From 62494528a8974eb46d8a302aa2bc8753b771ff74 Mon Sep 17 00:00:00 2001 From: maxrobot Date: Thu, 8 Aug 2024 10:07:56 +0100 Subject: [PATCH 1/2] feat: killed injective-protobuf --- Cargo.lock | 85 +- packages/injective-protobuf/.gitignore | 2 - packages/injective-protobuf/Cargo.toml | 28 - packages/injective-protobuf/README.md | 24 - packages/injective-protobuf/build.rs | 26 - .../injective/auction/v1beta1/auction.proto | 68 - .../injective/auction/v1beta1/genesis.proto | 22 - .../injective/auction/v1beta1/query.proto | 74 - .../proto/injective/auction/v1beta1/tx.proto | 49 - .../crypto/v1beta1/ethsecp256k1/keys.proto | 19 - .../injective/exchange/v1beta1/authz.proto | 76 - .../injective/exchange/v1beta1/events.proto | 211 - .../injective/exchange/v1beta1/exchange.proto | 904 - .../injective/exchange/v1beta1/genesis.proto | 237 - .../injective/exchange/v1beta1/query.proto | 1395 -- .../proto/injective/exchange/v1beta1/tx.proto | 1461 -- .../injective/insurance/v1beta1/genesis.proto | 29 - .../insurance/v1beta1/insurance.proto | 104 - .../injective/insurance/v1beta1/query.proto | 120 - .../injective/insurance/v1beta1/tx.proto | 111 - .../proto/injective/ocr/v1beta1/genesis.proto | 75 - .../proto/injective/ocr/v1beta1/ocr.proto | 330 - .../proto/injective/ocr/v1beta1/query.proto | 101 - .../proto/injective/ocr/v1beta1/tx.proto | 199 - .../injective/oracle/v1beta1/events.proto | 87 - .../injective/oracle/v1beta1/genesis.proto | 46 - .../injective/oracle/v1beta1/oracle.proto | 267 - .../injective/oracle/v1beta1/proposal.proto | 116 - .../injective/oracle/v1beta1/query.proto | 285 - .../proto/injective/oracle/v1beta1/tx.proto | 148 - .../injective/peggy/v1/attestation.proto | 62 - .../proto/injective/peggy/v1/batch.proto | 25 - .../injective/peggy/v1/ethereum_signer.proto | 14 - .../proto/injective/peggy/v1/events.proto | 148 - .../proto/injective/peggy/v1/genesis.proto | 31 - .../proto/injective/peggy/v1/msgs.proto | 278 - .../proto/injective/peggy/v1/params.proto | 132 - .../proto/injective/peggy/v1/pool.proto | 17 - .../proto/injective/peggy/v1/proposal.proto | 29 - .../proto/injective/peggy/v1/query.proto | 222 - .../proto/injective/peggy/v1/types.proto | 48 - .../v1beta1/authorityMetadata.proto | 17 - .../tokenfactory/v1beta1/events.proto | 34 - .../tokenfactory/v1beta1/genesis.proto | 32 - .../tokenfactory/v1beta1/params.proto | 18 - .../tokenfactory/v1beta1/query.proto | 88 - .../injective/tokenfactory/v1beta1/tx.proto | 136 - .../injective/types/v1beta1/account.proto | 25 - .../injective/types/v1beta1/tx_ext.proto | 22 - .../injective/types/v1beta1/tx_response.proto | 14 - .../proto/injective/wasmx/v1/events.proto | 13 - .../proto/injective/wasmx/v1/genesis.proto | 24 - .../proto/injective/wasmx/v1/proposal.proto | 92 - .../proto/injective/wasmx/v1/query.proto | 53 - .../proto/injective/wasmx/v1/tx.proto | 106 - .../proto/injective/wasmx/v1/wasmx.proto | 54 - packages/injective-protobuf/rustfmt.toml | 1 - .../injective-protobuf/scripts/protoexport.sh | 10 - packages/injective-protobuf/src/lib.rs | 1 - .../injective-protobuf/src/proto/.gitkeep | 0 .../injective-protobuf/src/proto/account.rs | 212 - packages/injective-protobuf/src/proto/auth.rs | 917 - packages/injective-protobuf/src/proto/coin.rs | 370 - .../src/proto/distribution.rs | 2262 -- .../injective-protobuf/src/proto/exchange.rs | 12717 ---------- packages/injective-protobuf/src/proto/mod.rs | 9 - .../injective-protobuf/src/proto/oracle.rs | 5059 ---- packages/injective-protobuf/src/proto/tx.rs | 20268 ---------------- .../third_party/proto/amino/amino.proto | 84 - .../cosmos/app/runtime/v1alpha1/module.proto | 65 - .../proto/cosmos/app/v1alpha1/config.proto | 55 - .../proto/cosmos/app/v1alpha1/module.proto | 91 - .../proto/cosmos/app/v1alpha1/query.proto | 22 - .../proto/cosmos/auth/module/v1/module.proto | 31 - .../proto/cosmos/auth/v1beta1/auth.proto | 66 - .../proto/cosmos/auth/v1beta1/genesis.proto | 18 - .../proto/cosmos/auth/v1beta1/query.proto | 236 - .../proto/cosmos/auth/v1beta1/tx.proto | 43 - .../proto/cosmos/authz/module/v1/module.proto | 12 - .../proto/cosmos/authz/v1beta1/authz.proto | 48 - .../proto/cosmos/authz/v1beta1/event.proto | 27 - .../proto/cosmos/authz/v1beta1/genesis.proto | 14 - .../proto/cosmos/authz/v1beta1/query.proto | 82 - .../proto/cosmos/authz/v1beta1/tx.proto | 81 - .../proto/cosmos/autocli/v1/options.proto | 134 - .../proto/cosmos/autocli/v1/query.proto | 28 - .../proto/cosmos/bank/module/v1/module.proto | 20 - .../proto/cosmos/bank/v1beta1/authz.proto | 31 - .../proto/cosmos/bank/v1beta1/bank.proto | 125 - .../proto/cosmos/bank/v1beta1/genesis.proto | 54 - .../proto/cosmos/bank/v1beta1/query.proto | 376 - .../proto/cosmos/bank/v1beta1/tx.proto | 124 - .../proto/cosmos/base/abci/v1beta1/abci.proto | 181 - .../cosmos/base/node/v1beta1/query.proto | 43 - .../base/query/v1beta1/pagination.proto | 56 - .../base/reflection/v1beta1/reflection.proto | 44 - .../base/reflection/v2alpha1/reflection.proto | 218 - .../base/tendermint/v1beta1/query.proto | 208 - .../base/tendermint/v1beta1/types.proto | 52 - .../proto/cosmos/base/v1beta1/coin.proto | 41 - .../cosmos/circuit/module/v1/module.proto | 15 - .../proto/cosmos/circuit/v1/query.proto | 61 - .../proto/cosmos/circuit/v1/tx.proto | 83 - .../proto/cosmos/circuit/v1/types.proto | 49 - .../cosmos/consensus/module/v1/module.proto | 15 - .../proto/cosmos/consensus/v1/query.proto | 27 - .../proto/cosmos/consensus/v1/tx.proto | 46 - .../cosmos/crisis/module/v1/module.proto | 18 - .../proto/cosmos/crisis/v1beta1/genesis.proto | 15 - .../proto/cosmos/crisis/v1beta1/tx.proto | 65 - .../proto/cosmos/crypto/ed25519/keys.proto | 39 - .../proto/cosmos/crypto/hd/v1/hd.proto | 27 - .../cosmos/crypto/keyring/v1/record.proto | 48 - .../proto/cosmos/crypto/multisig/keys.proto | 30 - .../crypto/multisig/v1beta1/multisig.proto | 25 - .../proto/cosmos/crypto/secp256k1/keys.proto | 38 - .../proto/cosmos/crypto/secp256r1/keys.proto | 23 - .../distribution/module/v1/module.proto | 17 - .../distribution/v1beta1/distribution.proto | 194 - .../cosmos/distribution/v1beta1/genesis.proto | 155 - .../cosmos/distribution/v1beta1/query.proto | 255 - .../cosmos/distribution/v1beta1/tx.proto | 215 - .../cosmos/evidence/module/v1/module.proto | 12 - .../cosmos/evidence/v1beta1/evidence.proto | 31 - .../cosmos/evidence/v1beta1/genesis.proto | 12 - .../proto/cosmos/evidence/v1beta1/query.proto | 56 - .../proto/cosmos/evidence/v1beta1/tx.proto | 42 - .../cosmos/feegrant/module/v1/module.proto | 12 - .../cosmos/feegrant/v1beta1/feegrant.proto | 96 - .../cosmos/feegrant/v1beta1/genesis.proto | 14 - .../proto/cosmos/feegrant/v1beta1/query.proto | 84 - .../proto/cosmos/feegrant/v1beta1/tx.proto | 57 - .../cosmos/genutil/module/v1/module.proto | 12 - .../cosmos/genutil/v1beta1/genesis.proto | 18 - .../proto/cosmos/gov/module/v1/module.proto | 19 - .../proto/cosmos/gov/v1/genesis.proto | 40 - .../third_party/proto/cosmos/gov/v1/gov.proto | 262 - .../proto/cosmos/gov/v1/query.proto | 205 - .../third_party/proto/cosmos/gov/v1/tx.proto | 213 - .../proto/cosmos/gov/v1beta1/genesis.proto | 30 - .../proto/cosmos/gov/v1beta1/gov.proto | 254 - .../proto/cosmos/gov/v1beta1/query.proto | 194 - .../proto/cosmos/gov/v1beta1/tx.proto | 134 - .../proto/cosmos/group/module/v1/module.proto | 24 - .../proto/cosmos/group/v1/events.proto | 94 - .../proto/cosmos/group/v1/genesis.proto | 39 - .../proto/cosmos/group/v1/query.proto | 320 - .../proto/cosmos/group/v1/tx.proto | 394 - .../proto/cosmos/group/v1/types.proto | 339 - .../proto/cosmos/mint/module/v1/module.proto | 17 - .../proto/cosmos/mint/v1beta1/genesis.proto | 17 - .../proto/cosmos/mint/v1beta1/mint.proto | 62 - .../proto/cosmos/mint/v1beta1/query.proto | 68 - .../proto/cosmos/mint/v1beta1/tx.proto | 43 - .../proto/cosmos/msg/textual/v1/textual.proto | 18 - .../third_party/proto/cosmos/msg/v1/msg.proto | 30 - .../proto/cosmos/nft/module/v1/module.proto | 12 - .../proto/cosmos/nft/v1beta1/event.proto | 43 - .../proto/cosmos/nft/v1beta1/genesis.proto | 24 - .../proto/cosmos/nft/v1beta1/nft.proto | 48 - .../proto/cosmos/nft/v1beta1/query.proto | 152 - .../proto/cosmos/nft/v1beta1/tx.proto | 34 - .../cosmos/orm/module/v1alpha1/module.proto | 14 - .../cosmos/orm/query/v1alpha1/query.proto | 131 - .../third_party/proto/cosmos/orm/v1/orm.proto | 107 - .../proto/cosmos/orm/v1alpha1/schema.proto | 58 - .../cosmos/params/module/v1/module.proto | 12 - .../proto/cosmos/params/v1beta1/params.proto | 28 - .../proto/cosmos/params/v1beta1/query.proto | 63 - .../proto/cosmos/query/v1/query.proto | 35 - .../cosmos/reflection/v1/reflection.proto | 27 - .../cosmos/slashing/module/v1/module.proto | 15 - .../cosmos/slashing/v1beta1/genesis.proto | 48 - .../proto/cosmos/slashing/v1beta1/query.proto | 66 - .../cosmos/slashing/v1beta1/slashing.proto | 68 - .../proto/cosmos/slashing/v1beta1/tx.proto | 67 - .../cosmos/staking/module/v1/module.proto | 26 - .../proto/cosmos/staking/v1beta1/authz.proto | 51 - .../cosmos/staking/v1beta1/genesis.proto | 55 - .../proto/cosmos/staking/v1beta1/query.proto | 387 - .../cosmos/staking/v1beta1/staking.proto | 394 - .../proto/cosmos/staking/v1beta1/tx.proto | 206 - .../cosmos/store/internal/kv/v1beta1/kv.proto | 19 - .../cosmos/store/snapshots/v1/snapshot.proto | 67 - .../cosmos/store/streaming/abci/grpc.proto | 36 - .../cosmos/store/v1beta1/commit_info.proto | 32 - .../cosmos/store/v1beta1/listening.proto | 28 - .../proto/cosmos/tx/config/v1/config.proto | 20 - .../cosmos/tx/signing/v1beta1/signing.proto | 108 - .../proto/cosmos/tx/v1beta1/service.proto | 293 - .../proto/cosmos/tx/v1beta1/tx.proto | 265 - .../cosmos/upgrade/module/v1/module.proto | 15 - .../proto/cosmos/upgrade/v1beta1/query.proto | 122 - .../proto/cosmos/upgrade/v1beta1/tx.proto | 62 - .../cosmos/upgrade/v1beta1/upgrade.proto | 94 - .../cosmos/vesting/module/v1/module.proto | 12 - .../proto/cosmos/vesting/v1beta1/tx.proto | 102 - .../cosmos/vesting/v1beta1/vesting.proto | 94 - .../proto/cosmos_proto/cosmos.proto | 97 - .../third_party/proto/gogoproto/gogo.proto | 145 - .../proto/google/api/annotations.proto | 31 - .../third_party/proto/google/api/http.proto | 379 - .../proto/tendermint/abci/types.proto | 486 - .../proto/tendermint/crypto/keys.proto | 17 - .../proto/tendermint/crypto/proof.proto | 41 - .../proto/tendermint/libs/bits/types.proto | 9 - .../proto/tendermint/p2p/types.proto | 34 - .../proto/tendermint/types/block.proto | 15 - .../proto/tendermint/types/evidence.proto | 38 - .../proto/tendermint/types/params.proto | 92 - .../proto/tendermint/types/types.proto | 178 - .../proto/tendermint/types/validator.proto | 37 - .../proto/tendermint/version/types.proto | 24 - .../third_party/proto/testpb/bank.proto | 50 - .../third_party/proto/testpb/bank_query.proto | 150 - .../proto/testpb/test_schema.proto | 142 - .../proto/testpb/test_schema_query.proto | 514 - 217 files changed, 4 insertions(+), 63706 deletions(-) delete mode 100644 packages/injective-protobuf/.gitignore delete mode 100644 packages/injective-protobuf/Cargo.toml delete mode 100644 packages/injective-protobuf/README.md delete mode 100644 packages/injective-protobuf/build.rs delete mode 100644 packages/injective-protobuf/proto/injective/auction/v1beta1/auction.proto delete mode 100644 packages/injective-protobuf/proto/injective/auction/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/proto/injective/auction/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/proto/injective/auction/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/proto/injective/crypto/v1beta1/ethsecp256k1/keys.proto delete mode 100644 packages/injective-protobuf/proto/injective/exchange/v1beta1/authz.proto delete mode 100644 packages/injective-protobuf/proto/injective/exchange/v1beta1/events.proto delete mode 100644 packages/injective-protobuf/proto/injective/exchange/v1beta1/exchange.proto delete mode 100644 packages/injective-protobuf/proto/injective/exchange/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/proto/injective/exchange/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/proto/injective/exchange/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/proto/injective/insurance/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/proto/injective/insurance/v1beta1/insurance.proto delete mode 100644 packages/injective-protobuf/proto/injective/insurance/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/proto/injective/insurance/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/proto/injective/ocr/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/proto/injective/ocr/v1beta1/ocr.proto delete mode 100644 packages/injective-protobuf/proto/injective/ocr/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/proto/injective/ocr/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/proto/injective/oracle/v1beta1/events.proto delete mode 100644 packages/injective-protobuf/proto/injective/oracle/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/proto/injective/oracle/v1beta1/oracle.proto delete mode 100644 packages/injective-protobuf/proto/injective/oracle/v1beta1/proposal.proto delete mode 100644 packages/injective-protobuf/proto/injective/oracle/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/proto/injective/oracle/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/attestation.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/batch.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/ethereum_signer.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/events.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/genesis.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/msgs.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/params.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/pool.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/proposal.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/query.proto delete mode 100644 packages/injective-protobuf/proto/injective/peggy/v1/types.proto delete mode 100644 packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/authorityMetadata.proto delete mode 100644 packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/events.proto delete mode 100644 packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/params.proto delete mode 100644 packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/proto/injective/types/v1beta1/account.proto delete mode 100644 packages/injective-protobuf/proto/injective/types/v1beta1/tx_ext.proto delete mode 100644 packages/injective-protobuf/proto/injective/types/v1beta1/tx_response.proto delete mode 100644 packages/injective-protobuf/proto/injective/wasmx/v1/events.proto delete mode 100644 packages/injective-protobuf/proto/injective/wasmx/v1/genesis.proto delete mode 100644 packages/injective-protobuf/proto/injective/wasmx/v1/proposal.proto delete mode 100644 packages/injective-protobuf/proto/injective/wasmx/v1/query.proto delete mode 100644 packages/injective-protobuf/proto/injective/wasmx/v1/tx.proto delete mode 100644 packages/injective-protobuf/proto/injective/wasmx/v1/wasmx.proto delete mode 100644 packages/injective-protobuf/rustfmt.toml delete mode 100755 packages/injective-protobuf/scripts/protoexport.sh delete mode 100644 packages/injective-protobuf/src/lib.rs delete mode 100644 packages/injective-protobuf/src/proto/.gitkeep delete mode 100644 packages/injective-protobuf/src/proto/account.rs delete mode 100644 packages/injective-protobuf/src/proto/auth.rs delete mode 100644 packages/injective-protobuf/src/proto/coin.rs delete mode 100644 packages/injective-protobuf/src/proto/distribution.rs delete mode 100644 packages/injective-protobuf/src/proto/exchange.rs delete mode 100644 packages/injective-protobuf/src/proto/mod.rs delete mode 100644 packages/injective-protobuf/src/proto/oracle.rs delete mode 100644 packages/injective-protobuf/src/proto/tx.rs delete mode 100644 packages/injective-protobuf/third_party/proto/amino/amino.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/app/runtime/v1alpha1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/config.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/auth/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/auth.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/authz/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/authz.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/event.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/autocli/v1/options.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/autocli/v1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/bank/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/authz.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/bank.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/base/abci/v1beta1/abci.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/base/node/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/base/query/v1beta1/pagination.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/base/reflection/v1beta1/reflection.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/base/tendermint/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/base/tendermint/v1beta1/types.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/base/v1beta1/coin.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/circuit/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/types.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/consensus/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/consensus/v1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/consensus/v1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crisis/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crisis/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crisis/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crypto/ed25519/keys.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crypto/hd/v1/hd.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crypto/keyring/v1/record.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crypto/multisig/keys.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crypto/multisig/v1beta1/multisig.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crypto/secp256k1/keys.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/crypto/secp256r1/keys.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/distribution/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/distribution.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/evidence/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/evidence.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/feegrant/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/genutil/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/genutil/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/gov/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/gov/v1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/gov/v1/gov.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/gov/v1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/gov/v1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/gov.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/group/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/group/v1/events.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/group/v1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/group/v1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/group/v1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/group/v1/types.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/mint/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/mint.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/msg/textual/v1/textual.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/msg/v1/msg.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/nft/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/event.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/nft.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/orm/module/v1alpha1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/orm/query/v1alpha1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/orm/v1/orm.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/orm/v1alpha1/schema.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/params/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/params/v1beta1/params.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/params/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/query/v1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/reflection/v1/reflection.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/slashing/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/slashing.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/staking/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/authz.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/genesis.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/staking.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/store/internal/kv/v1beta1/kv.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/store/snapshots/v1/snapshot.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/store/streaming/abci/grpc.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/store/v1beta1/commit_info.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/store/v1beta1/listening.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/tx/config/v1/config.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/tx/signing/v1beta1/signing.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/tx/v1beta1/service.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/tx/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/upgrade/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/vesting/module/v1/module.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/vesting/v1beta1/tx.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos/vesting/v1beta1/vesting.proto delete mode 100644 packages/injective-protobuf/third_party/proto/cosmos_proto/cosmos.proto delete mode 100644 packages/injective-protobuf/third_party/proto/gogoproto/gogo.proto delete mode 100644 packages/injective-protobuf/third_party/proto/google/api/annotations.proto delete mode 100644 packages/injective-protobuf/third_party/proto/google/api/http.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/abci/types.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/crypto/keys.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/crypto/proof.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/libs/bits/types.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/p2p/types.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/types/block.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/types/evidence.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/types/params.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/types/types.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/types/validator.proto delete mode 100644 packages/injective-protobuf/third_party/proto/tendermint/version/types.proto delete mode 100644 packages/injective-protobuf/third_party/proto/testpb/bank.proto delete mode 100644 packages/injective-protobuf/third_party/proto/testpb/bank_query.proto delete mode 100644 packages/injective-protobuf/third_party/proto/testpb/test_schema.proto delete mode 100644 packages/injective-protobuf/third_party/proto/testpb/test_schema_query.proto diff --git a/Cargo.lock b/Cargo.lock index 35e76fe9..9f2321ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1854,21 +1854,6 @@ dependencies = [ "subtle-encoding", ] -[[package]] -name = "injective-protobuf" -version = "0.3.0" -dependencies = [ - "cosmwasm-schema 1.5.5", - "cosmwasm-std 2.1.1", - "ethereum-types", - "num 0.4.3", - "protobuf", - "protobuf-codegen-pure", - "schemars", - "serde 1.0.204", - "subtle-encoding", -] - [[package]] name = "injective-std" version = "1.13.0" @@ -2156,24 +2141,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" dependencies = [ "num-bigint 0.1.44", - "num-complex 0.1.43", - "num-integer", - "num-iter", - "num-rational 0.1.42", - "num-traits", -] - -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint 0.4.6", - "num-complex 0.4.6", + "num-complex", "num-integer", "num-iter", - "num-rational 0.4.2", + "num-rational", "num-traits", ] @@ -2209,15 +2180,6 @@ dependencies = [ "rustc-serialize", ] -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -2267,17 +2229,6 @@ dependencies = [ "rustc-serialize", ] -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint 0.4.6", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -2565,34 +2516,6 @@ dependencies = [ "prost 0.12.6", ] -[[package]] -name = "protobuf" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" -dependencies = [ - "bytes", -] - -[[package]] -name = "protobuf-codegen" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033460afb75cf755fcfc16dfaed20b86468082a2ea24e05ac35ab4a099a017d6" -dependencies = [ - "protobuf", -] - -[[package]] -name = "protobuf-codegen-pure" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a29399fc94bcd3eeaa951c715f7bea69409b2445356b00519740bcd6ddd865" -dependencies = [ - "protobuf", - "protobuf-codegen", -] - [[package]] name = "quote" version = "1.0.36" @@ -3068,7 +2991,7 @@ version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c97b18e9e53de541f11e497357d6c5eaeb39f0cb9c8734e274abe4935f6991fa" dependencies = [ - "num 0.1.42", + "num", ] [[package]] @@ -3144,7 +3067,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aaee47e038bf9552d30380d3973fff2593ee0a76d81ad4c581f267cdcadf36" dependencies = [ - "num 0.1.42", + "num", "serde 0.6.15", ] diff --git a/packages/injective-protobuf/.gitignore b/packages/injective-protobuf/.gitignore deleted file mode 100644 index bf4e47ab..00000000 --- a/packages/injective-protobuf/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Protobuf -!src/proto/.gitkeep diff --git a/packages/injective-protobuf/Cargo.toml b/packages/injective-protobuf/Cargo.toml deleted file mode 100644 index 33a46037..00000000 --- a/packages/injective-protobuf/Cargo.toml +++ /dev/null @@ -1,28 +0,0 @@ -[package] -authors = [ "Mauro Lacy " ] -description = "Protobug parsing for Injective Protocol" -edition = "2021" -license = "Apache-2.0" -name = "injective-protobuf" -readme = "README.md" -repository = "https://github.com/InjectiveLabs/cw-injective/tree/dev/packages/injective-protobuf" -version = "0.3.0" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[build-dependencies] -protobuf-codegen-pure = "2" - -[features] - -[dependencies] -cosmwasm-std = { version = "2.1.0", features = [ "abort", "cosmwasm_1_2", "cosmwasm_1_3", "cosmwasm_1_4", "cosmwasm_2_0", "iterator", "stargate" ] } -ethereum-types = "0.5.2" -num = "0.4.0" -protobuf = { version = "2", features = [ "with-bytes" ] } -schemars = "0.8.8" -serde = { version = "1.0.136", default-features = false, features = [ "derive" ] } -subtle-encoding = { version = "0.5.1", features = [ "bech32-preview" ] } - -[dev-dependencies] -cosmwasm-schema = { version = "1.5.0" } diff --git a/packages/injective-protobuf/README.md b/packages/injective-protobuf/README.md deleted file mode 100644 index fafc8b33..00000000 --- a/packages/injective-protobuf/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# injective-protobuf - -Rust protobuf files generation for Injective messages. - -## Prerequisites - -- buf: `brew install bufbuild/buf/buf` on macOS or even Linux. See https://buf.build/docs/installation/ for detailed installation - instructions. - -## Usage - -- `./scripts/protoexport.sh` - - Downloads / Updates Injective and Cosmos SDK protobuf files under `./proto` and `./third_party/proto/`, using `buf`. - -- `cargo build` - - Generates the Rust protobuf files under `./src/proto`. - -## Maintenance - -- The specific version / tag of the Injective and Cosmos SDK proto files should be indicated in the `protoexport.sh` file. - -This is something that must be checked as part of each major release, and the `sdk-go` and `cosmos-sdk` reference updated accordingly. diff --git a/packages/injective-protobuf/build.rs b/packages/injective-protobuf/build.rs deleted file mode 100644 index 4ce868bf..00000000 --- a/packages/injective-protobuf/build.rs +++ /dev/null @@ -1,26 +0,0 @@ -use protobuf_codegen_pure::Customize; - -fn main() { - let customizer = Customize { - gen_mod_rs: Some(true), - lite_runtime: Some(true), - ..Default::default() - }; - - protobuf_codegen_pure::Codegen::new() - .out_dir("src/proto") - // TODO: Add more inputs as needed - .inputs([ - "third_party/proto/cosmos/auth/v1beta1/auth.proto", - "third_party/proto/cosmos/base/v1beta1/coin.proto", - "third_party/proto/cosmos/distribution/v1beta1/distribution.proto", - "proto/injective/exchange/v1beta1/exchange.proto", - "proto/injective/exchange/v1beta1/tx.proto", - "proto/injective/oracle/v1beta1/oracle.proto", - "proto/injective/types/v1beta1/account.proto", - ]) - .includes(["proto", "third_party/proto"]) - .customize(customizer) - .run() - .expect("Protobuf codegen failed."); -} diff --git a/packages/injective-protobuf/proto/injective/auction/v1beta1/auction.proto b/packages/injective-protobuf/proto/injective/auction/v1beta1/auction.proto deleted file mode 100644 index 530859f1..00000000 --- a/packages/injective-protobuf/proto/injective/auction/v1beta1/auction.proto +++ /dev/null @@ -1,68 +0,0 @@ -syntax = "proto3"; -package injective.auction.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/auction/types"; - -message Params { - option (gogoproto.equal) = true; - - // auction_period_duration defines the auction period duration - int64 auction_period = 1; - // min_next_bid_increment_rate defines the minimum increment rate for new bids - string min_next_bid_increment_rate = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message Bid { - string bidder = 1 [ - (gogoproto.jsontag) = "bidder", - (gogoproto.moretags) = "yaml:\"bidder\"" - ]; - - string amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; -} - -message EventBid { - // bidder describes the address of bidder - string bidder = 1; - // amount describes the amount the bidder put on the auction - string amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - // round defines the round number of auction - uint64 round = 3; -} - -message EventAuctionResult { - // winner describes the address of the winner - string winner = 1; - // amount describes the amount the winner get from the auction - string amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - // round defines the round number of auction - uint64 round = 3; -} - -message EventAuctionStart { - // round defines the round number of auction - uint64 round = 1; - // ending_timestamp describes auction end time - int64 ending_timestamp = 2; - // new_basket describes auction module balance at the time of new auction - // start - repeated cosmos.base.v1beta1.Coin new_basket = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/auction/v1beta1/genesis.proto b/packages/injective-protobuf/proto/injective/auction/v1beta1/genesis.proto deleted file mode 100644 index f0c9e155..00000000 --- a/packages/injective-protobuf/proto/injective/auction/v1beta1/genesis.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package injective.auction.v1beta1; - -import "injective/auction/v1beta1/auction.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/auction/types"; - -// GenesisState defines the auction module's genesis state. -message GenesisState { - // params defines all the parameters of related to auction. - Params params = 1 [ (gogoproto.nullable) = false ]; - - // current auction round - uint64 auction_round = 2; - - // current highest bid - Bid highest_bid = 3; - - // auction ending timestamp - int64 auction_ending_timestamp = 4; -} diff --git a/packages/injective-protobuf/proto/injective/auction/v1beta1/query.proto b/packages/injective-protobuf/proto/injective/auction/v1beta1/query.proto deleted file mode 100644 index 2a546f5f..00000000 --- a/packages/injective-protobuf/proto/injective/auction/v1beta1/query.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; -package injective.auction.v1beta1; - -import "google/api/annotations.proto"; -import "injective/auction/v1beta1/auction.proto"; -import "injective/auction/v1beta1/genesis.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/auction/types"; - -// Query defines the gRPC querier service. -service Query { - - // Retrieves auction params - rpc AuctionParams(QueryAuctionParamsRequest) - returns (QueryAuctionParamsResponse) { - option (google.api.http).get = "/injective/auction/v1beta1/params"; - } - - // Retrieves current auction basket with current highest bid and bidder - rpc CurrentAuctionBasket(QueryCurrentAuctionBasketRequest) - returns (QueryCurrentAuctionBasketResponse) { - option (google.api.http).get = "/injective/auction/v1beta1/basket"; - }; - - // Retrieves the entire auction module's state - rpc AuctionModuleState(QueryModuleStateRequest) - returns (QueryModuleStateResponse) { - option (google.api.http).get = "/injective/auction/v1beta1/module_state"; - } -} - -// QueryAuctionParamsRequest is the request type for the Query/AuctionParams RPC -// method. -message QueryAuctionParamsRequest {} - -// QueryAuctionParamsRequest is the response type for the Query/AuctionParams -// RPC method. -message QueryAuctionParamsResponse { - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryCurrentAuctionBasketRequest is the request type for the -// Query/CurrentAuctionBasket RPC method. -message QueryCurrentAuctionBasketRequest {} - -// QueryCurrentAuctionBasketResponse is the response type for the -// Query/CurrentAuctionBasket RPC method. -message QueryCurrentAuctionBasketResponse { - // amount describes the amount put on auction - repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false - ]; - // auctionRound describes current auction round - uint64 auctionRound = 2; - // auctionClosingTime describes auction close time for the round - int64 auctionClosingTime = 3; - // highestBidder describes highest bidder on current round - string highestBidder = 4; - // highestBidAmount describes highest bid amount on current round - string highestBidAmount = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -// QueryModuleStateRequest is the request type for the Query/AuctionModuleState -// RPC method. -message QueryModuleStateRequest {} - -// QueryModuleStateResponse is the response type for the -// Query/AuctionModuleState RPC method. -message QueryModuleStateResponse { GenesisState state = 1; } \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/auction/v1beta1/tx.proto b/packages/injective-protobuf/proto/injective/auction/v1beta1/tx.proto deleted file mode 100644 index 9e7eb5b9..00000000 --- a/packages/injective-protobuf/proto/injective/auction/v1beta1/tx.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; -package injective.auction.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/msg/v1/msg.proto"; -import "cosmos_proto/cosmos.proto"; -import "injective/auction/v1beta1/auction.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/auction/types"; - -// Msg defines the auction Msg service. -service Msg { - - // Bid defines a method for placing a bid for an auction - rpc Bid(MsgBid) returns (MsgBidResponse); - - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// Bid defines a SDK message for placing a bid for an auction -message MsgBid { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // amount of the bid in INJ tokens - cosmos.base.v1beta1.Coin bid_amount = 2 [ (gogoproto.nullable) = false ]; - // the current auction round being bid on - uint64 round = 3; -} - -message MsgBidResponse {} - -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // params defines the ocr parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [ (gogoproto.nullable) = false ]; -} - -message MsgUpdateParamsResponse {} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/crypto/v1beta1/ethsecp256k1/keys.proto b/packages/injective-protobuf/proto/injective/crypto/v1beta1/ethsecp256k1/keys.proto deleted file mode 100644 index cb30e830..00000000 --- a/packages/injective-protobuf/proto/injective/crypto/v1beta1/ethsecp256k1/keys.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package injective.crypto.v1beta1.ethsecp256k1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/crypto/ethsecp256k1"; - -// PubKey defines a type alias for an ecdsa.PublicKey that implements -// Tendermint's PubKey interface. It represents the 33-byte compressed public -// key format. -message PubKey { - option (gogoproto.goproto_stringer) = false; - - bytes key = 1; -} - -// PrivKey defines a type alias for an ecdsa.PrivateKey that implements -// Tendermint's PrivateKey interface. -message PrivKey { bytes key = 1; } diff --git a/packages/injective-protobuf/proto/injective/exchange/v1beta1/authz.proto b/packages/injective-protobuf/proto/injective/exchange/v1beta1/authz.proto deleted file mode 100644 index 6c9f540d..00000000 --- a/packages/injective-protobuf/proto/injective/exchange/v1beta1/authz.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; -package injective.exchange.v1beta1; - -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types"; - -// spot authz messages -message CreateSpotLimitOrderAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -message CreateSpotMarketOrderAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -message BatchCreateSpotLimitOrdersAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -message CancelSpotOrderAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -message BatchCancelSpotOrdersAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -// derivative authz messages -message CreateDerivativeLimitOrderAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -message CreateDerivativeMarketOrderAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -message BatchCreateDerivativeLimitOrdersAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -message CancelDerivativeOrderAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -message BatchCancelDerivativeOrdersAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string market_ids = 2; -} - -// common authz message used in both spot & derivative markets -message BatchUpdateOrdersAuthz { - option (cosmos_proto.implements_interface) = "Authorization"; - string subaccount_id = 1; - repeated string spot_markets = 2; - repeated string derivative_markets = 3; -} diff --git a/packages/injective-protobuf/proto/injective/exchange/v1beta1/events.proto b/packages/injective-protobuf/proto/injective/exchange/v1beta1/events.proto deleted file mode 100644 index 22d30340..00000000 --- a/packages/injective-protobuf/proto/injective/exchange/v1beta1/events.proto +++ /dev/null @@ -1,211 +0,0 @@ -syntax = "proto3"; -package injective.exchange.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "injective/oracle/v1beta1/oracle.proto"; -import "injective/exchange/v1beta1/exchange.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types"; - -message EventBatchSpotExecution { - string market_id = 1; - bool is_buy = 2; - ExecutionType executionType = 3; - repeated TradeLog trades = 4; -} - -message EventBatchDerivativeExecution { - string market_id = 1; - bool is_buy = 2; - bool is_liquidation = 3; - // nil for time expiry futures - string cumulative_funding = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - ExecutionType executionType = 5; - repeated DerivativeTradeLog trades = 6; -} - -message EventLostFundsFromLiquidation { - string market_id = 1; - bytes subaccount_id = 2; - string lost_funds_from_available_during_payout = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string lost_funds_from_order_cancels = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message EventBatchDerivativePosition { - string market_id = 1; - repeated SubaccountPosition positions = 2; -} - -message EventDerivativeMarketPaused { - string market_id = 1; - string settle_price = 2; - string total_missing_funds = 3; - string missing_funds_rate = 4; -} - -message EventMarketBeyondBankruptcy { - string market_id = 1; - string settle_price = 2; - string missing_market_funds = 3; -} - -message EventAllPositionsHaircut { - string market_id = 1; - string settle_price = 2; - string missing_funds_rate = 3; -} - -message EventBinaryOptionsMarketUpdate { - BinaryOptionsMarket market = 1 [ (gogoproto.nullable) = false ]; -} - -message EventNewSpotOrders { - string market_id = 1; - repeated SpotLimitOrder buy_orders = 2; - repeated SpotLimitOrder sell_orders = 3; -} - -message EventNewDerivativeOrders { - string market_id = 1; - repeated DerivativeLimitOrder buy_orders = 2; - repeated DerivativeLimitOrder sell_orders = 3; -} - -message EventCancelSpotOrder { - string market_id = 1; - SpotLimitOrder order = 2 [ (gogoproto.nullable) = false ]; -} - -message EventSpotMarketUpdate { - SpotMarket market = 1 [ (gogoproto.nullable) = false ]; -} - -message EventPerpetualMarketUpdate { - DerivativeMarket market = 1 [ (gogoproto.nullable) = false ]; - PerpetualMarketInfo perpetual_market_info = 2 [ (gogoproto.nullable) = true ]; - PerpetualMarketFunding funding = 3 [ (gogoproto.nullable) = true ]; -} - -message EventExpiryFuturesMarketUpdate { - DerivativeMarket market = 1 [ (gogoproto.nullable) = false ]; - ExpiryFuturesMarketInfo expiry_futures_market_info = 3 - [ (gogoproto.nullable) = true ]; -} - -message EventPerpetualMarketFundingUpdate { - string market_id = 1; - PerpetualMarketFunding funding = 2 [ (gogoproto.nullable) = false ]; - bool is_hourly_funding = 3; - string funding_rate = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - string mark_price = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -message EventSubaccountDeposit { - string src_address = 1; - bytes subaccount_id = 2; - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; -} - -message EventSubaccountWithdraw { - bytes subaccount_id = 1; - string dst_address = 2; - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; -} - -message EventSubaccountBalanceTransfer { - string src_subaccount_id = 1; - string dst_subaccount_id = 2; - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; -} - -message EventBatchDepositUpdate { repeated DepositUpdate deposit_updates = 1; } - -message DerivativeMarketOrderCancel { - DerivativeMarketOrder market_order = 1 [ (gogoproto.nullable) = true ]; - string cancel_quantity = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message EventCancelDerivativeOrder { - string market_id = 1; - bool isLimitCancel = 2; - DerivativeLimitOrder limit_order = 3 [ (gogoproto.nullable) = true ]; - DerivativeMarketOrderCancel market_order_cancel = 4 - [ (gogoproto.nullable) = true ]; -} - -message EventFeeDiscountSchedule { FeeDiscountSchedule schedule = 1; } - -message EventTradingRewardCampaignUpdate { - TradingRewardCampaignInfo campaign_info = 1; - repeated CampaignRewardPool campaign_reward_pools = 2; -} - -message EventTradingRewardDistribution { - repeated AccountRewards account_rewards = 1; -} - -message EventNewConditionalDerivativeOrder { - string market_id = 1; - DerivativeOrder order = 2; - bytes hash = 3; - bool is_market = 4; -} - -message EventCancelConditionalDerivativeOrder { - string market_id = 1; - bool isLimitCancel = 2; - DerivativeLimitOrder limit_order = 3 [ (gogoproto.nullable) = true ]; - DerivativeMarketOrder market_order = 4 [ (gogoproto.nullable) = true ]; -} - -message EventConditionalDerivativeOrderTrigger { - bytes market_id = 1; - bool isLimitTrigger = 2; - bytes triggered_order_hash = 3; - bytes placed_order_hash = 4; -} - -message EventOrderFail { - bytes account = 1; - repeated bytes hashes = 2; - repeated uint32 flags = 3; -} - -message EventAtomicMarketOrderFeeMultipliersUpdated { - repeated MarketFeeMultiplier market_fee_multipliers = 1; -} - -message EventOrderbookUpdate { - repeated OrderbookUpdate spot_updates = 1; - repeated OrderbookUpdate derivative_updates = 2; -} - -message OrderbookUpdate { - uint64 seq = 1; - Orderbook orderbook = 2; -} - -message Orderbook { - bytes market_id = 1; - repeated Level buy_levels = 2; - repeated Level sell_levels = 3; -} diff --git a/packages/injective-protobuf/proto/injective/exchange/v1beta1/exchange.proto b/packages/injective-protobuf/proto/injective/exchange/v1beta1/exchange.proto deleted file mode 100644 index 2d9e07b8..00000000 --- a/packages/injective-protobuf/proto/injective/exchange/v1beta1/exchange.proto +++ /dev/null @@ -1,904 +0,0 @@ -syntax = "proto3"; -package injective.exchange.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "injective/oracle/v1beta1/oracle.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types"; - -enum AtomicMarketOrderAccessLevel { - Nobody = 0; - // currently unsupported - BeginBlockerSmartContractsOnly = 1; - SmartContractsOnly = 2; - Everyone = 3; -} - -message Params { - option (gogoproto.equal) = true; - - // spot_market_instant_listing_fee defines the expedited fee in INJ required - // to create a spot market by bypassing governance - cosmos.base.v1beta1.Coin spot_market_instant_listing_fee = 1 - [ (gogoproto.nullable) = false ]; - - // derivative_market_instant_listing_fee defines the expedited fee in INJ - // required to create a derivative market by bypassing governance - cosmos.base.v1beta1.Coin derivative_market_instant_listing_fee = 2 - [ (gogoproto.nullable) = false ]; - - // default_spot_maker_fee defines the default exchange trade fee for makers on - // a spot market - string default_spot_maker_fee_rate = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // default_spot_taker_fee_rate defines the default exchange trade fee rate for - // takers on a new spot market - string default_spot_taker_fee_rate = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // default_derivative_maker_fee defines the default exchange trade fee for - // makers on a new derivative market - string default_derivative_maker_fee_rate = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // default_derivative_taker_fee defines the default exchange trade fee for - // takers on a new derivative market - string default_derivative_taker_fee_rate = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // default_initial_margin_ratio defines the default initial margin ratio on a - // new derivative market - string default_initial_margin_ratio = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // default_maintenance_margin_ratio defines the default maintenance margin - // ratio on a new derivative market - string default_maintenance_margin_ratio = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // default_funding_interval defines the default funding interval on a - // derivative market - int64 default_funding_interval = 9; - - // funding_multiple defines the timestamp multiple that the funding timestamp - // should be a multiple of - int64 funding_multiple = 10; - - // relayer_fee_share_rate defines the trade fee share percentage that goes to - // relayers - string relayer_fee_share_rate = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // default_hourly_funding_rate_cap defines the default maximum absolute value - // of the hourly funding rate - string default_hourly_funding_rate_cap = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // hourly_interest_rate defines the hourly interest rate - string default_hourly_interest_rate = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // max_derivative_order_side_count defines the maximum number of derivative - // active orders a subaccount can have for a given orderbook side - uint32 max_derivative_order_side_count = 14; - - // inj_reward_staked_requirement_threshold defines the threshold on INJ - // rewards after which one also needs staked INJ to receive more - string inj_reward_staked_requirement_threshold = 15 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - - // the trading_rewards_vesting_duration defines the vesting times for trading - // rewards - int64 trading_rewards_vesting_duration = 16; - - // liquidator_reward_share_rate defines the ratio of the split of the surplus - // collateral that goes to the liquidator - string liquidator_reward_share_rate = 17 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // binary_options_market_instant_listing_fee defines the expedited fee in INJ - // required to create a derivative market by bypassing governance - cosmos.base.v1beta1.Coin binary_options_market_instant_listing_fee = 18 - [ (gogoproto.nullable) = false ]; - // atomic_market_order_access_level defines the required access permissions - // for executing atomic market orders - AtomicMarketOrderAccessLevel atomic_market_order_access_level = 19; - - // spot_atomic_market_order_fee_multiplier defines the default multiplier for - // executing atomic market orders in spot markets - string spot_atomic_market_order_fee_multiplier = 20 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // derivative_atomic_market_order_fee_multiplier defines the default - // multiplier for executing atomic market orders in derivative markets - string derivative_atomic_market_order_fee_multiplier = 21 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // binary_options_atomic_market_order_fee_multiplier defines the default - // multiplier for executing atomic market orders in binary markets - string binary_options_atomic_market_order_fee_multiplier = 22 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // minimal_protocol_fee_rate defines the minimal protocol fee rate - string minimal_protocol_fee_rate = 23 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // is_instant_derivative_market_launch_enabled defines whether instant - // derivative market launch is enabled - bool is_instant_derivative_market_launch_enabled = 24; -} - -enum MarketStatus { - Unspecified = 0; - Active = 1; - Paused = 2; - Demolished = 3; - Expired = 4; -} - -message MarketFeeMultiplier { - option (gogoproto.goproto_getters) = false; - - string market_id = 1; - - string fee_multiplier = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// An object describing a derivative market in the Injective Futures Protocol. -message DerivativeMarket { - option (gogoproto.goproto_getters) = false; - - // Ticker for the derivative contract. - string ticker = 1; - // Oracle base currency - string oracle_base = 2; - // Oracle quote currency - string oracle_quote = 3; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 4; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 5; - // Address of the quote currency denomination for the derivative contract - string quote_denom = 6; - // Unique market ID. - string market_id = 7; - // initial_margin_ratio defines the initial margin ratio of a derivative - // market - string initial_margin_ratio = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // maintenance_margin_ratio defines the maintenance margin ratio of a - // derivative market - string maintenance_margin_ratio = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // maker_fee_rate defines the maker fee rate of a derivative market - string maker_fee_rate = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // taker_fee_rate defines the taker fee rate of a derivative market - string taker_fee_rate = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // relayer_fee_share_rate defines the percentage of the transaction fee shared - // with the relayer in a derivative market - string relayer_fee_share_rate = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // true if the market is a perpetual market. false if the market is an expiry - // futures market - bool isPerpetual = 13; - // Status of the market - MarketStatus status = 14; - // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market - string min_price_tick_size = 15 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market - string min_quantity_tick_size = 16 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} -// An object describing a binary options market in Injective Protocol. -message BinaryOptionsMarket { - option (gogoproto.goproto_getters) = false; - - // Ticker for the derivative contract. - string ticker = 1; - // Oracle symbol - string oracle_symbol = 2; - // Oracle Provider - string oracle_provider = 3; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 4; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 5; - // expiration timestamp - int64 expiration_timestamp = 6; - // expiration timestamp - int64 settlement_timestamp = 7; - // admin of the market - string admin = 8; - // Address of the quote currency denomination for the binary options contract - string quote_denom = 9; - // Unique market ID. - string market_id = 10; - // maker_fee_rate defines the maker fee rate of a binary options market - string maker_fee_rate = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // taker_fee_rate defines the taker fee rate of a derivative market - string taker_fee_rate = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // relayer_fee_share_rate defines the percentage of the transaction fee shared - // with the relayer in a derivative market - string relayer_fee_share_rate = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // Status of the market - MarketStatus status = 14; - // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market - string min_price_tick_size = 15 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market - string min_quantity_tick_size = 16 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - string settlement_price = 17 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -message ExpiryFuturesMarketInfo { - // market ID. - string market_id = 1; - // expiration_timestamp defines the expiration time for a time expiry futures - // market. - int64 expiration_timestamp = 2; - // expiration_twap_start_timestamp defines the start time of the TWAP - // calculation window - int64 twap_start_timestamp = 3; - // expiration_twap_start_price_cumulative defines the cumulative price for the - // start of the TWAP window - string expiration_twap_start_price_cumulative = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // settlement_price defines the settlement price for a time expiry futures - // market. - string settlement_price = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message PerpetualMarketInfo { - // market ID. - string market_id = 1; - // hourly_funding_rate_cap defines the maximum absolute value of the hourly - // funding rate - string hourly_funding_rate_cap = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // hourly_interest_rate defines the hourly interest rate - string hourly_interest_rate = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // next_funding_timestamp defines the next funding timestamp in seconds of a - // perpetual market - int64 next_funding_timestamp = 4; - // funding_interval defines the next funding interval in seconds of a - // perpetual market. - int64 funding_interval = 5; -} - -message PerpetualMarketFunding { - // cumulative_funding defines the cumulative funding of a perpetual market. - string cumulative_funding = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // cumulative_price defines the cumulative price for the current hour up to - // the last timestamp - string cumulative_price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - int64 last_timestamp = 3; -} - -message DerivativeMarketSettlementInfo { - // market ID. - string market_id = 1; - // settlement_price defines the settlement price - string settlement_price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message NextFundingTimestamp { int64 next_timestamp = 1; } - -message MidPriceAndTOB { - // mid price of the market - string mid_price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // best buy price of the market - string best_buy_price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // best sell price of the market - string best_sell_price = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -// An object describing trade pair of two assets. -message SpotMarket { - // A name of the pair in format AAA/BBB, where AAA is base asset, BBB is quote - // asset. - string ticker = 1; - // Coin denom used for the base asset - string base_denom = 2; - // Coin used for the quote asset - string quote_denom = 3; - // maker_fee_rate defines the fee percentage makers pay when trading - string maker_fee_rate = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // taker_fee_rate defines the fee percentage takers pay when trading - string taker_fee_rate = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // relayer_fee_share_rate defines the percentage of the transaction fee shared - // with the relayer in a derivative market - string relayer_fee_share_rate = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // Unique market ID. - string market_id = 7; - // Status of the market - MarketStatus status = 8; - // min_price_tick_size defines the minimum tick size that the price required - // for orders in the market - string min_price_tick_size = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market - string min_quantity_tick_size = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// A subaccount's deposit for a given base currency -message Deposit { - string available_balance = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string total_balance = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message SubaccountTradeNonce { uint32 nonce = 1; } - -message OrderInfo { - // bytes32 subaccount ID that created the order - string subaccount_id = 1; - // address fee_recipient address that will receive fees for the order - string fee_recipient = 2; - // price of the order - string price = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // quantity of the order - string quantity = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -enum OrderType { - UNSPECIFIED = 0 [ (gogoproto.enumvalue_customname) = "UNSPECIFIED" ]; - BUY = 1 [ (gogoproto.enumvalue_customname) = "BUY" ]; - SELL = 2 [ (gogoproto.enumvalue_customname) = "SELL" ]; - STOP_BUY = 3 [ (gogoproto.enumvalue_customname) = "STOP_BUY" ]; - STOP_SELL = 4 [ (gogoproto.enumvalue_customname) = "STOP_SELL" ]; - TAKE_BUY = 5 [ (gogoproto.enumvalue_customname) = "TAKE_BUY" ]; - TAKE_SELL = 6 [ (gogoproto.enumvalue_customname) = "TAKE_SELL" ]; - BUY_PO = 7 [ (gogoproto.enumvalue_customname) = "BUY_PO" ]; - SELL_PO = 8 [ (gogoproto.enumvalue_customname) = "SELL_PO" ]; - BUY_ATOMIC = 9 [ (gogoproto.enumvalue_customname) = "BUY_ATOMIC" ]; - SELL_ATOMIC = 10 [ (gogoproto.enumvalue_customname) = "SELL_ATOMIC" ]; -} - -message SpotOrder { - // market_id represents the unique ID of the market - string market_id = 1; - // order_info contains the information of the order - OrderInfo order_info = 2 [ (gogoproto.nullable) = false ]; - // order types - OrderType order_type = 3; - // trigger_price is the trigger price used by stop/take orders - string trigger_price = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -// A valid Spot limit order with Metadata. -message SpotLimitOrder { - // order_info contains the information of the order - OrderInfo order_info = 1 [ (gogoproto.nullable) = false ]; - // order types - OrderType order_type = 2; - // the amount of the quantity remaining fillable - string fillable = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // trigger_price is the trigger price used by stop/take orders - string trigger_price = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - bytes order_hash = 5; -} - -// A valid Spot market order with Metadata. -message SpotMarketOrder { - // order_info contains the information of the order - OrderInfo order_info = 1 [ (gogoproto.nullable) = false ]; - string balance_hold = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes order_hash = 3; - // order types - OrderType order_type = 4; - // trigger_price is the trigger price used by stop/take orders - string trigger_price = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -message DerivativeOrder { - // market_id represents the unique ID of the market - string market_id = 1; - // order_info contains the information of the order - OrderInfo order_info = 2 [ (gogoproto.nullable) = false ]; - // order types - OrderType order_type = 3; - // margin is the margin used by the limit order - string margin = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // trigger_price is the trigger price used by stop/take orders - string trigger_price = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -message SubaccountOrderbookMetadata { - uint32 vanilla_limit_order_count = 1; - uint32 reduce_only_limit_order_count = 2; - // AggregateReduceOnlyQuantity is the aggregate fillable quantity of the - // subaccount's reduce-only limit orders in the given direction. - string aggregate_reduce_only_quantity = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // AggregateVanillaQuantity is the aggregate fillable quantity of the - // subaccount's vanilla limit orders in the given direction. - string aggregate_vanilla_quantity = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - uint32 vanilla_conditional_order_count = 5; - uint32 reduce_only_conditional_order_count = 6; -} - -message SubaccountOrder { - // price of the order - string price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // the amount of the quantity remaining fillable - string quantity = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bool isReduceOnly = 3; -} - -message SubaccountOrderData { - SubaccountOrder order = 1; - bytes order_hash = 2; -} - -// A valid Derivative limit order with Metadata. -message DerivativeLimitOrder { - // order_info contains the information of the order - OrderInfo order_info = 1 [ (gogoproto.nullable) = false ]; - // order types - OrderType order_type = 2; - // margin is the margin used by the limit order - string margin = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // the amount of the quantity remaining fillable - string fillable = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // trigger_price is the trigger price used by stop/take orders - string trigger_price = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - bytes order_hash = 6; -} - -// A valid Derivative market order with Metadata. -message DerivativeMarketOrder { - // order_info contains the information of the order - OrderInfo order_info = 1 [ (gogoproto.nullable) = false ]; - // order types - OrderType order_type = 2; - string margin = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string margin_hold = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // trigger_price is the trigger price used by stop/take orders - string trigger_price = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - bytes order_hash = 6; -} - -message Position { - bool isLong = 1; - string quantity = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string entry_price = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string margin = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string cumulative_funding_entry = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message MarketOrderIndicator { - // market_id represents the unique ID of the market - string market_id = 1; - bool isBuy = 2; -} - -message TradeLog { - string quantity = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // bytes32 subaccount ID that executed the trade - bytes subaccount_id = 3; - string fee = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes order_hash = 5; - bytes fee_recipient_address = 6 [ (gogoproto.nullable) = true ]; -} - -message PositionDelta { - bool is_long = 1; - string execution_quantity = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string execution_margin = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string execution_price = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message DerivativeTradeLog { - bytes subaccount_id = 1; - PositionDelta position_delta = 2; - string payout = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string fee = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes order_hash = 5; - bytes fee_recipient_address = 6 [ (gogoproto.nullable) = true ]; -} - -enum ExecutionType { - UnspecifiedExecutionType = 0; - Market = 1; - LimitFill = 2; - LimitMatchRestingOrder = 3; - LimitMatchNewOrder = 4; - MarketLiquidation = 5; - ExpiryMarketSettlement = 6; -} - -message SubaccountPosition { - Position position = 1; - bytes subaccount_id = 2; -} - -message SubaccountDeposit { - bytes subaccount_id = 1; - Deposit deposit = 2; -} - -message DepositUpdate { - string denom = 1; - repeated SubaccountDeposit deposits = 2; -} - -message PointsMultiplier { - string maker_points_multiplier = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string taker_points_multiplier = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message TradingRewardCampaignBoostInfo { - repeated string boosted_spot_market_ids = 1; - repeated PointsMultiplier spot_market_multipliers = 2 - [ (gogoproto.nullable) = false ]; - repeated string boosted_derivative_market_ids = 3; - repeated PointsMultiplier derivative_market_multipliers = 4 - [ (gogoproto.nullable) = false ]; -} - -message CampaignRewardPool { - int64 start_timestamp = 1; - // max_campaign_rewards are the maximum reward amounts to be disbursed at the - // end of the campaign - repeated cosmos.base.v1beta1.Coin max_campaign_rewards = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message TradingRewardCampaignInfo { - // number of seconds of the duration of each campaign - int64 campaign_duration_seconds = 1; - // the trading fee quote denoms which will be counted for the rewards - repeated string quote_denoms = 2; - // the optional boost info for markets - TradingRewardCampaignBoostInfo trading_reward_boost_info = 3; - // the marketIDs which are disqualified from being rewarded - repeated string disqualified_market_ids = 4; -} - -message FeeDiscountTierInfo { - string maker_discount_rate = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string taker_discount_rate = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string staked_amount = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string volume = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message FeeDiscountSchedule { - uint64 bucket_count = 1; - int64 bucket_duration = 2; - // the trading fee quote denoms which will be counted for the fee paid - // contribution - repeated string quote_denoms = 3; - // the fee discount tiers - repeated FeeDiscountTierInfo tier_infos = 4; - // the marketIDs which are disqualified from contributing to the fee paid - // amount - repeated string disqualified_market_ids = 5; -} - -message FeeDiscountTierTTL { - uint64 tier = 1; - int64 ttl_timestamp = 2; -} - -message VolumeRecord { - string maker_volume = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string taker_volume = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message AccountRewards { - string account = 1; - repeated cosmos.base.v1beta1.Coin rewards = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message TradeRecords { - string market_id = 1; - repeated TradeRecord latest_trade_records = 2; -} - -message SubaccountIDs { repeated bytes subaccount_ids = 1; } - -message TradeRecord { - int64 timestamp = 1; - - string price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - string quantity = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -enum OrderMask { - UNUSED = 0 [ (gogoproto.enumvalue_customname) = "UNUSED" ]; - ANY = 1 [ (gogoproto.enumvalue_customname) = "ANY" ]; - REGULAR = 2 [ (gogoproto.enumvalue_customname) = "REGULAR" ]; - CONDITIONAL = 4 [ (gogoproto.enumvalue_customname) = "CONDITIONAL" ]; - DIRECTION_BUY_OR_HIGHER = 8 - [ (gogoproto.enumvalue_customname) = - "BUY_OR_HIGHER" ]; // for conditional orders means HIGHER - DIRECTION_SELL_OR_LOWER = 16 - [ (gogoproto.enumvalue_customname) = - "SELL_OR_LOWER" ]; // for conditional orders means LOWER - TYPE_MARKET = 32 [ (gogoproto.enumvalue_customname) = "MARKET" ]; - TYPE_LIMIT = 64 [ (gogoproto.enumvalue_customname) = "LIMIT" ]; -} - -message Level { - // price - string p = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // quantity - string q = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message AggregateSubaccountVolumeRecord { - string subaccount_id = 1; - repeated MarketVolume market_volumes = 2; -} - -message AggregateAccountVolumeRecord { - string account = 1; - repeated MarketVolume market_volumes = 2; -} - -message MarketVolume { - string market_id = 1; - VolumeRecord volume = 2 [ (gogoproto.nullable) = false ]; -} - -message DenomDecimals { - string denom = 1; - uint64 decimals = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/exchange/v1beta1/genesis.proto b/packages/injective-protobuf/proto/injective/exchange/v1beta1/genesis.proto deleted file mode 100644 index 51b99045..00000000 --- a/packages/injective-protobuf/proto/injective/exchange/v1beta1/genesis.proto +++ /dev/null @@ -1,237 +0,0 @@ -syntax = "proto3"; -package injective.exchange.v1beta1; - -import "injective/exchange/v1beta1/exchange.proto"; -import "injective/exchange/v1beta1/tx.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types"; - -// GenesisState defines the exchange module's genesis state. -message GenesisState { - // params defines all the parameters of related to exchange. - Params params = 1 [ (gogoproto.nullable) = false ]; - - // spot_markets is an array containing the genesis trade pairs - repeated SpotMarket spot_markets = 2; - - // derivative_markets is an array containing the genesis derivative markets - repeated DerivativeMarket derivative_markets = 3; - - // spot_orderbook defines the spot exchange limit orderbook active at genesis. - repeated SpotOrderBook spot_orderbook = 4 [ (gogoproto.nullable) = false ]; - - // derivative_orderbook defines the derivative exchange limit orderbook active - // at genesis. - repeated DerivativeOrderBook derivative_orderbook = 5 - [ (gogoproto.nullable) = false ]; - - // balances defines the exchange users balances active at genesis. - repeated Balance balances = 6 [ (gogoproto.nullable) = false ]; - - // positions defines the exchange derivative positions at genesis - repeated DerivativePosition positions = 7 [ (gogoproto.nullable) = false ]; - - // subaccount_trade_nonces defines the subaccount trade nonces for the - // subaccounts at genesis - repeated SubaccountNonce subaccount_trade_nonces = 8 - [ (gogoproto.nullable) = false ]; - - // expiry_futures_market_info defines the market info for the expiry futures - // markets at genesis - repeated ExpiryFuturesMarketInfoState expiry_futures_market_info_state = 9 - [ (gogoproto.nullable) = false ]; - - // perpetual_market_info defines the market info for the perpetual derivative - // markets at genesis - repeated PerpetualMarketInfo perpetual_market_info = 10 - [ (gogoproto.nullable) = false ]; - - // perpetual_market_funding_state defines the funding state for the perpetual - // derivative markets at genesis - repeated PerpetualMarketFundingState perpetual_market_funding_state = 11 - [ (gogoproto.nullable) = false ]; - - // derivative_market_settlement_scheduled defines the scheduled markets for - // settlement at genesis - repeated DerivativeMarketSettlementInfo - derivative_market_settlement_scheduled = 12 - [ (gogoproto.nullable) = false ]; - - // sets spot markets as enabled - bool is_spot_exchange_enabled = 13; - - // sets derivative markets as enabled - bool is_derivatives_exchange_enabled = 14; - - // the current trading reward campaign info - TradingRewardCampaignInfo trading_reward_campaign_info = 15; - - // the current and upcoming trading reward campaign pools - repeated CampaignRewardPool trading_reward_pool_campaign_schedule = 16; - - // the current trading reward account points - repeated TradingRewardCampaignAccountPoints - trading_reward_campaign_account_points = 17; - - // the fee discount schedule - FeeDiscountSchedule fee_discount_schedule = 18; - - // the cached fee discount account tiers with TTL - repeated FeeDiscountAccountTierTTL fee_discount_account_tier_ttl = 19; - - // the fee discount paid by accounts in all buckets - repeated FeeDiscountBucketVolumeAccounts fee_discount_bucket_volume_accounts = - 20; - - // sets the first fee cycle as finished - bool is_first_fee_cycle_finished = 21; - - // the current and upcoming trading reward campaign pending pools - repeated CampaignRewardPool pending_trading_reward_pool_campaign_schedule = - 22; - - // the pending trading reward account points - repeated TradingRewardCampaignAccountPendingPoints - pending_trading_reward_campaign_account_points = 23; - - // the addresses opting out of trading rewards - repeated string rewards_opt_out_addresses = 24; - - repeated TradeRecords historical_trade_records = 25; - - // binary_options_markets is an array containing the genesis binary options - // markets - repeated BinaryOptionsMarket binary_options_markets = 26; - - // binary_options_markets_scheduled_for_settlement contains the marketIDs of - // binary options markets scheduled for next-block settlement - repeated string binary_options_market_ids_scheduled_for_settlement = 27; - - // spot_market_ids_scheduled_to_force_close defines the scheduled markets for - // forced closings at genesis - repeated string spot_market_ids_scheduled_to_force_close = 28; - - // denom_decimals defines the denom decimals for the exchange. - repeated DenomDecimals denom_decimals = 29 [ (gogoproto.nullable) = false ]; - - // conditional_derivative_orderbook contains conditional orderbooks for all - // markets (both lmit and market conditional orders) - repeated ConditionalDerivativeOrderBook conditional_derivative_orderbooks = - 30; - - // market_fee_multipliers contains any non-default atomic order fee - // multipliers - repeated MarketFeeMultiplier market_fee_multipliers = 31; - - repeated OrderbookSequence orderbook_sequences = 32; - - repeated AggregateSubaccountVolumeRecord subaccount_volumes = 33; - - repeated MarketVolume market_volumes = 34; -} - -message OrderbookSequence { - uint64 sequence = 1; - string market_id = 2; -} - -message FeeDiscountAccountTierTTL { - string account = 1; - FeeDiscountTierTTL tier_ttl = 2; -} - -message FeeDiscountBucketVolumeAccounts { - int64 bucket_start_timestamp = 1; - repeated AccountVolume account_volume = 2; -} - -message AccountVolume { - string account = 1; - string volume = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message TradingRewardCampaignAccountPoints { - string account = 1; - string points = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message TradingRewardCampaignAccountPendingPoints { - int64 reward_pool_start_timestamp = 1; - repeated TradingRewardCampaignAccountPoints account_points = 2; -} - -// Spot Exchange Limit Orderbook -message SpotOrderBook { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string market_id = 1; - bool isBuySide = 2; - repeated SpotLimitOrder orders = 3; -} - -// Derivative Exchange Limit Orderbook -message DerivativeOrderBook { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string market_id = 1; - bool isBuySide = 2; - repeated DerivativeLimitOrder orders = 3; -} - -// Orderbook containing limit & market conditional orders -message ConditionalDerivativeOrderBook { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string market_id = 1; - repeated DerivativeLimitOrder limit_buy_orders = 2; - repeated DerivativeMarketOrder market_buy_orders = 3; - repeated DerivativeLimitOrder limit_sell_orders = 4; - repeated DerivativeMarketOrder market_sell_orders = 5; -} - -message Balance { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string subaccount_id = 1; - string denom = 2; - Deposit deposits = 3; -} - -message DerivativePosition { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string subaccount_id = 1; - string market_id = 2; - Position position = 3; -} - -message SubaccountNonce { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string subaccount_id = 1; - SubaccountTradeNonce subaccount_trade_nonce = 2 - [ (gogoproto.nullable) = false ]; -} - -message ExpiryFuturesMarketInfoState { - string market_id = 1; - ExpiryFuturesMarketInfo market_info = 2; -} - -message PerpetualMarketFundingState { - string market_id = 1; - PerpetualMarketFunding funding = 2; -} diff --git a/packages/injective-protobuf/proto/injective/exchange/v1beta1/query.proto b/packages/injective-protobuf/proto/injective/exchange/v1beta1/query.proto deleted file mode 100644 index 773b8d88..00000000 --- a/packages/injective-protobuf/proto/injective/exchange/v1beta1/query.proto +++ /dev/null @@ -1,1395 +0,0 @@ -syntax = "proto3"; -package injective.exchange.v1beta1; - -import "google/api/annotations.proto"; -import "injective/exchange/v1beta1/exchange.proto"; -import "injective/exchange/v1beta1/genesis.proto"; -import "injective/oracle/v1beta1/oracle.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types"; - -// Query defines the gRPC querier service. -service Query { - - // Retrieves exchange params - rpc QueryExchangeParams(QueryExchangeParamsRequest) - returns (QueryExchangeParamsResponse) { - option (google.api.http).get = "/injective/exchange/v1beta1/exchangeParams"; - } - - // Retrieves a Subaccount's Deposits - rpc SubaccountDeposits(QuerySubaccountDepositsRequest) - returns (QuerySubaccountDepositsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/exchange/subaccountDeposits"; - } - - // Retrieves a Subaccount's Deposits - rpc SubaccountDeposit(QuerySubaccountDepositRequest) - returns (QuerySubaccountDepositResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/exchange/subaccountDeposit"; - } - - // Retrieves all of the balances of all users on the exchange. - rpc ExchangeBalances(QueryExchangeBalancesRequest) - returns (QueryExchangeBalancesResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/exchange/exchangeBalances"; - } - - // Retrieves the aggregate volumes for the specified account or subaccount - rpc AggregateVolume(QueryAggregateVolumeRequest) - returns (QueryAggregateVolumeResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/exchange/aggregateVolume/{account}"; - } - - // Retrieves the aggregate volumes for specified accounts - rpc AggregateVolumes(QueryAggregateVolumesRequest) - returns (QueryAggregateVolumesResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/exchange/aggregateVolumes"; - } - - // Retrieves the aggregate volume for the specified market - rpc AggregateMarketVolume(QueryAggregateMarketVolumeRequest) - returns (QueryAggregateMarketVolumeResponse) { - option (google.api.http).get = "/injective/exchange/v1beta1/exchange/" - "aggregateMarketVolume/{market_id}"; - } - - // Retrieves the aggregate market volumes for specified markets - rpc AggregateMarketVolumes(QueryAggregateMarketVolumesRequest) - returns (QueryAggregateMarketVolumesResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/exchange/aggregateMarketVolumes"; - } - - // Retrieves the denom decimals for a denom. - rpc DenomDecimal(QueryDenomDecimalRequest) - returns (QueryDenomDecimalResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/exchange/denom_decimal/{denom}"; - } - - // Retrieves the denom decimals for multiple denoms. Returns all denom - // decimals if unspecified. - rpc DenomDecimals(QueryDenomDecimalsRequest) - returns (QueryDenomDecimalsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/exchange/denom_decimals"; - } - - // Retrieves a list of spot markets. - rpc SpotMarkets(QuerySpotMarketsRequest) returns (QuerySpotMarketsResponse) { - option (google.api.http).get = "/injective/exchange/v1beta1/spot/markets"; - } - - // Retrieves a spot market by ticker - rpc SpotMarket(QuerySpotMarketRequest) returns (QuerySpotMarketResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/spot/markets/{market_id}"; - } - - // Retrieves a list of spot markets with extra information. - rpc FullSpotMarkets(QueryFullSpotMarketsRequest) - returns (QueryFullSpotMarketsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/spot/full_markets"; - } - - // Retrieves a spot market with extra information. - rpc FullSpotMarket(QueryFullSpotMarketRequest) - returns (QueryFullSpotMarketResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/spot/full_market/{market_id}"; - } - - // Retrieves a spot market's orderbook by marketID - rpc SpotOrderbook(QuerySpotOrderbookRequest) - returns (QuerySpotOrderbookResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/spot/orderbook/{market_id}"; - } - - // Retrieves a trader's spot orders - rpc TraderSpotOrders(QueryTraderSpotOrdersRequest) - returns (QueryTraderSpotOrdersResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/spot/orders/{market_id}/{subaccount_id}"; - } - - // Retrieves all account address spot orders - rpc AccountAddressSpotOrders(QueryAccountAddressSpotOrdersRequest) - returns (QueryAccountAddressSpotOrdersResponse) { - option (google.api.http).get = "/injective/exchange/v1beta1/spot/orders/" - "{market_id}/account/{account_address}"; - } - - // Retrieves spot orders corresponding to specified order hashes for a given - // subaccountID and marketID - rpc SpotOrdersByHashes(QuerySpotOrdersByHashesRequest) - returns (QuerySpotOrdersByHashesResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/spot/orders_by_hashes/{market_id}/" - "{subaccount_id}"; - } - - // Retrieves subaccount's orders - rpc SubaccountOrders(QuerySubaccountOrdersRequest) - returns (QuerySubaccountOrdersResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/orders/{subaccount_id}"; - } - - // Retrieves a trader's transient spot orders - rpc TraderSpotTransientOrders(QueryTraderSpotOrdersRequest) - returns (QueryTraderSpotOrdersResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/spot/transient_orders/{market_id}/" - "{subaccount_id}"; - } - - // Retrieves a spot market's mid-price - rpc SpotMidPriceAndTOB(QuerySpotMidPriceAndTOBRequest) - returns (QuerySpotMidPriceAndTOBResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/spot/mid_price_and_tob/{market_id}"; - } - - // Retrieves a derivative market's mid-price - rpc DerivativeMidPriceAndTOB(QueryDerivativeMidPriceAndTOBRequest) - returns (QueryDerivativeMidPriceAndTOBResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/derivative/mid_price_and_tob/{market_id}"; - } - - // Retrieves a derivative market's orderbook by marketID - rpc DerivativeOrderbook(QueryDerivativeOrderbookRequest) - returns (QueryDerivativeOrderbookResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/derivative/orderbook/{market_id}"; - } - - // Retrieves a trader's derivative orders - rpc TraderDerivativeOrders(QueryTraderDerivativeOrdersRequest) - returns (QueryTraderDerivativeOrdersResponse) { - option (google.api.http).get = "/injective/exchange/v1beta1/derivative/" - "orders/{market_id}/{subaccount_id}"; - } - - // Retrieves all account address derivative orders - rpc AccountAddressDerivativeOrders(QueryAccountAddressDerivativeOrdersRequest) - returns (QueryAccountAddressDerivativeOrdersResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/derivative/orders/{market_id}/account/" - "{account_address}"; - } - - // Retrieves a trader's derivative orders - rpc DerivativeOrdersByHashes(QueryDerivativeOrdersByHashesRequest) - returns (QueryDerivativeOrdersByHashesResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/derivative/orders_by_hashes/{market_id}/" - "{subaccount_id}"; - } - - // Retrieves a trader's transient derivative orders - rpc TraderDerivativeTransientOrders(QueryTraderDerivativeOrdersRequest) - returns (QueryTraderDerivativeOrdersResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/derivative/transient_orders/{market_id}/" - "{subaccount_id}"; - } - - // Retrieves a list of derivative markets. - rpc DerivativeMarkets(QueryDerivativeMarketsRequest) - returns (QueryDerivativeMarketsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/derivative/markets"; - } - - // Retrieves a derivative market by ticker - rpc DerivativeMarket(QueryDerivativeMarketRequest) - returns (QueryDerivativeMarketResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/derivative/markets/{market_id}"; - } - - // Retrieves a derivative market's corresponding address for fees that - // contribute to the market's insurance fund - rpc DerivativeMarketAddress(QueryDerivativeMarketAddressRequest) - returns (QueryDerivativeMarketAddressResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/derivative/market_address/{market_id}"; - } - - // Retrieves a subaccount's trade nonce - rpc SubaccountTradeNonce(QuerySubaccountTradeNonceRequest) - returns (QuerySubaccountTradeNonceResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/exchange/{subaccount_id}"; - } - - // Retrieves the entire exchange module's state - rpc ExchangeModuleState(QueryModuleStateRequest) - returns (QueryModuleStateResponse) { - option (google.api.http).get = "/injective/exchange/v1beta1/module_state"; - } - - // Retrieves the entire exchange module's positions - rpc Positions(QueryPositionsRequest) returns (QueryPositionsResponse) { - option (google.api.http).get = "/injective/exchange/v1beta1/positions"; - } - - // Retrieves subaccount's positions - rpc SubaccountPositions(QuerySubaccountPositionsRequest) - returns (QuerySubaccountPositionsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/positions/{subaccount_id}"; - } - - // Retrieves subaccount's position in market - rpc SubaccountPositionInMarket(QuerySubaccountPositionInMarketRequest) - returns (QuerySubaccountPositionInMarketResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/positions/{subaccount_id}/{market_id}"; - } - - // Retrieves subaccount's position in market - rpc SubaccountEffectivePositionInMarket( - QuerySubaccountEffectivePositionInMarketRequest) - returns (QuerySubaccountEffectivePositionInMarketResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/effective_positions/{subaccount_id}/" - "{market_id}"; - } - - // Retrieves perpetual market info - rpc PerpetualMarketInfo(QueryPerpetualMarketInfoRequest) - returns (QueryPerpetualMarketInfoResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/perpetual_market_info/{market_id}"; - } - - // Retrieves expiry market info - rpc ExpiryFuturesMarketInfo(QueryExpiryFuturesMarketInfoRequest) - returns (QueryExpiryFuturesMarketInfoResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/expiry_market_info/{market_id}"; - } - - // Retrieves perpetual market funding - rpc PerpetualMarketFunding(QueryPerpetualMarketFundingRequest) - returns (QueryPerpetualMarketFundingResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/perpetual_market_funding/{market_id}"; - } - - // Retrieves subaccount's order metadata - rpc SubaccountOrderMetadata(QuerySubaccountOrderMetadataRequest) - returns (QuerySubaccountOrderMetadataResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/order_metadata/{subaccount_id}"; - } - - // Retrieves the account and total trade rewards points - rpc TradeRewardPoints(QueryTradeRewardPointsRequest) - returns (QueryTradeRewardPointsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/trade_reward_points"; - } - - // Retrieves the pending account and total trade rewards points - rpc PendingTradeRewardPoints(QueryTradeRewardPointsRequest) - returns (QueryTradeRewardPointsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/pending_trade_reward_points"; - } - - // Retrieves the trade reward campaign - rpc TradeRewardCampaign(QueryTradeRewardCampaignRequest) - returns (QueryTradeRewardCampaignResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/trade_reward_campaign"; - } - - // Retrieves the account's fee discount info - rpc FeeDiscountAccountInfo(QueryFeeDiscountAccountInfoRequest) - returns (QueryFeeDiscountAccountInfoResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/fee_discount_account_info/{account}"; - } - - // Retrieves the fee discount schedule - rpc FeeDiscountSchedule(QueryFeeDiscountScheduleRequest) - returns (QueryFeeDiscountScheduleResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/fee_discount_schedule"; - } - - // Retrieves mismatches between available vs. total balance - rpc BalanceMismatches(QueryBalanceMismatchesRequest) - returns (QueryBalanceMismatchesResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/balance_mismatches/{dust_factor}"; - } - - // Retrieves available and total balances with balance holds - rpc BalanceWithBalanceHolds(QueryBalanceWithBalanceHoldsRequest) - returns (QueryBalanceWithBalanceHoldsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/balances_with_balance_holds"; - } - - // Retrieves fee discount tier stats - rpc FeeDiscountTierStatistics(QueryFeeDiscountTierStatisticsRequest) - returns (QueryFeeDiscountTierStatisticsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/fee_discount_tier_stats"; - } - - // Retrieves market making pool info - rpc MitoVaultInfos(MitoVaultInfosRequest) returns (MitoVaultInfosResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/mito_vault_infos"; - } - - // QueryMarketIDFromVault returns the market ID for a given vault subaccount ID - rpc QueryMarketIDFromVault(QueryMarketIDFromVaultRequest) returns (QueryMarketIDFromVaultResponse) { - option (google.api.http).get = "/injective/exchange/v1beta1/vault_market_id/{vault_address}"; - } - - // Retrieves historical trade records for a given market ID - rpc HistoricalTradeRecords(QueryHistoricalTradeRecordsRequest) - returns (QueryHistoricalTradeRecordsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/historical_trade_records"; - } - - // Retrieves if the account is opted out of rewards - rpc IsOptedOutOfRewards(QueryIsOptedOutOfRewardsRequest) - returns (QueryIsOptedOutOfRewardsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/is_opted_out_of_rewards/{account}"; - } - - // Retrieves all accounts opted out of rewards - rpc OptedOutOfRewardsAccounts(QueryOptedOutOfRewardsAccountsRequest) - returns (QueryOptedOutOfRewardsAccountsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/opted_out_of_rewards_accounts"; - } - - // MarketVolatility computes the volatility for spot and derivative markets - // trading history. - rpc MarketVolatility(QueryMarketVolatilityRequest) - returns (QueryMarketVolatilityResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/market_volatility/{market_id}"; - } - - // Retrieves a spot market's orderbook by marketID - rpc BinaryOptionsMarkets(QueryBinaryMarketsRequest) - returns (QueryBinaryMarketsResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/binary_options/markets"; - } - - // Retrieves a trader's derivative conditional orders - rpc TraderDerivativeConditionalOrders( - QueryTraderDerivativeConditionalOrdersRequest) - returns (QueryTraderDerivativeConditionalOrdersResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/derivative/orders/conditional/{market_id}/" - "{subaccount_id}"; - } - - rpc MarketAtomicExecutionFeeMultiplier( - QueryMarketAtomicExecutionFeeMultiplierRequest) - returns (QueryMarketAtomicExecutionFeeMultiplierResponse) { - option (google.api.http).get = - "/injective/exchange/v1beta1/atomic_order_fee_multiplier"; - } -} - -message Subaccount { - string trader = 1; - uint32 subaccount_nonce = 2; -} - -message QuerySubaccountOrdersRequest { - string subaccount_id = 1; - string market_id = 2; -} - -message QuerySubaccountOrdersResponse { - repeated SubaccountOrderData buy_orders = 1; - repeated SubaccountOrderData sell_orders = 2; -} - -message SubaccountOrderbookMetadataWithMarket { - SubaccountOrderbookMetadata metadata = 1; - string market_id = 2; - bool isBuy = 3; -} - -// QueryExchangeParamsRequest is the request type for the Query/ExchangeParams -// RPC method. -message QueryExchangeParamsRequest {} - -// QueryExchangeParamsRequest is the response type for the Query/ExchangeParams -// RPC method. -message QueryExchangeParamsResponse { - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QuerySubaccountDepositsRequest is the request type for the -// Query/SubaccountDeposits RPC method. -message QuerySubaccountDepositsRequest { - string subaccount_id = 1; - Subaccount subaccount = 2 [ (gogoproto.nullable) = true ]; -} - -// QuerySubaccountDepositsResponse is the response type for the -// Query/SubaccountDeposits RPC method. -message QuerySubaccountDepositsResponse { map deposits = 1; } - -// QueryExchangeBalancesRequest is the request type for the -// Query/ExchangeBalances RPC method. -message QueryExchangeBalancesRequest {} - -// QuerySubaccountDepositsResponse is the response type for the -// Query/SubaccountDeposits RPC method. -message QueryExchangeBalancesResponse { - repeated Balance balances = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryAggregateVolumeRequest is the request type for the Query/AggregateVolume -// RPC method. -message QueryAggregateVolumeRequest { - // can either be an address or a subaccount - string account = 1; -} - -// QueryAggregateVolumeResponse is the response type for the -// Query/AggregateVolume RPC method. -message QueryAggregateVolumeResponse { - // if an address is specified, then the aggregate_volumes will aggregate the - // volumes across all subaccounts for the address - repeated MarketVolume aggregate_volumes = 1; -} - -// QueryAggregateVolumesRequest is the request type for the -// Query/AggregateVolumes RPC method. -message QueryAggregateVolumesRequest { - repeated string accounts = 1; - repeated string market_ids = 2; -} - -// QueryAggregateVolumesResponse is the response type for the -// Query/AggregateVolumes RPC method. -message QueryAggregateVolumesResponse { - // the aggregate volume records for the accounts specified - repeated AggregateAccountVolumeRecord aggregate_account_volumes = 1; - // the aggregate volumes for the markets specified - repeated MarketVolume aggregate_market_volumes = 2; -} - -// QueryAggregateMarketVolumeRequest is the request type for the -// Query/AggregateMarketVolume RPC method. -message QueryAggregateMarketVolumeRequest { string market_id = 1; } - -// QueryAggregateMarketVolumeResponse is the response type for the -// Query/AggregateMarketVolume RPC method. -message QueryAggregateMarketVolumeResponse { - VolumeRecord volume = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryDenomDecimalRequest is the request type for the Query/DenomDecimal RPC -// method. -message QueryDenomDecimalRequest { string denom = 1; } - -// QueryDenomDecimalResponse is the response type for the Query/DenomDecimal RPC -// method. -message QueryDenomDecimalResponse { uint64 decimal = 1; } - -// QueryDenomDecimalsRequest is the request type for the Query/DenomDecimals RPC -// method. -message QueryDenomDecimalsRequest { - // denoms can be empty to query all denom decimals - repeated string denoms = 1; -} - -// QueryDenomDecimalsRequest is the response type for the Query/DenomDecimals -// RPC method. -message QueryDenomDecimalsResponse { - repeated DenomDecimals denom_decimals = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryAggregateMarketVolumesRequest is the request type for the -// Query/AggregateMarketVolumes RPC method. -message QueryAggregateMarketVolumesRequest { repeated string market_ids = 1; } - -// QueryAggregateMarketVolumesResponse is the response type for the -// Query/AggregateMarketVolumes RPC method. -message QueryAggregateMarketVolumesResponse { - // the aggregate volumes for the entire market - repeated MarketVolume volumes = 1; -} - -// QuerySubaccountDepositsRequest is the request type for the -// Query/SubaccountDeposits RPC method. -message QuerySubaccountDepositRequest { - string subaccount_id = 1; - string denom = 2; -} - -// QuerySubaccountDepositsResponse is the response type for the -// Query/SubaccountDeposits RPC method. -message QuerySubaccountDepositResponse { Deposit deposits = 1; } - -// QuerySpotMarketsRequest is the request type for the Query/SpotMarkets RPC -// method. -message QuerySpotMarketsRequest { - // Status of the market, for convenience it is set to string - not enum - string status = 1; - - // Filter by market IDs - repeated string market_ids = 2; -} - -// QuerySpotMarketsResponse is the response type for the Query/SpotMarkets RPC -// method. -message QuerySpotMarketsResponse { repeated SpotMarket markets = 1; } - -// QuerySpotMarketRequest is the request type for the Query/SpotMarket RPC -// method. -message QuerySpotMarketRequest { - // Market ID for the market - string market_id = 1; -} - -// QuerySpotMarketResponse is the response type for the Query/SpotMarket RPC -// method. -message QuerySpotMarketResponse { SpotMarket market = 1; } - - -enum OrderSide { - // will return both - Side_Unspecified = 0; - Buy = 1; - Sell = 2; -} - -// QuerySpotOrderbookRequest is the request type for the Query/SpotOrderbook RPC -// method. -message QuerySpotOrderbookRequest { - // Market ID for the market - string market_id = 1; - uint64 limit = 2; - OrderSide order_side = 3; - string limit_cumulative_notional = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - string limit_cumulative_quantity = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -// QuerySpotOrderbookResponse is the response type for the Query/SpotOrderbook -// RPC method. -message QuerySpotOrderbookResponse { - repeated Level buys_price_level = 1; - repeated Level sells_price_level = 2; -} - -message FullSpotMarket { - SpotMarket market = 1; - // mid_price_and_tob defines the mid price for this market and the best ask - // and bid orders - MidPriceAndTOB mid_price_and_tob = 2 [ (gogoproto.nullable) = true ]; -} - -// QueryFullSpotMarketsRequest is the request type for the Query/FullSpotMarkets -// RPC method. -message QueryFullSpotMarketsRequest { - // Status of the market, for convenience it is set to string - not enum - string status = 1; - - // Filter by market IDs - repeated string market_ids = 2; - - // Flag to return the markets mid price and top of the book buy and sell - // orders. - bool with_mid_price_and_tob = 3; -} - -// QueryFullSpotMarketsResponse is the response type for the -// Query/FullSpotMarkets RPC method. -message QueryFullSpotMarketsResponse { repeated FullSpotMarket markets = 1; } - -// QuerySpotMarketRequest is the request type for the Query/SpotMarket RPC -// method. -message QueryFullSpotMarketRequest { - // Market ID for the market - string market_id = 1; - // Flag to return the markets mid price and top of the book buy and sell - // orders. - bool with_mid_price_and_tob = 2; -} - -// QuerySpotMarketResponse is the response type for the Query/SpotMarket RPC -// method. -message QueryFullSpotMarketResponse { FullSpotMarket market = 1; } - -// QuerySpotOrdersByHashesRequest is the request type for the -// Query/SpotOrdersByHashes RPC method. -message QuerySpotOrdersByHashesRequest { - // Market ID for the market - string market_id = 1; - // SubaccountID of the trader - string subaccount_id = 2; - // the order hashes - repeated string order_hashes = 3; -} - -// QuerySpotOrdersByHashesResponse is the response type for the -// Query/SpotOrdersByHashes RPC method. -message QuerySpotOrdersByHashesResponse { - repeated TrimmedSpotLimitOrder orders = 1; -} - -// QueryTraderSpotOrdersRequest is the request type for the -// Query/TraderSpotOrders RPC method. -message QueryTraderSpotOrdersRequest { - // Market ID for the market - string market_id = 1; - // SubaccountID of the trader - string subaccount_id = 2; -} - -// QueryAccountAddressSpotOrdersRequest is the request type for the -// Query/AccountAddressSpotOrders RPC method. -message QueryAccountAddressSpotOrdersRequest { - // Market ID for the market - string market_id = 1; - // Account address of the trader - string account_address = 2; -} - -message TrimmedSpotLimitOrder { - // price of the order - string price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // quantity of the order - string quantity = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // the amount of the quantity remaining fillable - string fillable = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // true if the order is a buy - bool isBuy = 4; - string order_hash = 5; -} - -// QueryTraderSpotOrdersResponse is the response type for the -// Query/TraderSpotOrders RPC method. -message QueryTraderSpotOrdersResponse { - repeated TrimmedSpotLimitOrder orders = 1; -} - -// QueryAccountAddressSpotOrdersResponse is the response type for the -// Query/AccountAddressSpotOrders RPC method. -message QueryAccountAddressSpotOrdersResponse { - repeated TrimmedSpotLimitOrder orders = 1; -} - -// QuerySpotMidPriceAndTOBRequest is the request type for the -// Query/SpotMidPriceAndTOB RPC method. -message QuerySpotMidPriceAndTOBRequest { - // Market ID for the market - string market_id = 1; -} - -// QuerySpotMidPriceAndTOBResponse is the response type for the -// Query/SpotMidPriceAndTOB RPC method. -message QuerySpotMidPriceAndTOBResponse { - // mid price of the market - string mid_price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // best buy price of the market - string best_buy_price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // best sell price of the market - string best_sell_price = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -// QueryDerivativeMidPriceAndTOBRequest is the request type for the -// Query/GetDerivativeMidPriceAndTOB RPC method. -message QueryDerivativeMidPriceAndTOBRequest { - // Market ID for the market - string market_id = 1; -} - -// QueryDerivativeMidPriceAndTOBResponse is the response type for the -// Query/GetDerivativeMidPriceAndTOB RPC method. -message QueryDerivativeMidPriceAndTOBResponse { - // mid price of the market - string mid_price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // best buy price of the market - string best_buy_price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // best sell price of the market - string best_sell_price = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -// QueryDerivativeOrderbookRequest is the request type for the -// Query/DerivativeOrderbook RPC method. -message QueryDerivativeOrderbookRequest { - // Market ID for the market - string market_id = 1; - uint64 limit = 2; - string limit_cumulative_notional = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -// QueryDerivativeOrderbookResponse is the response type for the -// Query/DerivativeOrderbook RPC method. -message QueryDerivativeOrderbookResponse { - repeated Level buys_price_level = 1; - repeated Level sells_price_level = 2; -} - -// CancellationStrategy is the list of cancellation strategies. -enum CancellationStrategy { - // just cancelling in random order in most efficient way - UnspecifiedOrder = 0; - // e.g. for buy orders from lowest to highest price - FromWorstToBest = 1; - // e.g. for buy orders from higest to lowest price - FromBestToWorst = 2; - - // more strategies could be imagined like cancel buy first or cancel sell - // first -} - -// QueryTraderSpotOrdersToCancelUpToAmountRequest is the request type for the -// Query/TraderSpotOrdersToCancelUpToAmountRequest RPC method. -message QueryTraderSpotOrdersToCancelUpToAmountRequest { - // Market ID for the market - string market_id = 1; - // SubaccountID of the trader - string subaccount_id = 2; - // the base amount to cancel (free up) - string base_amount = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // the quote amount to cancel (free up) - string quote_amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // The cancellation strategy - CancellationStrategy strategy = 5; - // The reference price for the cancellation strategy, e.g. mid price or mark - // price - string reference_price = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -// QueryTraderDerivativeOrdersToCancelUpToAmountRequest is the request type for -// the Query/TraderDerivativeOrdersToCancelUpToAmountRequest RPC method. -message QueryTraderDerivativeOrdersToCancelUpToAmountRequest { - // Market ID for the market - string market_id = 1; - // SubaccountID of the trader - string subaccount_id = 2; - // the quote amount to cancel (free up) - string quote_amount = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // The cancellation strategy - CancellationStrategy strategy = 4; - // The reference price for the cancellation strategy, e.g. mid price or mark - // price - string reference_price = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -// QueryTraderDerivativeOrdersRequest is the request type for the -// Query/TraderDerivativeOrders RPC method. -message QueryTraderDerivativeOrdersRequest { - // Market ID for the market - string market_id = 1; - // SubaccountID of the trader - string subaccount_id = 2; -} - -// QueryAccountAddressSpotOrdersRequest is the request type for the -// Query/AccountAddressDerivativeOrders RPC method. -message QueryAccountAddressDerivativeOrdersRequest { - // Market ID for the market - string market_id = 1; - // Account address of the trader - string account_address = 2; -} - -message TrimmedDerivativeLimitOrder { - // price of the order - string price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // quantity of the order - string quantity = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // margin of the order - string margin = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // the amount of the quantity remaining fillable - string fillable = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // true if the order is a buy - bool isBuy = 5 - [ (gogoproto.jsontag) = "isBuy" ]; // ensure omitempty is not in jsontag - string order_hash = 6; -} - -// QueryTraderDerivativeOrdersResponse is the response type for the -// Query/TraderDerivativeOrders RPC method. -message QueryTraderDerivativeOrdersResponse { - repeated TrimmedDerivativeLimitOrder orders = 1; -} - -// QueryAccountAddressDerivativeOrdersResponse is the response type for the -// Query/AccountAddressDerivativeOrders RPC method. -message QueryAccountAddressDerivativeOrdersResponse { - repeated TrimmedDerivativeLimitOrder orders = 1; -} - -// QueryTraderDerivativeOrdersRequest is the request type for the -// Query/TraderDerivativeOrders RPC method. -message QueryDerivativeOrdersByHashesRequest { - // Market ID for the market - string market_id = 1; - // SubaccountID of the trader - string subaccount_id = 2; - // the order hashes - repeated string order_hashes = 3; -} - -// QueryDerivativeOrdersByHashesResponse is the response type for the -// Query/DerivativeOrdersByHashes RPC method. -message QueryDerivativeOrdersByHashesResponse { - repeated TrimmedDerivativeLimitOrder orders = 1; -} - -// QueryDerivativeMarketsRequest is the request type for the -// Query/DerivativeMarkets RPC method. -message QueryDerivativeMarketsRequest { - // Status of the market, for convenience it is set to string - not enum - string status = 1; - - // Filter by market IDs - repeated string market_ids = 2; - - // Flag to return the markets mid price and top of the book buy and sell - // orders. - bool with_mid_price_and_tob = 3; -} - -message PriceLevel { - string price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // quantity - string quantity = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message PerpetualMarketState { - PerpetualMarketInfo market_info = 1; - PerpetualMarketFunding funding_info = 2; -} - -message FullDerivativeMarket { - DerivativeMarket market = 1; - oneof info { - PerpetualMarketState perpetual_info = 2; - ExpiryFuturesMarketInfo futures_info = 3; - } - string mark_price = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // mid_price_and_tob defines the mid price for this market and the best ask - // and bid orders - MidPriceAndTOB mid_price_and_tob = 5 [ (gogoproto.nullable) = true ]; -} - -// QueryDerivativeMarketsResponse is the response type for the -// Query/DerivativeMarkets RPC method. -message QueryDerivativeMarketsResponse { - repeated FullDerivativeMarket markets = 1; -} - -// QueryDerivativeMarketRequest is the request type for the -// Query/DerivativeMarket RPC method. -message QueryDerivativeMarketRequest { - // Market ID for the market - string market_id = 1; -} - -// QueryDerivativeMarketResponse is the response type for the -// Query/DerivativeMarket RPC method. -message QueryDerivativeMarketResponse { FullDerivativeMarket market = 1; } - -// QueryDerivativeMarketAddressRequest is the request type for the -// Query/DerivativeMarketAddress RPC method. -message QueryDerivativeMarketAddressRequest { - // Market ID for the market - string market_id = 1; -} - -// QueryDerivativeMarketAddressResponse is the response type for the -// Query/DerivativeMarketAddress RPC method. -message QueryDerivativeMarketAddressResponse { - // address for the market - string address = 1; - // subaccountID for the market - string subaccount_id = 2; -} - -// QuerySubaccountTradeNonceRequest is the request type for the -// Query/SubaccountTradeNonce RPC method. -message QuerySubaccountTradeNonceRequest { string subaccount_id = 1; } - -// QuerySubaccountPositionsRequest is the request type for the -// Query/SubaccountPositions RPC method. -message QuerySubaccountPositionsRequest { string subaccount_id = 1; } - -// QuerySubaccountPositionInMarketRequest is the request type for the -// Query/SubaccountPositionInMarket RPC method. -message QuerySubaccountPositionInMarketRequest { - string subaccount_id = 1; - string market_id = 2; -} - -// QuerySubaccountEffectivePositionInMarketRequest is the request type for the -// Query/SubaccountEffectivePositionInMarket RPC method. -message QuerySubaccountEffectivePositionInMarketRequest { - string subaccount_id = 1; - string market_id = 2; -} - -// QuerySubaccountOrderMetadataRequest is the request type for the -// Query/SubaccountOrderMetadata RPC method. -message QuerySubaccountOrderMetadataRequest { string subaccount_id = 1; } - -// QuerySubaccountPositionsResponse is the response type for the -// Query/SubaccountPositions RPC method. -message QuerySubaccountPositionsResponse { - repeated DerivativePosition state = 1 [ (gogoproto.nullable) = false ]; -} - -// QuerySubaccountPositionInMarketResponse is the response type for the -// Query/SubaccountPositionInMarket RPC method. -message QuerySubaccountPositionInMarketResponse { - Position state = 1 [ (gogoproto.nullable) = true ]; -} - -message EffectivePosition { - bool is_long = 1; - string quantity = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string entry_price = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string effective_margin = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// QuerySubaccountEffectivePositionInMarketResponse is the response type for the -// Query/SubaccountEffectivePositionInMarket RPC method. -message QuerySubaccountEffectivePositionInMarketResponse { - EffectivePosition state = 1 [ (gogoproto.nullable) = true ]; -} - -// QueryPerpetualMarketInfoRequest is the request type for the -// Query/PerpetualMarketInfo RPC method. -message QueryPerpetualMarketInfoRequest { string market_id = 1; } - -// QueryPerpetualMarketInfoResponse is the response type for the -// Query/PerpetualMarketInfo RPC method. -message QueryPerpetualMarketInfoResponse { - PerpetualMarketInfo info = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryExpiryFuturesMarketInfoRequest is the request type for the Query/ -// ExpiryFuturesMarketInfo RPC method. -message QueryExpiryFuturesMarketInfoRequest { string market_id = 1; } - -// QueryExpiryFuturesMarketInfoResponse is the response type for the Query/ -// ExpiryFuturesMarketInfo RPC method. -message QueryExpiryFuturesMarketInfoResponse { - ExpiryFuturesMarketInfo info = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryPerpetualMarketFundingRequest is the request type for the -// Query/PerpetualMarketFunding RPC method. -message QueryPerpetualMarketFundingRequest { string market_id = 1; } - -// QueryPerpetualMarketFundingResponse is the response type for the -// Query/PerpetualMarketFunding RPC method. -message QueryPerpetualMarketFundingResponse { - PerpetualMarketFunding state = 1 [ (gogoproto.nullable) = false ]; -} - -// QuerySubaccountOrderMetadataResponse is the response type for the -// Query/SubaccountOrderMetadata RPC method. -message QuerySubaccountOrderMetadataResponse { - repeated SubaccountOrderbookMetadataWithMarket metadata = 1 - [ (gogoproto.nullable) = false ]; -} - -// QuerySubaccountTradeNonceResponse is the response type for the -// Query/SubaccountTradeNonce RPC method. -message QuerySubaccountTradeNonceResponse { uint32 nonce = 1; } - -// QueryModuleStateRequest is the request type for the Query/ExchangeModuleState -// RPC method. -message QueryModuleStateRequest {} - -// QueryModuleStateResponse is the response type for the -// Query/ExchangeModuleState RPC method. -message QueryModuleStateResponse { GenesisState state = 1; } - -// QueryPositionsRequest is the request type for the Query/Positions RPC method. -message QueryPositionsRequest {} - -// QueryPositionsResponse is the response type for the Query/Positions RPC -// method. -message QueryPositionsResponse { - repeated DerivativePosition state = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryTradeRewardPointsRequest is the request type for the -// Query/TradeRewardPoints RPC method. -message QueryTradeRewardPointsRequest { - repeated string accounts = 1; - int64 pending_pool_timestamp = 2; -} - -// QueryTradeRewardPointsResponse is the response type for the -// Query/TradeRewardPoints RPC method. -message QueryTradeRewardPointsResponse { - repeated string account_trade_reward_points = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// QueryTradeRewardCampaignRequest is the request type for the -// Query/TradeRewardCampaign RPC method. -message QueryTradeRewardCampaignRequest {} - -// QueryTradeRewardCampaignResponse is the response type for the -// Query/TradeRewardCampaign RPC method. -message QueryTradeRewardCampaignResponse { - TradingRewardCampaignInfo trading_reward_campaign_info = 1; - repeated CampaignRewardPool trading_reward_pool_campaign_schedule = 2; - string total_trade_reward_points = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - repeated CampaignRewardPool pending_trading_reward_pool_campaign_schedule = 4; - repeated string pending_total_trade_reward_points = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// QueryIsRegisteredDMMRequest is the request type for the Query/IsRegisteredDMM -// RPC method. -message QueryIsOptedOutOfRewardsRequest { string account = 1; } - -// QueryIsRegisteredDMMResponse is the response type for the -// Query/IsRegisteredDMM RPC method. -message QueryIsOptedOutOfRewardsResponse { bool is_opted_out = 1; } - -// QueryRegisteredDMMsRequest is the request type for the Query/RegisteredDMMs -// RPC method. -message QueryOptedOutOfRewardsAccountsRequest {} - -// QueryRegisteredDMMsResponse is the response type for the Query/RegisteredDMMs -// RPC method. -message QueryOptedOutOfRewardsAccountsResponse { repeated string accounts = 1; } - -// QueryFeeDiscountAccountInfoRequest is the request type for the -// Query/FeeDiscountAccountInfo RPC method. -message QueryFeeDiscountAccountInfoRequest { string account = 1; } - -// QueryFeeDiscountAccountInfoResponse is the response type for the -// Query/FeeDiscountAccountInfo RPC method. -message QueryFeeDiscountAccountInfoResponse { - uint64 tier_level = 1; - FeeDiscountTierInfo account_info = 2; - FeeDiscountTierTTL account_ttl = 3; -} - -// QueryFeeDiscountScheduleRequest is the request type for the -// Query/FeeDiscountSchedule RPC method. -message QueryFeeDiscountScheduleRequest {} - -// QueryFeeDiscountScheduleResponse is the response type for the -// Query/FeeDiscountSchedule RPC method. -message QueryFeeDiscountScheduleResponse { - FeeDiscountSchedule fee_discount_schedule = 1; -} - -// QueryBalanceMismatchesRequest is the request type for the -// Query/QueryBalanceMismatches RPC method. -message QueryBalanceMismatchesRequest { int64 dust_factor = 1; } - -message BalanceMismatch { - string subaccountId = 1; - string denom = 2; - string available = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string total = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string balance_hold = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string expected_total = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string difference = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// QueryBalanceMismatchesResponse is the response type for the -// Query/QueryBalanceMismatches RPC method. -message QueryBalanceMismatchesResponse { - repeated BalanceMismatch balance_mismatches = 1; -} - -// QueryBalanceWithBalanceHoldsRequest is the request type for the -// Query/QueryBalanceWithBalanceHolds RPC method. -message QueryBalanceWithBalanceHoldsRequest {} - -message BalanceWithMarginHold { - string subaccountId = 1; - string denom = 2; - string available = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string total = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string balance_hold = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// QueryBalanceWithBalanceHoldsResponse is the response type for the -// Query/QueryBalanceWithBalanceHolds RPC method. -message QueryBalanceWithBalanceHoldsResponse { - repeated BalanceWithMarginHold balance_with_balance_holds = 1; -} - -// QueryFeeDiscountTierStatisticsRequest is the request type for the -// Query/QueryFeeDiscountTierStatistics RPC method. -message QueryFeeDiscountTierStatisticsRequest {} - -message TierStatistic { - uint64 tier = 1; - uint64 count = 2; -} - -// QueryFeeDiscountTierStatisticsResponse is the response type for the -// Query/QueryFeeDiscountTierStatistics RPC method. -message QueryFeeDiscountTierStatisticsResponse { - repeated TierStatistic statistics = 1; -} - -// MitoVaultInfosRequest is the request type for the Query/MitoVaultInfos RPC -// method. -message MitoVaultInfosRequest {} - -// MitoVaultInfosResponse is the response type for the Query/MitoVaultInfos RPC -// method. -message MitoVaultInfosResponse { - repeated string master_addresses = 1; - repeated string derivative_addresses = 2; - repeated string spot_addresses = 3; - repeated string cw20_addresses = 4; -} - -// QueryMarketIDFromVaultRequest is the request type for the Query/QueryMarketIDFromVault RPC method. -message QueryMarketIDFromVaultRequest { - string vault_address = 1; -} - -// QueryMarketIDFromVaultResponse is the response type for the -// Query/QueryMarketIDFromVault RPC method. -message QueryMarketIDFromVaultResponse { string market_id = 1; } - -message QueryHistoricalTradeRecordsRequest { string market_id = 1; } - -message QueryHistoricalTradeRecordsResponse { - repeated TradeRecords trade_records = 1; -} - -// TradeHistoryOptions are the optional params for Query/MarketVolatility RPC -// method. -message TradeHistoryOptions { - // TradeGroupingSec of 0 means use the chain's default grouping - uint64 trade_grouping_sec = 1; - // MaxAge restricts the trade records oldest age in seconds from the current block time to consider. - // A value of 0 means use all the records present on the chain. - uint64 max_age = 2; - // If IncludeRawHistory is true, the raw underlying data used for the - // computation is included in the response - bool include_raw_history = 4; - // If IncludeMetadata is true, metadata on the computation is included in the - // response - bool include_metadata = 5; -} - -// QueryMarketVolatilityRequest are the request params for the -// Query/MarketVolatility RPC method. -message QueryMarketVolatilityRequest { - string market_id = 1; - TradeHistoryOptions trade_history_options = 2; -} - -// QueryMarketVolatilityResponse is the response type for the -// Query/MarketVolatility RPC method. -message QueryMarketVolatilityResponse { - string volatility = 1 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; - injective.oracle.v1beta1.MetadataStatistics history_metadata = 2; - repeated TradeRecord raw_history = 3; -} - -// QuerBinaryMarketsRequest is the request type for the Query/BinaryMarkets RPC -// method. -message QueryBinaryMarketsRequest { - // Status of the market, for convenience it is set to string - not enum - string status = 1; -} - -// QueryBinaryMarketsResponse is the response type for the Query/BinaryMarkets -// RPC method. -message QueryBinaryMarketsResponse { repeated BinaryOptionsMarket markets = 1; } - -// QueryConditionalOrdersRequest is the request type for the -// Query/ConditionalOrders RPC method. -message QueryTraderDerivativeConditionalOrdersRequest { - string subaccount_id = 1; - string market_id = 2; -} - -message TrimmedDerivativeConditionalOrder { - // price of the order - string price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // quantity of the order - string quantity = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // margin of the order - string margin = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // price to trigger the order - string triggerPrice = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // true if the order is a buy - bool isBuy = 5 - [ (gogoproto.jsontag) = "isBuy" ]; // ensure omitempty is not in jsontag - bool isLimit = 6 [ (gogoproto.jsontag) = "isLimit" ]; - string order_hash = 7; -} - -// QueryTraderDerivativeOrdersResponse is the response type for the -// Query/TraderDerivativeOrders RPC method. -message QueryTraderDerivativeConditionalOrdersResponse { - repeated TrimmedDerivativeConditionalOrder orders = 1; -} - -message QueryMarketAtomicExecutionFeeMultiplierRequest { string market_id = 1; } - -message QueryMarketAtomicExecutionFeeMultiplierResponse { - string multiplier = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/exchange/v1beta1/tx.proto b/packages/injective-protobuf/proto/injective/exchange/v1beta1/tx.proto deleted file mode 100644 index e90848a7..00000000 --- a/packages/injective-protobuf/proto/injective/exchange/v1beta1/tx.proto +++ /dev/null @@ -1,1461 +0,0 @@ -syntax = "proto3"; -package injective.exchange.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; -import "cosmos/msg/v1/msg.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "injective/exchange/v1beta1/exchange.proto"; -import "injective/oracle/v1beta1/oracle.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types"; - -// Msg defines the exchange Msg service. -service Msg { - // Deposit defines a method for transferring coins from the sender's bank - // balance into the subaccount's exchange deposits - rpc Deposit(MsgDeposit) returns (MsgDepositResponse); - - // Withdraw defines a method for withdrawing coins from a subaccount's - // deposits to the user's bank balance - rpc Withdraw(MsgWithdraw) returns (MsgWithdrawResponse); - - // InstantSpotMarketLaunch defines method for creating a spot market by paying - // listing fee without governance - rpc InstantSpotMarketLaunch(MsgInstantSpotMarketLaunch) - returns (MsgInstantSpotMarketLaunchResponse); - - // InstantPerpetualMarketLaunch defines a method for creating a new perpetual - // futures market by paying listing fee without governance - rpc InstantPerpetualMarketLaunch(MsgInstantPerpetualMarketLaunch) - returns (MsgInstantPerpetualMarketLaunchResponse); - - // InstantExpiryFuturesMarketLaunch defines a method for creating a new expiry - // futures market by paying listing fee without governance - rpc InstantExpiryFuturesMarketLaunch(MsgInstantExpiryFuturesMarketLaunch) - returns (MsgInstantExpiryFuturesMarketLaunchResponse); - - // CreateSpotLimitOrder defines a method for creating a new spot limit order. - rpc CreateSpotLimitOrder(MsgCreateSpotLimitOrder) - returns (MsgCreateSpotLimitOrderResponse); - - // BatchCreateSpotLimitOrder defines a method for creating a new batch of spot - // limit orders. - rpc BatchCreateSpotLimitOrders(MsgBatchCreateSpotLimitOrders) - returns (MsgBatchCreateSpotLimitOrdersResponse); - - // CreateSpotMarketOrder defines a method for creating a new spot market - // order. - rpc CreateSpotMarketOrder(MsgCreateSpotMarketOrder) - returns (MsgCreateSpotMarketOrderResponse); - - // MsgCancelSpotOrder defines a method for cancelling a spot order. - rpc CancelSpotOrder(MsgCancelSpotOrder) returns (MsgCancelSpotOrderResponse); - - // BatchCancelSpotOrders defines a method for cancelling a batch of spot - // orders in a given market. - rpc BatchCancelSpotOrders(MsgBatchCancelSpotOrders) - returns (MsgBatchCancelSpotOrdersResponse); - - // BatchUpdateOrders defines a method for updating a batch of orders. - rpc BatchUpdateOrders(MsgBatchUpdateOrders) - returns (MsgBatchUpdateOrdersResponse); - - // PrivilegedExecuteContract defines a method for executing a Cosmwasm - // contract from the exchange module with privileged capabilities. - rpc PrivilegedExecuteContract(MsgPrivilegedExecuteContract) - returns (MsgPrivilegedExecuteContractResponse); - - // CreateDerivativeLimitOrder defines a method for creating a new derivative - // limit order. - rpc CreateDerivativeLimitOrder(MsgCreateDerivativeLimitOrder) - returns (MsgCreateDerivativeLimitOrderResponse); - - // BatchCreateDerivativeLimitOrders defines a method for creating a new batch - // of derivative limit orders. - rpc BatchCreateDerivativeLimitOrders(MsgBatchCreateDerivativeLimitOrders) - returns (MsgBatchCreateDerivativeLimitOrdersResponse); - - // MsgCreateDerivativeLimitOrder defines a method for creating a new - // derivative market order. - rpc CreateDerivativeMarketOrder(MsgCreateDerivativeMarketOrder) - returns (MsgCreateDerivativeMarketOrderResponse); - - // MsgCancelDerivativeOrder defines a method for cancelling a derivative - // order. - rpc CancelDerivativeOrder(MsgCancelDerivativeOrder) - returns (MsgCancelDerivativeOrderResponse); - - // MsgBatchCancelDerivativeOrders defines a method for cancelling a batch of - // derivative limit orders. - rpc BatchCancelDerivativeOrders(MsgBatchCancelDerivativeOrders) - returns (MsgBatchCancelDerivativeOrdersResponse); - - // InstantBinaryOptionsMarketLaunch defines method for creating a binary - // options market by paying listing fee without governance - rpc InstantBinaryOptionsMarketLaunch(MsgInstantBinaryOptionsMarketLaunch) - returns (MsgInstantBinaryOptionsMarketLaunchResponse); - - // CreateBinaryOptionsLimitOrder defines a method for creating a new binary - // options limit order. - rpc CreateBinaryOptionsLimitOrder(MsgCreateBinaryOptionsLimitOrder) - returns (MsgCreateBinaryOptionsLimitOrderResponse); - - // CreateBinaryOptionsMarketOrder defines a method for creating a new binary - // options market order. - rpc CreateBinaryOptionsMarketOrder(MsgCreateBinaryOptionsMarketOrder) - returns (MsgCreateBinaryOptionsMarketOrderResponse); - - // MsgCancelBinaryOptionsOrder defines a method for cancelling a binary - // options order. - rpc CancelBinaryOptionsOrder(MsgCancelBinaryOptionsOrder) - returns (MsgCancelBinaryOptionsOrderResponse); - - // BatchCancelBinaryOptionsOrders defines a method for cancelling a batch of - // binary options limit orders. - rpc BatchCancelBinaryOptionsOrders(MsgBatchCancelBinaryOptionsOrders) - returns (MsgBatchCancelBinaryOptionsOrdersResponse); - - // SubaccountTransfer defines a method for transfer between subaccounts - rpc SubaccountTransfer(MsgSubaccountTransfer) - returns (MsgSubaccountTransferResponse); - - // ExternalTransfer defines a method for transfer between external accounts - rpc ExternalTransfer(MsgExternalTransfer) - returns (MsgExternalTransferResponse); - - // LiquidatePosition defines a method for liquidating a position - rpc LiquidatePosition(MsgLiquidatePosition) - returns (MsgLiquidatePositionResponse); - - // IncreasePositionMargin defines a method for increasing margin of a position - rpc IncreasePositionMargin(MsgIncreasePositionMargin) - returns (MsgIncreasePositionMarginResponse); - - // RewardsOptOut defines a method for opting out of rewards - rpc RewardsOptOut(MsgRewardsOptOut) returns (MsgRewardsOptOutResponse); - - // AdminUpdateBinaryOptionsMarket defines method for updating a binary options - // market by admin - rpc AdminUpdateBinaryOptionsMarket(MsgAdminUpdateBinaryOptionsMarket) - returns (MsgAdminUpdateBinaryOptionsMarketResponse); - - // - rpc ReclaimLockedFunds(MsgReclaimLockedFunds) - returns (MsgReclaimLockedFundsResponse); - - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // params defines the exchange parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [ (gogoproto.nullable) = false ]; -} - -message MsgUpdateParamsResponse {} - -// MsgDeposit defines a SDK message for transferring coins from the sender's -// bank balance into the subaccount's exchange deposits -message MsgDeposit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // (Optional) bytes32 subaccount ID to deposit funds into. If empty, the coin - // will be deposited to the sender's default subaccount address. - string subaccount_id = 2; - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; -} - -// MsgDepositResponse defines the Msg/Deposit response type. -message MsgDepositResponse {} - -// MsgWithdraw defines a SDK message for withdrawing coins from a subaccount's -// deposits to the user's bank balance -message MsgWithdraw { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // bytes32 subaccount ID to withdraw funds from - string subaccount_id = 2; - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; -} - -// MsgWithdraw defines the Msg/Withdraw response type. -message MsgWithdrawResponse {} - -// MsgCreateSpotLimitOrder defines a SDK message for creating a new spot limit -// order. -message MsgCreateSpotLimitOrder { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - SpotOrder order = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgCreateSpotLimitOrderResponse defines the Msg/CreateSpotOrder response -// type. -message MsgCreateSpotLimitOrderResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string order_hash = 1; -} - -// MsgBatchCreateSpotLimitOrders defines a SDK message for creating a new batch -// of spot limit orders. -message MsgBatchCreateSpotLimitOrders { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - repeated SpotOrder orders = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgBatchCreateSpotLimitOrdersResponse defines the -// Msg/BatchCreateSpotLimitOrders response type. -message MsgBatchCreateSpotLimitOrdersResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated string order_hashes = 1; -} - -// MsgInstantSpotMarketLaunch defines a SDK message for creating a new spot -// market by paying listing fee without governance -message MsgInstantSpotMarketLaunch { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // Ticker for the spot market. - string ticker = 2; - // type of coin to use as the base currency - string base_denom = 3; - // type of coin to use as the quote currency - string quote_denom = 4; - // min_price_tick_size defines the minimum tick size of the order's price - string min_price_tick_size = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the order's - // quantity - string min_quantity_tick_size = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// MsgInstantSpotMarketLaunchResponse defines the Msg/InstantSpotMarketLaunch -// response type. -message MsgInstantSpotMarketLaunchResponse {} - -// MsgInstantPerpetualMarketLaunch defines a SDK message for creating a new -// perpetual futures market by paying listing fee without governance -message MsgInstantPerpetualMarketLaunch { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // Ticker for the derivative market. - string ticker = 2; - // type of coin to use as the base currency - string quote_denom = 3; - // Oracle base currency - string oracle_base = 4; - // Oracle quote currency - string oracle_quote = 5; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 6; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 7; - // maker_fee_rate defines the trade fee rate for makers on the perpetual - // market - string maker_fee_rate = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // taker_fee_rate defines the trade fee rate for takers on the perpetual - // market - string taker_fee_rate = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // initial_margin_ratio defines the initial margin ratio for the perpetual - // market - string initial_margin_ratio = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // maintenance_margin_ratio defines the maintenance margin ratio for the - // perpetual market - string maintenance_margin_ratio = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_price_tick_size defines the minimum tick size of the order's price and - // margin - string min_price_tick_size = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the order's - // quantity - string min_quantity_tick_size = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// MsgInstantPerpetualMarketLaunchResponse defines the -// Msg/InstantPerpetualMarketLaunchResponse response type. -message MsgInstantPerpetualMarketLaunchResponse {} - -// MsgInstantBinaryOptionsMarketLaunch defines a SDK message for creating a new -// perpetual futures market by paying listing fee without governance -message MsgInstantBinaryOptionsMarketLaunch { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // Ticker for the derivative contract. - string ticker = 2; - // Oracle symbol - string oracle_symbol = 3; - // Oracle Provider - string oracle_provider = 4; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 5; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 6; - // maker_fee_rate defines the trade fee rate for makers on the perpetual - // market - string maker_fee_rate = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // taker_fee_rate defines the trade fee rate for takers on the perpetual - // market - string taker_fee_rate = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // expiration timestamp - int64 expiration_timestamp = 9; - // expiration timestamp - int64 settlement_timestamp = 10; - // admin of the market - string admin = 11; - // Address of the quote currency denomination for the binary options contract - string quote_denom = 12; - // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market - string min_price_tick_size = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market - string min_quantity_tick_size = 14 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// MsgInstantBinaryOptionsMarketLaunchResponse defines the -// Msg/InstantBinaryOptionsMarketLaunchResponse response type. -message MsgInstantBinaryOptionsMarketLaunchResponse {} - -// MsgInstantExpiryFuturesMarketLaunch defines a SDK message for creating a new -// expiry futures market by paying listing fee without governance -message MsgInstantExpiryFuturesMarketLaunch { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // Ticker for the derivative market. - string ticker = 2; - // type of coin to use as the quote currency - string quote_denom = 3; - // Oracle base currency - string oracle_base = 4; - // Oracle quote currency - string oracle_quote = 5; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 6; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 7; - // Expiration time of the market - int64 expiry = 8; - // maker_fee_rate defines the trade fee rate for makers on the expiry futures - // market - string maker_fee_rate = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // taker_fee_rate defines the trade fee rate for takers on the expiry futures - // market - string taker_fee_rate = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // initial_margin_ratio defines the initial margin ratio for the derivative - // market - string initial_margin_ratio = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // maintenance_margin_ratio defines the maintenance margin ratio for the - // derivative market - string maintenance_margin_ratio = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_price_tick_size defines the minimum tick size of the order's price and - // margin - string min_price_tick_size = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the order's - // quantity - string min_quantity_tick_size = 14 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// MsgInstantExpiryFuturesMarketLaunchResponse defines the -// Msg/InstantExpiryFuturesMarketLaunch response type. -message MsgInstantExpiryFuturesMarketLaunchResponse {} - -// MsgCreateSpotMarketOrder defines a SDK message for creating a new spot market -// order. -message MsgCreateSpotMarketOrder { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - SpotOrder order = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgCreateSpotMarketOrderResponse defines the Msg/CreateSpotMarketLimitOrder -// response type. -message MsgCreateSpotMarketOrderResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string order_hash = 1; - - SpotMarketOrderResults results = 2 [ (gogoproto.nullable) = true ]; -} - -message SpotMarketOrderResults { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string quantity = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string fee = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// A Cosmos-SDK MsgCreateDerivativeLimitOrder -message MsgCreateDerivativeLimitOrder { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgCreateDerivativeLimitOrderResponse defines the -// Msg/CreateDerivativeMarketOrder response type. -message MsgCreateDerivativeLimitOrderResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string order_hash = 1; -} - -// A Cosmos-SDK MsgCreateBinaryOptionsLimitOrder -message MsgCreateBinaryOptionsLimitOrder { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgCreateBinaryOptionsLimitOrderResponse defines the -// Msg/CreateBinaryOptionsLimitOrder response type. -message MsgCreateBinaryOptionsLimitOrderResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string order_hash = 1; -} - -// A Cosmos-SDK MsgBatchCreateDerivativeLimitOrders -message MsgBatchCreateDerivativeLimitOrders { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - repeated DerivativeOrder orders = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgBatchCreateDerivativeLimitOrdersResponse defines the -// Msg/BatchCreateDerivativeLimitOrders response type. -message MsgBatchCreateDerivativeLimitOrdersResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated string order_hashes = 1; -} - -// MsgCancelSpotOrder defines the Msg/CancelSpotOrder response type. -message MsgCancelSpotOrder { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string market_id = 2; - string subaccount_id = 3; - string order_hash = 4; -} - -// MsgCancelSpotOrderResponse defines the Msg/CancelSpotOrder response type. -message MsgCancelSpotOrderResponse {} - -// MsgBatchCancelSpotOrders defines the Msg/BatchCancelSpotOrders response type. -message MsgBatchCancelSpotOrders { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - repeated OrderData data = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgBatchCancelSpotOrdersResponse defines the Msg/BatchCancelSpotOrders -// response type. -message MsgBatchCancelSpotOrdersResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated bool success = 1; -} - -// MsgBatchCancelBinaryOptionsOrders defines the -// Msg/BatchCancelBinaryOptionsOrders response type. -message MsgBatchCancelBinaryOptionsOrders { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - repeated OrderData data = 2 [ (gogoproto.nullable) = false ]; -} - -// BatchCancelBinaryOptionsOrdersResponse defines the -// Msg/BatchCancelBinaryOptionsOrders response type. -message MsgBatchCancelBinaryOptionsOrdersResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated bool success = 1; -} - -// MsgBatchUpdateOrders defines the Msg/BatchUpdateOrders response type. -message MsgBatchUpdateOrders { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // subaccount_id only used for the spot_market_ids_to_cancel_all and - // derivative_market_ids_to_cancel_all. - string subaccount_id = 2; - repeated string spot_market_ids_to_cancel_all = 3; - repeated string derivative_market_ids_to_cancel_all = 4; - repeated OrderData spot_orders_to_cancel = 5 [ (gogoproto.nullable) = true ]; - repeated OrderData derivative_orders_to_cancel = 6 - [ (gogoproto.nullable) = true ]; - repeated SpotOrder spot_orders_to_create = 7 [ (gogoproto.nullable) = true ]; - repeated DerivativeOrder derivative_orders_to_create = 8 - [ (gogoproto.nullable) = true ]; - repeated OrderData binary_options_orders_to_cancel = 9 - [ (gogoproto.nullable) = true ]; - repeated string binary_options_market_ids_to_cancel_all = 10; - repeated DerivativeOrder binary_options_orders_to_create = 11 - [ (gogoproto.nullable) = true ]; -} - -// MsgBatchUpdateOrdersResponse defines the Msg/BatchUpdateOrders response type. -message MsgBatchUpdateOrdersResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated bool spot_cancel_success = 1; - repeated bool derivative_cancel_success = 2; - repeated string spot_order_hashes = 3; - repeated string derivative_order_hashes = 4; - repeated bool binary_options_cancel_success = 5; - repeated string binary_options_order_hashes = 6; -} - -// A Cosmos-SDK MsgCreateDerivativeMarketOrder -message MsgCreateDerivativeMarketOrder { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgCreateDerivativeMarketOrderResponse defines the -// Msg/CreateDerivativeMarketOrder response type. -message MsgCreateDerivativeMarketOrderResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string order_hash = 1; - - DerivativeMarketOrderResults results = 2 [ (gogoproto.nullable) = true ]; -} - -message DerivativeMarketOrderResults { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string quantity = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string fee = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - PositionDelta position_delta = 4 [ (gogoproto.nullable) = false ]; - string payout = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// A Cosmos-SDK MsgCreateBinaryOptionsMarketOrder -message MsgCreateBinaryOptionsMarketOrder { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - DerivativeOrder order = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgCreateBinaryOptionsMarketOrderResponse defines the -// Msg/CreateBinaryOptionsMarketOrder response type. -message MsgCreateBinaryOptionsMarketOrderResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string order_hash = 1; - - DerivativeMarketOrderResults results = 2 [ (gogoproto.nullable) = true ]; -} - -// MsgCancelDerivativeOrder defines the Msg/CancelDerivativeOrder response type. -message MsgCancelDerivativeOrder { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string market_id = 2; - string subaccount_id = 3; - string order_hash = 4; - int32 order_mask = 5; // bitwise combination of OrderMask enum values -} - -// MsgCancelDerivativeOrderResponse defines the -// Msg/CancelDerivativeOrderResponse response type. -message MsgCancelDerivativeOrderResponse {} - -// MsgCancelBinaryOptionsOrder defines the Msg/CancelBinaryOptionsOrder response -// type. -message MsgCancelBinaryOptionsOrder { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string market_id = 2; - string subaccount_id = 3; - string order_hash = 4; - int32 order_mask = 5; // bitwise combination of OrderMask enum values -} - -// MsgCancelBinaryOptionsOrderResponse defines the -// Msg/CancelBinaryOptionsOrderResponse response type. -message MsgCancelBinaryOptionsOrderResponse {} - -message OrderData { - string market_id = 1; - string subaccount_id = 2; - string order_hash = 3; - int32 order_mask = 4; // bitwise combination of OrderMask enum values -} - -// MsgBatchCancelDerivativeOrders defines the Msg/CancelDerivativeOrders -// response type. -message MsgBatchCancelDerivativeOrders { - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - repeated OrderData data = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgBatchCancelDerivativeOrdersResponse defines the -// Msg/CancelDerivativeOrderResponse response type. -message MsgBatchCancelDerivativeOrdersResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated bool success = 1; -} - -// A Cosmos-SDK MsgSubaccountTransfer -message MsgSubaccountTransfer { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string source_subaccount_id = 2; - string destination_subaccount_id = 3; - cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ]; -} - -// MsgSubaccountTransferResponse defines the Msg/SubaccountTransfer response -// type. -message MsgSubaccountTransferResponse {} - -// A Cosmos-SDK MsgExternalTransfer -message MsgExternalTransfer { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string source_subaccount_id = 2; - string destination_subaccount_id = 3; - cosmos.base.v1beta1.Coin amount = 4 [ (gogoproto.nullable) = false ]; -} - -// MsgExternalTransferResponse defines the Msg/ExternalTransfer response type. -message MsgExternalTransferResponse {} - -// A Cosmos-SDK MsgLiquidatePosition -message MsgLiquidatePosition { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string subaccount_id = 2; - string market_id = 3; - - // optional order to provide for liquidation - DerivativeOrder order = 4 [ (gogoproto.nullable) = true ]; -} - -// MsgLiquidatePositionResponse defines the Msg/LiquidatePosition response type. -message MsgLiquidatePositionResponse {} - -// A Cosmos-SDK MsgIncreasePositionMargin -message MsgIncreasePositionMargin { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string source_subaccount_id = 2; - string destination_subaccount_id = 3; - string market_id = 4; - // amount defines the amount of margin to add to the position - string amount = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// MsgIncreasePositionMarginResponse defines the Msg/IncreasePositionMargin -// response type. -message MsgIncreasePositionMarginResponse {} - -// MsgPrivilegedExecuteContract defines the Msg/Exec message type -message MsgPrivilegedExecuteContract { - option (cosmos.msg.v1.signer) = "sender"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - string sender = 1; - - // funds defines the user's bank coins used to fund the execution (e.g. - // 100inj). - string funds = 2; - - // contract_address defines the contract address to execute - string contract_address = 3; - - // data defines the call data used when executing the contract - string data = 4; -} - -// MsgPrivilegedExecuteContractResponse defines the Msg/Exec response type. -message MsgPrivilegedExecuteContractResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - repeated cosmos.base.v1beta1.Coin funds_diff = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -message SpotMarketParamUpdateProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string market_id = 3; - - // maker_fee_rate defines the trade fee rate for makers on the spot market - string maker_fee_rate = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // taker_fee_rate defines the trade fee rate for takers on the spot market - string taker_fee_rate = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // relayer_fee_share_rate defines the relayer fee share rate for the spot - // market - string relayer_fee_share_rate = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // min_price_tick_size defines the minimum tick size of the order's price and - // margin - string min_price_tick_size = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // min_quantity_tick_size defines the minimum tick size of the order's - // quantity - string min_quantity_tick_size = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - MarketStatus status = 9; -} - -enum ExchangeType { - EXCHANGE_UNSPECIFIED = 0 - [ (gogoproto.enumvalue_customname) = "EXCHANGE_UNSPECIFIED" ]; - SPOT = 1 [ (gogoproto.enumvalue_customname) = "SPOT" ]; - DERIVATIVES = 2 [ (gogoproto.enumvalue_customname) = "DERIVATIVES" ]; -} - -message ExchangeEnableProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string title = 1; - string description = 2; - - ExchangeType exchangeType = 3; -} - -message BatchExchangeModificationProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - - repeated SpotMarketParamUpdateProposal spot_market_param_update_proposals = 3; - repeated DerivativeMarketParamUpdateProposal - derivative_market_param_update_proposals = 4; - repeated SpotMarketLaunchProposal spot_market_launch_proposals = 5; - repeated PerpetualMarketLaunchProposal perpetual_market_launch_proposals = 6; - repeated ExpiryFuturesMarketLaunchProposal - expiry_futures_market_launch_proposals = 7; - TradingRewardCampaignUpdateProposal trading_reward_campaign_update_proposal = - 8; - repeated BinaryOptionsMarketLaunchProposal - binary_options_market_launch_proposals = 9; - repeated BinaryOptionsMarketParamUpdateProposal - binary_options_param_update_proposals = 10; - UpdateDenomDecimalsProposal denom_decimals_update_proposal = 11; -} - -// SpotMarketLaunchProposal defines a SDK message for proposing a new spot -// market through governance -message SpotMarketLaunchProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - // Ticker for the spot market. - string ticker = 3; - // type of coin to use as the base currency - string base_denom = 4; - // type of coin to use as the quote currency - string quote_denom = 5; - // min_price_tick_size defines the minimum tick size of the order's price - string min_price_tick_size = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the order's - // quantity - string min_quantity_tick_size = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // maker_fee_rate defines the fee percentage makers pay when trading - string maker_fee_rate = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // taker_fee_rate defines the fee percentage takers pay when trading - string taker_fee_rate = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -// PerpetualMarketLaunchProposal defines a SDK message for proposing a new -// perpetual futures market through governance -message PerpetualMarketLaunchProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - // Ticker for the derivative market. - string ticker = 3; - // type of coin to use as the base currency - string quote_denom = 4; - // Oracle base currency - string oracle_base = 5; - // Oracle quote currency - string oracle_quote = 6; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 7; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 8; - // initial_margin_ratio defines the initial margin ratio for the derivative - // market - string initial_margin_ratio = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // maintenance_margin_ratio defines the maintenance margin ratio for the - // derivative market - string maintenance_margin_ratio = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // maker_fee_rate defines the exchange trade fee for makers for the derivative - // market - string maker_fee_rate = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // taker_fee_rate defines the exchange trade fee for takers for the derivative - // market - string taker_fee_rate = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_price_tick_size defines the minimum tick size of the order's price and - // margin - string min_price_tick_size = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the order's - // quantity - string min_quantity_tick_size = 14 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message BinaryOptionsMarketLaunchProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - // Ticker for the derivative contract. - string ticker = 3; - // Oracle symbol - string oracle_symbol = 4; - // Oracle Provider - string oracle_provider = 5; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 6; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 7; - // expiration timestamp - int64 expiration_timestamp = 8; - // expiration timestamp - int64 settlement_timestamp = 9; - // admin of the market - string admin = 10; - // Address of the quote currency denomination for the binary options contract - string quote_denom = 11; - // maker_fee_rate defines the maker fee rate of a binary options market - string maker_fee_rate = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // taker_fee_rate defines the taker fee rate of a derivative market - string taker_fee_rate = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_price_tick_size defines the minimum tick size that the price and margin - // required for orders in the market - string min_price_tick_size = 14 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the quantity - // required for orders in the market - string min_quantity_tick_size = 15 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// ExpiryFuturesMarketLaunchProposal defines a SDK message for proposing a new -// expiry futures market through governance -message ExpiryFuturesMarketLaunchProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - // Ticker for the derivative market. - string ticker = 3; - // type of coin to use as the quote currency - string quote_denom = 4; - // Oracle base currency - string oracle_base = 5; - // Oracle quote currency - string oracle_quote = 6; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 7; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 8; - // Expiration time of the market - int64 expiry = 9; - // initial_margin_ratio defines the initial margin ratio for the derivative - // market - string initial_margin_ratio = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // maintenance_margin_ratio defines the maintenance margin ratio for the - // derivative market - string maintenance_margin_ratio = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // maker_fee_rate defines the exchange trade fee for makers for the derivative - // market - string maker_fee_rate = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // taker_fee_rate defines the exchange trade fee for takers for the derivative - // market - string taker_fee_rate = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_price_tick_size defines the minimum tick size of the order's price and - // margin - string min_price_tick_size = 14 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // min_quantity_tick_size defines the minimum tick size of the order's - // quantity - string min_quantity_tick_size = 15 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message DerivativeMarketParamUpdateProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string market_id = 3; - - // initial_margin_ratio defines the initial margin ratio for the derivative - // market - string initial_margin_ratio = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // maintenance_margin_ratio defines the maintenance margin ratio for the - // derivative market - string maintenance_margin_ratio = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // maker_fee_rate defines the exchange trade fee for makers for the derivative - // market - string maker_fee_rate = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // taker_fee_rate defines the exchange trade fee for takers for the derivative - // market - string taker_fee_rate = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // relayer_fee_share_rate defines the relayer fee share rate for the - // derivative market - string relayer_fee_share_rate = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // min_price_tick_size defines the minimum tick size of the order's price and - // margin - string min_price_tick_size = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // min_quantity_tick_size defines the minimum tick size of the order's - // quantity - string min_quantity_tick_size = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // hourly_interest_rate defines the hourly interest rate - string HourlyInterestRate = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // hourly_funding_rate_cap defines the maximum absolute value of the hourly - // funding rate - string HourlyFundingRateCap = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - MarketStatus status = 13; - - OracleParams oracle_params = 14; -} - -message MarketForcedSettlementProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string market_id = 3; - string settlement_price = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; -} - -message UpdateDenomDecimalsProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated DenomDecimals denom_decimals = 3; -} - -message BinaryOptionsMarketParamUpdateProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string market_id = 3; - - // maker_fee_rate defines the exchange trade fee for makers for the derivative - // market - string maker_fee_rate = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // taker_fee_rate defines the exchange trade fee for takers for the derivative - // market - string taker_fee_rate = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // relayer_fee_share_rate defines the relayer fee share rate for the - // derivative market - string relayer_fee_share_rate = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // min_price_tick_size defines the minimum tick size of the order's price and - // margin - string min_price_tick_size = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // min_quantity_tick_size defines the minimum tick size of the order's - // quantity - string min_quantity_tick_size = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - - // expiration timestamp - int64 expiration_timestamp = 9; - // expiration timestamp - int64 settlement_timestamp = 10; - // new price at which market will be settled - string settlement_price = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // admin of the market - string admin = 12; - MarketStatus status = 13; - ProviderOracleParams oracle_params = 14; -} - -message ProviderOracleParams { - // Oracle base currency - string symbol = 1; - // Oracle quote currency - string provider = 2; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 3; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 4; -} - -message OracleParams { - // Oracle base currency - string oracle_base = 1; - // Oracle quote currency - string oracle_quote = 2; - // Scale factor for oracle prices. - uint32 oracle_scale_factor = 3; - // Oracle type - injective.oracle.v1beta1.OracleType oracle_type = 4; -} - -message TradingRewardCampaignLaunchProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - TradingRewardCampaignInfo campaign_info = 3; - repeated CampaignRewardPool campaign_reward_pools = 4; -} - -message TradingRewardCampaignUpdateProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - TradingRewardCampaignInfo campaign_info = 3; - repeated CampaignRewardPool campaign_reward_pools_additions = 4; - repeated CampaignRewardPool campaign_reward_pools_updates = 5; -} - -message RewardPointUpdate { - string account_address = 1; - // new_points overwrites the current trading reward points for the account - string new_points = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message TradingRewardPendingPointsUpdateProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - int64 pending_pool_timestamp = 3; - repeated RewardPointUpdate reward_point_updates = 4; -} - -message FeeDiscountProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - FeeDiscountSchedule schedule = 3; -} - -message BatchCommunityPoolSpendProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated cosmos.distribution.v1beta1.CommunityPoolSpendProposal proposals = 3; -} - -// A Cosmos-SDK MsgRewardsOptOut -message MsgRewardsOptOut { string sender = 1; } - -// MsgRewardsOptOutResponse defines the Msg/RewardsOptOut response type. -message MsgRewardsOptOutResponse {} - -// A Cosmos-SDK MsgReclaimLockedFunds -message MsgReclaimLockedFunds { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - bytes lockedAccountPubKey = 2; - bytes signature = 3; -} - -// MsgReclaimLockedFundsResponse defines the Msg/ReclaimLockedFunds response -// type. -message MsgReclaimLockedFundsResponse {} - -// MsgSignData defines an arbitrary, general-purpose, off-chain message -message MsgSignData { - // Signer is the sdk.AccAddress of the message signer - bytes Signer = 1 [ - (gogoproto.jsontag) = "signer", - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" - ]; - // Data represents the raw bytes of the content that is signed (text, json, - // etc) - bytes Data = 2 [ (gogoproto.jsontag) = "data" ]; -} - -// MsgSignDoc defines an arbitrary, general-purpose, off-chain message -message MsgSignDoc { - string sign_type = 1 [ (gogoproto.jsontag) = "type" ]; - MsgSignData value = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgAdminUpdateBinaryOptionsMarket is used by the market Admin to operate the -// market -message MsgAdminUpdateBinaryOptionsMarket { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string market_id = 2; - // new price at which market will be settled - string settlement_price = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = true - ]; - // expiration timestamp - int64 expiration_timestamp = 4; - // expiration timestamp - int64 settlement_timestamp = 5; - // Status of the market - MarketStatus status = 6; -} - -// MsgAdminUpdateBinaryOptionsMarketResponse is the response for -// AdminUpdateBinaryOptionsMarket rpc method -message MsgAdminUpdateBinaryOptionsMarketResponse {} - -// AtomicMarketOrderFeeMultiplierScheduleProposal defines a SDK message for -// proposing new atomic take fee multipliers for specified markets -message AtomicMarketOrderFeeMultiplierScheduleProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - - repeated MarketFeeMultiplier market_fee_multipliers = 3; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/insurance/v1beta1/genesis.proto b/packages/injective-protobuf/proto/injective/insurance/v1beta1/genesis.proto deleted file mode 100644 index 3b7d3d34..00000000 --- a/packages/injective-protobuf/proto/injective/insurance/v1beta1/genesis.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; -package injective.insurance.v1beta1; - -import "injective/insurance/v1beta1/insurance.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/insurance/types"; - -// GenesisState defines the insurance module's genesis state. -message GenesisState { - // params defines all the parameters of related to insurance. - Params params = 1 [ (gogoproto.nullable) = false ]; - - // insurance_funds describes the insurance funds available for derivative - // markets - repeated InsuranceFund insurance_funds = 2 [ (gogoproto.nullable) = false ]; - - // redemption_schedule describes the redemption requests pending - repeated RedemptionSchedule redemption_schedule = 3 - [ (gogoproto.nullable) = false ]; - - // next_share_denom_id describes the next share denom id to be used for newly - // creating insurance fund incremented by 1 per insurance fund creation - uint64 next_share_denom_id = 4; - - // next_redemption_schedule_id describes next redemption schedule id to be - // used for next schedule incremented by 1 per redemption request - uint64 next_redemption_schedule_id = 5; -} diff --git a/packages/injective-protobuf/proto/injective/insurance/v1beta1/insurance.proto b/packages/injective-protobuf/proto/injective/insurance/v1beta1/insurance.proto deleted file mode 100644 index 3607e402..00000000 --- a/packages/injective-protobuf/proto/injective/insurance/v1beta1/insurance.proto +++ /dev/null @@ -1,104 +0,0 @@ -syntax = "proto3"; -package injective.insurance.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "injective/oracle/v1beta1/oracle.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/insurance/types"; - -message Params { - option (gogoproto.equal) = true; - - // default_redemption_notice_period_duration defines the default minimum - // notice period duration that must pass after an underwriter sends a - // redemption request before the underwriter can claim his tokens - google.protobuf.Duration default_redemption_notice_period_duration = 1 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"default_redemption_notice_period_duration\"" - ]; -} - -message InsuranceFund { - // deposit denomination for the given insurance fund - string deposit_denom = 1; - // insurance fund pool token denomination for the given insurance fund - string insurance_pool_token_denom = 2; - // redemption_notice_period_duration defines the minimum notice period - // duration that must pass after an underwriter sends a redemption request - // before the underwriter can claim his tokens - google.protobuf.Duration redemption_notice_period_duration = 3 [ - (gogoproto.stdduration) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"redemption_notice_period_duration\"" - ]; - // balance of fund - string balance = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - // total share tokens minted - string total_share = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - // marketID of the derivative market - string market_id = 6; - // ticker of the derivative market - string market_ticker = 7; - // Oracle base currency of the derivative market OR the oracle symbol for the - // binary options market. - string oracle_base = 8; - // Oracle quote currency of the derivative market OR the oracle provider for - // the binary options market. - string oracle_quote = 9; - // Oracle type of the binary options or derivative market - injective.oracle.v1beta1.OracleType oracle_type = 10; - // Expiration time of the derivative market. Should be -1 for perpetual or -2 - // for binary options markets. - int64 expiry = 11; -} - -message RedemptionSchedule { - // id of redemption schedule - uint64 id = 1; - // marketId of insurance fund for the redemption - string marketId = 2; - // address of the redeemer - string redeemer = 3; - // the time after which the redemption can be claimed - google.protobuf.Timestamp claimable_redemption_time = 4 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"claimable_redemption_time\"" - ]; - - // the insurance_pool_token amount to redeem - cosmos.base.v1beta1.Coin redemption_amount = 5 - [ (gogoproto.nullable) = false ]; -} - -message EventInsuranceFundUpdate { InsuranceFund fund = 1; } - -message EventRequestRedemption { RedemptionSchedule schedule = 1; } - -message EventWithdrawRedemption { - // redemption schedule triggered withdraw - RedemptionSchedule schedule = 1; - // redeem coin amount in base_currency - cosmos.base.v1beta1.Coin redeem_coin = 2 [ (gogoproto.nullable) = false ]; -} - -message EventUnderwrite { - // address of the underwriter - string underwriter = 1; - // marketId of insurance fund for the redemption - string marketId = 2; - // deposit coin amount - cosmos.base.v1beta1.Coin deposit = 3 [ (gogoproto.nullable) = false ]; - // share coin amount - cosmos.base.v1beta1.Coin shares = 4 [ (gogoproto.nullable) = false ]; -} diff --git a/packages/injective-protobuf/proto/injective/insurance/v1beta1/query.proto b/packages/injective-protobuf/proto/injective/insurance/v1beta1/query.proto deleted file mode 100644 index ec21948c..00000000 --- a/packages/injective-protobuf/proto/injective/insurance/v1beta1/query.proto +++ /dev/null @@ -1,120 +0,0 @@ -syntax = "proto3"; -package injective.insurance.v1beta1; - -import "google/api/annotations.proto"; -import "injective/insurance/v1beta1/insurance.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "injective/insurance/v1beta1/genesis.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/insurance/types"; - -// Query defines the gRPC querier service. -service Query { - - // Retrieves insurance params - rpc InsuranceParams(QueryInsuranceParamsRequest) - returns (QueryInsuranceParamsResponse) { - option (google.api.http).get = "/injective/insurance/v1beta1/params"; - } - - // Retrieves individual insurance fund information from market id - rpc InsuranceFund(QueryInsuranceFundRequest) - returns (QueryInsuranceFundResponse) { - option (google.api.http).get = - "/injective/insurance/v1beta1/insurance_fund/{market_id}"; - } - - // Retrieves all insurance funds - rpc InsuranceFunds(QueryInsuranceFundsRequest) - returns (QueryInsuranceFundsResponse) { - option (google.api.http).get = - "/injective/insurance/v1beta1/insurance_funds"; - } - - // Retrives the value of insurance fund share token at current price (not - // pending redemption) - rpc EstimatedRedemptions(QueryEstimatedRedemptionsRequest) - returns (QueryEstimatedRedemptionsResponse) { - option (google.api.http).get = - "/injective/insurance/v1beta1/estimated_redemptions"; - } - - // Retrieves pending redemptions' share token at current price - rpc PendingRedemptions(QueryPendingRedemptionsRequest) - returns (QueryPendingRedemptionsResponse) { - option (google.api.http).get = - "/injective/insurance/v1beta1/pending_redemptions"; - } - - // Retrieves the entire insurance module's state - rpc InsuranceModuleState(QueryModuleStateRequest) - returns (QueryModuleStateResponse) { - option (google.api.http).get = "/injective/insurance/v1beta1/module_state"; - } -} - -// QueryInsuranceParamsRequest is the request type for the Query/InsuranceParams -// RPC method. -message QueryInsuranceParamsRequest {} - -// QueryInsuranceParamsRequest is the response type for the -// Query/InsuranceParams RPC method. -message QueryInsuranceParamsResponse { - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryInsuranceFundRequest is the request type for the Query/InsuranceFunds -// RPC method. -message QueryInsuranceFundRequest { - // Market ID for the market - string market_id = 1; -} - -// QueryInsuranceFundResponse is the response type for the Query/InsuranceFund -// RPC method. -message QueryInsuranceFundResponse { InsuranceFund fund = 1; } - -// QueryInsuranceFundsRequest is the request type for the Query/InsuranceFunds -// RPC method. -message QueryInsuranceFundsRequest {} - -// QueryInsuranceFundsResponse is the response type for the Query/InsuranceFunds -// RPC method. -message QueryInsuranceFundsResponse { - repeated InsuranceFund funds = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryEstimatedRedemptionsRequest is the request type for the -// Query/EstimatedRedemptions RPC method. -message QueryEstimatedRedemptionsRequest { - string marketId = 1; - string address = 2; -} - -// QueryEstimatedRedemptionsResponse is the response type for the -// Query/EstimatedRedemptions RPC method. -message QueryEstimatedRedemptionsResponse { - repeated cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryPendingRedemptionsRequest is the request type for the -// Query/PendingRedemptions RPC method. -message QueryPendingRedemptionsRequest { - string marketId = 1; - string address = 2; -} - -// QueryPendingRedemptionsResponse is the response type for the -// Query/PendingRedemptions RPC method. -message QueryPendingRedemptionsResponse { - repeated cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryModuleStateRequest is the request type for the -// Query/InsuranceModuleState RPC method. -message QueryModuleStateRequest {} - -// QueryModuleStateResponse is the response type for the -// Query/InsuranceModuleState RPC method. -message QueryModuleStateResponse { GenesisState state = 1; } \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/insurance/v1beta1/tx.proto b/packages/injective-protobuf/proto/injective/insurance/v1beta1/tx.proto deleted file mode 100644 index 22e33993..00000000 --- a/packages/injective-protobuf/proto/injective/insurance/v1beta1/tx.proto +++ /dev/null @@ -1,111 +0,0 @@ -syntax = "proto3"; -package injective.insurance.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/msg/v1/msg.proto"; -import "cosmos_proto/cosmos.proto"; -import "injective/insurance/v1beta1/insurance.proto"; -import "injective/oracle/v1beta1/oracle.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/insurance/types"; - -// Msg defines the insurance Msg service. -service Msg { - - // CreateInsuranceFund defines a method for creating an insurance fund - rpc CreateInsuranceFund(MsgCreateInsuranceFund) - returns (MsgCreateInsuranceFundResponse); - - // Underwrite defines a method for depositing tokens to underwrite an - // insurance fund - rpc Underwrite(MsgUnderwrite) returns (MsgUnderwriteResponse); - - // RequestRedemption defines a method for requesting a redemption of the - // sender's insurance fund tokens - rpc RequestRedemption(MsgRequestRedemption) - returns (MsgRequestRedemptionResponse); - - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// MsgCreateInsuranceFund a message to create an insurance fund for a derivative -// market. -message MsgCreateInsuranceFund { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - // Creator of the insurance fund. - string sender = 1; - // Ticker for the derivative market. - string ticker = 2; - // Coin denom to use for the market quote denom - string quote_denom = 3; - // Oracle base currency of the derivative market OR the oracle symbol for the - // binary options market. - string oracle_base = 4; - // Oracle quote currency of the derivative market OR the oracle provider for - // the binary options market. - string oracle_quote = 5; - // Oracle type of the binary options or derivative market - injective.oracle.v1beta1.OracleType oracle_type = 6; - // Expiration time of the derivative market. Should be -1 for perpetual or -2 - // for binary options markets. - int64 expiry = 7; - // Initial deposit of the insurance fund - cosmos.base.v1beta1.Coin initial_deposit = 8 [ (gogoproto.nullable) = false ]; -} - -message MsgCreateInsuranceFundResponse {} - -// MsgUnderwrite defines a message for depositing coins to underwrite an -// insurance fund -message MsgUnderwrite { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - // Address of the underwriter. - string sender = 1; - // MarketID of the insurance fund. - string market_id = 2; - // Amount of quote_denom to underwrite the insurance fund. - cosmos.base.v1beta1.Coin deposit = 3 [ (gogoproto.nullable) = false ]; -} - -message MsgUnderwriteResponse {} - -// MsgRequestRedemption defines a message for requesting a redemption of the -// sender's insurance fund tokens -message MsgRequestRedemption { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - // Address of the underwriter requesting a redemption. - string sender = 1; - // MarketID of the insurance fund. - string market_id = 2; - // Insurance fund share token amount to be redeemed. - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; -} - -message MsgRequestRedemptionResponse {} - -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // params defines the insurance parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [ (gogoproto.nullable) = false ]; -} - -message MsgUpdateParamsResponse {} diff --git a/packages/injective-protobuf/proto/injective/ocr/v1beta1/genesis.proto b/packages/injective-protobuf/proto/injective/ocr/v1beta1/genesis.proto deleted file mode 100644 index 3783cd9f..00000000 --- a/packages/injective-protobuf/proto/injective/ocr/v1beta1/genesis.proto +++ /dev/null @@ -1,75 +0,0 @@ -syntax = "proto3"; -package injective.ocr.v1beta1; - -import "injective/ocr/v1beta1/ocr.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/ocr/types"; - -// GenesisState defines the OCR module's genesis state. -message GenesisState { - // params defines all the parameters of related to OCR. - Params params = 1 [ (gogoproto.nullable) = false ]; - - // feed_configs stores all of the supported OCR feeds - repeated FeedConfig feed_configs = 2; - - // latest_epoch_and_rounds stores the latest epoch and round for each feedId - repeated FeedEpochAndRound latest_epoch_and_rounds = 3; - - // feed_transmissions stores the last transmission for each feed - repeated FeedTransmission feed_transmissions = 4; - - // latest_aggregator_round_ids stores the latest aggregator round ID for each - // feedId - repeated FeedLatestAggregatorRoundIDs latest_aggregator_round_ids = 5; - - // reward_pools stores the reward pools - repeated RewardPool reward_pools = 6; - - // feed_observation_counts stores the feed observation counts - repeated FeedCounts feed_observation_counts = 7; - - // feed_transmission_counts stores the feed transmission counts - repeated FeedCounts feed_transmission_counts = 8; - - // pending_payeeships stores the pending payeeships - repeated PendingPayeeship pending_payeeships = 9; -} - -message FeedTransmission { - string feed_id = 1; - Transmission transmission = 2; -} - -message FeedEpochAndRound { - string feed_id = 1; - EpochAndRound epoch_and_round = 2; -} - -message FeedLatestAggregatorRoundIDs { - string feed_id = 1; - uint64 aggregator_round_id = 2; -} - -message RewardPool { - string feed_id = 1; - cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; -} - -message FeedCounts { - string feed_id = 1; - repeated Count counts = 2; -} - -message Count { - string address = 1; - uint64 count = 2; -} - -message PendingPayeeship { - string feed_id = 1; - string transmitter = 2; - string proposed_payee = 3; -} diff --git a/packages/injective-protobuf/proto/injective/ocr/v1beta1/ocr.proto b/packages/injective-protobuf/proto/injective/ocr/v1beta1/ocr.proto deleted file mode 100644 index 48bfe7cc..00000000 --- a/packages/injective-protobuf/proto/injective/ocr/v1beta1/ocr.proto +++ /dev/null @@ -1,330 +0,0 @@ -syntax = "proto3"; -package injective.ocr.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/ocr/types"; - -message Params { - option (gogoproto.equal) = true; - - // Native denom for LINK coin in the bank keeper - string link_denom = 1; - // The block number interval at which payouts are made - uint64 payout_block_interval = 2; - // The admin for the OCR module - string module_admin = 3; -} - -message FeedConfig { - // signers ith element is address ith oracle uses to sign a report - repeated string signers = 1; - - // transmitters ith element is address ith oracle uses to transmit a report - // via the transmit method - repeated string transmitters = 2; - - // f maximum number of faulty/dishonest oracles the protocol can tolerate - // while still working correctly - uint32 f = 3; - - // onchain_config serialized data with reporting plugin params on chain. - bytes onchain_config = 4; - - // offchain_config_version version of the serialization format used for - // "offchain_config" parameter - uint64 offchain_config_version = 5; - - // offchain_config serialized data used by oracles to configure their offchain - // operation - bytes offchain_config = 6; - - // feed-specific params for the Cosmos module. - ModuleParams module_params = 7; -} - -message FeedConfigInfo { - bytes latest_config_digest = 1; - uint32 f = 2; - uint32 n = 3; - // config_count ordinal number of this config setting among all config - // settings - uint64 config_count = 4; - int64 latest_config_block_number = 5; -} - -message ModuleParams { - // feed_id is an unique ID for the target of this config - string feed_id = 1; - - // lowest answer the median of a report is allowed to be - string min_answer = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // highest answer the median of a report is allowed to be - string max_answer = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // Fixed LINK reward for each observer - string link_per_observation = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - - // Fixed LINK reward for transmitter - string link_per_transmission = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - - // Native denom for LINK coin in the bank keeper - string link_denom = 6; - - // Enables unique reports - bool unique_reports = 7; - - // short human-readable description of observable this feed's answers pertain - // to - string description = 8; - - // feed administrator - string feed_admin = 9; - - // feed billing administrator - string billing_admin = 10; -} - -message ContractConfig { - // config_count ordinal number of this config setting among all config - // settings - uint64 config_count = 1; - - // signers ith element is address ith oracle uses to sign a report - repeated string signers = 2; - - // transmitters ith element is address ith oracle uses to transmit a report - // via the transmit method - repeated string transmitters = 3; - - // f maximum number of faulty/dishonest oracles the protocol can tolerate - // while still working correctly - uint32 f = 4; - - // onchain_config serialized data with reporting plugin params on chain. - bytes onchain_config = 5; - - // offchain_config_version version of the serialization format used for - // "offchain_config" parameter - uint64 offchain_config_version = 6; - - // offchain_config serialized data used by oracles to configure their offchain - // operation - bytes offchain_config = 7; -} - -message SetConfigProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - FeedConfig config = 3; -} - -message FeedProperties { - // feed_id is an unique ID for the target of this config - string feed_id = 1; - - // f maximum number of faulty/dishonest oracles the protocol can tolerate - // while still working correctly - uint32 f = 2; - - // onchain_config serialized data with reporting plugin params on chain. - bytes onchain_config = 3; - - // offchain_config_version version of the serialization format used for - // "offchain_config" parameter - uint64 offchain_config_version = 4; - - // offchain_config serialized data used by oracles to configure their offchain - // operation - bytes offchain_config = 5; - - // lowest answer the median of a report is allowed to be - string min_answer = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // highest answer the median of a report is allowed to be - string max_answer = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - // Fixed LINK reward for each observer - string link_per_observation = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - - // Fixed LINK reward for transmitter - string link_per_transmission = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - - // Enables unique reports - bool unique_reports = 10; - - // short human-readable description of observable this feed's answers pertain - // to - string description = 11; -} - -message SetBatchConfigProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - - // signers ith element is address ith oracle uses to sign a report - repeated string signers = 3; - - // transmitters ith element is address ith oracle uses to transmit a report - // via the transmit method - repeated string transmitters = 4; - - // Native denom for LINK coin in the bank keeper - string link_denom = 5; - - // feed properties - repeated FeedProperties feed_properties = 6; -} - -message OracleObservationsCounts { repeated uint32 counts = 1; } - -// LINK-INJ-denominated reimbursements for gas used by transmitters. -message GasReimbursements { - repeated cosmos.base.v1beta1.Coin reimbursements = 1; -} - -message Payee { - string transmitter_addr = 1; - string payment_addr = 2; -} - -// Transmission records the median answer from the transmit transaction at -// time timestamp -message Transmission { - string answer = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - int64 observations_timestamp = 2; // when were observations made offchain - int64 transmission_timestamp = 3; // when was report received onchain -} - -message EpochAndRound { - uint64 epoch = 1; - uint64 round = 2; -} - -message Report { - int64 observations_timestamp = 1; - bytes observers = 2; // ith element is the index of the ith observer - repeated string observations = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // ith element is the ith observation -} - -message ReportToSign { - bytes config_digest = 1; - uint64 epoch = 2; - uint64 round = 3; - bytes extra_hash = 4; - - // Opaque report - bytes report = 5; -} - -message EventOraclePaid { - string transmitter_addr = 1; - string payee_addr = 2; - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; -} - -message EventAnswerUpdated { - string current = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - - string round_id = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - - google.protobuf.Timestamp updated_at = 3 - [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; -} - -message EventNewRound { - string round_id = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - - // address of starter - string started_by = 2; - - google.protobuf.Timestamp started_at = 3 - [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; -} - -message EventTransmitted { - bytes config_digest = 1; - uint64 epoch = 2; -} - -message EventNewTransmission { - string feed_id = 1; - uint32 aggregator_round_id = 2; - string answer = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string transmitter = 4; - int64 observations_timestamp = 5; - repeated string observations = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes observers = 7; - bytes config_digest = 8; - EpochAndRound epoch_and_round = 9; -} - -message EventConfigSet { - // hash of the config - bytes config_digest = 1; - // previous_config_block_number block in which the previous config was set, to - // simplify historic analysis - int64 previous_config_block_number = 2; - - FeedConfig config = 3; - FeedConfigInfo config_info = 4; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/ocr/v1beta1/query.proto b/packages/injective-protobuf/proto/injective/ocr/v1beta1/query.proto deleted file mode 100644 index 408c1e26..00000000 --- a/packages/injective-protobuf/proto/injective/ocr/v1beta1/query.proto +++ /dev/null @@ -1,101 +0,0 @@ -syntax = "proto3"; -package injective.ocr.v1beta1; - -import "google/api/annotations.proto"; -import "injective/ocr/v1beta1/ocr.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "injective/ocr/v1beta1/genesis.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/ocr/types"; - -// Query defines the gRPC querier service for OCR module. -service Query { - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/chainlink/ocr/v1beta1/params"; - } - - // Retrieves the OCR FeedConfig for a given FeedId - rpc FeedConfig(QueryFeedConfigRequest) returns (QueryFeedConfigResponse) { - option (google.api.http).get = - "/chainlink/ocr/v1beta1/feed_config/{feed_id}"; - } - - // Retrieves the OCR FeedConfigInfo for a given FeedId - rpc FeedConfigInfo(QueryFeedConfigInfoRequest) - returns (QueryFeedConfigInfoResponse) { - option (google.api.http).get = - "/chainlink/ocr/v1beta1/feed_config_info/{feed_id}"; - } - - // Retrieves latest round ID and data, including median answer for that round - rpc LatestRound(QueryLatestRoundRequest) returns (QueryLatestRoundResponse) { - option (google.api.http).get = - "/chainlink/ocr/v1beta1/latest_round/{feed_id}"; - } - - // LatestTransmissionDetails returns details about the latest trasmission - // recorded on chain for the given feed ID. - rpc LatestTransmissionDetails(QueryLatestTransmissionDetailsRequest) - returns (QueryLatestTransmissionDetailsResponse) { - option (google.api.http).get = - "/chainlink/ocr/v1beta1/latest_transmission_details/{feed_id}"; - } - - // Retrieves transmitter's owed amount - rpc OwedAmount(QueryOwedAmountRequest) returns (QueryOwedAmountResponse) { - option (google.api.http).get = - "/chainlink/ocr/v1beta1/owed_amount/{transmitter}"; - } - - // Retrieves the entire OCR module's state - rpc OcrModuleState(QueryModuleStateRequest) - returns (QueryModuleStateResponse) { - option (google.api.http).get = "/chainlink/ocr/v1beta1/module_state"; - } -} - -message QueryParamsRequest {} - -message QueryParamsResponse { - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryFeedConfigRequest { string feed_id = 1; } - -message QueryFeedConfigResponse { - FeedConfigInfo feed_config_info = 1; - FeedConfig feed_config = 2; -} - -message QueryFeedConfigInfoRequest { string feed_id = 1; } - -message QueryFeedConfigInfoResponse { - FeedConfigInfo feed_config_info = 1; - EpochAndRound epoch_and_round = 2; -} - -message QueryLatestRoundRequest { string feed_id = 1; } - -message QueryLatestRoundResponse { - uint64 latest_round_id = 1; - Transmission data = 2; -} - -message QueryLatestTransmissionDetailsRequest { string feed_id = 1; } - -message QueryLatestTransmissionDetailsResponse { - bytes config_digest = 1; - EpochAndRound epoch_and_round = 2; - Transmission data = 3; -} - -message QueryOwedAmountRequest { string transmitter = 1; } - -message QueryOwedAmountResponse { - cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryModuleStateRequest {} - -message QueryModuleStateResponse { GenesisState state = 1; } \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/ocr/v1beta1/tx.proto b/packages/injective-protobuf/proto/injective/ocr/v1beta1/tx.proto deleted file mode 100644 index fa84a912..00000000 --- a/packages/injective-protobuf/proto/injective/ocr/v1beta1/tx.proto +++ /dev/null @@ -1,199 +0,0 @@ -syntax = "proto3"; -package injective.ocr.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/msg/v1/msg.proto"; -import "gogoproto/gogo.proto"; -import "injective/ocr/v1beta1/ocr.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/ocr/types"; - -// Msg defines the OCR Msg service. -service Msg { - // CreateFeed defines a method for creating feed by module admin - rpc CreateFeed(MsgCreateFeed) returns (MsgCreateFeedResponse); - // CreateFeed defines a method for creating feed by feed admin or feed billing - // admin - rpc UpdateFeed(MsgUpdateFeed) returns (MsgUpdateFeedResponse); - // Transmit defines a method for transmitting the feed info by transmitter - rpc Transmit(MsgTransmit) returns (MsgTransmitResponse); - // FundFeedRewardPool defines a method to put funds into feed reward pool - rpc FundFeedRewardPool(MsgFundFeedRewardPool) - returns (MsgFundFeedRewardPoolResponse); - // WithdrawFeedRewardPool defines a method to witdhraw feed reward by feed - // admin or billing admin - rpc WithdrawFeedRewardPool(MsgWithdrawFeedRewardPool) - returns (MsgWithdrawFeedRewardPoolResponse); - // SetPayees defines a method to set payees for transmitters (batch action) - rpc SetPayees(MsgSetPayees) returns (MsgSetPayeesResponse); - // TransferPayeeship defines a method for a payee to transfer reward receive - // ownership - rpc TransferPayeeship(MsgTransferPayeeship) - returns (MsgTransferPayeeshipResponse); - // AcceptPayeeship defines a method for a new payee to accept reward receive - // ownership - rpc AcceptPayeeship(MsgAcceptPayeeship) returns (MsgAcceptPayeeshipResponse); - - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -message MsgCreateFeed { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - FeedConfig config = 2; -} - -message MsgCreateFeedResponse {} - -message MsgUpdateFeed { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // feed_id is an unique ID for the target of this config - string feed_id = 2; - - // signers ith element is address ith oracle uses to sign a report - repeated string signers = 3; - - // transmitters ith element is address ith oracle uses to transmit a report - // via the transmit method - repeated string transmitters = 4; - - // Fixed LINK reward for each observer - string link_per_observation = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = true - ]; - - // Fixed LINK reward for transmitter - string link_per_transmission = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = true - ]; - - // Native denom for LINK coin in the bank keeper - string link_denom = 7; - - // feed administrator - string feed_admin = 8; - - // feed billing administrator - string billing_admin = 9; -} - -message MsgUpdateFeedResponse {} - -message MsgTransmit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "transmitter"; - - // Address of the transmitter - string transmitter = 1; - bytes config_digest = 2; - string feed_id = 3; - uint64 epoch = 4; - uint64 round = 5; - bytes extra_hash = 6; - Report report = 7; - repeated bytes signatures = 8; -} - -message MsgTransmitResponse {} - -message MsgFundFeedRewardPool { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string feed_id = 2; - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; -} - -message MsgFundFeedRewardPoolResponse {} - -message MsgWithdrawFeedRewardPool { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string feed_id = 2; - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; -} - -message MsgWithdrawFeedRewardPoolResponse {} - -message MsgSetPayees { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string feed_id = 2; - // addresses oracles use to transmit the reports - repeated string transmitters = 3; - - // addresses of payees corresponding to list of transmitters - repeated string payees = 4; -} - -message MsgSetPayeesResponse {} - -message MsgTransferPayeeship { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "sender"; - - // transmitter address of oracle whose payee is changing - string sender = 1; - string transmitter = 2; - string feed_id = 3; - // new payee address - string proposed = 4; -} - -message MsgTransferPayeeshipResponse {} - -message MsgAcceptPayeeship { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos.msg.v1.signer) = "transmitter"; - - // new payee address - string payee = 1; - // transmitter address of oracle whose payee is changing - string transmitter = 2; - string feed_id = 3; -} - -message MsgAcceptPayeeshipResponse {} - -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // params defines the ocr parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [ (gogoproto.nullable) = false ]; -} - -message MsgUpdateParamsResponse {} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/oracle/v1beta1/events.proto b/packages/injective-protobuf/proto/injective/oracle/v1beta1/events.proto deleted file mode 100644 index 5db1c22a..00000000 --- a/packages/injective-protobuf/proto/injective/oracle/v1beta1/events.proto +++ /dev/null @@ -1,87 +0,0 @@ -syntax = "proto3"; -package injective.oracle.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "injective/oracle/v1beta1/oracle.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/oracle/types"; - -message SetChainlinkPriceEvent { - string feed_id = 1; - string answer = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 timestamp = 3; -} - -// Event type upon set ref -message SetBandPriceEvent { - string relayer = 1; - string symbol = 2; - string price = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 resolve_time = 4; - uint64 request_id = 5; -} - -message SetBandIBCPriceEvent { - string relayer = 1; - repeated string symbols = 2; - repeated string prices = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 resolve_time = 4; - uint64 request_id = 5; - int64 client_id = 6; -} - -message EventBandIBCAckSuccess { - string ack_result = 1; - int64 client_id = 2; -} - -message EventBandIBCAckError { - string ack_error = 1; - int64 client_id = 2; -} - -message EventBandIBCResponseTimeout { int64 client_id = 1; } - -message SetPriceFeedPriceEvent { - string relayer = 1; - - string base = 2; - string quote = 3; - - // price defines the price of the oracle base and quote - string price = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message SetProviderPriceEvent { - string provider = 1; - string relayer = 2; - string symbol = 3; - string price = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message SetCoinbasePriceEvent { - string symbol = 1; - string price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 timestamp = 3; -} - -message EventSetPythPrices { repeated PythPriceState prices = 1; } diff --git a/packages/injective-protobuf/proto/injective/oracle/v1beta1/genesis.proto b/packages/injective-protobuf/proto/injective/oracle/v1beta1/genesis.proto deleted file mode 100644 index 864afc83..00000000 --- a/packages/injective-protobuf/proto/injective/oracle/v1beta1/genesis.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; -package injective.oracle.v1beta1; - -import "injective/oracle/v1beta1/oracle.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/oracle/types"; - -// GenesisState defines the oracle module's genesis state. -message GenesisState { - // params defines all the parameters of related to oracle. - Params params = 1 [ (gogoproto.nullable) = false ]; - - repeated string band_relayers = 2; - - repeated BandPriceState band_price_states = 3; - - repeated PriceFeedState price_feed_price_states = 4; - - repeated CoinbasePriceState coinbase_price_states = 5; - - repeated BandPriceState band_ibc_price_states = 6; - - repeated BandOracleRequest band_ibc_oracle_requests = 7; - - BandIBCParams band_ibc_params = 8 [ (gogoproto.nullable) = false ]; - - uint64 band_ibc_latest_client_id = 9; - - repeated CalldataRecord calldata_records = 10; - - uint64 band_ibc_latest_request_id = 11; - - repeated ChainlinkPriceState chainlink_price_states = 12; - - repeated PriceRecords historical_price_records = 13; - - repeated ProviderState provider_states = 14; - - repeated PythPriceState pyth_price_states = 15; -} - -message CalldataRecord { - uint64 client_id = 1; - bytes calldata = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/oracle/v1beta1/oracle.proto b/packages/injective-protobuf/proto/injective/oracle/v1beta1/oracle.proto deleted file mode 100644 index 9d11158e..00000000 --- a/packages/injective-protobuf/proto/injective/oracle/v1beta1/oracle.proto +++ /dev/null @@ -1,267 +0,0 @@ -syntax = "proto3"; -package injective.oracle.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/oracle/types"; - -message Params { - option (gogoproto.equal) = true; - - string pyth_contract = 1; -} - -enum OracleType { - Unspecified = 0; - Band = 1; - PriceFeed = 2; - Coinbase = 3; - Chainlink = 4; - Razor = 5; - Dia = 6; - API3 = 7; - Uma = 8; - Pyth = 9; - BandIBC = 10; - Provider = 11; -} - -message OracleInfo { - string symbol = 1; - OracleType oracle_type = 2; - uint32 scale_factor = 3; -} - -message ChainlinkPriceState { - string feed_id = 1; - string answer = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 timestamp = 3; - PriceState price_state = 4 [ (gogoproto.nullable) = false ]; -} - -message BandPriceState { - string symbol = 1; - string rate = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - uint64 resolve_time = 3; - uint64 request_ID = 4; - PriceState price_state = 5 [ (gogoproto.nullable) = false ]; -} - -message PriceFeedState { - string base = 1; - string quote = 2; - PriceState price_state = 3; - repeated string relayers = 4; -} - -message ProviderInfo { - string provider = 1; - repeated string relayers = 2; -} - -message ProviderState { - ProviderInfo provider_info = 1; - repeated ProviderPriceState provider_price_states = 2; -} - -message ProviderPriceState { - string symbol = 1; - PriceState state = 2; -} - -message PriceFeedInfo { - string base = 1; - string quote = 2; -} - -message PriceFeedPrice { - string price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message CoinbasePriceState { - // kind should always be "prices" - string kind = 1; - // timestamp of the when the price was signed by coinbase - uint64 timestamp = 2; - // the symbol of the price, e.g. BTC - string key = 3; - // the value of the price scaled by 1e6 - uint64 value = 4; - // the price state - PriceState price_state = 5 [ (gogoproto.nullable) = false ]; -} - -message PriceState { - string price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - string cumulative_price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - int64 timestamp = 3; -} - -message PythPriceState { - string price_id = 1; - string ema_price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string ema_conf = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string conf = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 publish_time = 5; - PriceState price_state = 6 [ (gogoproto.nullable) = false ]; -} - -message BandOracleRequest { - // Unique Identifier for band ibc oracle request - uint64 request_id = 1; - - // OracleScriptID is the unique identifier of the oracle script to be - // executed. - int64 oracle_script_id = 2; - - // Symbols is the list of symbols to prepare in the calldata - repeated string symbols = 3; - - // AskCount is the number of validators that are requested to respond to this - // oracle request. Higher value means more security, at a higher gas cost. - uint64 ask_count = 4; - - // MinCount is the minimum number of validators necessary for the request to - // proceed to the execution phase. Higher value means more security, at the - // cost of liveness. - uint64 min_count = 5; - - // FeeLimit is the maximum tokens that will be paid to all data source - // providers. - repeated cosmos.base.v1beta1.Coin fee_limit = 6 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // PrepareGas is amount of gas to pay to prepare raw requests - uint64 prepare_gas = 7; - // ExecuteGas is amount of gas to reserve for executing - uint64 execute_gas = 8; - // MinSourceCount is the minimum number of data sources that must be used by - // each validator - uint64 min_source_count = 9; -} - -message BandIBCParams { - // true if Band IBC should be enabled - bool band_ibc_enabled = 1; - // block request interval to send Band IBC prices - int64 ibc_request_interval = 2; - - // band IBC source channel - string ibc_source_channel = 3; - // band IBC version - string ibc_version = 4; - // band IBC portID - string ibc_port_id = 5; - // legacy oracle scheme ids - repeated int64 legacy_oracle_ids = 6; -} - -message SymbolPriceTimestamp { - OracleType oracle = 1; - string symbol_id = 2; - - int64 timestamp = 3; -} - -message LastPriceTimestamps { - repeated SymbolPriceTimestamp last_price_timestamps = 1; -} - -message PriceRecords { - OracleType oracle = 1; - string symbol_id = 2; - repeated PriceRecord latest_price_records = 3; -} - -message PriceRecord { - int64 timestamp = 1; - - string price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// MetadataStatistics refers to the metadata summary statistics of the -// historical sample considered -message MetadataStatistics { - // GroupCount refers to the number of groups used. Equals RecordsSampleSize if - // no grouping is used - uint32 group_count = 1; - // RecordsSampleSize refers to the total number of records used. - uint32 records_sample_size = 2; - // Mean refers to the arithmetic mean - // For trades, the mean is the VWAP computed over the grouped trade records ∑ - // (price * quantity) / ∑ quantity For oracle prices, the mean is computed - // over the price records ∑ (price) / prices_count - string mean = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // TWAP refers to the time-weighted average price which equals ∑ (price_i * - // ∆t_i) / ∑ ∆t_i where ∆t_i = t_i - t_{i-1} - string twap = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // FirstTimestamp is the timestamp of the oldest record considered - int64 first_timestamp = 5; - // LastTimestamp is the timestamp of the youngest record considered - int64 last_timestamp = 6; - // MinPrice refers to the smallest individual raw price considered - string min_price = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // MaxPrice refers to the largest individual raw price considered - string max_price = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // MedianPrice refers to the median individual raw price considered - string median_price = 9 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message PriceAttestation { - string price_id = 1; - // MaxPrice refers to the largest individual raw price considered - int64 price = 2; - uint64 conf = 3; - int32 expo = 4; - int64 ema_price = 5; - uint64 ema_conf = 6; - int32 ema_expo = 7; - int64 publish_time = 8; -} diff --git a/packages/injective-protobuf/proto/injective/oracle/v1beta1/proposal.proto b/packages/injective-protobuf/proto/injective/oracle/v1beta1/proposal.proto deleted file mode 100644 index 925d786d..00000000 --- a/packages/injective-protobuf/proto/injective/oracle/v1beta1/proposal.proto +++ /dev/null @@ -1,116 +0,0 @@ -syntax = "proto3"; -package injective.oracle.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "injective/oracle/v1beta1/oracle.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/oracle/types"; - -message GrantBandOraclePrivilegeProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated string relayers = 3; -} - -message RevokeBandOraclePrivilegeProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated string relayers = 3; -} - -message GrantPriceFeederPrivilegeProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string base = 3; - string quote = 4; - repeated string relayers = 5; -} - -message GrantProviderPrivilegeProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string provider = 3; - repeated string relayers = 4; -} - -message RevokeProviderPrivilegeProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string provider = 3; - repeated string relayers = 5; -} - -message RevokePriceFeederPrivilegeProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string base = 3; - string quote = 4; - repeated string relayers = 5; -} - -message AuthorizeBandOracleRequestProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - BandOracleRequest request = 3 [ (gogoproto.nullable) = false ]; -} - -message UpdateBandOracleRequestProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated uint64 delete_request_ids = 3; - BandOracleRequest update_oracle_request = 4; -} - -message EnableBandIBCProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - - BandIBCParams band_ibc_params = 3 [ (gogoproto.nullable) = false ]; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/oracle/v1beta1/query.proto b/packages/injective-protobuf/proto/injective/oracle/v1beta1/query.proto deleted file mode 100644 index 3e07408b..00000000 --- a/packages/injective-protobuf/proto/injective/oracle/v1beta1/query.proto +++ /dev/null @@ -1,285 +0,0 @@ -syntax = "proto3"; -package injective.oracle.v1beta1; - -import "google/api/annotations.proto"; -import "injective/oracle/v1beta1/oracle.proto"; -import "injective/oracle/v1beta1/genesis.proto"; -import "gogoproto/gogo.proto"; -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/oracle/types"; - -// Query defines the gRPC querier service. -service Query { - - // Retrieves oracle params - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/injective/oracle/v1beta1/params"; - } - - // Retrieves the band relayers - rpc BandRelayers(QueryBandRelayersRequest) - returns (QueryBandRelayersResponse) { - option (google.api.http).get = "/injective/oracle/v1beta1/band_relayers"; - } - - // Retrieves the state for all band price feeds - rpc BandPriceStates(QueryBandPriceStatesRequest) - returns (QueryBandPriceStatesResponse) { - option (google.api.http).get = - "/injective/oracle/v1beta1/band_price_states"; - } - - // Retrieves the state for all band ibc price feeds - rpc BandIBCPriceStates(QueryBandIBCPriceStatesRequest) - returns (QueryBandIBCPriceStatesResponse) { - option (google.api.http).get = - "/injective/oracle/v1beta1/band_ibc_price_states"; - } - - // Retrieves the state for all price feeds - rpc PriceFeedPriceStates(QueryPriceFeedPriceStatesRequest) - returns (QueryPriceFeedPriceStatesResponse) { - option (google.api.http).get = - "/injective/oracle/v1beta1/pricefeed_price_states"; - } - - // Retrieves the state for all coinbase price feeds - rpc CoinbasePriceStates(QueryCoinbasePriceStatesRequest) - returns (QueryCoinbasePriceStatesResponse) { - option (google.api.http).get = - "/injective/oracle/v1beta1/coinbase_price_states"; - } - - // Retrieves the state for all pyth price feeds - rpc PythPriceStates(QueryPythPriceStatesRequest) - returns (QueryPythPriceStatesResponse) { - option (google.api.http).get = - "/injective/oracle/v1beta1/pyth_price_states"; - } - - // Retrieves the state for all provider price feeds - rpc ProviderPriceState(QueryProviderPriceStateRequest) - returns (QueryProviderPriceStateResponse) { - option (google.api.http).get = - "/injective/oracle/v1beta1/provider_price_state/{provider}/{symbol}"; - } - - // Retrieves the entire oracle module's state - rpc OracleModuleState(QueryModuleStateRequest) - returns (QueryModuleStateResponse) { - option (google.api.http).get = "/injective/oracle/v1beta1/module_state"; - } - - // Retrieves historical price records for a given OracleType and Symbol - rpc HistoricalPriceRecords(QueryHistoricalPriceRecordsRequest) - returns (QueryHistoricalPriceRecordsResponse) { - option (google.api.http).get = - "/injective/oracle/v1beta1/historical_price_records"; - } - - // Retrieves mixed volatility value for the specified pair of base/quote - rpc OracleVolatility(QueryOracleVolatilityRequest) - returns (QueryOracleVolatilityResponse) { - option (google.api.http).get = "/injective/oracle/v1beta1/volatility"; - } - - rpc OracleProvidersInfo(QueryOracleProvidersInfoRequest) - returns (QueryOracleProvidersInfoResponse) { - option (google.api.http).get = "/injective/oracle/v1beta1/providers"; - } - - rpc OracleProviderPrices(QueryOracleProviderPricesRequest) - returns (QueryOracleProviderPricesResponse) { - option (google.api.http).get = "/injective/oracle/v1beta1/provider_prices"; - } - - rpc OraclePrice(QueryOraclePriceRequest) returns (QueryOraclePriceResponse) { - option (google.api.http).get = "/injective/oracle/v1beta1/price"; - } - - rpc PythPrice(QueryPythPriceRequest) returns (QueryPythPriceResponse) { - option (google.api.http).get = "/injective/oracle/v1beta1/pyth_price"; - } -} - -message QueryPythPriceRequest { string price_id = 1; } - -message QueryPythPriceResponse { - PythPriceState price_state = 1; -} - -// QueryOracleParamsRequest is the request type for the Query/OracleParams RPC -// method. -message QueryParamsRequest {} - -// QueryOracleParamsResponse is the response type for the Query/OracleParams RPC -// method. -message QueryParamsResponse { - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryBandRelayersRequest is the request type for the Query/BandRelayers RPC -// method. -message QueryBandRelayersRequest {} - -// QueryBandRelayersResponse is the response type for the Query/BandRelayers RPC -// method. -message QueryBandRelayersResponse { repeated string relayers = 1; } - -// QueryBandPriceStatesRequest is the request type for the Query/BandPriceStates -// RPC method. -message QueryBandPriceStatesRequest {} - -// QueryBandPriceStatesResponse is the response type for the -// Query/BandPriceStates RPC method. -message QueryBandPriceStatesResponse { - repeated BandPriceState price_states = 1; -} - -// QueryBandIBCPriceStatesRequest is the request type for the -// Query/BandIBCPriceStates RPC method. -message QueryBandIBCPriceStatesRequest {} - -// QueryBandIBCPriceStatesResponse is the response type for the -// Query/BandIBCPriceStates RPC method. -message QueryBandIBCPriceStatesResponse { - repeated BandPriceState price_states = 1; -} - -// QueryPriceFeedPriceStatesRequest is the request type for the -// Query/PriceFeedPriceStates RPC method. -message QueryPriceFeedPriceStatesRequest {} - -// QueryPriceFeedPriceStatesResponse is the response type for the -// Query/PriceFeedPriceStates RPC method. -message QueryPriceFeedPriceStatesResponse { - repeated PriceFeedState price_states = 1; -} - -// QueryCoinbasePriceStatesRequest is the request type for the -// Query/CoinbasePriceStates RPC method. -message QueryCoinbasePriceStatesRequest {} - -// QueryCoinbasePriceStatesResponse is the response type for the -// Query/CoinbasePriceStates RPC method. -message QueryCoinbasePriceStatesResponse { - repeated CoinbasePriceState price_states = 1; -} - -// QueryPythPriceStatesRequest is the request type for the -// Query/CoinbasePriceStates RPC method. -message QueryPythPriceStatesRequest {} - -// QueryPythPriceStatesResponse is the response type for the -// Query/CoinbasePriceStates RPC method. -message QueryPythPriceStatesResponse { - repeated PythPriceState price_states = 1; -} - -// QueryProviderPriceStateRequest is the request type for the -// Query/ProviderPriceState RPC method. -message QueryProviderPriceStateRequest { - string provider = 1; - string symbol = 2; -} - -// QueryProviderPriceStatesResponse is the response type for the -// Query/ProviderPriceStates RPC method. -message QueryProviderPriceStateResponse { PriceState price_state = 1; } - -// QueryModuleStateRequest is the request type for the Query/OracleModuleState -// RPC method. -message QueryModuleStateRequest {} - -// QueryModuleStateResponse is the response type for the Query/OracleModuleState -// RPC method. -message QueryModuleStateResponse { GenesisState state = 1; } - -message QueryHistoricalPriceRecordsRequest { - OracleType oracle = 1; - string symbol_id = 2; -} - -message QueryHistoricalPriceRecordsResponse { - repeated PriceRecords price_records = 1; -} - -message OracleHistoryOptions { - // MaxAge restricts the oracle price records oldest age in seconds from the - // current block time to consider. A value of 0 means use all the records - // present on the chain. - uint64 max_age = 1; - // If IncludeRawHistory is true, the raw underlying data used for the - // computation is included in the response - bool include_raw_history = 2; - // If IncludeMetadata is true, metadata on the computation is included in the - // response - bool include_metadata = 3; -} - -// QueryOracleVolatilityRequest is the request type for Query/OracleVolatility -// RPC method. -message QueryOracleVolatilityRequest { - OracleInfo base_info = 1; - OracleInfo quote_info = 2; - OracleHistoryOptions oracle_history_options = 3; -} - -// QueryOracleVolatilityResponse is the response type for Query/OracleVolatility -// RPC method. -message QueryOracleVolatilityResponse { - string volatility = 1 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; - MetadataStatistics history_metadata = 2; - repeated PriceRecord raw_history = 3; -} - -message QueryOracleProvidersInfoRequest {} - -message QueryOracleProvidersInfoResponse { - repeated ProviderInfo providers = 1; -} - -message QueryOracleProviderPricesRequest { string provider = 1; } - -message QueryOracleProviderPricesResponse { - repeated ProviderState providerState = 1; -} - -// QueryOraclePriceRequest is the request type for the Query/OraclePrice RPC -// method. -message QueryOraclePriceRequest { - OracleType oracle_type = 1; - string base = 2; - string quote = 3; -} - -message PricePairState { - string pair_price = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string base_price = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string quote_price = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - string base_cumulative_price = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string quote_cumulative_price = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - - int64 base_timestamp = 6; - int64 quote_timestamp = 7; -} - -// QueryOraclePriceResponse is the response type for the Query/OraclePrice RPC -// method. -message QueryOraclePriceResponse { PricePairState price_pair_state = 1; } \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/oracle/v1beta1/tx.proto b/packages/injective-protobuf/proto/injective/oracle/v1beta1/tx.proto deleted file mode 100644 index 2c5ccebf..00000000 --- a/packages/injective-protobuf/proto/injective/oracle/v1beta1/tx.proto +++ /dev/null @@ -1,148 +0,0 @@ -syntax = "proto3"; -package injective.oracle.v1beta1; - -import "gogoproto/gogo.proto"; -import "injective/oracle/v1beta1/oracle.proto"; -import "cosmos/msg/v1/msg.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/oracle/types"; - -// Msg defines the oracle Msg service. -service Msg { - - // RelayProviderPrice defines a method for relaying a price for a - // provider-based oracle - rpc RelayProviderPrices(MsgRelayProviderPrices) - returns (MsgRelayProviderPricesResponse); - - // RelayPriceFeedPrice defines a method for relaying a price for a price - // feeder-based oracle - rpc RelayPriceFeedPrice(MsgRelayPriceFeedPrice) - returns (MsgRelayPriceFeedPriceResponse); - - // RelayBandRates defines a method for relaying rates from Band - rpc RelayBandRates(MsgRelayBandRates) returns (MsgRelayBandRatesResponse); - - // RequestBandIBCRates defines a method for fetching rates from Band ibc - rpc RequestBandIBCRates(MsgRequestBandIBCRates) - returns (MsgRequestBandIBCRatesResponse); - - // RelayCoinbaseMessages defines a method for relaying price messages from - // Coinbase API - rpc RelayCoinbaseMessages(MsgRelayCoinbaseMessages) - returns (MsgRelayCoinbaseMessagesResponse); - - // RelayPythPrices defines a method for relaying rates from the Pyth contract - rpc RelayPythPrices(MsgRelayPythPrices) returns (MsgRelayPythPricesResponse); - - // UpdateParams enables updating oracle module's params via governance - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// MsgRelayProviderPrice defines a SDK message for setting a price through the -// provider oracle. -message MsgRelayProviderPrices { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string provider = 2; - repeated string symbols = 3; - repeated string prices = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message MsgRelayProviderPricesResponse {} - -// MsgRelayPriceFeedPrice defines a SDK message for setting a price through the -// pricefeed oracle. -message MsgRelayPriceFeedPrice { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - - repeated string base = 2; - repeated string quote = 3; - - // price defines the price of the oracle base and quote - repeated string price = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -message MsgRelayPriceFeedPriceResponse {} - -message MsgRelayBandRates { - option (cosmos.msg.v1.signer) = "relayer"; - - string relayer = 1; - repeated string symbols = 2; - repeated uint64 rates = 3; - repeated uint64 resolve_times = 4; - repeated uint64 requestIDs = 5; -} - -message MsgRelayBandRatesResponse {} - -// MsgRelayCoinbaseMessages defines a SDK message for relaying price messages -// from Coinbase API. -message MsgRelayCoinbaseMessages { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - - repeated bytes messages = 2; - repeated bytes signatures = 3; -} - -message MsgRelayCoinbaseMessagesResponse {} - -// MsgRequestBandIBCRates defines a SDK message for requesting data from -// BandChain using IBC. -message MsgRequestBandIBCRates { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - uint64 request_id = 2; -} - -// MsgRequestDataResponse defines the Msg/RequestBandIBCRates response type. -message MsgRequestBandIBCRatesResponse {} - -// MsgRelayPythPrices defines a SDK message for updating Pyth prices -message MsgRelayPythPrices { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - repeated PriceAttestation price_attestations = 2; -} - -// MsgRelayPythPricesResponse defines the Msg/RelayPythPrices response type. -message MsgRelayPythPricesResponse {} - -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // params defines the oracle parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [ (gogoproto.nullable) = false ]; -} - -message MsgUpdateParamsResponse {} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/attestation.proto b/packages/injective-protobuf/proto/injective/peggy/v1/attestation.proto deleted file mode 100644 index f059c054..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/attestation.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; - -// TODO-JT: add ERC20DeployedEvent claim - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -// ClaimType is the cosmos type of an event from the counterpart chain that can -// be handled -enum ClaimType { - option (gogoproto.goproto_enum_prefix) = false; - - CLAIM_TYPE_UNKNOWN = 0 - [ (gogoproto.enumvalue_customname) = "CLAIM_TYPE_UNKNOWN" ]; - CLAIM_TYPE_DEPOSIT = 1 - [ (gogoproto.enumvalue_customname) = "CLAIM_TYPE_DEPOSIT" ]; - CLAIM_TYPE_WITHDRAW = 2 - [ (gogoproto.enumvalue_customname) = "CLAIM_TYPE_WITHDRAW" ]; - CLAIM_TYPE_ERC20_DEPLOYED = 3 - [ (gogoproto.enumvalue_customname) = "CLAIM_TYPE_ERC20_DEPLOYED" ]; - CLAIM_TYPE_VALSET_UPDATED = 4 - [ (gogoproto.enumvalue_customname) = "CLAIM_TYPE_VALSET_UPDATED" ]; -} - -// Attestation is an aggregate of `claims` that eventually becomes `observed` by -// all orchestrators -// EVENT_NONCE: -// EventNonce a nonce provided by the peggy contract that is unique per event -// fired These event nonces must be relayed in order. This is a correctness -// issue, if relaying out of order transaction replay attacks become possible -// OBSERVED: -// Observed indicates that >67% of validators have attested to the event, -// and that the event should be executed by the peggy state machine -// -// The actual content of the claims is passed in with the transaction making the -// claim and then passed through the call stack alongside the attestation while -// it is processed the key in which the attestation is stored is keyed on the -// exact details of the claim but there is no reason to store those exact -// details becuause the next message sender will kindly provide you with them. -message Attestation { - bool observed = 1; - repeated string votes = 2; - uint64 height = 3; - google.protobuf.Any claim = 4; -} - -// ERC20Token unique identifier for an Ethereum ERC20 token. -// CONTRACT: -// The contract address on ETH of the token, this could be a Cosmos -// originated token, if so it will be the ERC20 address of the representation -// (note: developers should look up the token symbol using the address on ETH to -// display for UI) -message ERC20Token { - string contract = 1; - string amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/batch.proto b/packages/injective-protobuf/proto/injective/peggy/v1/batch.proto deleted file mode 100644 index c0d8afee..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/batch.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; - -import "injective/peggy/v1/attestation.proto"; -// import "injective/peggy/v1/types.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -// OutgoingTxBatch represents a batch of transactions going from Peggy to ETH -message OutgoingTxBatch { - uint64 batch_nonce = 1; - uint64 batch_timeout = 2; - repeated OutgoingTransferTx transactions = 3; - string token_contract = 4; - uint64 block = 5; -} - -// OutgoingTransferTx represents an individual send from Peggy to ETH -message OutgoingTransferTx { - uint64 id = 1; - string sender = 2; - string dest_address = 3; - ERC20Token erc20_token = 4; - ERC20Token erc20_fee = 5; -} diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/ethereum_signer.proto b/packages/injective-protobuf/proto/injective/peggy/v1/ethereum_signer.proto deleted file mode 100644 index 6b3f6ea7..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/ethereum_signer.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; -import "gogoproto/gogo.proto"; -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -// SignType defines messages that have been signed by an orchestrator -enum SignType { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = false; - - SIGN_TYPE_UNKNOWN = 0; - SIGN_TYPE_ORCHESTRATOR_SIGNED_MULTI_SIG_UPDATE = 1; - SIGN_TYPE_ORCHESTRATOR_SIGNED_WITHDRAW_BATCH = 2; -} diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/events.proto b/packages/injective-protobuf/proto/injective/peggy/v1/events.proto deleted file mode 100644 index 2436735c..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/events.proto +++ /dev/null @@ -1,148 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; - -import "gogoproto/gogo.proto"; -import "injective/peggy/v1/attestation.proto"; -import "injective/peggy/v1/types.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -message EventAttestationObserved { - ClaimType attestation_type = 1; - string bridge_contract = 2; - uint64 bridge_chain_id = 3; - bytes attestation_id = 4; - uint64 nonce = 5; -} - -message EventBridgeWithdrawCanceled { - string bridge_contract = 1; - uint64 bridge_chain_id = 2; -} - -message EventOutgoingBatch { - string denom = 1; - string orchestrator_address = 2; - uint64 batch_nonce = 3; - uint64 batch_timeout = 4; - repeated uint64 batch_tx_ids = 5; -} - -message EventOutgoingBatchCanceled { - string bridge_contract = 1; - uint64 bridge_chain_id = 2; - uint64 batch_id = 3; - uint64 nonce = 4; -} - -message EventValsetUpdateRequest { - uint64 valset_nonce = 1; - uint64 valset_height = 2; - repeated BridgeValidator valset_members = 3; - string reward_amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string reward_token = 5; -} -message EventSetOrchestratorAddresses { - string validator_address = 1; - string orchestrator_address = 2; - string operator_eth_address = 3; -} - -message EventValsetConfirm { - uint64 valset_nonce = 1; - string orchestrator_address = 2; -} - -message EventSendToEth { - uint64 outgoing_tx_id = 1; - string sender = 2; - string receiver = 3; - string amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - - string bridge_fee = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; -} - -message EventConfirmBatch { - uint64 batch_nonce = 1; - string orchestrator_address = 2; -} - -message EventAttestationVote { - uint64 event_nonce = 1; - bytes attestation_id = 2; - string voter = 3; -} - -message EventDepositClaim { - uint64 event_nonce = 1; - uint64 event_height = 2; - bytes attestation_id = 3; - string ethereum_sender = 4; - string cosmos_receiver = 5; - string token_contract = 6; - string amount = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string orchestrator_address = 8; - string data = 9; -} - -message EventWithdrawClaim { - uint64 event_nonce = 1; - uint64 event_height = 2; - bytes attestation_id = 3; - uint64 batch_nonce = 4; - string token_contract = 5; - string orchestrator_address = 6; -} - -message EventERC20DeployedClaim { - uint64 event_nonce = 1; - uint64 event_height = 2; - bytes attestation_id = 3; - string cosmos_denom = 4; - string token_contract = 5; - string name = 6; - string symbol = 7; - uint64 decimals = 8; - string orchestrator_address = 9; -} - -message EventValsetUpdateClaim { - uint64 event_nonce = 1; - uint64 event_height = 2; - bytes attestation_id = 3; - uint64 valset_nonce = 4; - repeated BridgeValidator valset_members = 5; - string reward_amount = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string reward_token = 7; - string orchestrator_address = 8; -} - -message EventCancelSendToEth { uint64 outgoing_tx_id = 1; } - -message EventSubmitBadSignatureEvidence { - string bad_eth_signature = 1; - string bad_eth_signature_subject = 2; -} - -message EventValidatorSlash { - int64 power = 1; - string reason = 2; - string consensus_address = 3; - string operator_address = 4; - string moniker = 5; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/genesis.proto b/packages/injective-protobuf/proto/injective/peggy/v1/genesis.proto deleted file mode 100644 index 78febe09..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/genesis.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; - -import "gogoproto/gogo.proto"; -import "injective/peggy/v1/types.proto"; -import "injective/peggy/v1/msgs.proto"; -import "injective/peggy/v1/batch.proto"; -import "injective/peggy/v1/attestation.proto"; -import "injective/peggy/v1/params.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -// GenesisState struct -message GenesisState { - Params params = 1; - uint64 last_observed_nonce = 2; - repeated Valset valsets = 3; - repeated MsgValsetConfirm valset_confirms = 4; - repeated OutgoingTxBatch batches = 5; - repeated MsgConfirmBatch batch_confirms = 6; - repeated Attestation attestations = 7; - repeated MsgSetOrchestratorAddresses orchestrator_addresses = 8; - repeated ERC20ToDenom erc20_to_denoms = 9; - repeated OutgoingTransferTx unbatched_transfers = 10; - uint64 last_observed_ethereum_height = 11; - uint64 last_outgoing_batch_id = 12; - uint64 last_outgoing_pool_id = 13; - Valset last_observed_valset = 14 [ (gogoproto.nullable) = false ]; - repeated string ethereum_blacklist = 15; -} diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/msgs.proto b/packages/injective-protobuf/proto/injective/peggy/v1/msgs.proto deleted file mode 100644 index f28584cc..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/msgs.proto +++ /dev/null @@ -1,278 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "injective/peggy/v1/types.proto"; -import "injective/peggy/v1/params.proto"; -import "google/protobuf/any.proto"; -import "cosmos/msg/v1/msg.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -service Msg { - rpc ValsetConfirm(MsgValsetConfirm) returns (MsgValsetConfirmResponse) { - option (google.api.http).post = "/injective/peggy/v1/valset_confirm"; - } - rpc SendToEth(MsgSendToEth) returns (MsgSendToEthResponse) { - option (google.api.http).post = "/injective/peggy/v1/send_to_eth"; - } - rpc RequestBatch(MsgRequestBatch) returns (MsgRequestBatchResponse) { - option (google.api.http).post = "/injective/peggy/v1/request_batch"; - } - rpc ConfirmBatch(MsgConfirmBatch) returns (MsgConfirmBatchResponse) { - option (google.api.http).post = "/injective/peggy/v1/confirm_batch"; - } - rpc DepositClaim(MsgDepositClaim) returns (MsgDepositClaimResponse) { - option (google.api.http).post = "/injective/peggy/v1/deposit_claim"; - } - rpc WithdrawClaim(MsgWithdrawClaim) returns (MsgWithdrawClaimResponse) { - option (google.api.http).post = "/injective/peggy/v1/withdraw_claim"; - } - rpc ValsetUpdateClaim(MsgValsetUpdatedClaim) - returns (MsgValsetUpdatedClaimResponse) { - option (google.api.http).post = "/injective/peggy/v1/valset_updated_claim"; - } - rpc ERC20DeployedClaim(MsgERC20DeployedClaim) - returns (MsgERC20DeployedClaimResponse) { - option (google.api.http).post = "/injective/peggy/v1/erc20_deployed_claim"; - } - rpc SetOrchestratorAddresses(MsgSetOrchestratorAddresses) - returns (MsgSetOrchestratorAddressesResponse) { - option (google.api.http).post = - "/injective/peggy/v1/set_orchestrator_address"; - } - rpc CancelSendToEth(MsgCancelSendToEth) returns (MsgCancelSendToEthResponse) { - option (google.api.http).post = "/injective/peggy/v1/cancel_send_to_eth"; - } - rpc SubmitBadSignatureEvidence(MsgSubmitBadSignatureEvidence) - returns (MsgSubmitBadSignatureEvidenceResponse) { - option (google.api.http).post = - "/injective/peggy/v1/submit_bad_signature_evidence"; - } - - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// MsgSetOrchestratorAddresses -// this message allows validators to delegate their voting responsibilities -// to a given key. This key is then used as an optional authentication method -// for sigining oracle claims -// VALIDATOR -// The validator field is a cosmosvaloper1... string (i.e. sdk.ValAddress) -// that references a validator in the active set -// ORCHESTRATOR -// The orchestrator field is a cosmos1... string (i.e. sdk.AccAddress) that -// references the key that is being delegated to -// ETH_ADDRESS -// This is a hex encoded 0x Ethereum public key that will be used by this -// validator on Ethereum -message MsgSetOrchestratorAddresses { - string sender = 1; - string orchestrator = 2; - string eth_address = 3; -} - -message MsgSetOrchestratorAddressesResponse {} - -// MsgValsetConfirm -// this is the message sent by the validators when they wish to submit their -// signatures over the validator set at a given block height. A validator must -// first call MsgSetEthAddress to set their Ethereum address to be used for -// signing. Then someone (anyone) must make a ValsetRequest the request is -// essentially a messaging mechanism to determine which block all validators -// should submit signatures over. Finally validators sign the validator set, -// powers, and Ethereum addresses of the entire validator set at the height of a -// ValsetRequest and submit that signature with this message. -// -// If a sufficient number of validators (66% of voting power) (A) have set -// Ethereum addresses and (B) submit ValsetConfirm messages with their -// signatures it is then possible for anyone to view these signatures in the -// chain store and submit them to Ethereum to update the validator set -// ------------- -message MsgValsetConfirm { - option (cosmos.msg.v1.signer) = "orchestrator"; - - uint64 nonce = 1; - string orchestrator = 2; - string eth_address = 3; - string signature = 4; -} - -message MsgValsetConfirmResponse {} - -// MsgSendToEth -// This is the message that a user calls when they want to bridge an asset -// it will later be removed when it is included in a batch and successfully -// submitted tokens are removed from the users balance immediately -// ------------- -// AMOUNT: -// the coin to send across the bridge, note the restriction that this is a -// single coin not a set of coins that is normal in other Cosmos messages -// FEE: -// the fee paid for the bridge, distinct from the fee paid to the chain to -// actually send this message in the first place. So a successful send has -// two layers of fees for the user -message MsgSendToEth { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - string eth_dest = 2; - cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ]; - cosmos.base.v1beta1.Coin bridge_fee = 4 [ (gogoproto.nullable) = false ]; -} - -message MsgSendToEthResponse {} - -// MsgRequestBatch -// this is a message anyone can send that requests a batch of transactions to -// send across the bridge be created for whatever block height this message is -// included in. This acts as a coordination point, the handler for this message -// looks at the AddToOutgoingPool tx's in the store and generates a batch, also -// available in the store tied to this message. The validators then grab this -// batch, sign it, submit the signatures with a MsgConfirmBatch before a relayer -// can finally submit the batch -// ------------- -message MsgRequestBatch { - option (cosmos.msg.v1.signer) = "orchestrator"; - - string orchestrator = 1; - string denom = 2; -} - -message MsgRequestBatchResponse {} - -// MsgConfirmBatch -// When validators observe a MsgRequestBatch they form a batch by ordering -// transactions currently in the txqueue in order of highest to lowest fee, -// cutting off when the batch either reaches a hardcoded maximum size (to be -// decided, probably around 100) or when transactions stop being profitable -// (TODO determine this without nondeterminism) This message includes the batch -// as well as an Ethereum signature over this batch by the validator -// ------------- -message MsgConfirmBatch { - option (cosmos.msg.v1.signer) = "orchestrator"; - - uint64 nonce = 1; - string token_contract = 2; - string eth_signer = 3; - string orchestrator = 4; - string signature = 5; -} - -message MsgConfirmBatchResponse {} - -// EthereumBridgeDepositClaim -// When more than 66% of the active validator set has -// claimed to have seen the deposit enter the ethereum blockchain coins are -// issued to the Cosmos address in question -// ------------- -message MsgDepositClaim { - option (cosmos.msg.v1.signer) = "orchestrator"; - - uint64 event_nonce = 1; - uint64 block_height = 2; - string token_contract = 3; - string amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string ethereum_sender = 5; - string cosmos_receiver = 6; - string orchestrator = 7; - string data = 8; -} - -message MsgDepositClaimResponse {} - -// WithdrawClaim claims that a batch of withdrawal -// operations on the bridge contract was executed. -message MsgWithdrawClaim { - option (cosmos.msg.v1.signer) = "orchestrator"; - - uint64 event_nonce = 1; - uint64 block_height = 2; - uint64 batch_nonce = 3; - string token_contract = 4; - string orchestrator = 5; -} - -message MsgWithdrawClaimResponse {} - -// ERC20DeployedClaim allows the Cosmos module -// to learn about an ERC20 that someone deployed -// to represent a Cosmos asset -message MsgERC20DeployedClaim { - option (cosmos.msg.v1.signer) = "orchestrator"; - - uint64 event_nonce = 1; - uint64 block_height = 2; - string cosmos_denom = 3; - string token_contract = 4; - string name = 5; - string symbol = 6; - uint64 decimals = 7; - string orchestrator = 8; -} - -message MsgERC20DeployedClaimResponse {} - -// This call allows the sender (and only the sender) -// to cancel a given MsgSendToEth and recieve a refund -// of the tokens -message MsgCancelSendToEth { - option (cosmos.msg.v1.signer) = "sender"; - - uint64 transaction_id = 1; - string sender = 2; -} - -message MsgCancelSendToEthResponse {} - -// This call allows anyone to submit evidence that a -// validator has signed a valset, batch, or logic call that never -// existed. Subject contains the batch, valset, or logic call. -message MsgSubmitBadSignatureEvidence { - option (cosmos.msg.v1.signer) = "sender"; - - google.protobuf.Any subject = 1; - string signature = 2; - string sender = 3; -} - -message MsgSubmitBadSignatureEvidenceResponse {} - -// This informs the Cosmos module that a validator -// set has been updated. -message MsgValsetUpdatedClaim { - option (cosmos.msg.v1.signer) = "orchestrator"; - - uint64 event_nonce = 1; - uint64 valset_nonce = 2; - uint64 block_height = 3; - repeated BridgeValidator members = 4; - string reward_amount = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string reward_token = 6; - string orchestrator = 7; -} - -message MsgValsetUpdatedClaimResponse {} - -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // params defines the peggy parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [ (gogoproto.nullable) = false ]; -} - -message MsgUpdateParamsResponse {} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/params.proto b/packages/injective-protobuf/proto/injective/peggy/v1/params.proto deleted file mode 100644 index 8e84f61d..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/params.proto +++ /dev/null @@ -1,132 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -// Params represent the peggy genesis and store parameters -// peggy_id: -// a random 32 byte value to prevent signature reuse, for example if the -// cosmos validators decided to use the same Ethereum keys for another chain -// also running Peggy we would not want it to be possible to play a deposit -// from chain A back on chain B's peggy. This value IS USED ON ETHEREUM so -// it must be set in your genesis.json before launch and not changed after -// deploying Peggy -// -// contract_hash: -// the code hash of a known good version of the Peggy contract -// solidity code. This can be used to verify the correct version -// of the contract has been deployed. This is a reference value for -// goernance action only it is never read by any Peggy code -// -// bridge_ethereum_address: -// is address of the bridge contract on the Ethereum side, this is a -// reference value for governance only and is not actually used by any -// Peggy code -// -// bridge_chain_id: -// the unique identifier of the Ethereum chain, this is a reference value -// only and is not actually used by any Peggy code -// -// These reference values may be used by future Peggy client implemetnations -// to allow for saftey features or convenience features like the peggy address -// in your relayer. A relayer would require a configured peggy address if -// governance had not set the address on the chain it was relaying for. -// -// signed_valsets_window -// signed_batches_window -// signed_claims_window -// -// These values represent the time in blocks that a validator has to submit -// a signature for a batch or valset, or to submit a claim for a particular -// attestation nonce. In the case of attestations this clock starts when the -// attestation is created, but only allows for slashing once the event has -// passed -// -// target_batch_timeout: -// -// This is the 'target' value for when batches time out, this is a target -// becuase Ethereum is a probabalistic chain and you can't say for sure what the -// block frequency is ahead of time. -// -// average_block_time -// average_ethereum_block_time -// -// These values are the average Cosmos block time and Ethereum block time -// repsectively and they are used to copute what the target batch timeout is. It -// is important that governance updates these in case of any major, prolonged -// change in the time it takes to produce a block -// -// slash_fraction_valset -// slash_fraction_batch -// slash_fraction_claim -// slash_fraction_conflicting_claim -// -// The slashing fractions for the various peggy related slashing conditions. The -// first three refer to not submitting a particular message, the third for -// submitting a different claim for the same Ethereum event -// -// unbond_slashing_valsets_window -// -// The unbond slashing valsets window is used to determine how many blocks after -// starting to unbond a validator needs to continue signing blocks. The goal of -// this paramater is that when a validator leaves the set, if their leaving -// creates enough change in the validator set to justify an update they will -// sign a validator set update for the Ethereum bridge that does not include -// themselves. Allowing us to remove them from the Ethereum bridge and replace -// them with the new set gracefully. -// -// valset_reward -// -// Valset rewards are the amount of tokens this chain issues to relayers of -// validator sets. These can be any ERC20 token in the bridge, but it's strongly -// advised that chains use only Cosmos originated tokens, which the bridge -// effectively mints on Ethereum. If you run out of the token you are using for -// validator set rewards valset updates will fail and the bridge will be -// vulnerable to highjacking. For these paramaters the zero values are special -// and indicate not to attempt any reward. This is the default for -// bootstrapping. - -message Params { - option (gogoproto.stringer) = false; - - string peggy_id = 1; - string contract_source_hash = 2; - string bridge_ethereum_address = 3; - uint64 bridge_chain_id = 4; - uint64 signed_valsets_window = 5; - uint64 signed_batches_window = 6; - uint64 signed_claims_window = 7; - uint64 target_batch_timeout = 8; - uint64 average_block_time = 9; - uint64 average_ethereum_block_time = 10; - bytes slash_fraction_valset = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes slash_fraction_batch = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes slash_fraction_claim = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes slash_fraction_conflicting_claim = 14 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 unbond_slashing_valsets_window = 15; - bytes slash_fraction_bad_eth_signature = 16 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string cosmos_coin_denom = 17; - string cosmos_coin_erc20_contract = 18; - bool claim_slashing_enabled = 19; - uint64 bridge_contract_start_height = 20; - - cosmos.base.v1beta1.Coin valset_reward = 21 [ (gogoproto.nullable) = false ]; -} diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/pool.proto b/packages/injective-protobuf/proto/injective/peggy/v1/pool.proto deleted file mode 100644 index 6853ed26..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/pool.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -// IDSet represents a set of IDs -message IDSet { repeated uint64 ids = 1; } - -message BatchFees { - string token = 1; - string total_fees = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/proposal.proto b/packages/injective-protobuf/proto/injective/peggy/v1/proposal.proto deleted file mode 100644 index f6eed0f1..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/proposal.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -message BlacklistEthereumAddressesProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated string blacklist_addresses = 3; -} - -message RevokeEthereumBlacklistProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated string blacklist_addresses = 3; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/query.proto b/packages/injective-protobuf/proto/injective/peggy/v1/query.proto deleted file mode 100644 index d3cc7828..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/query.proto +++ /dev/null @@ -1,222 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; - -import "injective/peggy/v1/genesis.proto"; -import "injective/peggy/v1/params.proto"; -import "injective/peggy/v1/types.proto"; -import "injective/peggy/v1/msgs.proto"; -import "injective/peggy/v1/pool.proto"; -import "injective/peggy/v1/batch.proto"; -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -// Query defines the gRPC querier service -service Query { - // Deployments queries deployments - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/peggy/v1/params"; - } - - // valset - rpc CurrentValset(QueryCurrentValsetRequest) - returns (QueryCurrentValsetResponse) { - option (google.api.http).get = "/peggy/v1/valset/current"; - } - rpc ValsetRequest(QueryValsetRequestRequest) - returns (QueryValsetRequestResponse) { - option (google.api.http).get = "/peggy/v1/valset"; - } - rpc ValsetConfirm(QueryValsetConfirmRequest) - returns (QueryValsetConfirmResponse) { - option (google.api.http).get = "/peggy/v1/valset/confirm"; - } - rpc ValsetConfirmsByNonce(QueryValsetConfirmsByNonceRequest) - returns (QueryValsetConfirmsByNonceResponse) { - option (google.api.http).get = "/peggy/v1/confirms/{nonce}"; - } - rpc LastValsetRequests(QueryLastValsetRequestsRequest) - returns (QueryLastValsetRequestsResponse) { - option (google.api.http).get = "/peggy/v1/valset/requests"; - } - rpc LastPendingValsetRequestByAddr(QueryLastPendingValsetRequestByAddrRequest) - returns (QueryLastPendingValsetRequestByAddrResponse) { - option (google.api.http).get = "/peggy/v1/valset/last"; - } - - // claim - rpc LastEventByAddr(QueryLastEventByAddrRequest) - returns (QueryLastEventByAddrResponse) { - option (google.api.http).get = "/peggy/v1/oracle/event/{address}"; - } - - // batch - rpc GetPendingSendToEth(QueryPendingSendToEth) - returns (QueryPendingSendToEthResponse) { - option (google.api.http).get = "/peggy/v1/pending_send_to_eth"; - } - rpc BatchFees(QueryBatchFeeRequest) returns (QueryBatchFeeResponse) { - option (google.api.http).get = "/peggy/v1/batchfees"; - } - rpc OutgoingTxBatches(QueryOutgoingTxBatchesRequest) - returns (QueryOutgoingTxBatchesResponse) { - option (google.api.http).get = "/peggy/v1/batch/outgoingtx"; - } - rpc LastPendingBatchRequestByAddr(QueryLastPendingBatchRequestByAddrRequest) - returns (QueryLastPendingBatchRequestByAddrResponse) { - option (google.api.http).get = "/peggy/v1/batch/last"; - } - rpc BatchRequestByNonce(QueryBatchRequestByNonceRequest) - returns (QueryBatchRequestByNonceResponse) { - option (google.api.http).get = "/peggy/v1/batch"; - } - rpc BatchConfirms(QueryBatchConfirmsRequest) - returns (QueryBatchConfirmsResponse) { - option (google.api.http).get = "/peggy/v1/batch/confirms"; - } - - rpc ERC20ToDenom(QueryERC20ToDenomRequest) - returns (QueryERC20ToDenomResponse) { - option (google.api.http).get = "/peggy/v1/cosmos_originated/erc20_to_denom"; - } - rpc DenomToERC20(QueryDenomToERC20Request) - returns (QueryDenomToERC20Response) { - option (google.api.http).get = "/peggy/v1/cosmos_originated/denom_to_erc20"; - } - - rpc GetDelegateKeyByValidator(QueryDelegateKeysByValidatorAddress) - returns (QueryDelegateKeysByValidatorAddressResponse) { - option (google.api.http).get = "/peggy/v1/query_delegate_keys_by_validator"; - } - rpc GetDelegateKeyByEth(QueryDelegateKeysByEthAddress) - returns (QueryDelegateKeysByEthAddressResponse) { - option (google.api.http).get = "/peggy/v1/query_delegate_keys_by_eth"; - } - rpc GetDelegateKeyByOrchestrator(QueryDelegateKeysByOrchestratorAddress) - returns (QueryDelegateKeysByOrchestratorAddressResponse) { - option (google.api.http).get = - "/peggy/v1/query_delegate_keys_by_orchestrator"; - } - - // Retrieves the entire peggy module's state - rpc PeggyModuleState(QueryModuleStateRequest) - returns (QueryModuleStateResponse) { - option (google.api.http).get = "/peggy/v1/module_state"; - } - - rpc MissingPeggoNonces(MissingNoncesRequest) returns (MissingNoncesResponse) { - option (google.api.http).get = "/peggy/v1/missing_nonces"; - } - -} - -message QueryParamsRequest {} -message QueryParamsResponse { - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryCurrentValsetRequest {} -message QueryCurrentValsetResponse { Valset valset = 1; } - -message QueryValsetRequestRequest { uint64 nonce = 1; } -message QueryValsetRequestResponse { Valset valset = 1; } - -message QueryValsetConfirmRequest { - uint64 nonce = 1; - string address = 2; -} -message QueryValsetConfirmResponse { MsgValsetConfirm confirm = 1; } - -message QueryValsetConfirmsByNonceRequest { uint64 nonce = 1; } -message QueryValsetConfirmsByNonceResponse { - repeated MsgValsetConfirm confirms = 1; -} - -message QueryLastValsetRequestsRequest {} -message QueryLastValsetRequestsResponse { repeated Valset valsets = 1; } - -message QueryLastPendingValsetRequestByAddrRequest { string address = 1; } -message QueryLastPendingValsetRequestByAddrResponse { - repeated Valset valsets = 1; -} - -message QueryBatchFeeRequest {} -message QueryBatchFeeResponse { repeated BatchFees batchFees = 1; } - -message QueryLastPendingBatchRequestByAddrRequest { string address = 1; } -message QueryLastPendingBatchRequestByAddrResponse { - OutgoingTxBatch batch = 1; -} - -message QueryOutgoingTxBatchesRequest {} -message QueryOutgoingTxBatchesResponse { repeated OutgoingTxBatch batches = 1; } - -message QueryBatchRequestByNonceRequest { - uint64 nonce = 1; - string contract_address = 2; -} -message QueryBatchRequestByNonceResponse { OutgoingTxBatch batch = 1; } - -message QueryBatchConfirmsRequest { - uint64 nonce = 1; - string contract_address = 2; -} -message QueryBatchConfirmsResponse { repeated MsgConfirmBatch confirms = 1; } - -message QueryLastEventByAddrRequest { string address = 1; } -message QueryLastEventByAddrResponse { LastClaimEvent last_claim_event = 1; } - -message QueryERC20ToDenomRequest { string erc20 = 1; } -message QueryERC20ToDenomResponse { - string denom = 1; - bool cosmos_originated = 2; -} - -message QueryDenomToERC20Request { string denom = 1; } -message QueryDenomToERC20Response { - string erc20 = 1; - bool cosmos_originated = 2; -} - -message QueryDelegateKeysByValidatorAddress { string validator_address = 1; } -message QueryDelegateKeysByValidatorAddressResponse { - string eth_address = 1; - string orchestrator_address = 2; -} - -message QueryDelegateKeysByEthAddress { string eth_address = 1; } -message QueryDelegateKeysByEthAddressResponse { - string validator_address = 1; - string orchestrator_address = 2; -} - -message QueryDelegateKeysByOrchestratorAddress { - string orchestrator_address = 1; -} -message QueryDelegateKeysByOrchestratorAddressResponse { - string validator_address = 1; - string eth_address = 2; -} - -message QueryPendingSendToEth { string sender_address = 1; } - -message QueryPendingSendToEthResponse { - repeated OutgoingTransferTx transfers_in_batches = 1; - repeated OutgoingTransferTx unbatched_transfers = 2; -} - -// QueryModuleStateRequest is the request type for the Query/PeggyModuleState -// RPC method. -message QueryModuleStateRequest {} - -// QueryModuleStateResponse is the response type for the Query/PeggyModuleState RPC method. -message QueryModuleStateResponse { - GenesisState state = 1; -} - -message MissingNoncesRequest {} - -message MissingNoncesResponse { - repeated string operator_addresses = 1; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/peggy/v1/types.proto b/packages/injective-protobuf/proto/injective/peggy/v1/types.proto deleted file mode 100644 index d0593262..00000000 --- a/packages/injective-protobuf/proto/injective/peggy/v1/types.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; -package injective.peggy.v1; -import "gogoproto/gogo.proto"; -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/peggy/types"; - -// BridgeValidator represents a validator's ETH address and its power -message BridgeValidator { - uint64 power = 1; - string ethereum_address = 2; -} - -// Valset is the Ethereum Bridge Multsig Set, each peggy validator also -// maintains an ETH key to sign messages, these are used to check signatures on -// ETH because of the significant gas savings -message Valset { - uint64 nonce = 1; - repeated BridgeValidator members = 2; - uint64 height = 3; - string reward_amount = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - // the reward token in it's Ethereum hex address representation - string reward_token = 5; -} - -// LastObservedEthereumBlockHeight stores the last observed -// Ethereum block height along with the Cosmos block height that -// it was observed at. These two numbers can be used to project -// outward and always produce batches with timeouts in the future -// even if no Ethereum block height has been relayed for a long time -message LastObservedEthereumBlockHeight { - uint64 cosmos_block_height = 1; - uint64 ethereum_block_height = 2; -} - -// LastClaimEvent stores last claim event details of validator. -message LastClaimEvent { - uint64 ethereum_event_nonce = 1; - uint64 ethereum_event_height = 2; -} - -// This records the relationship between an ERC20 token and the denom -// of the corresponding Cosmos originated asset -message ERC20ToDenom { - string erc20 = 1; - string denom = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/authorityMetadata.proto b/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/authorityMetadata.proto deleted file mode 100644 index fd68ac49..00000000 --- a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/authorityMetadata.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package injective.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/tokenfactory/types"; - -// DenomAuthorityMetadata specifies metadata for addresses that have specific -// capabilities over a token factory denom. Right now there is only one Admin -// permission, but is planned to be extended to the future. -message DenomAuthorityMetadata { - option (gogoproto.equal) = true; - - // Can be empty for no admin, or a valid injective address - string admin = 1 [ (gogoproto.moretags) = "yaml:\"admin\"" ]; -} diff --git a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/events.proto b/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/events.proto deleted file mode 100644 index 32b7776c..00000000 --- a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/events.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package injective.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; -import "injective/tokenfactory/v1beta1/authorityMetadata.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/tokenfactory/types"; - -message EventCreateTFDenom { - string account = 1; - string denom = 2; -} - -message EventMintTFDenom { - string recipient_address = 1; - cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; -} - -message EventBurnTFDenom { - string burner_address = 1; - cosmos.base.v1beta1.Coin amount = 2 [ (gogoproto.nullable) = false ]; -} - -message EventChangeTFAdmin { - string denom = 1; - string new_admin_address = 2; -} - -message EventSetTFDenomMetadata { - string denom = 1; - cosmos.bank.v1beta1.Metadata metadata = 2 [ (gogoproto.nullable) = false ]; -} diff --git a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/genesis.proto b/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/genesis.proto deleted file mode 100644 index cf4c92d2..00000000 --- a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/genesis.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package injective.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "injective/tokenfactory/v1beta1/authorityMetadata.proto"; -import "injective/tokenfactory/v1beta1/params.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/tokenfactory/types"; - -// GenesisState defines the tokenfactory module's genesis state. -message GenesisState { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; - - repeated GenesisDenom factory_denoms = 2 [ - (gogoproto.moretags) = "yaml:\"factory_denoms\"", - (gogoproto.nullable) = false - ]; -} - -// GenesisDenom defines a tokenfactory denom that is defined within genesis -// state. The structure contains DenomAuthorityMetadata which defines the -// denom's admin. -message GenesisDenom { - option (gogoproto.equal) = true; - - string denom = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; - DenomAuthorityMetadata authority_metadata = 2 [ - (gogoproto.moretags) = "yaml:\"authority_metadata\"", - (gogoproto.nullable) = false - ]; -} diff --git a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/params.proto b/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/params.proto deleted file mode 100644 index 327ce69b..00000000 --- a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/params.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package injective.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "injective/tokenfactory/v1beta1/authorityMetadata.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/tokenfactory/types"; - -// Params defines the parameters for the tokenfactory module. -message Params { - repeated cosmos.base.v1beta1.Coin denom_creation_fee = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"denom_creation_fee\"", - (gogoproto.nullable) = false - ]; -} diff --git a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/query.proto b/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/query.proto deleted file mode 100644 index 6633a211..00000000 --- a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/query.proto +++ /dev/null @@ -1,88 +0,0 @@ -syntax = "proto3"; -package injective.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "injective/tokenfactory/v1beta1/authorityMetadata.proto"; -import "injective/tokenfactory/v1beta1/params.proto"; -import "injective/tokenfactory/v1beta1/genesis.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/tokenfactory/types"; - -// Query defines the gRPC querier service. -service Query { - // Params defines a gRPC query method that returns the tokenfactory module's - // parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/injective/tokenfactory/v1beta1/params"; - } - - // DenomAuthorityMetadata defines a gRPC query method for fetching - // DenomAuthorityMetadata for a particular denom. - rpc DenomAuthorityMetadata(QueryDenomAuthorityMetadataRequest) - returns (QueryDenomAuthorityMetadataResponse) { - option (google.api.http).get = "/injective/tokenfactory/v1beta1/denoms/" - "{creator}/{sub_denom}/authority_metadata"; - } - - // DenomsFromCreator defines a gRPC query method for fetching all - // denominations created by a specific admin/creator. - rpc DenomsFromCreator(QueryDenomsFromCreatorRequest) - returns (QueryDenomsFromCreatorResponse) { - option (google.api.http).get = - "/injective/tokenfactory/v1beta1/denoms_from_creator/{creator}"; - } - - // Retrieves the entire auction module's state - rpc TokenfactoryModuleState(QueryModuleStateRequest) - returns (QueryModuleStateResponse) { - option (google.api.http).get = - "/injective/tokenfactory/v1beta1/module_state"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryDenomAuthorityMetadataRequest defines the request structure for the -// DenomAuthorityMetadata gRPC query. -message QueryDenomAuthorityMetadataRequest { - string creator = 1 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; - string sub_denom = 2 [ (gogoproto.moretags) = "yaml:\"sub_denom\"" ]; -} - -// QueryDenomAuthorityMetadataResponse defines the response structure for the -// DenomAuthorityMetadata gRPC query. -message QueryDenomAuthorityMetadataResponse { - DenomAuthorityMetadata authority_metadata = 1 [ - (gogoproto.moretags) = "yaml:\"authority_metadata\"", - (gogoproto.nullable) = false - ]; -} - -// QueryDenomsFromCreatorRequest defines the request structure for the -// DenomsFromCreator gRPC query. -message QueryDenomsFromCreatorRequest { - string creator = 1 [ (gogoproto.moretags) = "yaml:\"creator\"" ]; -} - -// QueryDenomsFromCreatorRequest defines the response structure for the -// DenomsFromCreator gRPC query. -message QueryDenomsFromCreatorResponse { - repeated string denoms = 1 [ (gogoproto.moretags) = "yaml:\"denoms\"" ]; -} - -// QueryModuleStateRequest is the request type for the -// Query/TokenfactoryModuleState RPC method. -message QueryModuleStateRequest {} - -// QueryModuleStateResponse is the response type for the -// Query/TokenfactoryModuleState RPC method. -message QueryModuleStateResponse { GenesisState state = 1; } \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/tx.proto b/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/tx.proto deleted file mode 100644 index be4af7b0..00000000 --- a/packages/injective-protobuf/proto/injective/tokenfactory/v1beta1/tx.proto +++ /dev/null @@ -1,136 +0,0 @@ -syntax = "proto3"; -package injective.tokenfactory.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; -import "cosmos/msg/v1/msg.proto"; -import "cosmos_proto/cosmos.proto"; -import "injective/tokenfactory/v1beta1/params.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/tokenfactory/types"; - -// Msg defines the tokefactory module's gRPC message service. -service Msg { - rpc CreateDenom(MsgCreateDenom) returns (MsgCreateDenomResponse); - rpc Mint(MsgMint) returns (MsgMintResponse); - rpc Burn(MsgBurn) returns (MsgBurnResponse); - rpc ChangeAdmin(MsgChangeAdmin) returns (MsgChangeAdminResponse); - rpc SetDenomMetadata(MsgSetDenomMetadata) - returns (MsgSetDenomMetadataResponse); - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - - // ForceTransfer is deactivated for now because we need to think through edge - // cases rpc ForceTransfer(MsgForceTransfer) returns - // (MsgForceTransferResponse); -} - -// MsgCreateDenom defines the message structure for the CreateDenom gRPC service -// method. It allows an account to create a new denom. It requires a sender -// address and a sub denomination. The (sender_address, sub_denomination) tuple -// must be unique and cannot be re-used. -// -// The resulting denom created is defined as -// . The resulting denom's admin is -// originally set to be the creator, but this can be changed later. The token -// denom does not indicate the current admin. -message MsgCreateDenom { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - // subdenom can be up to 44 "alphanumeric" characters long. - string subdenom = 2 [ (gogoproto.moretags) = "yaml:\"subdenom\"" ]; -} - -// MsgCreateDenomResponse is the return value of MsgCreateDenom -// It returns the full string of the newly created denom -message MsgCreateDenomResponse { - string new_token_denom = 1 - [ (gogoproto.moretags) = "yaml:\"new_token_denom\"" ]; -} - -// MsgMint is the sdk.Msg type for allowing an admin account to mint -// more of a token. For now, we only support minting to the sender account -message MsgMint { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - cosmos.base.v1beta1.Coin amount = 2 [ - (gogoproto.moretags) = "yaml:\"amount\"", - (gogoproto.nullable) = false - ]; -} - -message MsgMintResponse {} - -// MsgBurn is the sdk.Msg type for allowing an admin account to burn -// a token. For now, we only support burning from the sender account. -message MsgBurn { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - cosmos.base.v1beta1.Coin amount = 2 [ - (gogoproto.moretags) = "yaml:\"amount\"", - (gogoproto.nullable) = false - ]; -} - -message MsgBurnResponse {} - -// MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign -// adminship of a denom to a new account -message MsgChangeAdmin { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - string denom = 2 [ (gogoproto.moretags) = "yaml:\"denom\"" ]; - string new_admin = 3 [ (gogoproto.moretags) = "yaml:\"new_admin\"" ]; -} - -// MsgChangeAdminResponse defines the response structure for an executed -// MsgChangeAdmin message. -message MsgChangeAdminResponse {} - -// message MsgForceTransfer { -// string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; -// cosmos.base.v1beta1.Coin amount = 2 [ -// (gogoproto.moretags) = "yaml:\"amount\"", -// (gogoproto.nullable) = false -// ]; -// string transferFromAddress = 3 -// [ (gogoproto.moretags) = "yaml:\"transfer_from_address\"" ]; -// string transferToAddress = 4 -// [ (gogoproto.moretags) = "yaml:\"transfer_to_address\"" ]; -// } - -// message MsgForceTransferResponse {} - -// MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set -// the denom's bank metadata -message MsgSetDenomMetadata { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; - cosmos.bank.v1beta1.Metadata metadata = 2 [ - (gogoproto.moretags) = "yaml:\"metadata\"", - (gogoproto.nullable) = false - ]; -} - -// MsgSetDenomMetadataResponse defines the response structure for an executed -// MsgSetDenomMetadata message. -message MsgSetDenomMetadataResponse {} - -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // params defines the tokenfactory parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [ (gogoproto.nullable) = false ]; -} - -message MsgUpdateParamsResponse {} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/types/v1beta1/account.proto b/packages/injective-protobuf/proto/injective/types/v1beta1/account.proto deleted file mode 100644 index 54e6e527..00000000 --- a/packages/injective-protobuf/proto/injective/types/v1beta1/account.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package injective.types.v1beta1; - -import "cosmos/auth/v1beta1/auth.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/types"; - -// EthAccount implements the authtypes.AccountI interface and embeds an -// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. -message EthAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; - - option (cosmos_proto.implements_interface) = - "github.com/cosmos/cosmos-sdk/x/auth/types.AccountI"; - - cosmos.auth.v1beta1.BaseAccount base_account = 1 [ - (gogoproto.embed) = true, - (gogoproto.moretags) = "yaml:\"base_account\"" - ]; - bytes code_hash = 2 [ (gogoproto.moretags) = "yaml:\"code_hash\"" ]; -} diff --git a/packages/injective-protobuf/proto/injective/types/v1beta1/tx_ext.proto b/packages/injective-protobuf/proto/injective/types/v1beta1/tx_ext.proto deleted file mode 100644 index 7c13befe..00000000 --- a/packages/injective-protobuf/proto/injective/types/v1beta1/tx_ext.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package injective.types.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/types"; - -message ExtensionOptionsWeb3Tx { - option (gogoproto.goproto_getters) = false; - - // typedDataChainID used only in EIP712 Domain and should match - // Ethereum network ID in a Web3 provider (e.g. Metamask). - uint64 typedDataChainID = 1; - - // feePayer is an account address for the fee payer. It will be validated - // during EIP712 signature checking. - string feePayer = 2; - - // feePayerSig is a signature data from the fee paying account, - // allows to perform fee delegation when using EIP712 Domain. - bytes feePayerSig = 3; -} diff --git a/packages/injective-protobuf/proto/injective/types/v1beta1/tx_response.proto b/packages/injective-protobuf/proto/injective/types/v1beta1/tx_response.proto deleted file mode 100644 index c2b15d4f..00000000 --- a/packages/injective-protobuf/proto/injective/types/v1beta1/tx_response.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package injective.types.v1beta1; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/types"; - -// base header ak message type, we can cast the bytes into corresponding message -// response type -message TxResponseGenericMessage { - string header = 1; - bytes data = 2; -} - -// improvised message to unpack length prefixed messages in tx response data -message TxResponseData { repeated TxResponseGenericMessage messages = 1; } diff --git a/packages/injective-protobuf/proto/injective/wasmx/v1/events.proto b/packages/injective-protobuf/proto/injective/wasmx/v1/events.proto deleted file mode 100644 index c810cdd3..00000000 --- a/packages/injective-protobuf/proto/injective/wasmx/v1/events.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; -package injective.wasmx.v1; - -import "injective/wasmx/v1/wasmx.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/wasmx/types"; - -message EventContractExecution { - string contract_address = 1; - bytes response = 2; - string error = 3; - } \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/wasmx/v1/genesis.proto b/packages/injective-protobuf/proto/injective/wasmx/v1/genesis.proto deleted file mode 100644 index e0f1b999..00000000 --- a/packages/injective-protobuf/proto/injective/wasmx/v1/genesis.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package injective.wasmx.v1; - -import "injective/wasmx/v1/wasmx.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/wasmx/types"; - -message RegisteredContractWithAddress { - string address = 1; - - RegisteredContract registered_contract = 2; -} - -// GenesisState defines the wasmx module's genesis state. -message GenesisState { - // params defines all the parameters of related to wasmx. - Params params = 1 [ (gogoproto.nullable) = false ]; - - // registered_contracts is an array containing the genesis registered - // contracts - repeated RegisteredContractWithAddress registered_contracts = 2 - [ (gogoproto.nullable) = false ]; -} diff --git a/packages/injective-protobuf/proto/injective/wasmx/v1/proposal.proto b/packages/injective-protobuf/proto/injective/wasmx/v1/proposal.proto deleted file mode 100644 index 7cbb1811..00000000 --- a/packages/injective-protobuf/proto/injective/wasmx/v1/proposal.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; -package injective.wasmx.v1; - -import "cosmos_proto/cosmos.proto"; -import "cosmwasm/wasm/v1/proposal.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/wasmx/types"; - -message ContractRegistrationRequestProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - ContractRegistrationRequest contract_registration_request = 3 - [ (gogoproto.nullable) = false ]; -} - -message BatchContractRegistrationRequestProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated ContractRegistrationRequest contract_registration_requests = 3 - [ (gogoproto.nullable) = false ]; -} - -message BatchContractDeregistrationProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated string contracts = 3; -} - -enum FundingMode { - Unspecified = 0; - SelfFunded = 1; - GrantOnly = 2; - Dual = 3; -} - -message ContractRegistrationRequest { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - // Unique Identifier for contract instance to be registered. - string contract_address = 1; - - // Maximum gas to be used for the smart contract execution. - uint64 gas_limit = 2; - - // gas price to be used for the smart contract execution. - uint64 gas_price = 3; - - bool should_pin_contract = 4; - - // if true contract owner can update it, if false only current code_id will be - // allowed to be executed - bool is_migration_allowed = 5; - - // code_id of the contract being registered - will be verified upon every - // execution but only if is_migration_allowed is false - uint64 code_id = 6; - - // Optional address of admin account (that will be allowed to pause or update - // contract params) - string admin_address = 7; - - // Optional address of the contract that grants fees. Must be set if - // funding_mode is other than SelfFunded - string granter_address = 8; - - // Specifies how the contract will fund its execution - FundingMode funding_mode = 9; -} - -message BatchStoreCodeProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - repeated cosmwasm.wasm.v1.StoreCodeProposal proposals = 3 - [ (gogoproto.nullable) = false ]; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/wasmx/v1/query.proto b/packages/injective-protobuf/proto/injective/wasmx/v1/query.proto deleted file mode 100644 index af95855a..00000000 --- a/packages/injective-protobuf/proto/injective/wasmx/v1/query.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package injective.wasmx.v1; - -import "google/api/annotations.proto"; -import "injective/wasmx/v1/wasmx.proto"; -import "injective/wasmx/v1/genesis.proto"; -import "gogoproto/gogo.proto"; -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/wasmx/types"; - -// Query defines the gRPC querier service. -service Query { - - // Retrieves wasmx params - rpc WasmxParams(QueryWasmxParamsRequest) returns (QueryWasmxParamsResponse) { - option (google.api.http).get = "/injective/wasmx/v1/params"; - } - - // Retrieves contract registration info - rpc ContractRegistrationInfo(QueryContractRegistrationInfoRequest) returns (QueryContractRegistrationInfoResponse) { - option (google.api.http).get = "/injective/wasmx/v1/registration_info/{contract_address}"; - } - - // Retrieves the entire wasmx module's state - rpc WasmxModuleState(QueryModuleStateRequest) - returns (QueryModuleStateResponse) { - option (google.api.http).get = "/injective/wasmx/v1/module_state"; - } -} - -// QueryWasmxParamsRequest is the request type for the Query/WasmxParams RPC -// method. -message QueryWasmxParamsRequest {} - -// QueryWasmxParamsRequest is the response type for the Query/WasmxParams RPC -// method. -message QueryWasmxParamsResponse { - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryModuleStateRequest is the request type for the Query/WasmxModuleState -// RPC method. -message QueryModuleStateRequest {} - -// QueryModuleStateResponse is the response type for the Query/WasmxModuleState -// RPC method. -message QueryModuleStateResponse { GenesisState state = 1; } - -// Contract registration info -message QueryContractRegistrationInfoRequest { string contract_address = 1; } - -message QueryContractRegistrationInfoResponse { - RegisteredContract contract = 1; -} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/wasmx/v1/tx.proto b/packages/injective-protobuf/proto/injective/wasmx/v1/tx.proto deleted file mode 100644 index 77d80b1c..00000000 --- a/packages/injective-protobuf/proto/injective/wasmx/v1/tx.proto +++ /dev/null @@ -1,106 +0,0 @@ -syntax = "proto3"; -package injective.wasmx.v1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "injective/wasmx/v1/wasmx.proto"; -import "injective/wasmx/v1/proposal.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/wasmx/types"; - -// Msg defines the wasmx Msg service. -service Msg { - rpc UpdateRegistryContractParams(MsgUpdateContract) - returns (MsgUpdateContractResponse); - rpc ActivateRegistryContract(MsgActivateContract) - returns (MsgActivateContractResponse); - rpc DeactivateRegistryContract(MsgDeactivateContract) - returns (MsgDeactivateContractResponse); - rpc ExecuteContractCompat(MsgExecuteContractCompat) - returns (MsgExecuteContractCompatResponse); - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - rpc RegisterContract(MsgRegisterContract) returns (MsgRegisterContractResponse); -} - -// MsgExecuteContractCompat submits the given message data to a smart contract, -// compatible with EIP712 -message MsgExecuteContractCompat { - option (cosmos.msg.v1.signer) = "sender"; - - // Sender is the that actor that signed the messages - string sender = 1; - // Contract is the address of the smart contract - string contract = 2; - // Msg json encoded message to be passed to the contract - string msg = 3; - // Funds coins that are transferred to the contract on execution - string funds = 4; -} - -// MsgExecuteContractCompatResponse returns execution result data. -message MsgExecuteContractCompatResponse { - // Data contains bytes to returned from the contract - bytes data = 1; -} - -message MsgUpdateContract { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // Unique Identifier for contract instance to be registered. - string contract_address = 2; - // Maximum gas to be used for the smart contract execution. - uint64 gas_limit = 3; - // gas price to be used for the smart contract execution. - uint64 gas_price = 4; - // optional - admin account that will be allowed to perform any changes - string admin_address = 5 [ (gogoproto.nullable) = true ]; -} - -message MsgUpdateContractResponse {} - -message MsgActivateContract { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // Unique Identifier for contract instance to be activated. - string contract_address = 2; -} - -message MsgActivateContractResponse {} - -message MsgDeactivateContract { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - // Unique Identifier for contract instance to be deactivated. - string contract_address = 2; -} - -message MsgDeactivateContractResponse {} - -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // params defines the wasmx parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [ (gogoproto.nullable) = false ]; -} - -message MsgUpdateParamsResponse {} - -message MsgRegisterContract { - option (cosmos.msg.v1.signer) = "sender"; - - string sender = 1; - - ContractRegistrationRequest contract_registration_request = 2 [ (gogoproto.nullable) = false ]; -} - -message MsgRegisterContractResponse {} \ No newline at end of file diff --git a/packages/injective-protobuf/proto/injective/wasmx/v1/wasmx.proto b/packages/injective-protobuf/proto/injective/wasmx/v1/wasmx.proto deleted file mode 100644 index fb501c9b..00000000 --- a/packages/injective-protobuf/proto/injective/wasmx/v1/wasmx.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; -package injective.wasmx.v1; - -import "gogoproto/gogo.proto"; -import "injective/wasmx/v1/proposal.proto"; - -option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/wasmx/types"; - -message Params { - option (gogoproto.equal) = true; - - // Set the status to active to indicate that contracts can be executed in - // begin blocker. - bool is_execution_enabled = 1; - - // Maximum aggregate total gas to be used for the contract executions in the - // BeginBlocker. - uint64 max_begin_block_total_gas = 2; - - // the maximum gas limit each individual contract can consume in the - // BeginBlocker. - uint64 max_contract_gas_limit = 3; - - // min_gas_price defines the minimum gas price the contracts must pay to be - // executed in the BeginBlocker. - uint64 min_gas_price = 4; -} - -message RegisteredContract { - option (gogoproto.equal) = true; - - // limit of gas per BB execution - uint64 gas_limit = 1; - - // gas price that contract is willing to pay for execution in BeginBlocker - uint64 gas_price = 2; - - // is contract currently active - bool is_executable = 3; - - // code_id that is allowed to be executed (to prevent malicious updates) - if - // nil/0 any code_id can be executed - uint64 code_id = 4 [ (gogoproto.nullable) = true ]; - - // optional - admin addr that is allowed to update contract data - string admin_address = 5 [ (gogoproto.nullable) = true ]; - - // Optional: address of the contract granting fee - // Must be set if fund_mode is GrantOnly - string granter_address = 6 [ (gogoproto.nullable) = true ]; - - // funding mode - FundingMode fund_mode = 7; -} \ No newline at end of file diff --git a/packages/injective-protobuf/rustfmt.toml b/packages/injective-protobuf/rustfmt.toml deleted file mode 100644 index 672d2e72..00000000 --- a/packages/injective-protobuf/rustfmt.toml +++ /dev/null @@ -1 +0,0 @@ -#ignore = ["src/proto/*"] diff --git a/packages/injective-protobuf/scripts/protoexport.sh b/packages/injective-protobuf/scripts/protoexport.sh deleted file mode 100755 index 4a564111..00000000 --- a/packages/injective-protobuf/scripts/protoexport.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -eo pipefail - -echo "Exporting gogo proto files" -echo "Injective" -buf export --exclude-imports https://github.com/InjectiveLabs/sdk-go.git --output ./ -# Remove spurious extra exported dir -rm -rf ./exchange -echo "Cosmos" -buf export https://github.com/cosmos/cosmos-sdk.git --output ./third_party/proto diff --git a/packages/injective-protobuf/src/lib.rs b/packages/injective-protobuf/src/lib.rs deleted file mode 100644 index febacec6..00000000 --- a/packages/injective-protobuf/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod proto; diff --git a/packages/injective-protobuf/src/proto/.gitkeep b/packages/injective-protobuf/src/proto/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/injective-protobuf/src/proto/account.rs b/packages/injective-protobuf/src/proto/account.rs deleted file mode 100644 index 7913e383..00000000 --- a/packages/injective-protobuf/src/proto/account.rs +++ /dev/null @@ -1,212 +0,0 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `injective/types/v1beta1/account.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct EthAccount { - // message fields - pub base_account: ::protobuf::SingularPtrField, - pub code_hash: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a EthAccount { - fn default() -> &'a EthAccount { - ::default_instance() - } -} - -impl EthAccount { - pub fn new() -> EthAccount { - ::std::default::Default::default() - } - - // .cosmos.auth.v1beta1.BaseAccount base_account = 1; - - - pub fn get_base_account(&self) -> &super::auth::BaseAccount { - self.base_account.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_base_account(&mut self) { - self.base_account.clear(); - } - - pub fn has_base_account(&self) -> bool { - self.base_account.is_some() - } - - // Param is passed by value, moved - pub fn set_base_account(&mut self, v: super::auth::BaseAccount) { - self.base_account = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_base_account(&mut self) -> &mut super::auth::BaseAccount { - if self.base_account.is_none() { - self.base_account.set_default(); - } - self.base_account.as_mut().unwrap() - } - - // Take field - pub fn take_base_account(&mut self) -> super::auth::BaseAccount { - self.base_account.take().unwrap_or_else(|| super::auth::BaseAccount::new()) - } - - // bytes code_hash = 2; - - - pub fn get_code_hash(&self) -> &[u8] { - &self.code_hash - } - pub fn clear_code_hash(&mut self) { - self.code_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_code_hash(&mut self, v: ::std::vec::Vec) { - self.code_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_code_hash(&mut self) -> &mut ::std::vec::Vec { - &mut self.code_hash - } - - // Take field - pub fn take_code_hash(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.code_hash, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for EthAccount { - fn is_initialized(&self) -> bool { - for v in &self.base_account { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.base_account)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.code_hash)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.base_account.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if !self.code_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.code_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.base_account.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if !self.code_hash.is_empty() { - os.write_bytes(2, &self.code_hash)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> EthAccount { - EthAccount::new() - } - - fn default_instance() -> &'static EthAccount { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(EthAccount::new) - } -} - -impl ::protobuf::Clear for EthAccount { - fn clear(&mut self) { - self.base_account.clear(); - self.code_hash.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for EthAccount { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} diff --git a/packages/injective-protobuf/src/proto/auth.rs b/packages/injective-protobuf/src/proto/auth.rs deleted file mode 100644 index ea7a4808..00000000 --- a/packages/injective-protobuf/src/proto/auth.rs +++ /dev/null @@ -1,917 +0,0 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `cosmos/auth/v1beta1/auth.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BaseAccount { - // message fields - pub address: ::std::string::String, - pub pub_key: ::protobuf::SingularPtrField<::protobuf::well_known_types::Any>, - pub account_number: u64, - pub sequence: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BaseAccount { - fn default() -> &'a BaseAccount { - ::default_instance() - } -} - -impl BaseAccount { - pub fn new() -> BaseAccount { - ::std::default::Default::default() - } - - // string address = 1; - - - pub fn get_address(&self) -> &str { - &self.address - } - pub fn clear_address(&mut self) { - self.address.clear(); - } - - // Param is passed by value, moved - pub fn set_address(&mut self, v: ::std::string::String) { - self.address = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_address(&mut self) -> &mut ::std::string::String { - &mut self.address - } - - // Take field - pub fn take_address(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.address, ::std::string::String::new()) - } - - // .google.protobuf.Any pub_key = 2; - - - pub fn get_pub_key(&self) -> &::protobuf::well_known_types::Any { - self.pub_key.as_ref().unwrap_or_else(|| <::protobuf::well_known_types::Any as ::protobuf::Message>::default_instance()) - } - pub fn clear_pub_key(&mut self) { - self.pub_key.clear(); - } - - pub fn has_pub_key(&self) -> bool { - self.pub_key.is_some() - } - - // Param is passed by value, moved - pub fn set_pub_key(&mut self, v: ::protobuf::well_known_types::Any) { - self.pub_key = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_pub_key(&mut self) -> &mut ::protobuf::well_known_types::Any { - if self.pub_key.is_none() { - self.pub_key.set_default(); - } - self.pub_key.as_mut().unwrap() - } - - // Take field - pub fn take_pub_key(&mut self) -> ::protobuf::well_known_types::Any { - self.pub_key.take().unwrap_or_else(|| ::protobuf::well_known_types::Any::new()) - } - - // uint64 account_number = 3; - - - pub fn get_account_number(&self) -> u64 { - self.account_number - } - pub fn clear_account_number(&mut self) { - self.account_number = 0; - } - - // Param is passed by value, moved - pub fn set_account_number(&mut self, v: u64) { - self.account_number = v; - } - - // uint64 sequence = 4; - - - pub fn get_sequence(&self) -> u64 { - self.sequence - } - pub fn clear_sequence(&mut self) { - self.sequence = 0; - } - - // Param is passed by value, moved - pub fn set_sequence(&mut self, v: u64) { - self.sequence = v; - } -} - -impl ::protobuf::Message for BaseAccount { - fn is_initialized(&self) -> bool { - for v in &self.pub_key { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.address)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.pub_key)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.account_number = tmp; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.sequence = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.address.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.address); - } - if let Some(ref v) = self.pub_key.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if self.account_number != 0 { - my_size += ::protobuf::rt::value_size(3, self.account_number, ::protobuf::wire_format::WireTypeVarint); - } - if self.sequence != 0 { - my_size += ::protobuf::rt::value_size(4, self.sequence, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.address.is_empty() { - os.write_string(1, &self.address)?; - } - if let Some(ref v) = self.pub_key.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.account_number != 0 { - os.write_uint64(3, self.account_number)?; - } - if self.sequence != 0 { - os.write_uint64(4, self.sequence)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BaseAccount { - BaseAccount::new() - } - - fn default_instance() -> &'static BaseAccount { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BaseAccount::new) - } -} - -impl ::protobuf::Clear for BaseAccount { - fn clear(&mut self) { - self.address.clear(); - self.pub_key.clear(); - self.account_number = 0; - self.sequence = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for BaseAccount { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ModuleAccount { - // message fields - pub base_account: ::protobuf::SingularPtrField, - pub name: ::std::string::String, - pub permissions: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ModuleAccount { - fn default() -> &'a ModuleAccount { - ::default_instance() - } -} - -impl ModuleAccount { - pub fn new() -> ModuleAccount { - ::std::default::Default::default() - } - - // .cosmos.auth.v1beta1.BaseAccount base_account = 1; - - - pub fn get_base_account(&self) -> &BaseAccount { - self.base_account.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_base_account(&mut self) { - self.base_account.clear(); - } - - pub fn has_base_account(&self) -> bool { - self.base_account.is_some() - } - - // Param is passed by value, moved - pub fn set_base_account(&mut self, v: BaseAccount) { - self.base_account = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_base_account(&mut self) -> &mut BaseAccount { - if self.base_account.is_none() { - self.base_account.set_default(); - } - self.base_account.as_mut().unwrap() - } - - // Take field - pub fn take_base_account(&mut self) -> BaseAccount { - self.base_account.take().unwrap_or_else(|| BaseAccount::new()) - } - - // string name = 2; - - - pub fn get_name(&self) -> &str { - &self.name - } - pub fn clear_name(&mut self) { - self.name.clear(); - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - &mut self.name - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.name, ::std::string::String::new()) - } - - // repeated string permissions = 3; - - - pub fn get_permissions(&self) -> &[::std::string::String] { - &self.permissions - } - pub fn clear_permissions(&mut self) { - self.permissions.clear(); - } - - // Param is passed by value, moved - pub fn set_permissions(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.permissions = v; - } - - // Mutable pointer to the field. - pub fn mut_permissions(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.permissions - } - - // Take field - pub fn take_permissions(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.permissions, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for ModuleAccount { - fn is_initialized(&self) -> bool { - for v in &self.base_account { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.base_account)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; - }, - 3 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.permissions)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.base_account.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.name); - } - for value in &self.permissions { - my_size += ::protobuf::rt::string_size(3, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.base_account.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if !self.name.is_empty() { - os.write_string(2, &self.name)?; - } - for v in &self.permissions { - os.write_string(3, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ModuleAccount { - ModuleAccount::new() - } - - fn default_instance() -> &'static ModuleAccount { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ModuleAccount::new) - } -} - -impl ::protobuf::Clear for ModuleAccount { - fn clear(&mut self) { - self.base_account.clear(); - self.name.clear(); - self.permissions.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ModuleAccount { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ModuleCredential { - // message fields - pub module_name: ::std::string::String, - pub derivation_keys: ::protobuf::RepeatedField<::std::vec::Vec>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ModuleCredential { - fn default() -> &'a ModuleCredential { - ::default_instance() - } -} - -impl ModuleCredential { - pub fn new() -> ModuleCredential { - ::std::default::Default::default() - } - - // string module_name = 1; - - - pub fn get_module_name(&self) -> &str { - &self.module_name - } - pub fn clear_module_name(&mut self) { - self.module_name.clear(); - } - - // Param is passed by value, moved - pub fn set_module_name(&mut self, v: ::std::string::String) { - self.module_name = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_module_name(&mut self) -> &mut ::std::string::String { - &mut self.module_name - } - - // Take field - pub fn take_module_name(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.module_name, ::std::string::String::new()) - } - - // repeated bytes derivation_keys = 2; - - - pub fn get_derivation_keys(&self) -> &[::std::vec::Vec] { - &self.derivation_keys - } - pub fn clear_derivation_keys(&mut self) { - self.derivation_keys.clear(); - } - - // Param is passed by value, moved - pub fn set_derivation_keys(&mut self, v: ::protobuf::RepeatedField<::std::vec::Vec>) { - self.derivation_keys = v; - } - - // Mutable pointer to the field. - pub fn mut_derivation_keys(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec> { - &mut self.derivation_keys - } - - // Take field - pub fn take_derivation_keys(&mut self) -> ::protobuf::RepeatedField<::std::vec::Vec> { - ::std::mem::replace(&mut self.derivation_keys, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for ModuleCredential { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.module_name)?; - }, - 2 => { - ::protobuf::rt::read_repeated_bytes_into(wire_type, is, &mut self.derivation_keys)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.module_name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.module_name); - } - for value in &self.derivation_keys { - my_size += ::protobuf::rt::bytes_size(2, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.module_name.is_empty() { - os.write_string(1, &self.module_name)?; - } - for v in &self.derivation_keys { - os.write_bytes(2, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ModuleCredential { - ModuleCredential::new() - } - - fn default_instance() -> &'static ModuleCredential { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ModuleCredential::new) - } -} - -impl ::protobuf::Clear for ModuleCredential { - fn clear(&mut self) { - self.module_name.clear(); - self.derivation_keys.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ModuleCredential { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Params { - // message fields - pub max_memo_characters: u64, - pub tx_sig_limit: u64, - pub tx_size_cost_per_byte: u64, - pub sig_verify_cost_ed25519: u64, - pub sig_verify_cost_secp256k1: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Params { - fn default() -> &'a Params { - ::default_instance() - } -} - -impl Params { - pub fn new() -> Params { - ::std::default::Default::default() - } - - // uint64 max_memo_characters = 1; - - - pub fn get_max_memo_characters(&self) -> u64 { - self.max_memo_characters - } - pub fn clear_max_memo_characters(&mut self) { - self.max_memo_characters = 0; - } - - // Param is passed by value, moved - pub fn set_max_memo_characters(&mut self, v: u64) { - self.max_memo_characters = v; - } - - // uint64 tx_sig_limit = 2; - - - pub fn get_tx_sig_limit(&self) -> u64 { - self.tx_sig_limit - } - pub fn clear_tx_sig_limit(&mut self) { - self.tx_sig_limit = 0; - } - - // Param is passed by value, moved - pub fn set_tx_sig_limit(&mut self, v: u64) { - self.tx_sig_limit = v; - } - - // uint64 tx_size_cost_per_byte = 3; - - - pub fn get_tx_size_cost_per_byte(&self) -> u64 { - self.tx_size_cost_per_byte - } - pub fn clear_tx_size_cost_per_byte(&mut self) { - self.tx_size_cost_per_byte = 0; - } - - // Param is passed by value, moved - pub fn set_tx_size_cost_per_byte(&mut self, v: u64) { - self.tx_size_cost_per_byte = v; - } - - // uint64 sig_verify_cost_ed25519 = 4; - - - pub fn get_sig_verify_cost_ed25519(&self) -> u64 { - self.sig_verify_cost_ed25519 - } - pub fn clear_sig_verify_cost_ed25519(&mut self) { - self.sig_verify_cost_ed25519 = 0; - } - - // Param is passed by value, moved - pub fn set_sig_verify_cost_ed25519(&mut self, v: u64) { - self.sig_verify_cost_ed25519 = v; - } - - // uint64 sig_verify_cost_secp256k1 = 5; - - - pub fn get_sig_verify_cost_secp256k1(&self) -> u64 { - self.sig_verify_cost_secp256k1 - } - pub fn clear_sig_verify_cost_secp256k1(&mut self) { - self.sig_verify_cost_secp256k1 = 0; - } - - // Param is passed by value, moved - pub fn set_sig_verify_cost_secp256k1(&mut self, v: u64) { - self.sig_verify_cost_secp256k1 = v; - } -} - -impl ::protobuf::Message for Params { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.max_memo_characters = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.tx_sig_limit = tmp; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.tx_size_cost_per_byte = tmp; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.sig_verify_cost_ed25519 = tmp; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.sig_verify_cost_secp256k1 = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.max_memo_characters != 0 { - my_size += ::protobuf::rt::value_size(1, self.max_memo_characters, ::protobuf::wire_format::WireTypeVarint); - } - if self.tx_sig_limit != 0 { - my_size += ::protobuf::rt::value_size(2, self.tx_sig_limit, ::protobuf::wire_format::WireTypeVarint); - } - if self.tx_size_cost_per_byte != 0 { - my_size += ::protobuf::rt::value_size(3, self.tx_size_cost_per_byte, ::protobuf::wire_format::WireTypeVarint); - } - if self.sig_verify_cost_ed25519 != 0 { - my_size += ::protobuf::rt::value_size(4, self.sig_verify_cost_ed25519, ::protobuf::wire_format::WireTypeVarint); - } - if self.sig_verify_cost_secp256k1 != 0 { - my_size += ::protobuf::rt::value_size(5, self.sig_verify_cost_secp256k1, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.max_memo_characters != 0 { - os.write_uint64(1, self.max_memo_characters)?; - } - if self.tx_sig_limit != 0 { - os.write_uint64(2, self.tx_sig_limit)?; - } - if self.tx_size_cost_per_byte != 0 { - os.write_uint64(3, self.tx_size_cost_per_byte)?; - } - if self.sig_verify_cost_ed25519 != 0 { - os.write_uint64(4, self.sig_verify_cost_ed25519)?; - } - if self.sig_verify_cost_secp256k1 != 0 { - os.write_uint64(5, self.sig_verify_cost_secp256k1)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Params { - Params::new() - } - - fn default_instance() -> &'static Params { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Params::new) - } -} - -impl ::protobuf::Clear for Params { - fn clear(&mut self) { - self.max_memo_characters = 0; - self.tx_sig_limit = 0; - self.tx_size_cost_per_byte = 0; - self.sig_verify_cost_ed25519 = 0; - self.sig_verify_cost_secp256k1 = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for Params { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} diff --git a/packages/injective-protobuf/src/proto/coin.rs b/packages/injective-protobuf/src/proto/coin.rs deleted file mode 100644 index 8d3209d7..00000000 --- a/packages/injective-protobuf/src/proto/coin.rs +++ /dev/null @@ -1,370 +0,0 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `cosmos/base/v1beta1/coin.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Coin { - // message fields - pub denom: ::std::string::String, - pub amount: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Coin { - fn default() -> &'a Coin { - ::default_instance() - } -} - -impl Coin { - pub fn new() -> Coin { - ::std::default::Default::default() - } - - // string denom = 1; - - - pub fn get_denom(&self) -> &str { - &self.denom - } - pub fn clear_denom(&mut self) { - self.denom.clear(); - } - - // Param is passed by value, moved - pub fn set_denom(&mut self, v: ::std::string::String) { - self.denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_denom(&mut self) -> &mut ::std::string::String { - &mut self.denom - } - - // Take field - pub fn take_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.denom, ::std::string::String::new()) - } - - // string amount = 2; - - - pub fn get_amount(&self) -> &str { - &self.amount - } - pub fn clear_amount(&mut self) { - self.amount.clear(); - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: ::std::string::String) { - self.amount = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_amount(&mut self) -> &mut ::std::string::String { - &mut self.amount - } - - // Take field - pub fn take_amount(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.amount, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for Coin { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.denom)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.amount)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.denom.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.denom); - } - if !self.amount.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.amount); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.denom.is_empty() { - os.write_string(1, &self.denom)?; - } - if !self.amount.is_empty() { - os.write_string(2, &self.amount)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Coin { - Coin::new() - } - - fn default_instance() -> &'static Coin { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Coin::new) - } -} - -impl ::protobuf::Clear for Coin { - fn clear(&mut self) { - self.denom.clear(); - self.amount.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for Coin { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DecCoin { - // message fields - pub denom: ::std::string::String, - pub amount: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DecCoin { - fn default() -> &'a DecCoin { - ::default_instance() - } -} - -impl DecCoin { - pub fn new() -> DecCoin { - ::std::default::Default::default() - } - - // string denom = 1; - - - pub fn get_denom(&self) -> &str { - &self.denom - } - pub fn clear_denom(&mut self) { - self.denom.clear(); - } - - // Param is passed by value, moved - pub fn set_denom(&mut self, v: ::std::string::String) { - self.denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_denom(&mut self) -> &mut ::std::string::String { - &mut self.denom - } - - // Take field - pub fn take_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.denom, ::std::string::String::new()) - } - - // string amount = 2; - - - pub fn get_amount(&self) -> &str { - &self.amount - } - pub fn clear_amount(&mut self) { - self.amount.clear(); - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: ::std::string::String) { - self.amount = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_amount(&mut self) -> &mut ::std::string::String { - &mut self.amount - } - - // Take field - pub fn take_amount(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.amount, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for DecCoin { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.denom)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.amount)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.denom.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.denom); - } - if !self.amount.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.amount); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.denom.is_empty() { - os.write_string(1, &self.denom)?; - } - if !self.amount.is_empty() { - os.write_string(2, &self.amount)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DecCoin { - DecCoin::new() - } - - fn default_instance() -> &'static DecCoin { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DecCoin::new) - } -} - -impl ::protobuf::Clear for DecCoin { - fn clear(&mut self) { - self.denom.clear(); - self.amount.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DecCoin { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} diff --git a/packages/injective-protobuf/src/proto/distribution.rs b/packages/injective-protobuf/src/proto/distribution.rs deleted file mode 100644 index 044fa016..00000000 --- a/packages/injective-protobuf/src/proto/distribution.rs +++ /dev/null @@ -1,2262 +0,0 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `cosmos/distribution/v1beta1/distribution.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Params { - // message fields - pub community_tax: ::std::string::String, - pub base_proposer_reward: ::std::string::String, - pub bonus_proposer_reward: ::std::string::String, - pub withdraw_addr_enabled: bool, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Params { - fn default() -> &'a Params { - ::default_instance() - } -} - -impl Params { - pub fn new() -> Params { - ::std::default::Default::default() - } - - // string community_tax = 1; - - - pub fn get_community_tax(&self) -> &str { - &self.community_tax - } - pub fn clear_community_tax(&mut self) { - self.community_tax.clear(); - } - - // Param is passed by value, moved - pub fn set_community_tax(&mut self, v: ::std::string::String) { - self.community_tax = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_community_tax(&mut self) -> &mut ::std::string::String { - &mut self.community_tax - } - - // Take field - pub fn take_community_tax(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.community_tax, ::std::string::String::new()) - } - - // string base_proposer_reward = 2; - - - pub fn get_base_proposer_reward(&self) -> &str { - &self.base_proposer_reward - } - pub fn clear_base_proposer_reward(&mut self) { - self.base_proposer_reward.clear(); - } - - // Param is passed by value, moved - pub fn set_base_proposer_reward(&mut self, v: ::std::string::String) { - self.base_proposer_reward = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_base_proposer_reward(&mut self) -> &mut ::std::string::String { - &mut self.base_proposer_reward - } - - // Take field - pub fn take_base_proposer_reward(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.base_proposer_reward, ::std::string::String::new()) - } - - // string bonus_proposer_reward = 3; - - - pub fn get_bonus_proposer_reward(&self) -> &str { - &self.bonus_proposer_reward - } - pub fn clear_bonus_proposer_reward(&mut self) { - self.bonus_proposer_reward.clear(); - } - - // Param is passed by value, moved - pub fn set_bonus_proposer_reward(&mut self, v: ::std::string::String) { - self.bonus_proposer_reward = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_bonus_proposer_reward(&mut self) -> &mut ::std::string::String { - &mut self.bonus_proposer_reward - } - - // Take field - pub fn take_bonus_proposer_reward(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.bonus_proposer_reward, ::std::string::String::new()) - } - - // bool withdraw_addr_enabled = 4; - - - pub fn get_withdraw_addr_enabled(&self) -> bool { - self.withdraw_addr_enabled - } - pub fn clear_withdraw_addr_enabled(&mut self) { - self.withdraw_addr_enabled = false; - } - - // Param is passed by value, moved - pub fn set_withdraw_addr_enabled(&mut self, v: bool) { - self.withdraw_addr_enabled = v; - } -} - -impl ::protobuf::Message for Params { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.community_tax)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.base_proposer_reward)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.bonus_proposer_reward)?; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.withdraw_addr_enabled = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.community_tax.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.community_tax); - } - if !self.base_proposer_reward.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.base_proposer_reward); - } - if !self.bonus_proposer_reward.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.bonus_proposer_reward); - } - if self.withdraw_addr_enabled != false { - my_size += 2; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.community_tax.is_empty() { - os.write_string(1, &self.community_tax)?; - } - if !self.base_proposer_reward.is_empty() { - os.write_string(2, &self.base_proposer_reward)?; - } - if !self.bonus_proposer_reward.is_empty() { - os.write_string(3, &self.bonus_proposer_reward)?; - } - if self.withdraw_addr_enabled != false { - os.write_bool(4, self.withdraw_addr_enabled)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Params { - Params::new() - } - - fn default_instance() -> &'static Params { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Params::new) - } -} - -impl ::protobuf::Clear for Params { - fn clear(&mut self) { - self.community_tax.clear(); - self.base_proposer_reward.clear(); - self.bonus_proposer_reward.clear(); - self.withdraw_addr_enabled = false; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for Params { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ValidatorHistoricalRewards { - // message fields - pub cumulative_reward_ratio: ::protobuf::RepeatedField, - pub reference_count: u32, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ValidatorHistoricalRewards { - fn default() -> &'a ValidatorHistoricalRewards { - ::default_instance() - } -} - -impl ValidatorHistoricalRewards { - pub fn new() -> ValidatorHistoricalRewards { - ::std::default::Default::default() - } - - // repeated .cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1; - - - pub fn get_cumulative_reward_ratio(&self) -> &[super::coin::DecCoin] { - &self.cumulative_reward_ratio - } - pub fn clear_cumulative_reward_ratio(&mut self) { - self.cumulative_reward_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_cumulative_reward_ratio(&mut self, v: ::protobuf::RepeatedField) { - self.cumulative_reward_ratio = v; - } - - // Mutable pointer to the field. - pub fn mut_cumulative_reward_ratio(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.cumulative_reward_ratio - } - - // Take field - pub fn take_cumulative_reward_ratio(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.cumulative_reward_ratio, ::protobuf::RepeatedField::new()) - } - - // uint32 reference_count = 2; - - - pub fn get_reference_count(&self) -> u32 { - self.reference_count - } - pub fn clear_reference_count(&mut self) { - self.reference_count = 0; - } - - // Param is passed by value, moved - pub fn set_reference_count(&mut self, v: u32) { - self.reference_count = v; - } -} - -impl ::protobuf::Message for ValidatorHistoricalRewards { - fn is_initialized(&self) -> bool { - for v in &self.cumulative_reward_ratio { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.cumulative_reward_ratio)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.reference_count = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.cumulative_reward_ratio { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - if self.reference_count != 0 { - my_size += ::protobuf::rt::value_size(2, self.reference_count, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.cumulative_reward_ratio { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - if self.reference_count != 0 { - os.write_uint32(2, self.reference_count)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ValidatorHistoricalRewards { - ValidatorHistoricalRewards::new() - } - - fn default_instance() -> &'static ValidatorHistoricalRewards { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ValidatorHistoricalRewards::new) - } -} - -impl ::protobuf::Clear for ValidatorHistoricalRewards { - fn clear(&mut self) { - self.cumulative_reward_ratio.clear(); - self.reference_count = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ValidatorHistoricalRewards { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ValidatorCurrentRewards { - // message fields - pub rewards: ::protobuf::RepeatedField, - pub period: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ValidatorCurrentRewards { - fn default() -> &'a ValidatorCurrentRewards { - ::default_instance() - } -} - -impl ValidatorCurrentRewards { - pub fn new() -> ValidatorCurrentRewards { - ::std::default::Default::default() - } - - // repeated .cosmos.base.v1beta1.DecCoin rewards = 1; - - - pub fn get_rewards(&self) -> &[super::coin::DecCoin] { - &self.rewards - } - pub fn clear_rewards(&mut self) { - self.rewards.clear(); - } - - // Param is passed by value, moved - pub fn set_rewards(&mut self, v: ::protobuf::RepeatedField) { - self.rewards = v; - } - - // Mutable pointer to the field. - pub fn mut_rewards(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.rewards - } - - // Take field - pub fn take_rewards(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.rewards, ::protobuf::RepeatedField::new()) - } - - // uint64 period = 2; - - - pub fn get_period(&self) -> u64 { - self.period - } - pub fn clear_period(&mut self) { - self.period = 0; - } - - // Param is passed by value, moved - pub fn set_period(&mut self, v: u64) { - self.period = v; - } -} - -impl ::protobuf::Message for ValidatorCurrentRewards { - fn is_initialized(&self) -> bool { - for v in &self.rewards { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.rewards)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.period = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.rewards { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - if self.period != 0 { - my_size += ::protobuf::rt::value_size(2, self.period, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.rewards { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - if self.period != 0 { - os.write_uint64(2, self.period)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ValidatorCurrentRewards { - ValidatorCurrentRewards::new() - } - - fn default_instance() -> &'static ValidatorCurrentRewards { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ValidatorCurrentRewards::new) - } -} - -impl ::protobuf::Clear for ValidatorCurrentRewards { - fn clear(&mut self) { - self.rewards.clear(); - self.period = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ValidatorCurrentRewards { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ValidatorAccumulatedCommission { - // message fields - pub commission: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ValidatorAccumulatedCommission { - fn default() -> &'a ValidatorAccumulatedCommission { - ::default_instance() - } -} - -impl ValidatorAccumulatedCommission { - pub fn new() -> ValidatorAccumulatedCommission { - ::std::default::Default::default() - } - - // repeated .cosmos.base.v1beta1.DecCoin commission = 1; - - - pub fn get_commission(&self) -> &[super::coin::DecCoin] { - &self.commission - } - pub fn clear_commission(&mut self) { - self.commission.clear(); - } - - // Param is passed by value, moved - pub fn set_commission(&mut self, v: ::protobuf::RepeatedField) { - self.commission = v; - } - - // Mutable pointer to the field. - pub fn mut_commission(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.commission - } - - // Take field - pub fn take_commission(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.commission, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for ValidatorAccumulatedCommission { - fn is_initialized(&self) -> bool { - for v in &self.commission { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.commission)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.commission { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.commission { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ValidatorAccumulatedCommission { - ValidatorAccumulatedCommission::new() - } - - fn default_instance() -> &'static ValidatorAccumulatedCommission { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ValidatorAccumulatedCommission::new) - } -} - -impl ::protobuf::Clear for ValidatorAccumulatedCommission { - fn clear(&mut self) { - self.commission.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ValidatorAccumulatedCommission { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ValidatorOutstandingRewards { - // message fields - pub rewards: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ValidatorOutstandingRewards { - fn default() -> &'a ValidatorOutstandingRewards { - ::default_instance() - } -} - -impl ValidatorOutstandingRewards { - pub fn new() -> ValidatorOutstandingRewards { - ::std::default::Default::default() - } - - // repeated .cosmos.base.v1beta1.DecCoin rewards = 1; - - - pub fn get_rewards(&self) -> &[super::coin::DecCoin] { - &self.rewards - } - pub fn clear_rewards(&mut self) { - self.rewards.clear(); - } - - // Param is passed by value, moved - pub fn set_rewards(&mut self, v: ::protobuf::RepeatedField) { - self.rewards = v; - } - - // Mutable pointer to the field. - pub fn mut_rewards(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.rewards - } - - // Take field - pub fn take_rewards(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.rewards, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for ValidatorOutstandingRewards { - fn is_initialized(&self) -> bool { - for v in &self.rewards { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.rewards)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.rewards { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.rewards { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ValidatorOutstandingRewards { - ValidatorOutstandingRewards::new() - } - - fn default_instance() -> &'static ValidatorOutstandingRewards { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ValidatorOutstandingRewards::new) - } -} - -impl ::protobuf::Clear for ValidatorOutstandingRewards { - fn clear(&mut self) { - self.rewards.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ValidatorOutstandingRewards { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ValidatorSlashEvent { - // message fields - pub validator_period: u64, - pub fraction: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ValidatorSlashEvent { - fn default() -> &'a ValidatorSlashEvent { - ::default_instance() - } -} - -impl ValidatorSlashEvent { - pub fn new() -> ValidatorSlashEvent { - ::std::default::Default::default() - } - - // uint64 validator_period = 1; - - - pub fn get_validator_period(&self) -> u64 { - self.validator_period - } - pub fn clear_validator_period(&mut self) { - self.validator_period = 0; - } - - // Param is passed by value, moved - pub fn set_validator_period(&mut self, v: u64) { - self.validator_period = v; - } - - // string fraction = 2; - - - pub fn get_fraction(&self) -> &str { - &self.fraction - } - pub fn clear_fraction(&mut self) { - self.fraction.clear(); - } - - // Param is passed by value, moved - pub fn set_fraction(&mut self, v: ::std::string::String) { - self.fraction = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fraction(&mut self) -> &mut ::std::string::String { - &mut self.fraction - } - - // Take field - pub fn take_fraction(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.fraction, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for ValidatorSlashEvent { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.validator_period = tmp; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.fraction)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.validator_period != 0 { - my_size += ::protobuf::rt::value_size(1, self.validator_period, ::protobuf::wire_format::WireTypeVarint); - } - if !self.fraction.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.fraction); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.validator_period != 0 { - os.write_uint64(1, self.validator_period)?; - } - if !self.fraction.is_empty() { - os.write_string(2, &self.fraction)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ValidatorSlashEvent { - ValidatorSlashEvent::new() - } - - fn default_instance() -> &'static ValidatorSlashEvent { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ValidatorSlashEvent::new) - } -} - -impl ::protobuf::Clear for ValidatorSlashEvent { - fn clear(&mut self) { - self.validator_period = 0; - self.fraction.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ValidatorSlashEvent { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ValidatorSlashEvents { - // message fields - pub validator_slash_events: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ValidatorSlashEvents { - fn default() -> &'a ValidatorSlashEvents { - ::default_instance() - } -} - -impl ValidatorSlashEvents { - pub fn new() -> ValidatorSlashEvents { - ::std::default::Default::default() - } - - // repeated .cosmos.distribution.v1beta1.ValidatorSlashEvent validator_slash_events = 1; - - - pub fn get_validator_slash_events(&self) -> &[ValidatorSlashEvent] { - &self.validator_slash_events - } - pub fn clear_validator_slash_events(&mut self) { - self.validator_slash_events.clear(); - } - - // Param is passed by value, moved - pub fn set_validator_slash_events(&mut self, v: ::protobuf::RepeatedField) { - self.validator_slash_events = v; - } - - // Mutable pointer to the field. - pub fn mut_validator_slash_events(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.validator_slash_events - } - - // Take field - pub fn take_validator_slash_events(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.validator_slash_events, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for ValidatorSlashEvents { - fn is_initialized(&self) -> bool { - for v in &self.validator_slash_events { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.validator_slash_events)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.validator_slash_events { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.validator_slash_events { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ValidatorSlashEvents { - ValidatorSlashEvents::new() - } - - fn default_instance() -> &'static ValidatorSlashEvents { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ValidatorSlashEvents::new) - } -} - -impl ::protobuf::Clear for ValidatorSlashEvents { - fn clear(&mut self) { - self.validator_slash_events.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ValidatorSlashEvents { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct FeePool { - // message fields - pub community_pool: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a FeePool { - fn default() -> &'a FeePool { - ::default_instance() - } -} - -impl FeePool { - pub fn new() -> FeePool { - ::std::default::Default::default() - } - - // repeated .cosmos.base.v1beta1.DecCoin community_pool = 1; - - - pub fn get_community_pool(&self) -> &[super::coin::DecCoin] { - &self.community_pool - } - pub fn clear_community_pool(&mut self) { - self.community_pool.clear(); - } - - // Param is passed by value, moved - pub fn set_community_pool(&mut self, v: ::protobuf::RepeatedField) { - self.community_pool = v; - } - - // Mutable pointer to the field. - pub fn mut_community_pool(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.community_pool - } - - // Take field - pub fn take_community_pool(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.community_pool, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for FeePool { - fn is_initialized(&self) -> bool { - for v in &self.community_pool { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.community_pool)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.community_pool { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.community_pool { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> FeePool { - FeePool::new() - } - - fn default_instance() -> &'static FeePool { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(FeePool::new) - } -} - -impl ::protobuf::Clear for FeePool { - fn clear(&mut self) { - self.community_pool.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for FeePool { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CommunityPoolSpendProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub recipient: ::std::string::String, - pub amount: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CommunityPoolSpendProposal { - fn default() -> &'a CommunityPoolSpendProposal { - ::default_instance() - } -} - -impl CommunityPoolSpendProposal { - pub fn new() -> CommunityPoolSpendProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string recipient = 3; - - - pub fn get_recipient(&self) -> &str { - &self.recipient - } - pub fn clear_recipient(&mut self) { - self.recipient.clear(); - } - - // Param is passed by value, moved - pub fn set_recipient(&mut self, v: ::std::string::String) { - self.recipient = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_recipient(&mut self) -> &mut ::std::string::String { - &mut self.recipient - } - - // Take field - pub fn take_recipient(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.recipient, ::std::string::String::new()) - } - - // repeated .cosmos.base.v1beta1.Coin amount = 4; - - - pub fn get_amount(&self) -> &[super::coin::Coin] { - &self.amount - } - pub fn clear_amount(&mut self) { - self.amount.clear(); - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: ::protobuf::RepeatedField) { - self.amount = v; - } - - // Mutable pointer to the field. - pub fn mut_amount(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.amount - } - - // Take field - pub fn take_amount(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.amount, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for CommunityPoolSpendProposal { - fn is_initialized(&self) -> bool { - for v in &self.amount { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.recipient)?; - }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.amount)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.recipient.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.recipient); - } - for value in &self.amount { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.recipient.is_empty() { - os.write_string(3, &self.recipient)?; - } - for v in &self.amount { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CommunityPoolSpendProposal { - CommunityPoolSpendProposal::new() - } - - fn default_instance() -> &'static CommunityPoolSpendProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CommunityPoolSpendProposal::new) - } -} - -impl ::protobuf::Clear for CommunityPoolSpendProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.recipient.clear(); - self.amount.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for CommunityPoolSpendProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DelegatorStartingInfo { - // message fields - pub previous_period: u64, - pub stake: ::std::string::String, - pub height: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DelegatorStartingInfo { - fn default() -> &'a DelegatorStartingInfo { - ::default_instance() - } -} - -impl DelegatorStartingInfo { - pub fn new() -> DelegatorStartingInfo { - ::std::default::Default::default() - } - - // uint64 previous_period = 1; - - - pub fn get_previous_period(&self) -> u64 { - self.previous_period - } - pub fn clear_previous_period(&mut self) { - self.previous_period = 0; - } - - // Param is passed by value, moved - pub fn set_previous_period(&mut self, v: u64) { - self.previous_period = v; - } - - // string stake = 2; - - - pub fn get_stake(&self) -> &str { - &self.stake - } - pub fn clear_stake(&mut self) { - self.stake.clear(); - } - - // Param is passed by value, moved - pub fn set_stake(&mut self, v: ::std::string::String) { - self.stake = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_stake(&mut self) -> &mut ::std::string::String { - &mut self.stake - } - - // Take field - pub fn take_stake(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.stake, ::std::string::String::new()) - } - - // uint64 height = 3; - - - pub fn get_height(&self) -> u64 { - self.height - } - pub fn clear_height(&mut self) { - self.height = 0; - } - - // Param is passed by value, moved - pub fn set_height(&mut self, v: u64) { - self.height = v; - } -} - -impl ::protobuf::Message for DelegatorStartingInfo { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.previous_period = tmp; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.stake)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.height = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.previous_period != 0 { - my_size += ::protobuf::rt::value_size(1, self.previous_period, ::protobuf::wire_format::WireTypeVarint); - } - if !self.stake.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.stake); - } - if self.height != 0 { - my_size += ::protobuf::rt::value_size(3, self.height, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.previous_period != 0 { - os.write_uint64(1, self.previous_period)?; - } - if !self.stake.is_empty() { - os.write_string(2, &self.stake)?; - } - if self.height != 0 { - os.write_uint64(3, self.height)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DelegatorStartingInfo { - DelegatorStartingInfo::new() - } - - fn default_instance() -> &'static DelegatorStartingInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DelegatorStartingInfo::new) - } -} - -impl ::protobuf::Clear for DelegatorStartingInfo { - fn clear(&mut self) { - self.previous_period = 0; - self.stake.clear(); - self.height = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DelegatorStartingInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DelegationDelegatorReward { - // message fields - pub validator_address: ::std::string::String, - pub reward: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DelegationDelegatorReward { - fn default() -> &'a DelegationDelegatorReward { - ::default_instance() - } -} - -impl DelegationDelegatorReward { - pub fn new() -> DelegationDelegatorReward { - ::std::default::Default::default() - } - - // string validator_address = 1; - - - pub fn get_validator_address(&self) -> &str { - &self.validator_address - } - pub fn clear_validator_address(&mut self) { - self.validator_address.clear(); - } - - // Param is passed by value, moved - pub fn set_validator_address(&mut self, v: ::std::string::String) { - self.validator_address = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_validator_address(&mut self) -> &mut ::std::string::String { - &mut self.validator_address - } - - // Take field - pub fn take_validator_address(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.validator_address, ::std::string::String::new()) - } - - // repeated .cosmos.base.v1beta1.DecCoin reward = 2; - - - pub fn get_reward(&self) -> &[super::coin::DecCoin] { - &self.reward - } - pub fn clear_reward(&mut self) { - self.reward.clear(); - } - - // Param is passed by value, moved - pub fn set_reward(&mut self, v: ::protobuf::RepeatedField) { - self.reward = v; - } - - // Mutable pointer to the field. - pub fn mut_reward(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.reward - } - - // Take field - pub fn take_reward(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.reward, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for DelegationDelegatorReward { - fn is_initialized(&self) -> bool { - for v in &self.reward { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.validator_address)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.reward)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.validator_address.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.validator_address); - } - for value in &self.reward { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.validator_address.is_empty() { - os.write_string(1, &self.validator_address)?; - } - for v in &self.reward { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DelegationDelegatorReward { - DelegationDelegatorReward::new() - } - - fn default_instance() -> &'static DelegationDelegatorReward { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DelegationDelegatorReward::new) - } -} - -impl ::protobuf::Clear for DelegationDelegatorReward { - fn clear(&mut self) { - self.validator_address.clear(); - self.reward.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DelegationDelegatorReward { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CommunityPoolSpendProposalWithDeposit { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub recipient: ::std::string::String, - pub amount: ::std::string::String, - pub deposit: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CommunityPoolSpendProposalWithDeposit { - fn default() -> &'a CommunityPoolSpendProposalWithDeposit { - ::default_instance() - } -} - -impl CommunityPoolSpendProposalWithDeposit { - pub fn new() -> CommunityPoolSpendProposalWithDeposit { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string recipient = 3; - - - pub fn get_recipient(&self) -> &str { - &self.recipient - } - pub fn clear_recipient(&mut self) { - self.recipient.clear(); - } - - // Param is passed by value, moved - pub fn set_recipient(&mut self, v: ::std::string::String) { - self.recipient = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_recipient(&mut self) -> &mut ::std::string::String { - &mut self.recipient - } - - // Take field - pub fn take_recipient(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.recipient, ::std::string::String::new()) - } - - // string amount = 4; - - - pub fn get_amount(&self) -> &str { - &self.amount - } - pub fn clear_amount(&mut self) { - self.amount.clear(); - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: ::std::string::String) { - self.amount = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_amount(&mut self) -> &mut ::std::string::String { - &mut self.amount - } - - // Take field - pub fn take_amount(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.amount, ::std::string::String::new()) - } - - // string deposit = 5; - - - pub fn get_deposit(&self) -> &str { - &self.deposit - } - pub fn clear_deposit(&mut self) { - self.deposit.clear(); - } - - // Param is passed by value, moved - pub fn set_deposit(&mut self, v: ::std::string::String) { - self.deposit = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_deposit(&mut self) -> &mut ::std::string::String { - &mut self.deposit - } - - // Take field - pub fn take_deposit(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.deposit, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for CommunityPoolSpendProposalWithDeposit { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.recipient)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.amount)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.deposit)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.recipient.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.recipient); - } - if !self.amount.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.amount); - } - if !self.deposit.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.deposit); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.recipient.is_empty() { - os.write_string(3, &self.recipient)?; - } - if !self.amount.is_empty() { - os.write_string(4, &self.amount)?; - } - if !self.deposit.is_empty() { - os.write_string(5, &self.deposit)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CommunityPoolSpendProposalWithDeposit { - CommunityPoolSpendProposalWithDeposit::new() - } - - fn default_instance() -> &'static CommunityPoolSpendProposalWithDeposit { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CommunityPoolSpendProposalWithDeposit::new) - } -} - -impl ::protobuf::Clear for CommunityPoolSpendProposalWithDeposit { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.recipient.clear(); - self.amount.clear(); - self.deposit.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for CommunityPoolSpendProposalWithDeposit { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} diff --git a/packages/injective-protobuf/src/proto/exchange.rs b/packages/injective-protobuf/src/proto/exchange.rs deleted file mode 100644 index ef64ba06..00000000 --- a/packages/injective-protobuf/src/proto/exchange.rs +++ /dev/null @@ -1,12717 +0,0 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `injective/exchange/v1beta1/exchange.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Params { - // message fields - pub spot_market_instant_listing_fee: ::protobuf::SingularPtrField, - pub derivative_market_instant_listing_fee: ::protobuf::SingularPtrField, - pub default_spot_maker_fee_rate: ::std::string::String, - pub default_spot_taker_fee_rate: ::std::string::String, - pub default_derivative_maker_fee_rate: ::std::string::String, - pub default_derivative_taker_fee_rate: ::std::string::String, - pub default_initial_margin_ratio: ::std::string::String, - pub default_maintenance_margin_ratio: ::std::string::String, - pub default_funding_interval: i64, - pub funding_multiple: i64, - pub relayer_fee_share_rate: ::std::string::String, - pub default_hourly_funding_rate_cap: ::std::string::String, - pub default_hourly_interest_rate: ::std::string::String, - pub max_derivative_order_side_count: u32, - pub inj_reward_staked_requirement_threshold: ::std::string::String, - pub trading_rewards_vesting_duration: i64, - pub liquidator_reward_share_rate: ::std::string::String, - pub binary_options_market_instant_listing_fee: ::protobuf::SingularPtrField, - pub atomic_market_order_access_level: AtomicMarketOrderAccessLevel, - pub spot_atomic_market_order_fee_multiplier: ::std::string::String, - pub derivative_atomic_market_order_fee_multiplier: ::std::string::String, - pub binary_options_atomic_market_order_fee_multiplier: ::std::string::String, - pub minimal_protocol_fee_rate: ::std::string::String, - pub is_instant_derivative_market_launch_enabled: bool, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Params { - fn default() -> &'a Params { - ::default_instance() - } -} - -impl Params { - pub fn new() -> Params { - ::std::default::Default::default() - } - - // .cosmos.base.v1beta1.Coin spot_market_instant_listing_fee = 1; - - - pub fn get_spot_market_instant_listing_fee(&self) -> &super::coin::Coin { - self.spot_market_instant_listing_fee.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_spot_market_instant_listing_fee(&mut self) { - self.spot_market_instant_listing_fee.clear(); - } - - pub fn has_spot_market_instant_listing_fee(&self) -> bool { - self.spot_market_instant_listing_fee.is_some() - } - - // Param is passed by value, moved - pub fn set_spot_market_instant_listing_fee(&mut self, v: super::coin::Coin) { - self.spot_market_instant_listing_fee = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_spot_market_instant_listing_fee(&mut self) -> &mut super::coin::Coin { - if self.spot_market_instant_listing_fee.is_none() { - self.spot_market_instant_listing_fee.set_default(); - } - self.spot_market_instant_listing_fee.as_mut().unwrap() - } - - // Take field - pub fn take_spot_market_instant_listing_fee(&mut self) -> super::coin::Coin { - self.spot_market_instant_listing_fee.take().unwrap_or_else(|| super::coin::Coin::new()) - } - - // .cosmos.base.v1beta1.Coin derivative_market_instant_listing_fee = 2; - - - pub fn get_derivative_market_instant_listing_fee(&self) -> &super::coin::Coin { - self.derivative_market_instant_listing_fee.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_derivative_market_instant_listing_fee(&mut self) { - self.derivative_market_instant_listing_fee.clear(); - } - - pub fn has_derivative_market_instant_listing_fee(&self) -> bool { - self.derivative_market_instant_listing_fee.is_some() - } - - // Param is passed by value, moved - pub fn set_derivative_market_instant_listing_fee(&mut self, v: super::coin::Coin) { - self.derivative_market_instant_listing_fee = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_derivative_market_instant_listing_fee(&mut self) -> &mut super::coin::Coin { - if self.derivative_market_instant_listing_fee.is_none() { - self.derivative_market_instant_listing_fee.set_default(); - } - self.derivative_market_instant_listing_fee.as_mut().unwrap() - } - - // Take field - pub fn take_derivative_market_instant_listing_fee(&mut self) -> super::coin::Coin { - self.derivative_market_instant_listing_fee.take().unwrap_or_else(|| super::coin::Coin::new()) - } - - // string default_spot_maker_fee_rate = 3; - - - pub fn get_default_spot_maker_fee_rate(&self) -> &str { - &self.default_spot_maker_fee_rate - } - pub fn clear_default_spot_maker_fee_rate(&mut self) { - self.default_spot_maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_default_spot_maker_fee_rate(&mut self, v: ::std::string::String) { - self.default_spot_maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_default_spot_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.default_spot_maker_fee_rate - } - - // Take field - pub fn take_default_spot_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.default_spot_maker_fee_rate, ::std::string::String::new()) - } - - // string default_spot_taker_fee_rate = 4; - - - pub fn get_default_spot_taker_fee_rate(&self) -> &str { - &self.default_spot_taker_fee_rate - } - pub fn clear_default_spot_taker_fee_rate(&mut self) { - self.default_spot_taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_default_spot_taker_fee_rate(&mut self, v: ::std::string::String) { - self.default_spot_taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_default_spot_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.default_spot_taker_fee_rate - } - - // Take field - pub fn take_default_spot_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.default_spot_taker_fee_rate, ::std::string::String::new()) - } - - // string default_derivative_maker_fee_rate = 5; - - - pub fn get_default_derivative_maker_fee_rate(&self) -> &str { - &self.default_derivative_maker_fee_rate - } - pub fn clear_default_derivative_maker_fee_rate(&mut self) { - self.default_derivative_maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_default_derivative_maker_fee_rate(&mut self, v: ::std::string::String) { - self.default_derivative_maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_default_derivative_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.default_derivative_maker_fee_rate - } - - // Take field - pub fn take_default_derivative_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.default_derivative_maker_fee_rate, ::std::string::String::new()) - } - - // string default_derivative_taker_fee_rate = 6; - - - pub fn get_default_derivative_taker_fee_rate(&self) -> &str { - &self.default_derivative_taker_fee_rate - } - pub fn clear_default_derivative_taker_fee_rate(&mut self) { - self.default_derivative_taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_default_derivative_taker_fee_rate(&mut self, v: ::std::string::String) { - self.default_derivative_taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_default_derivative_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.default_derivative_taker_fee_rate - } - - // Take field - pub fn take_default_derivative_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.default_derivative_taker_fee_rate, ::std::string::String::new()) - } - - // string default_initial_margin_ratio = 7; - - - pub fn get_default_initial_margin_ratio(&self) -> &str { - &self.default_initial_margin_ratio - } - pub fn clear_default_initial_margin_ratio(&mut self) { - self.default_initial_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_default_initial_margin_ratio(&mut self, v: ::std::string::String) { - self.default_initial_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_default_initial_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.default_initial_margin_ratio - } - - // Take field - pub fn take_default_initial_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.default_initial_margin_ratio, ::std::string::String::new()) - } - - // string default_maintenance_margin_ratio = 8; - - - pub fn get_default_maintenance_margin_ratio(&self) -> &str { - &self.default_maintenance_margin_ratio - } - pub fn clear_default_maintenance_margin_ratio(&mut self) { - self.default_maintenance_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_default_maintenance_margin_ratio(&mut self, v: ::std::string::String) { - self.default_maintenance_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_default_maintenance_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.default_maintenance_margin_ratio - } - - // Take field - pub fn take_default_maintenance_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.default_maintenance_margin_ratio, ::std::string::String::new()) - } - - // int64 default_funding_interval = 9; - - - pub fn get_default_funding_interval(&self) -> i64 { - self.default_funding_interval - } - pub fn clear_default_funding_interval(&mut self) { - self.default_funding_interval = 0; - } - - // Param is passed by value, moved - pub fn set_default_funding_interval(&mut self, v: i64) { - self.default_funding_interval = v; - } - - // int64 funding_multiple = 10; - - - pub fn get_funding_multiple(&self) -> i64 { - self.funding_multiple - } - pub fn clear_funding_multiple(&mut self) { - self.funding_multiple = 0; - } - - // Param is passed by value, moved - pub fn set_funding_multiple(&mut self, v: i64) { - self.funding_multiple = v; - } - - // string relayer_fee_share_rate = 11; - - - pub fn get_relayer_fee_share_rate(&self) -> &str { - &self.relayer_fee_share_rate - } - pub fn clear_relayer_fee_share_rate(&mut self) { - self.relayer_fee_share_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_relayer_fee_share_rate(&mut self, v: ::std::string::String) { - self.relayer_fee_share_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_relayer_fee_share_rate(&mut self) -> &mut ::std::string::String { - &mut self.relayer_fee_share_rate - } - - // Take field - pub fn take_relayer_fee_share_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.relayer_fee_share_rate, ::std::string::String::new()) - } - - // string default_hourly_funding_rate_cap = 12; - - - pub fn get_default_hourly_funding_rate_cap(&self) -> &str { - &self.default_hourly_funding_rate_cap - } - pub fn clear_default_hourly_funding_rate_cap(&mut self) { - self.default_hourly_funding_rate_cap.clear(); - } - - // Param is passed by value, moved - pub fn set_default_hourly_funding_rate_cap(&mut self, v: ::std::string::String) { - self.default_hourly_funding_rate_cap = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_default_hourly_funding_rate_cap(&mut self) -> &mut ::std::string::String { - &mut self.default_hourly_funding_rate_cap - } - - // Take field - pub fn take_default_hourly_funding_rate_cap(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.default_hourly_funding_rate_cap, ::std::string::String::new()) - } - - // string default_hourly_interest_rate = 13; - - - pub fn get_default_hourly_interest_rate(&self) -> &str { - &self.default_hourly_interest_rate - } - pub fn clear_default_hourly_interest_rate(&mut self) { - self.default_hourly_interest_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_default_hourly_interest_rate(&mut self, v: ::std::string::String) { - self.default_hourly_interest_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_default_hourly_interest_rate(&mut self) -> &mut ::std::string::String { - &mut self.default_hourly_interest_rate - } - - // Take field - pub fn take_default_hourly_interest_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.default_hourly_interest_rate, ::std::string::String::new()) - } - - // uint32 max_derivative_order_side_count = 14; - - - pub fn get_max_derivative_order_side_count(&self) -> u32 { - self.max_derivative_order_side_count - } - pub fn clear_max_derivative_order_side_count(&mut self) { - self.max_derivative_order_side_count = 0; - } - - // Param is passed by value, moved - pub fn set_max_derivative_order_side_count(&mut self, v: u32) { - self.max_derivative_order_side_count = v; - } - - // string inj_reward_staked_requirement_threshold = 15; - - - pub fn get_inj_reward_staked_requirement_threshold(&self) -> &str { - &self.inj_reward_staked_requirement_threshold - } - pub fn clear_inj_reward_staked_requirement_threshold(&mut self) { - self.inj_reward_staked_requirement_threshold.clear(); - } - - // Param is passed by value, moved - pub fn set_inj_reward_staked_requirement_threshold(&mut self, v: ::std::string::String) { - self.inj_reward_staked_requirement_threshold = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_inj_reward_staked_requirement_threshold(&mut self) -> &mut ::std::string::String { - &mut self.inj_reward_staked_requirement_threshold - } - - // Take field - pub fn take_inj_reward_staked_requirement_threshold(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.inj_reward_staked_requirement_threshold, ::std::string::String::new()) - } - - // int64 trading_rewards_vesting_duration = 16; - - - pub fn get_trading_rewards_vesting_duration(&self) -> i64 { - self.trading_rewards_vesting_duration - } - pub fn clear_trading_rewards_vesting_duration(&mut self) { - self.trading_rewards_vesting_duration = 0; - } - - // Param is passed by value, moved - pub fn set_trading_rewards_vesting_duration(&mut self, v: i64) { - self.trading_rewards_vesting_duration = v; - } - - // string liquidator_reward_share_rate = 17; - - - pub fn get_liquidator_reward_share_rate(&self) -> &str { - &self.liquidator_reward_share_rate - } - pub fn clear_liquidator_reward_share_rate(&mut self) { - self.liquidator_reward_share_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_liquidator_reward_share_rate(&mut self, v: ::std::string::String) { - self.liquidator_reward_share_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_liquidator_reward_share_rate(&mut self) -> &mut ::std::string::String { - &mut self.liquidator_reward_share_rate - } - - // Take field - pub fn take_liquidator_reward_share_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.liquidator_reward_share_rate, ::std::string::String::new()) - } - - // .cosmos.base.v1beta1.Coin binary_options_market_instant_listing_fee = 18; - - - pub fn get_binary_options_market_instant_listing_fee(&self) -> &super::coin::Coin { - self.binary_options_market_instant_listing_fee.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_binary_options_market_instant_listing_fee(&mut self) { - self.binary_options_market_instant_listing_fee.clear(); - } - - pub fn has_binary_options_market_instant_listing_fee(&self) -> bool { - self.binary_options_market_instant_listing_fee.is_some() - } - - // Param is passed by value, moved - pub fn set_binary_options_market_instant_listing_fee(&mut self, v: super::coin::Coin) { - self.binary_options_market_instant_listing_fee = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_binary_options_market_instant_listing_fee(&mut self) -> &mut super::coin::Coin { - if self.binary_options_market_instant_listing_fee.is_none() { - self.binary_options_market_instant_listing_fee.set_default(); - } - self.binary_options_market_instant_listing_fee.as_mut().unwrap() - } - - // Take field - pub fn take_binary_options_market_instant_listing_fee(&mut self) -> super::coin::Coin { - self.binary_options_market_instant_listing_fee.take().unwrap_or_else(|| super::coin::Coin::new()) - } - - // .injective.exchange.v1beta1.AtomicMarketOrderAccessLevel atomic_market_order_access_level = 19; - - - pub fn get_atomic_market_order_access_level(&self) -> AtomicMarketOrderAccessLevel { - self.atomic_market_order_access_level - } - pub fn clear_atomic_market_order_access_level(&mut self) { - self.atomic_market_order_access_level = AtomicMarketOrderAccessLevel::Nobody; - } - - // Param is passed by value, moved - pub fn set_atomic_market_order_access_level(&mut self, v: AtomicMarketOrderAccessLevel) { - self.atomic_market_order_access_level = v; - } - - // string spot_atomic_market_order_fee_multiplier = 20; - - - pub fn get_spot_atomic_market_order_fee_multiplier(&self) -> &str { - &self.spot_atomic_market_order_fee_multiplier - } - pub fn clear_spot_atomic_market_order_fee_multiplier(&mut self) { - self.spot_atomic_market_order_fee_multiplier.clear(); - } - - // Param is passed by value, moved - pub fn set_spot_atomic_market_order_fee_multiplier(&mut self, v: ::std::string::String) { - self.spot_atomic_market_order_fee_multiplier = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_spot_atomic_market_order_fee_multiplier(&mut self) -> &mut ::std::string::String { - &mut self.spot_atomic_market_order_fee_multiplier - } - - // Take field - pub fn take_spot_atomic_market_order_fee_multiplier(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.spot_atomic_market_order_fee_multiplier, ::std::string::String::new()) - } - - // string derivative_atomic_market_order_fee_multiplier = 21; - - - pub fn get_derivative_atomic_market_order_fee_multiplier(&self) -> &str { - &self.derivative_atomic_market_order_fee_multiplier - } - pub fn clear_derivative_atomic_market_order_fee_multiplier(&mut self) { - self.derivative_atomic_market_order_fee_multiplier.clear(); - } - - // Param is passed by value, moved - pub fn set_derivative_atomic_market_order_fee_multiplier(&mut self, v: ::std::string::String) { - self.derivative_atomic_market_order_fee_multiplier = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_derivative_atomic_market_order_fee_multiplier(&mut self) -> &mut ::std::string::String { - &mut self.derivative_atomic_market_order_fee_multiplier - } - - // Take field - pub fn take_derivative_atomic_market_order_fee_multiplier(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.derivative_atomic_market_order_fee_multiplier, ::std::string::String::new()) - } - - // string binary_options_atomic_market_order_fee_multiplier = 22; - - - pub fn get_binary_options_atomic_market_order_fee_multiplier(&self) -> &str { - &self.binary_options_atomic_market_order_fee_multiplier - } - pub fn clear_binary_options_atomic_market_order_fee_multiplier(&mut self) { - self.binary_options_atomic_market_order_fee_multiplier.clear(); - } - - // Param is passed by value, moved - pub fn set_binary_options_atomic_market_order_fee_multiplier(&mut self, v: ::std::string::String) { - self.binary_options_atomic_market_order_fee_multiplier = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_binary_options_atomic_market_order_fee_multiplier(&mut self) -> &mut ::std::string::String { - &mut self.binary_options_atomic_market_order_fee_multiplier - } - - // Take field - pub fn take_binary_options_atomic_market_order_fee_multiplier(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.binary_options_atomic_market_order_fee_multiplier, ::std::string::String::new()) - } - - // string minimal_protocol_fee_rate = 23; - - - pub fn get_minimal_protocol_fee_rate(&self) -> &str { - &self.minimal_protocol_fee_rate - } - pub fn clear_minimal_protocol_fee_rate(&mut self) { - self.minimal_protocol_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_minimal_protocol_fee_rate(&mut self, v: ::std::string::String) { - self.minimal_protocol_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_minimal_protocol_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.minimal_protocol_fee_rate - } - - // Take field - pub fn take_minimal_protocol_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.minimal_protocol_fee_rate, ::std::string::String::new()) - } - - // bool is_instant_derivative_market_launch_enabled = 24; - - - pub fn get_is_instant_derivative_market_launch_enabled(&self) -> bool { - self.is_instant_derivative_market_launch_enabled - } - pub fn clear_is_instant_derivative_market_launch_enabled(&mut self) { - self.is_instant_derivative_market_launch_enabled = false; - } - - // Param is passed by value, moved - pub fn set_is_instant_derivative_market_launch_enabled(&mut self, v: bool) { - self.is_instant_derivative_market_launch_enabled = v; - } -} - -impl ::protobuf::Message for Params { - fn is_initialized(&self) -> bool { - for v in &self.spot_market_instant_listing_fee { - if !v.is_initialized() { - return false; - } - }; - for v in &self.derivative_market_instant_listing_fee { - if !v.is_initialized() { - return false; - } - }; - for v in &self.binary_options_market_instant_listing_fee { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.spot_market_instant_listing_fee)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.derivative_market_instant_listing_fee)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.default_spot_maker_fee_rate)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.default_spot_taker_fee_rate)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.default_derivative_maker_fee_rate)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.default_derivative_taker_fee_rate)?; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.default_initial_margin_ratio)?; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.default_maintenance_margin_ratio)?; - }, - 9 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.default_funding_interval = tmp; - }, - 10 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.funding_multiple = tmp; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.relayer_fee_share_rate)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.default_hourly_funding_rate_cap)?; - }, - 13 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.default_hourly_interest_rate)?; - }, - 14 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.max_derivative_order_side_count = tmp; - }, - 15 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.inj_reward_staked_requirement_threshold)?; - }, - 16 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.trading_rewards_vesting_duration = tmp; - }, - 17 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.liquidator_reward_share_rate)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.binary_options_market_instant_listing_fee)?; - }, - 19 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.atomic_market_order_access_level, 19, &mut self.unknown_fields)? - }, - 20 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.spot_atomic_market_order_fee_multiplier)?; - }, - 21 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.derivative_atomic_market_order_fee_multiplier)?; - }, - 22 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.binary_options_atomic_market_order_fee_multiplier)?; - }, - 23 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.minimal_protocol_fee_rate)?; - }, - 24 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.is_instant_derivative_market_launch_enabled = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.spot_market_instant_listing_fee.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.derivative_market_instant_listing_fee.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if !self.default_spot_maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.default_spot_maker_fee_rate); - } - if !self.default_spot_taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.default_spot_taker_fee_rate); - } - if !self.default_derivative_maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.default_derivative_maker_fee_rate); - } - if !self.default_derivative_taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.default_derivative_taker_fee_rate); - } - if !self.default_initial_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.default_initial_margin_ratio); - } - if !self.default_maintenance_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.default_maintenance_margin_ratio); - } - if self.default_funding_interval != 0 { - my_size += ::protobuf::rt::value_size(9, self.default_funding_interval, ::protobuf::wire_format::WireTypeVarint); - } - if self.funding_multiple != 0 { - my_size += ::protobuf::rt::value_size(10, self.funding_multiple, ::protobuf::wire_format::WireTypeVarint); - } - if !self.relayer_fee_share_rate.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.relayer_fee_share_rate); - } - if !self.default_hourly_funding_rate_cap.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.default_hourly_funding_rate_cap); - } - if !self.default_hourly_interest_rate.is_empty() { - my_size += ::protobuf::rt::string_size(13, &self.default_hourly_interest_rate); - } - if self.max_derivative_order_side_count != 0 { - my_size += ::protobuf::rt::value_size(14, self.max_derivative_order_side_count, ::protobuf::wire_format::WireTypeVarint); - } - if !self.inj_reward_staked_requirement_threshold.is_empty() { - my_size += ::protobuf::rt::string_size(15, &self.inj_reward_staked_requirement_threshold); - } - if self.trading_rewards_vesting_duration != 0 { - my_size += ::protobuf::rt::value_size(16, self.trading_rewards_vesting_duration, ::protobuf::wire_format::WireTypeVarint); - } - if !self.liquidator_reward_share_rate.is_empty() { - my_size += ::protobuf::rt::string_size(17, &self.liquidator_reward_share_rate); - } - if let Some(ref v) = self.binary_options_market_instant_listing_fee.as_ref() { - let len = v.compute_size(); - my_size += 2 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if self.atomic_market_order_access_level != AtomicMarketOrderAccessLevel::Nobody { - my_size += ::protobuf::rt::enum_size(19, self.atomic_market_order_access_level); - } - if !self.spot_atomic_market_order_fee_multiplier.is_empty() { - my_size += ::protobuf::rt::string_size(20, &self.spot_atomic_market_order_fee_multiplier); - } - if !self.derivative_atomic_market_order_fee_multiplier.is_empty() { - my_size += ::protobuf::rt::string_size(21, &self.derivative_atomic_market_order_fee_multiplier); - } - if !self.binary_options_atomic_market_order_fee_multiplier.is_empty() { - my_size += ::protobuf::rt::string_size(22, &self.binary_options_atomic_market_order_fee_multiplier); - } - if !self.minimal_protocol_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(23, &self.minimal_protocol_fee_rate); - } - if self.is_instant_derivative_market_launch_enabled != false { - my_size += 3; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.spot_market_instant_listing_fee.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if let Some(ref v) = self.derivative_market_instant_listing_fee.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if !self.default_spot_maker_fee_rate.is_empty() { - os.write_string(3, &self.default_spot_maker_fee_rate)?; - } - if !self.default_spot_taker_fee_rate.is_empty() { - os.write_string(4, &self.default_spot_taker_fee_rate)?; - } - if !self.default_derivative_maker_fee_rate.is_empty() { - os.write_string(5, &self.default_derivative_maker_fee_rate)?; - } - if !self.default_derivative_taker_fee_rate.is_empty() { - os.write_string(6, &self.default_derivative_taker_fee_rate)?; - } - if !self.default_initial_margin_ratio.is_empty() { - os.write_string(7, &self.default_initial_margin_ratio)?; - } - if !self.default_maintenance_margin_ratio.is_empty() { - os.write_string(8, &self.default_maintenance_margin_ratio)?; - } - if self.default_funding_interval != 0 { - os.write_int64(9, self.default_funding_interval)?; - } - if self.funding_multiple != 0 { - os.write_int64(10, self.funding_multiple)?; - } - if !self.relayer_fee_share_rate.is_empty() { - os.write_string(11, &self.relayer_fee_share_rate)?; - } - if !self.default_hourly_funding_rate_cap.is_empty() { - os.write_string(12, &self.default_hourly_funding_rate_cap)?; - } - if !self.default_hourly_interest_rate.is_empty() { - os.write_string(13, &self.default_hourly_interest_rate)?; - } - if self.max_derivative_order_side_count != 0 { - os.write_uint32(14, self.max_derivative_order_side_count)?; - } - if !self.inj_reward_staked_requirement_threshold.is_empty() { - os.write_string(15, &self.inj_reward_staked_requirement_threshold)?; - } - if self.trading_rewards_vesting_duration != 0 { - os.write_int64(16, self.trading_rewards_vesting_duration)?; - } - if !self.liquidator_reward_share_rate.is_empty() { - os.write_string(17, &self.liquidator_reward_share_rate)?; - } - if let Some(ref v) = self.binary_options_market_instant_listing_fee.as_ref() { - os.write_tag(18, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.atomic_market_order_access_level != AtomicMarketOrderAccessLevel::Nobody { - os.write_enum(19, ::protobuf::ProtobufEnum::value(&self.atomic_market_order_access_level))?; - } - if !self.spot_atomic_market_order_fee_multiplier.is_empty() { - os.write_string(20, &self.spot_atomic_market_order_fee_multiplier)?; - } - if !self.derivative_atomic_market_order_fee_multiplier.is_empty() { - os.write_string(21, &self.derivative_atomic_market_order_fee_multiplier)?; - } - if !self.binary_options_atomic_market_order_fee_multiplier.is_empty() { - os.write_string(22, &self.binary_options_atomic_market_order_fee_multiplier)?; - } - if !self.minimal_protocol_fee_rate.is_empty() { - os.write_string(23, &self.minimal_protocol_fee_rate)?; - } - if self.is_instant_derivative_market_launch_enabled != false { - os.write_bool(24, self.is_instant_derivative_market_launch_enabled)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Params { - Params::new() - } - - fn default_instance() -> &'static Params { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Params::new) - } -} - -impl ::protobuf::Clear for Params { - fn clear(&mut self) { - self.spot_market_instant_listing_fee.clear(); - self.derivative_market_instant_listing_fee.clear(); - self.default_spot_maker_fee_rate.clear(); - self.default_spot_taker_fee_rate.clear(); - self.default_derivative_maker_fee_rate.clear(); - self.default_derivative_taker_fee_rate.clear(); - self.default_initial_margin_ratio.clear(); - self.default_maintenance_margin_ratio.clear(); - self.default_funding_interval = 0; - self.funding_multiple = 0; - self.relayer_fee_share_rate.clear(); - self.default_hourly_funding_rate_cap.clear(); - self.default_hourly_interest_rate.clear(); - self.max_derivative_order_side_count = 0; - self.inj_reward_staked_requirement_threshold.clear(); - self.trading_rewards_vesting_duration = 0; - self.liquidator_reward_share_rate.clear(); - self.binary_options_market_instant_listing_fee.clear(); - self.atomic_market_order_access_level = AtomicMarketOrderAccessLevel::Nobody; - self.spot_atomic_market_order_fee_multiplier.clear(); - self.derivative_atomic_market_order_fee_multiplier.clear(); - self.binary_options_atomic_market_order_fee_multiplier.clear(); - self.minimal_protocol_fee_rate.clear(); - self.is_instant_derivative_market_launch_enabled = false; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for Params { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MarketFeeMultiplier { - // message fields - pub market_id: ::std::string::String, - pub fee_multiplier: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MarketFeeMultiplier { - fn default() -> &'a MarketFeeMultiplier { - ::default_instance() - } -} - -impl MarketFeeMultiplier { - pub fn new() -> MarketFeeMultiplier { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string fee_multiplier = 2; - - - pub fn get_fee_multiplier(&self) -> &str { - &self.fee_multiplier - } - pub fn clear_fee_multiplier(&mut self) { - self.fee_multiplier.clear(); - } - - // Param is passed by value, moved - pub fn set_fee_multiplier(&mut self, v: ::std::string::String) { - self.fee_multiplier = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fee_multiplier(&mut self) -> &mut ::std::string::String { - &mut self.fee_multiplier - } - - // Take field - pub fn take_fee_multiplier(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.fee_multiplier, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MarketFeeMultiplier { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.fee_multiplier)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - if !self.fee_multiplier.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.fee_multiplier); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - if !self.fee_multiplier.is_empty() { - os.write_string(2, &self.fee_multiplier)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MarketFeeMultiplier { - MarketFeeMultiplier::new() - } - - fn default_instance() -> &'static MarketFeeMultiplier { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MarketFeeMultiplier::new) - } -} - -impl ::protobuf::Clear for MarketFeeMultiplier { - fn clear(&mut self) { - self.market_id.clear(); - self.fee_multiplier.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MarketFeeMultiplier { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DerivativeMarket { - // message fields - pub ticker: ::std::string::String, - pub oracle_base: ::std::string::String, - pub oracle_quote: ::std::string::String, - pub oracle_type: super::oracle::OracleType, - pub oracle_scale_factor: u32, - pub quote_denom: ::std::string::String, - pub market_id: ::std::string::String, - pub initial_margin_ratio: ::std::string::String, - pub maintenance_margin_ratio: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub relayer_fee_share_rate: ::std::string::String, - pub isPerpetual: bool, - pub status: MarketStatus, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DerivativeMarket { - fn default() -> &'a DerivativeMarket { - ::default_instance() - } -} - -impl DerivativeMarket { - pub fn new() -> DerivativeMarket { - ::std::default::Default::default() - } - - // string ticker = 1; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string oracle_base = 2; - - - pub fn get_oracle_base(&self) -> &str { - &self.oracle_base - } - pub fn clear_oracle_base(&mut self) { - self.oracle_base.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_base(&mut self, v: ::std::string::String) { - self.oracle_base = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_base(&mut self) -> &mut ::std::string::String { - &mut self.oracle_base - } - - // Take field - pub fn take_oracle_base(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_base, ::std::string::String::new()) - } - - // string oracle_quote = 3; - - - pub fn get_oracle_quote(&self) -> &str { - &self.oracle_quote - } - pub fn clear_oracle_quote(&mut self) { - self.oracle_quote.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_quote(&mut self, v: ::std::string::String) { - self.oracle_quote = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_quote(&mut self) -> &mut ::std::string::String { - &mut self.oracle_quote - } - - // Take field - pub fn take_oracle_quote(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_quote, ::std::string::String::new()) - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 4; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } - - // uint32 oracle_scale_factor = 5; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // string quote_denom = 6; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string market_id = 7; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string initial_margin_ratio = 8; - - - pub fn get_initial_margin_ratio(&self) -> &str { - &self.initial_margin_ratio - } - pub fn clear_initial_margin_ratio(&mut self) { - self.initial_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_initial_margin_ratio(&mut self, v: ::std::string::String) { - self.initial_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_initial_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.initial_margin_ratio - } - - // Take field - pub fn take_initial_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.initial_margin_ratio, ::std::string::String::new()) - } - - // string maintenance_margin_ratio = 9; - - - pub fn get_maintenance_margin_ratio(&self) -> &str { - &self.maintenance_margin_ratio - } - pub fn clear_maintenance_margin_ratio(&mut self) { - self.maintenance_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_maintenance_margin_ratio(&mut self, v: ::std::string::String) { - self.maintenance_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maintenance_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.maintenance_margin_ratio - } - - // Take field - pub fn take_maintenance_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maintenance_margin_ratio, ::std::string::String::new()) - } - - // string maker_fee_rate = 10; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 11; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string relayer_fee_share_rate = 12; - - - pub fn get_relayer_fee_share_rate(&self) -> &str { - &self.relayer_fee_share_rate - } - pub fn clear_relayer_fee_share_rate(&mut self) { - self.relayer_fee_share_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_relayer_fee_share_rate(&mut self, v: ::std::string::String) { - self.relayer_fee_share_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_relayer_fee_share_rate(&mut self) -> &mut ::std::string::String { - &mut self.relayer_fee_share_rate - } - - // Take field - pub fn take_relayer_fee_share_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.relayer_fee_share_rate, ::std::string::String::new()) - } - - // bool isPerpetual = 13; - - - pub fn get_isPerpetual(&self) -> bool { - self.isPerpetual - } - pub fn clear_isPerpetual(&mut self) { - self.isPerpetual = false; - } - - // Param is passed by value, moved - pub fn set_isPerpetual(&mut self, v: bool) { - self.isPerpetual = v; - } - - // .injective.exchange.v1beta1.MarketStatus status = 14; - - - pub fn get_status(&self) -> MarketStatus { - self.status - } - pub fn clear_status(&mut self) { - self.status = MarketStatus::Unspecified; - } - - // Param is passed by value, moved - pub fn set_status(&mut self, v: MarketStatus) { - self.status = v; - } - - // string min_price_tick_size = 15; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 16; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for DerivativeMarket { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_base)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_quote)?; - }, - 4 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 4, &mut self.unknown_fields)? - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.initial_margin_ratio)?; - }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maintenance_margin_ratio)?; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.relayer_fee_share_rate)?; - }, - 13 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.isPerpetual = tmp; - }, - 14 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 14, &mut self.unknown_fields)? - }, - 15 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 16 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.ticker); - } - if !self.oracle_base.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.oracle_base); - } - if !self.oracle_quote.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.oracle_quote); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(4, self.oracle_type); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(5, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.quote_denom); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.market_id); - } - if !self.initial_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.initial_margin_ratio); - } - if !self.maintenance_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.maintenance_margin_ratio); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.taker_fee_rate); - } - if !self.relayer_fee_share_rate.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.relayer_fee_share_rate); - } - if self.isPerpetual != false { - my_size += 2; - } - if self.status != MarketStatus::Unspecified { - my_size += ::protobuf::rt::enum_size(14, self.status); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(15, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(16, &self.min_quantity_tick_size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.ticker.is_empty() { - os.write_string(1, &self.ticker)?; - } - if !self.oracle_base.is_empty() { - os.write_string(2, &self.oracle_base)?; - } - if !self.oracle_quote.is_empty() { - os.write_string(3, &self.oracle_quote)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(5, self.oracle_scale_factor)?; - } - if !self.quote_denom.is_empty() { - os.write_string(6, &self.quote_denom)?; - } - if !self.market_id.is_empty() { - os.write_string(7, &self.market_id)?; - } - if !self.initial_margin_ratio.is_empty() { - os.write_string(8, &self.initial_margin_ratio)?; - } - if !self.maintenance_margin_ratio.is_empty() { - os.write_string(9, &self.maintenance_margin_ratio)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(10, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(11, &self.taker_fee_rate)?; - } - if !self.relayer_fee_share_rate.is_empty() { - os.write_string(12, &self.relayer_fee_share_rate)?; - } - if self.isPerpetual != false { - os.write_bool(13, self.isPerpetual)?; - } - if self.status != MarketStatus::Unspecified { - os.write_enum(14, ::protobuf::ProtobufEnum::value(&self.status))?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(15, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(16, &self.min_quantity_tick_size)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DerivativeMarket { - DerivativeMarket::new() - } - - fn default_instance() -> &'static DerivativeMarket { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DerivativeMarket::new) - } -} - -impl ::protobuf::Clear for DerivativeMarket { - fn clear(&mut self) { - self.ticker.clear(); - self.oracle_base.clear(); - self.oracle_quote.clear(); - self.oracle_type = super::oracle::OracleType::Unspecified; - self.oracle_scale_factor = 0; - self.quote_denom.clear(); - self.market_id.clear(); - self.initial_margin_ratio.clear(); - self.maintenance_margin_ratio.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.relayer_fee_share_rate.clear(); - self.isPerpetual = false; - self.status = MarketStatus::Unspecified; - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DerivativeMarket { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinaryOptionsMarket { - // message fields - pub ticker: ::std::string::String, - pub oracle_symbol: ::std::string::String, - pub oracle_provider: ::std::string::String, - pub oracle_type: super::oracle::OracleType, - pub oracle_scale_factor: u32, - pub expiration_timestamp: i64, - pub settlement_timestamp: i64, - pub admin: ::std::string::String, - pub quote_denom: ::std::string::String, - pub market_id: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub relayer_fee_share_rate: ::std::string::String, - pub status: MarketStatus, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - pub settlement_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BinaryOptionsMarket { - fn default() -> &'a BinaryOptionsMarket { - ::default_instance() - } -} - -impl BinaryOptionsMarket { - pub fn new() -> BinaryOptionsMarket { - ::std::default::Default::default() - } - - // string ticker = 1; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string oracle_symbol = 2; - - - pub fn get_oracle_symbol(&self) -> &str { - &self.oracle_symbol - } - pub fn clear_oracle_symbol(&mut self) { - self.oracle_symbol.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_symbol(&mut self, v: ::std::string::String) { - self.oracle_symbol = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_symbol(&mut self) -> &mut ::std::string::String { - &mut self.oracle_symbol - } - - // Take field - pub fn take_oracle_symbol(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_symbol, ::std::string::String::new()) - } - - // string oracle_provider = 3; - - - pub fn get_oracle_provider(&self) -> &str { - &self.oracle_provider - } - pub fn clear_oracle_provider(&mut self) { - self.oracle_provider.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_provider(&mut self, v: ::std::string::String) { - self.oracle_provider = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_provider(&mut self) -> &mut ::std::string::String { - &mut self.oracle_provider - } - - // Take field - pub fn take_oracle_provider(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_provider, ::std::string::String::new()) - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 4; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } - - // uint32 oracle_scale_factor = 5; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // int64 expiration_timestamp = 6; - - - pub fn get_expiration_timestamp(&self) -> i64 { - self.expiration_timestamp - } - pub fn clear_expiration_timestamp(&mut self) { - self.expiration_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_expiration_timestamp(&mut self, v: i64) { - self.expiration_timestamp = v; - } - - // int64 settlement_timestamp = 7; - - - pub fn get_settlement_timestamp(&self) -> i64 { - self.settlement_timestamp - } - pub fn clear_settlement_timestamp(&mut self) { - self.settlement_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_settlement_timestamp(&mut self, v: i64) { - self.settlement_timestamp = v; - } - - // string admin = 8; - - - pub fn get_admin(&self) -> &str { - &self.admin - } - pub fn clear_admin(&mut self) { - self.admin.clear(); - } - - // Param is passed by value, moved - pub fn set_admin(&mut self, v: ::std::string::String) { - self.admin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_admin(&mut self) -> &mut ::std::string::String { - &mut self.admin - } - - // Take field - pub fn take_admin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.admin, ::std::string::String::new()) - } - - // string quote_denom = 9; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string market_id = 10; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string maker_fee_rate = 11; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 12; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string relayer_fee_share_rate = 13; - - - pub fn get_relayer_fee_share_rate(&self) -> &str { - &self.relayer_fee_share_rate - } - pub fn clear_relayer_fee_share_rate(&mut self) { - self.relayer_fee_share_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_relayer_fee_share_rate(&mut self, v: ::std::string::String) { - self.relayer_fee_share_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_relayer_fee_share_rate(&mut self) -> &mut ::std::string::String { - &mut self.relayer_fee_share_rate - } - - // Take field - pub fn take_relayer_fee_share_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.relayer_fee_share_rate, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.MarketStatus status = 14; - - - pub fn get_status(&self) -> MarketStatus { - self.status - } - pub fn clear_status(&mut self) { - self.status = MarketStatus::Unspecified; - } - - // Param is passed by value, moved - pub fn set_status(&mut self, v: MarketStatus) { - self.status = v; - } - - // string min_price_tick_size = 15; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 16; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } - - // string settlement_price = 17; - - - pub fn get_settlement_price(&self) -> &str { - &self.settlement_price - } - pub fn clear_settlement_price(&mut self) { - self.settlement_price.clear(); - } - - // Param is passed by value, moved - pub fn set_settlement_price(&mut self, v: ::std::string::String) { - self.settlement_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_settlement_price(&mut self) -> &mut ::std::string::String { - &mut self.settlement_price - } - - // Take field - pub fn take_settlement_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.settlement_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for BinaryOptionsMarket { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_symbol)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_provider)?; - }, - 4 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 4, &mut self.unknown_fields)? - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.expiration_timestamp = tmp; - }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.settlement_timestamp = tmp; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.admin)?; - }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 13 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.relayer_fee_share_rate)?; - }, - 14 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 14, &mut self.unknown_fields)? - }, - 15 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 16 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - 17 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.settlement_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.ticker); - } - if !self.oracle_symbol.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.oracle_symbol); - } - if !self.oracle_provider.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.oracle_provider); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(4, self.oracle_type); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(5, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if self.expiration_timestamp != 0 { - my_size += ::protobuf::rt::value_size(6, self.expiration_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if self.settlement_timestamp != 0 { - my_size += ::protobuf::rt::value_size(7, self.settlement_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if !self.admin.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.admin); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.quote_denom); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.market_id); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.taker_fee_rate); - } - if !self.relayer_fee_share_rate.is_empty() { - my_size += ::protobuf::rt::string_size(13, &self.relayer_fee_share_rate); - } - if self.status != MarketStatus::Unspecified { - my_size += ::protobuf::rt::enum_size(14, self.status); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(15, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(16, &self.min_quantity_tick_size); - } - if !self.settlement_price.is_empty() { - my_size += ::protobuf::rt::string_size(17, &self.settlement_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.ticker.is_empty() { - os.write_string(1, &self.ticker)?; - } - if !self.oracle_symbol.is_empty() { - os.write_string(2, &self.oracle_symbol)?; - } - if !self.oracle_provider.is_empty() { - os.write_string(3, &self.oracle_provider)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(5, self.oracle_scale_factor)?; - } - if self.expiration_timestamp != 0 { - os.write_int64(6, self.expiration_timestamp)?; - } - if self.settlement_timestamp != 0 { - os.write_int64(7, self.settlement_timestamp)?; - } - if !self.admin.is_empty() { - os.write_string(8, &self.admin)?; - } - if !self.quote_denom.is_empty() { - os.write_string(9, &self.quote_denom)?; - } - if !self.market_id.is_empty() { - os.write_string(10, &self.market_id)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(11, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(12, &self.taker_fee_rate)?; - } - if !self.relayer_fee_share_rate.is_empty() { - os.write_string(13, &self.relayer_fee_share_rate)?; - } - if self.status != MarketStatus::Unspecified { - os.write_enum(14, ::protobuf::ProtobufEnum::value(&self.status))?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(15, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(16, &self.min_quantity_tick_size)?; - } - if !self.settlement_price.is_empty() { - os.write_string(17, &self.settlement_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BinaryOptionsMarket { - BinaryOptionsMarket::new() - } - - fn default_instance() -> &'static BinaryOptionsMarket { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BinaryOptionsMarket::new) - } -} - -impl ::protobuf::Clear for BinaryOptionsMarket { - fn clear(&mut self) { - self.ticker.clear(); - self.oracle_symbol.clear(); - self.oracle_provider.clear(); - self.oracle_type = super::oracle::OracleType::Unspecified; - self.oracle_scale_factor = 0; - self.expiration_timestamp = 0; - self.settlement_timestamp = 0; - self.admin.clear(); - self.quote_denom.clear(); - self.market_id.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.relayer_fee_share_rate.clear(); - self.status = MarketStatus::Unspecified; - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.settlement_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for BinaryOptionsMarket { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ExpiryFuturesMarketInfo { - // message fields - pub market_id: ::std::string::String, - pub expiration_timestamp: i64, - pub twap_start_timestamp: i64, - pub expiration_twap_start_price_cumulative: ::std::string::String, - pub settlement_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ExpiryFuturesMarketInfo { - fn default() -> &'a ExpiryFuturesMarketInfo { - ::default_instance() - } -} - -impl ExpiryFuturesMarketInfo { - pub fn new() -> ExpiryFuturesMarketInfo { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // int64 expiration_timestamp = 2; - - - pub fn get_expiration_timestamp(&self) -> i64 { - self.expiration_timestamp - } - pub fn clear_expiration_timestamp(&mut self) { - self.expiration_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_expiration_timestamp(&mut self, v: i64) { - self.expiration_timestamp = v; - } - - // int64 twap_start_timestamp = 3; - - - pub fn get_twap_start_timestamp(&self) -> i64 { - self.twap_start_timestamp - } - pub fn clear_twap_start_timestamp(&mut self) { - self.twap_start_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_twap_start_timestamp(&mut self, v: i64) { - self.twap_start_timestamp = v; - } - - // string expiration_twap_start_price_cumulative = 4; - - - pub fn get_expiration_twap_start_price_cumulative(&self) -> &str { - &self.expiration_twap_start_price_cumulative - } - pub fn clear_expiration_twap_start_price_cumulative(&mut self) { - self.expiration_twap_start_price_cumulative.clear(); - } - - // Param is passed by value, moved - pub fn set_expiration_twap_start_price_cumulative(&mut self, v: ::std::string::String) { - self.expiration_twap_start_price_cumulative = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_expiration_twap_start_price_cumulative(&mut self) -> &mut ::std::string::String { - &mut self.expiration_twap_start_price_cumulative - } - - // Take field - pub fn take_expiration_twap_start_price_cumulative(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.expiration_twap_start_price_cumulative, ::std::string::String::new()) - } - - // string settlement_price = 5; - - - pub fn get_settlement_price(&self) -> &str { - &self.settlement_price - } - pub fn clear_settlement_price(&mut self) { - self.settlement_price.clear(); - } - - // Param is passed by value, moved - pub fn set_settlement_price(&mut self, v: ::std::string::String) { - self.settlement_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_settlement_price(&mut self) -> &mut ::std::string::String { - &mut self.settlement_price - } - - // Take field - pub fn take_settlement_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.settlement_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for ExpiryFuturesMarketInfo { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.expiration_timestamp = tmp; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.twap_start_timestamp = tmp; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.expiration_twap_start_price_cumulative)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.settlement_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - if self.expiration_timestamp != 0 { - my_size += ::protobuf::rt::value_size(2, self.expiration_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if self.twap_start_timestamp != 0 { - my_size += ::protobuf::rt::value_size(3, self.twap_start_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if !self.expiration_twap_start_price_cumulative.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.expiration_twap_start_price_cumulative); - } - if !self.settlement_price.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.settlement_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - if self.expiration_timestamp != 0 { - os.write_int64(2, self.expiration_timestamp)?; - } - if self.twap_start_timestamp != 0 { - os.write_int64(3, self.twap_start_timestamp)?; - } - if !self.expiration_twap_start_price_cumulative.is_empty() { - os.write_string(4, &self.expiration_twap_start_price_cumulative)?; - } - if !self.settlement_price.is_empty() { - os.write_string(5, &self.settlement_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ExpiryFuturesMarketInfo { - ExpiryFuturesMarketInfo::new() - } - - fn default_instance() -> &'static ExpiryFuturesMarketInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ExpiryFuturesMarketInfo::new) - } -} - -impl ::protobuf::Clear for ExpiryFuturesMarketInfo { - fn clear(&mut self) { - self.market_id.clear(); - self.expiration_timestamp = 0; - self.twap_start_timestamp = 0; - self.expiration_twap_start_price_cumulative.clear(); - self.settlement_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ExpiryFuturesMarketInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PerpetualMarketInfo { - // message fields - pub market_id: ::std::string::String, - pub hourly_funding_rate_cap: ::std::string::String, - pub hourly_interest_rate: ::std::string::String, - pub next_funding_timestamp: i64, - pub funding_interval: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PerpetualMarketInfo { - fn default() -> &'a PerpetualMarketInfo { - ::default_instance() - } -} - -impl PerpetualMarketInfo { - pub fn new() -> PerpetualMarketInfo { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string hourly_funding_rate_cap = 2; - - - pub fn get_hourly_funding_rate_cap(&self) -> &str { - &self.hourly_funding_rate_cap - } - pub fn clear_hourly_funding_rate_cap(&mut self) { - self.hourly_funding_rate_cap.clear(); - } - - // Param is passed by value, moved - pub fn set_hourly_funding_rate_cap(&mut self, v: ::std::string::String) { - self.hourly_funding_rate_cap = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_hourly_funding_rate_cap(&mut self) -> &mut ::std::string::String { - &mut self.hourly_funding_rate_cap - } - - // Take field - pub fn take_hourly_funding_rate_cap(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.hourly_funding_rate_cap, ::std::string::String::new()) - } - - // string hourly_interest_rate = 3; - - - pub fn get_hourly_interest_rate(&self) -> &str { - &self.hourly_interest_rate - } - pub fn clear_hourly_interest_rate(&mut self) { - self.hourly_interest_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_hourly_interest_rate(&mut self, v: ::std::string::String) { - self.hourly_interest_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_hourly_interest_rate(&mut self) -> &mut ::std::string::String { - &mut self.hourly_interest_rate - } - - // Take field - pub fn take_hourly_interest_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.hourly_interest_rate, ::std::string::String::new()) - } - - // int64 next_funding_timestamp = 4; - - - pub fn get_next_funding_timestamp(&self) -> i64 { - self.next_funding_timestamp - } - pub fn clear_next_funding_timestamp(&mut self) { - self.next_funding_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_next_funding_timestamp(&mut self, v: i64) { - self.next_funding_timestamp = v; - } - - // int64 funding_interval = 5; - - - pub fn get_funding_interval(&self) -> i64 { - self.funding_interval - } - pub fn clear_funding_interval(&mut self) { - self.funding_interval = 0; - } - - // Param is passed by value, moved - pub fn set_funding_interval(&mut self, v: i64) { - self.funding_interval = v; - } -} - -impl ::protobuf::Message for PerpetualMarketInfo { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hourly_funding_rate_cap)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.hourly_interest_rate)?; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.next_funding_timestamp = tmp; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.funding_interval = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - if !self.hourly_funding_rate_cap.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.hourly_funding_rate_cap); - } - if !self.hourly_interest_rate.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.hourly_interest_rate); - } - if self.next_funding_timestamp != 0 { - my_size += ::protobuf::rt::value_size(4, self.next_funding_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if self.funding_interval != 0 { - my_size += ::protobuf::rt::value_size(5, self.funding_interval, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - if !self.hourly_funding_rate_cap.is_empty() { - os.write_string(2, &self.hourly_funding_rate_cap)?; - } - if !self.hourly_interest_rate.is_empty() { - os.write_string(3, &self.hourly_interest_rate)?; - } - if self.next_funding_timestamp != 0 { - os.write_int64(4, self.next_funding_timestamp)?; - } - if self.funding_interval != 0 { - os.write_int64(5, self.funding_interval)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PerpetualMarketInfo { - PerpetualMarketInfo::new() - } - - fn default_instance() -> &'static PerpetualMarketInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PerpetualMarketInfo::new) - } -} - -impl ::protobuf::Clear for PerpetualMarketInfo { - fn clear(&mut self) { - self.market_id.clear(); - self.hourly_funding_rate_cap.clear(); - self.hourly_interest_rate.clear(); - self.next_funding_timestamp = 0; - self.funding_interval = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PerpetualMarketInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PerpetualMarketFunding { - // message fields - pub cumulative_funding: ::std::string::String, - pub cumulative_price: ::std::string::String, - pub last_timestamp: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PerpetualMarketFunding { - fn default() -> &'a PerpetualMarketFunding { - ::default_instance() - } -} - -impl PerpetualMarketFunding { - pub fn new() -> PerpetualMarketFunding { - ::std::default::Default::default() - } - - // string cumulative_funding = 1; - - - pub fn get_cumulative_funding(&self) -> &str { - &self.cumulative_funding - } - pub fn clear_cumulative_funding(&mut self) { - self.cumulative_funding.clear(); - } - - // Param is passed by value, moved - pub fn set_cumulative_funding(&mut self, v: ::std::string::String) { - self.cumulative_funding = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_cumulative_funding(&mut self) -> &mut ::std::string::String { - &mut self.cumulative_funding - } - - // Take field - pub fn take_cumulative_funding(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.cumulative_funding, ::std::string::String::new()) - } - - // string cumulative_price = 2; - - - pub fn get_cumulative_price(&self) -> &str { - &self.cumulative_price - } - pub fn clear_cumulative_price(&mut self) { - self.cumulative_price.clear(); - } - - // Param is passed by value, moved - pub fn set_cumulative_price(&mut self, v: ::std::string::String) { - self.cumulative_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_cumulative_price(&mut self) -> &mut ::std::string::String { - &mut self.cumulative_price - } - - // Take field - pub fn take_cumulative_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.cumulative_price, ::std::string::String::new()) - } - - // int64 last_timestamp = 3; - - - pub fn get_last_timestamp(&self) -> i64 { - self.last_timestamp - } - pub fn clear_last_timestamp(&mut self) { - self.last_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_last_timestamp(&mut self, v: i64) { - self.last_timestamp = v; - } -} - -impl ::protobuf::Message for PerpetualMarketFunding { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.cumulative_funding)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.cumulative_price)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.last_timestamp = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.cumulative_funding.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.cumulative_funding); - } - if !self.cumulative_price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.cumulative_price); - } - if self.last_timestamp != 0 { - my_size += ::protobuf::rt::value_size(3, self.last_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.cumulative_funding.is_empty() { - os.write_string(1, &self.cumulative_funding)?; - } - if !self.cumulative_price.is_empty() { - os.write_string(2, &self.cumulative_price)?; - } - if self.last_timestamp != 0 { - os.write_int64(3, self.last_timestamp)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PerpetualMarketFunding { - PerpetualMarketFunding::new() - } - - fn default_instance() -> &'static PerpetualMarketFunding { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PerpetualMarketFunding::new) - } -} - -impl ::protobuf::Clear for PerpetualMarketFunding { - fn clear(&mut self) { - self.cumulative_funding.clear(); - self.cumulative_price.clear(); - self.last_timestamp = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PerpetualMarketFunding { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DerivativeMarketSettlementInfo { - // message fields - pub market_id: ::std::string::String, - pub settlement_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DerivativeMarketSettlementInfo { - fn default() -> &'a DerivativeMarketSettlementInfo { - ::default_instance() - } -} - -impl DerivativeMarketSettlementInfo { - pub fn new() -> DerivativeMarketSettlementInfo { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string settlement_price = 2; - - - pub fn get_settlement_price(&self) -> &str { - &self.settlement_price - } - pub fn clear_settlement_price(&mut self) { - self.settlement_price.clear(); - } - - // Param is passed by value, moved - pub fn set_settlement_price(&mut self, v: ::std::string::String) { - self.settlement_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_settlement_price(&mut self) -> &mut ::std::string::String { - &mut self.settlement_price - } - - // Take field - pub fn take_settlement_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.settlement_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for DerivativeMarketSettlementInfo { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.settlement_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - if !self.settlement_price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.settlement_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - if !self.settlement_price.is_empty() { - os.write_string(2, &self.settlement_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DerivativeMarketSettlementInfo { - DerivativeMarketSettlementInfo::new() - } - - fn default_instance() -> &'static DerivativeMarketSettlementInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DerivativeMarketSettlementInfo::new) - } -} - -impl ::protobuf::Clear for DerivativeMarketSettlementInfo { - fn clear(&mut self) { - self.market_id.clear(); - self.settlement_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DerivativeMarketSettlementInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct NextFundingTimestamp { - // message fields - pub next_timestamp: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a NextFundingTimestamp { - fn default() -> &'a NextFundingTimestamp { - ::default_instance() - } -} - -impl NextFundingTimestamp { - pub fn new() -> NextFundingTimestamp { - ::std::default::Default::default() - } - - // int64 next_timestamp = 1; - - - pub fn get_next_timestamp(&self) -> i64 { - self.next_timestamp - } - pub fn clear_next_timestamp(&mut self) { - self.next_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_next_timestamp(&mut self, v: i64) { - self.next_timestamp = v; - } -} - -impl ::protobuf::Message for NextFundingTimestamp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.next_timestamp = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.next_timestamp != 0 { - my_size += ::protobuf::rt::value_size(1, self.next_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.next_timestamp != 0 { - os.write_int64(1, self.next_timestamp)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> NextFundingTimestamp { - NextFundingTimestamp::new() - } - - fn default_instance() -> &'static NextFundingTimestamp { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(NextFundingTimestamp::new) - } -} - -impl ::protobuf::Clear for NextFundingTimestamp { - fn clear(&mut self) { - self.next_timestamp = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for NextFundingTimestamp { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MidPriceAndTOB { - // message fields - pub mid_price: ::std::string::String, - pub best_buy_price: ::std::string::String, - pub best_sell_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MidPriceAndTOB { - fn default() -> &'a MidPriceAndTOB { - ::default_instance() - } -} - -impl MidPriceAndTOB { - pub fn new() -> MidPriceAndTOB { - ::std::default::Default::default() - } - - // string mid_price = 1; - - - pub fn get_mid_price(&self) -> &str { - &self.mid_price - } - pub fn clear_mid_price(&mut self) { - self.mid_price.clear(); - } - - // Param is passed by value, moved - pub fn set_mid_price(&mut self, v: ::std::string::String) { - self.mid_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_mid_price(&mut self) -> &mut ::std::string::String { - &mut self.mid_price - } - - // Take field - pub fn take_mid_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.mid_price, ::std::string::String::new()) - } - - // string best_buy_price = 2; - - - pub fn get_best_buy_price(&self) -> &str { - &self.best_buy_price - } - pub fn clear_best_buy_price(&mut self) { - self.best_buy_price.clear(); - } - - // Param is passed by value, moved - pub fn set_best_buy_price(&mut self, v: ::std::string::String) { - self.best_buy_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_best_buy_price(&mut self) -> &mut ::std::string::String { - &mut self.best_buy_price - } - - // Take field - pub fn take_best_buy_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.best_buy_price, ::std::string::String::new()) - } - - // string best_sell_price = 3; - - - pub fn get_best_sell_price(&self) -> &str { - &self.best_sell_price - } - pub fn clear_best_sell_price(&mut self) { - self.best_sell_price.clear(); - } - - // Param is passed by value, moved - pub fn set_best_sell_price(&mut self, v: ::std::string::String) { - self.best_sell_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_best_sell_price(&mut self) -> &mut ::std::string::String { - &mut self.best_sell_price - } - - // Take field - pub fn take_best_sell_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.best_sell_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MidPriceAndTOB { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.mid_price)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.best_buy_price)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.best_sell_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.mid_price.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.mid_price); - } - if !self.best_buy_price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.best_buy_price); - } - if !self.best_sell_price.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.best_sell_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.mid_price.is_empty() { - os.write_string(1, &self.mid_price)?; - } - if !self.best_buy_price.is_empty() { - os.write_string(2, &self.best_buy_price)?; - } - if !self.best_sell_price.is_empty() { - os.write_string(3, &self.best_sell_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MidPriceAndTOB { - MidPriceAndTOB::new() - } - - fn default_instance() -> &'static MidPriceAndTOB { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MidPriceAndTOB::new) - } -} - -impl ::protobuf::Clear for MidPriceAndTOB { - fn clear(&mut self) { - self.mid_price.clear(); - self.best_buy_price.clear(); - self.best_sell_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MidPriceAndTOB { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SpotMarket { - // message fields - pub ticker: ::std::string::String, - pub base_denom: ::std::string::String, - pub quote_denom: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub relayer_fee_share_rate: ::std::string::String, - pub market_id: ::std::string::String, - pub status: MarketStatus, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SpotMarket { - fn default() -> &'a SpotMarket { - ::default_instance() - } -} - -impl SpotMarket { - pub fn new() -> SpotMarket { - ::std::default::Default::default() - } - - // string ticker = 1; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string base_denom = 2; - - - pub fn get_base_denom(&self) -> &str { - &self.base_denom - } - pub fn clear_base_denom(&mut self) { - self.base_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_base_denom(&mut self, v: ::std::string::String) { - self.base_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_base_denom(&mut self) -> &mut ::std::string::String { - &mut self.base_denom - } - - // Take field - pub fn take_base_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.base_denom, ::std::string::String::new()) - } - - // string quote_denom = 3; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string maker_fee_rate = 4; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 5; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string relayer_fee_share_rate = 6; - - - pub fn get_relayer_fee_share_rate(&self) -> &str { - &self.relayer_fee_share_rate - } - pub fn clear_relayer_fee_share_rate(&mut self) { - self.relayer_fee_share_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_relayer_fee_share_rate(&mut self, v: ::std::string::String) { - self.relayer_fee_share_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_relayer_fee_share_rate(&mut self) -> &mut ::std::string::String { - &mut self.relayer_fee_share_rate - } - - // Take field - pub fn take_relayer_fee_share_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.relayer_fee_share_rate, ::std::string::String::new()) - } - - // string market_id = 7; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.MarketStatus status = 8; - - - pub fn get_status(&self) -> MarketStatus { - self.status - } - pub fn clear_status(&mut self) { - self.status = MarketStatus::Unspecified; - } - - // Param is passed by value, moved - pub fn set_status(&mut self, v: MarketStatus) { - self.status = v; - } - - // string min_price_tick_size = 9; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 10; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for SpotMarket { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.base_denom)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.relayer_fee_share_rate)?; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 8 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 8, &mut self.unknown_fields)? - }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.ticker); - } - if !self.base_denom.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.base_denom); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.quote_denom); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.taker_fee_rate); - } - if !self.relayer_fee_share_rate.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.relayer_fee_share_rate); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.market_id); - } - if self.status != MarketStatus::Unspecified { - my_size += ::protobuf::rt::enum_size(8, self.status); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.min_quantity_tick_size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.ticker.is_empty() { - os.write_string(1, &self.ticker)?; - } - if !self.base_denom.is_empty() { - os.write_string(2, &self.base_denom)?; - } - if !self.quote_denom.is_empty() { - os.write_string(3, &self.quote_denom)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(4, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(5, &self.taker_fee_rate)?; - } - if !self.relayer_fee_share_rate.is_empty() { - os.write_string(6, &self.relayer_fee_share_rate)?; - } - if !self.market_id.is_empty() { - os.write_string(7, &self.market_id)?; - } - if self.status != MarketStatus::Unspecified { - os.write_enum(8, ::protobuf::ProtobufEnum::value(&self.status))?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(9, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(10, &self.min_quantity_tick_size)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SpotMarket { - SpotMarket::new() - } - - fn default_instance() -> &'static SpotMarket { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SpotMarket::new) - } -} - -impl ::protobuf::Clear for SpotMarket { - fn clear(&mut self) { - self.ticker.clear(); - self.base_denom.clear(); - self.quote_denom.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.relayer_fee_share_rate.clear(); - self.market_id.clear(); - self.status = MarketStatus::Unspecified; - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SpotMarket { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Deposit { - // message fields - pub available_balance: ::std::string::String, - pub total_balance: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Deposit { - fn default() -> &'a Deposit { - ::default_instance() - } -} - -impl Deposit { - pub fn new() -> Deposit { - ::std::default::Default::default() - } - - // string available_balance = 1; - - - pub fn get_available_balance(&self) -> &str { - &self.available_balance - } - pub fn clear_available_balance(&mut self) { - self.available_balance.clear(); - } - - // Param is passed by value, moved - pub fn set_available_balance(&mut self, v: ::std::string::String) { - self.available_balance = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_available_balance(&mut self) -> &mut ::std::string::String { - &mut self.available_balance - } - - // Take field - pub fn take_available_balance(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.available_balance, ::std::string::String::new()) - } - - // string total_balance = 2; - - - pub fn get_total_balance(&self) -> &str { - &self.total_balance - } - pub fn clear_total_balance(&mut self) { - self.total_balance.clear(); - } - - // Param is passed by value, moved - pub fn set_total_balance(&mut self, v: ::std::string::String) { - self.total_balance = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_total_balance(&mut self) -> &mut ::std::string::String { - &mut self.total_balance - } - - // Take field - pub fn take_total_balance(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.total_balance, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for Deposit { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.available_balance)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.total_balance)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.available_balance.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.available_balance); - } - if !self.total_balance.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.total_balance); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.available_balance.is_empty() { - os.write_string(1, &self.available_balance)?; - } - if !self.total_balance.is_empty() { - os.write_string(2, &self.total_balance)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Deposit { - Deposit::new() - } - - fn default_instance() -> &'static Deposit { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Deposit::new) - } -} - -impl ::protobuf::Clear for Deposit { - fn clear(&mut self) { - self.available_balance.clear(); - self.total_balance.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for Deposit { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SubaccountTradeNonce { - // message fields - pub nonce: u32, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SubaccountTradeNonce { - fn default() -> &'a SubaccountTradeNonce { - ::default_instance() - } -} - -impl SubaccountTradeNonce { - pub fn new() -> SubaccountTradeNonce { - ::std::default::Default::default() - } - - // uint32 nonce = 1; - - - pub fn get_nonce(&self) -> u32 { - self.nonce - } - pub fn clear_nonce(&mut self) { - self.nonce = 0; - } - - // Param is passed by value, moved - pub fn set_nonce(&mut self, v: u32) { - self.nonce = v; - } -} - -impl ::protobuf::Message for SubaccountTradeNonce { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.nonce = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.nonce != 0 { - my_size += ::protobuf::rt::value_size(1, self.nonce, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.nonce != 0 { - os.write_uint32(1, self.nonce)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SubaccountTradeNonce { - SubaccountTradeNonce::new() - } - - fn default_instance() -> &'static SubaccountTradeNonce { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SubaccountTradeNonce::new) - } -} - -impl ::protobuf::Clear for SubaccountTradeNonce { - fn clear(&mut self) { - self.nonce = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SubaccountTradeNonce { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct OrderInfo { - // message fields - pub subaccount_id: ::std::string::String, - pub fee_recipient: ::std::string::String, - pub price: ::std::string::String, - pub quantity: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a OrderInfo { - fn default() -> &'a OrderInfo { - ::default_instance() - } -} - -impl OrderInfo { - pub fn new() -> OrderInfo { - ::std::default::Default::default() - } - - // string subaccount_id = 1; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // string fee_recipient = 2; - - - pub fn get_fee_recipient(&self) -> &str { - &self.fee_recipient - } - pub fn clear_fee_recipient(&mut self) { - self.fee_recipient.clear(); - } - - // Param is passed by value, moved - pub fn set_fee_recipient(&mut self, v: ::std::string::String) { - self.fee_recipient = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fee_recipient(&mut self) -> &mut ::std::string::String { - &mut self.fee_recipient - } - - // Take field - pub fn take_fee_recipient(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.fee_recipient, ::std::string::String::new()) - } - - // string price = 3; - - - pub fn get_price(&self) -> &str { - &self.price - } - pub fn clear_price(&mut self) { - self.price.clear(); - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: ::std::string::String) { - self.price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price(&mut self) -> &mut ::std::string::String { - &mut self.price - } - - // Take field - pub fn take_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price, ::std::string::String::new()) - } - - // string quantity = 4; - - - pub fn get_quantity(&self) -> &str { - &self.quantity - } - pub fn clear_quantity(&mut self) { - self.quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_quantity(&mut self, v: ::std::string::String) { - self.quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quantity(&mut self) -> &mut ::std::string::String { - &mut self.quantity - } - - // Take field - pub fn take_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quantity, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for OrderInfo { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.fee_recipient)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quantity)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.subaccount_id); - } - if !self.fee_recipient.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.fee_recipient); - } - if !self.price.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.price); - } - if !self.quantity.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.quantity); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.subaccount_id.is_empty() { - os.write_string(1, &self.subaccount_id)?; - } - if !self.fee_recipient.is_empty() { - os.write_string(2, &self.fee_recipient)?; - } - if !self.price.is_empty() { - os.write_string(3, &self.price)?; - } - if !self.quantity.is_empty() { - os.write_string(4, &self.quantity)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> OrderInfo { - OrderInfo::new() - } - - fn default_instance() -> &'static OrderInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(OrderInfo::new) - } -} - -impl ::protobuf::Clear for OrderInfo { - fn clear(&mut self) { - self.subaccount_id.clear(); - self.fee_recipient.clear(); - self.price.clear(); - self.quantity.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for OrderInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SpotOrder { - // message fields - pub market_id: ::std::string::String, - pub order_info: ::protobuf::SingularPtrField, - pub order_type: OrderType, - pub trigger_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SpotOrder { - fn default() -> &'a SpotOrder { - ::default_instance() - } -} - -impl SpotOrder { - pub fn new() -> SpotOrder { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.OrderInfo order_info = 2; - - - pub fn get_order_info(&self) -> &OrderInfo { - self.order_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order_info(&mut self) { - self.order_info.clear(); - } - - pub fn has_order_info(&self) -> bool { - self.order_info.is_some() - } - - // Param is passed by value, moved - pub fn set_order_info(&mut self, v: OrderInfo) { - self.order_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_info(&mut self) -> &mut OrderInfo { - if self.order_info.is_none() { - self.order_info.set_default(); - } - self.order_info.as_mut().unwrap() - } - - // Take field - pub fn take_order_info(&mut self) -> OrderInfo { - self.order_info.take().unwrap_or_else(|| OrderInfo::new()) - } - - // .injective.exchange.v1beta1.OrderType order_type = 3; - - - pub fn get_order_type(&self) -> OrderType { - self.order_type - } - pub fn clear_order_type(&mut self) { - self.order_type = OrderType::UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_order_type(&mut self, v: OrderType) { - self.order_type = v; - } - - // string trigger_price = 4; - - - pub fn get_trigger_price(&self) -> &str { - &self.trigger_price - } - pub fn clear_trigger_price(&mut self) { - self.trigger_price.clear(); - } - - // Param is passed by value, moved - pub fn set_trigger_price(&mut self, v: ::std::string::String) { - self.trigger_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_trigger_price(&mut self) -> &mut ::std::string::String { - &mut self.trigger_price - } - - // Take field - pub fn take_trigger_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.trigger_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for SpotOrder { - fn is_initialized(&self) -> bool { - for v in &self.order_info { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order_info)?; - }, - 3 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.order_type, 3, &mut self.unknown_fields)? - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.trigger_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - if let Some(ref v) = self.order_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if self.order_type != OrderType::UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(3, self.order_type); - } - if !self.trigger_price.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.trigger_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - if let Some(ref v) = self.order_info.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.order_type != OrderType::UNSPECIFIED { - os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.order_type))?; - } - if !self.trigger_price.is_empty() { - os.write_string(4, &self.trigger_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SpotOrder { - SpotOrder::new() - } - - fn default_instance() -> &'static SpotOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SpotOrder::new) - } -} - -impl ::protobuf::Clear for SpotOrder { - fn clear(&mut self) { - self.market_id.clear(); - self.order_info.clear(); - self.order_type = OrderType::UNSPECIFIED; - self.trigger_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SpotOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SpotLimitOrder { - // message fields - pub order_info: ::protobuf::SingularPtrField, - pub order_type: OrderType, - pub fillable: ::std::string::String, - pub trigger_price: ::std::string::String, - pub order_hash: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SpotLimitOrder { - fn default() -> &'a SpotLimitOrder { - ::default_instance() - } -} - -impl SpotLimitOrder { - pub fn new() -> SpotLimitOrder { - ::std::default::Default::default() - } - - // .injective.exchange.v1beta1.OrderInfo order_info = 1; - - - pub fn get_order_info(&self) -> &OrderInfo { - self.order_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order_info(&mut self) { - self.order_info.clear(); - } - - pub fn has_order_info(&self) -> bool { - self.order_info.is_some() - } - - // Param is passed by value, moved - pub fn set_order_info(&mut self, v: OrderInfo) { - self.order_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_info(&mut self) -> &mut OrderInfo { - if self.order_info.is_none() { - self.order_info.set_default(); - } - self.order_info.as_mut().unwrap() - } - - // Take field - pub fn take_order_info(&mut self) -> OrderInfo { - self.order_info.take().unwrap_or_else(|| OrderInfo::new()) - } - - // .injective.exchange.v1beta1.OrderType order_type = 2; - - - pub fn get_order_type(&self) -> OrderType { - self.order_type - } - pub fn clear_order_type(&mut self) { - self.order_type = OrderType::UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_order_type(&mut self, v: OrderType) { - self.order_type = v; - } - - // string fillable = 3; - - - pub fn get_fillable(&self) -> &str { - &self.fillable - } - pub fn clear_fillable(&mut self) { - self.fillable.clear(); - } - - // Param is passed by value, moved - pub fn set_fillable(&mut self, v: ::std::string::String) { - self.fillable = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fillable(&mut self) -> &mut ::std::string::String { - &mut self.fillable - } - - // Take field - pub fn take_fillable(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.fillable, ::std::string::String::new()) - } - - // string trigger_price = 4; - - - pub fn get_trigger_price(&self) -> &str { - &self.trigger_price - } - pub fn clear_trigger_price(&mut self) { - self.trigger_price.clear(); - } - - // Param is passed by value, moved - pub fn set_trigger_price(&mut self, v: ::std::string::String) { - self.trigger_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_trigger_price(&mut self) -> &mut ::std::string::String { - &mut self.trigger_price - } - - // Take field - pub fn take_trigger_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.trigger_price, ::std::string::String::new()) - } - - // bytes order_hash = 5; - - - pub fn get_order_hash(&self) -> &[u8] { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::vec::Vec) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::vec::Vec { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.order_hash, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for SpotLimitOrder { - fn is_initialized(&self) -> bool { - for v in &self.order_info { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order_info)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.order_type, 2, &mut self.unknown_fields)? - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.fillable)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.trigger_price)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.order_hash)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.order_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if self.order_type != OrderType::UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(2, self.order_type); - } - if !self.fillable.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.fillable); - } - if !self.trigger_price.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.trigger_price); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(5, &self.order_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.order_info.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.order_type != OrderType::UNSPECIFIED { - os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.order_type))?; - } - if !self.fillable.is_empty() { - os.write_string(3, &self.fillable)?; - } - if !self.trigger_price.is_empty() { - os.write_string(4, &self.trigger_price)?; - } - if !self.order_hash.is_empty() { - os.write_bytes(5, &self.order_hash)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SpotLimitOrder { - SpotLimitOrder::new() - } - - fn default_instance() -> &'static SpotLimitOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SpotLimitOrder::new) - } -} - -impl ::protobuf::Clear for SpotLimitOrder { - fn clear(&mut self) { - self.order_info.clear(); - self.order_type = OrderType::UNSPECIFIED; - self.fillable.clear(); - self.trigger_price.clear(); - self.order_hash.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SpotLimitOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SpotMarketOrder { - // message fields - pub order_info: ::protobuf::SingularPtrField, - pub balance_hold: ::std::string::String, - pub order_hash: ::std::vec::Vec, - pub order_type: OrderType, - pub trigger_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SpotMarketOrder { - fn default() -> &'a SpotMarketOrder { - ::default_instance() - } -} - -impl SpotMarketOrder { - pub fn new() -> SpotMarketOrder { - ::std::default::Default::default() - } - - // .injective.exchange.v1beta1.OrderInfo order_info = 1; - - - pub fn get_order_info(&self) -> &OrderInfo { - self.order_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order_info(&mut self) { - self.order_info.clear(); - } - - pub fn has_order_info(&self) -> bool { - self.order_info.is_some() - } - - // Param is passed by value, moved - pub fn set_order_info(&mut self, v: OrderInfo) { - self.order_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_info(&mut self) -> &mut OrderInfo { - if self.order_info.is_none() { - self.order_info.set_default(); - } - self.order_info.as_mut().unwrap() - } - - // Take field - pub fn take_order_info(&mut self) -> OrderInfo { - self.order_info.take().unwrap_or_else(|| OrderInfo::new()) - } - - // string balance_hold = 2; - - - pub fn get_balance_hold(&self) -> &str { - &self.balance_hold - } - pub fn clear_balance_hold(&mut self) { - self.balance_hold.clear(); - } - - // Param is passed by value, moved - pub fn set_balance_hold(&mut self, v: ::std::string::String) { - self.balance_hold = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_balance_hold(&mut self) -> &mut ::std::string::String { - &mut self.balance_hold - } - - // Take field - pub fn take_balance_hold(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.balance_hold, ::std::string::String::new()) - } - - // bytes order_hash = 3; - - - pub fn get_order_hash(&self) -> &[u8] { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::vec::Vec) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::vec::Vec { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.order_hash, ::std::vec::Vec::new()) - } - - // .injective.exchange.v1beta1.OrderType order_type = 4; - - - pub fn get_order_type(&self) -> OrderType { - self.order_type - } - pub fn clear_order_type(&mut self) { - self.order_type = OrderType::UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_order_type(&mut self, v: OrderType) { - self.order_type = v; - } - - // string trigger_price = 5; - - - pub fn get_trigger_price(&self) -> &str { - &self.trigger_price - } - pub fn clear_trigger_price(&mut self) { - self.trigger_price.clear(); - } - - // Param is passed by value, moved - pub fn set_trigger_price(&mut self, v: ::std::string::String) { - self.trigger_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_trigger_price(&mut self) -> &mut ::std::string::String { - &mut self.trigger_price - } - - // Take field - pub fn take_trigger_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.trigger_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for SpotMarketOrder { - fn is_initialized(&self) -> bool { - for v in &self.order_info { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order_info)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.balance_hold)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.order_hash)?; - }, - 4 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.order_type, 4, &mut self.unknown_fields)? - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.trigger_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.order_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if !self.balance_hold.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.balance_hold); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.order_hash); - } - if self.order_type != OrderType::UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(4, self.order_type); - } - if !self.trigger_price.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.trigger_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.order_info.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if !self.balance_hold.is_empty() { - os.write_string(2, &self.balance_hold)?; - } - if !self.order_hash.is_empty() { - os.write_bytes(3, &self.order_hash)?; - } - if self.order_type != OrderType::UNSPECIFIED { - os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.order_type))?; - } - if !self.trigger_price.is_empty() { - os.write_string(5, &self.trigger_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SpotMarketOrder { - SpotMarketOrder::new() - } - - fn default_instance() -> &'static SpotMarketOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SpotMarketOrder::new) - } -} - -impl ::protobuf::Clear for SpotMarketOrder { - fn clear(&mut self) { - self.order_info.clear(); - self.balance_hold.clear(); - self.order_hash.clear(); - self.order_type = OrderType::UNSPECIFIED; - self.trigger_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SpotMarketOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DerivativeOrder { - // message fields - pub market_id: ::std::string::String, - pub order_info: ::protobuf::SingularPtrField, - pub order_type: OrderType, - pub margin: ::std::string::String, - pub trigger_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DerivativeOrder { - fn default() -> &'a DerivativeOrder { - ::default_instance() - } -} - -impl DerivativeOrder { - pub fn new() -> DerivativeOrder { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.OrderInfo order_info = 2; - - - pub fn get_order_info(&self) -> &OrderInfo { - self.order_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order_info(&mut self) { - self.order_info.clear(); - } - - pub fn has_order_info(&self) -> bool { - self.order_info.is_some() - } - - // Param is passed by value, moved - pub fn set_order_info(&mut self, v: OrderInfo) { - self.order_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_info(&mut self) -> &mut OrderInfo { - if self.order_info.is_none() { - self.order_info.set_default(); - } - self.order_info.as_mut().unwrap() - } - - // Take field - pub fn take_order_info(&mut self) -> OrderInfo { - self.order_info.take().unwrap_or_else(|| OrderInfo::new()) - } - - // .injective.exchange.v1beta1.OrderType order_type = 3; - - - pub fn get_order_type(&self) -> OrderType { - self.order_type - } - pub fn clear_order_type(&mut self) { - self.order_type = OrderType::UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_order_type(&mut self, v: OrderType) { - self.order_type = v; - } - - // string margin = 4; - - - pub fn get_margin(&self) -> &str { - &self.margin - } - pub fn clear_margin(&mut self) { - self.margin.clear(); - } - - // Param is passed by value, moved - pub fn set_margin(&mut self, v: ::std::string::String) { - self.margin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_margin(&mut self) -> &mut ::std::string::String { - &mut self.margin - } - - // Take field - pub fn take_margin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.margin, ::std::string::String::new()) - } - - // string trigger_price = 5; - - - pub fn get_trigger_price(&self) -> &str { - &self.trigger_price - } - pub fn clear_trigger_price(&mut self) { - self.trigger_price.clear(); - } - - // Param is passed by value, moved - pub fn set_trigger_price(&mut self, v: ::std::string::String) { - self.trigger_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_trigger_price(&mut self) -> &mut ::std::string::String { - &mut self.trigger_price - } - - // Take field - pub fn take_trigger_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.trigger_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for DerivativeOrder { - fn is_initialized(&self) -> bool { - for v in &self.order_info { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order_info)?; - }, - 3 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.order_type, 3, &mut self.unknown_fields)? - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.margin)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.trigger_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - if let Some(ref v) = self.order_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if self.order_type != OrderType::UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(3, self.order_type); - } - if !self.margin.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.margin); - } - if !self.trigger_price.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.trigger_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - if let Some(ref v) = self.order_info.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.order_type != OrderType::UNSPECIFIED { - os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.order_type))?; - } - if !self.margin.is_empty() { - os.write_string(4, &self.margin)?; - } - if !self.trigger_price.is_empty() { - os.write_string(5, &self.trigger_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DerivativeOrder { - DerivativeOrder::new() - } - - fn default_instance() -> &'static DerivativeOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DerivativeOrder::new) - } -} - -impl ::protobuf::Clear for DerivativeOrder { - fn clear(&mut self) { - self.market_id.clear(); - self.order_info.clear(); - self.order_type = OrderType::UNSPECIFIED; - self.margin.clear(); - self.trigger_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DerivativeOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SubaccountOrderbookMetadata { - // message fields - pub vanilla_limit_order_count: u32, - pub reduce_only_limit_order_count: u32, - pub aggregate_reduce_only_quantity: ::std::string::String, - pub aggregate_vanilla_quantity: ::std::string::String, - pub vanilla_conditional_order_count: u32, - pub reduce_only_conditional_order_count: u32, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SubaccountOrderbookMetadata { - fn default() -> &'a SubaccountOrderbookMetadata { - ::default_instance() - } -} - -impl SubaccountOrderbookMetadata { - pub fn new() -> SubaccountOrderbookMetadata { - ::std::default::Default::default() - } - - // uint32 vanilla_limit_order_count = 1; - - - pub fn get_vanilla_limit_order_count(&self) -> u32 { - self.vanilla_limit_order_count - } - pub fn clear_vanilla_limit_order_count(&mut self) { - self.vanilla_limit_order_count = 0; - } - - // Param is passed by value, moved - pub fn set_vanilla_limit_order_count(&mut self, v: u32) { - self.vanilla_limit_order_count = v; - } - - // uint32 reduce_only_limit_order_count = 2; - - - pub fn get_reduce_only_limit_order_count(&self) -> u32 { - self.reduce_only_limit_order_count - } - pub fn clear_reduce_only_limit_order_count(&mut self) { - self.reduce_only_limit_order_count = 0; - } - - // Param is passed by value, moved - pub fn set_reduce_only_limit_order_count(&mut self, v: u32) { - self.reduce_only_limit_order_count = v; - } - - // string aggregate_reduce_only_quantity = 3; - - - pub fn get_aggregate_reduce_only_quantity(&self) -> &str { - &self.aggregate_reduce_only_quantity - } - pub fn clear_aggregate_reduce_only_quantity(&mut self) { - self.aggregate_reduce_only_quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_aggregate_reduce_only_quantity(&mut self, v: ::std::string::String) { - self.aggregate_reduce_only_quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_aggregate_reduce_only_quantity(&mut self) -> &mut ::std::string::String { - &mut self.aggregate_reduce_only_quantity - } - - // Take field - pub fn take_aggregate_reduce_only_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.aggregate_reduce_only_quantity, ::std::string::String::new()) - } - - // string aggregate_vanilla_quantity = 4; - - - pub fn get_aggregate_vanilla_quantity(&self) -> &str { - &self.aggregate_vanilla_quantity - } - pub fn clear_aggregate_vanilla_quantity(&mut self) { - self.aggregate_vanilla_quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_aggregate_vanilla_quantity(&mut self, v: ::std::string::String) { - self.aggregate_vanilla_quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_aggregate_vanilla_quantity(&mut self) -> &mut ::std::string::String { - &mut self.aggregate_vanilla_quantity - } - - // Take field - pub fn take_aggregate_vanilla_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.aggregate_vanilla_quantity, ::std::string::String::new()) - } - - // uint32 vanilla_conditional_order_count = 5; - - - pub fn get_vanilla_conditional_order_count(&self) -> u32 { - self.vanilla_conditional_order_count - } - pub fn clear_vanilla_conditional_order_count(&mut self) { - self.vanilla_conditional_order_count = 0; - } - - // Param is passed by value, moved - pub fn set_vanilla_conditional_order_count(&mut self, v: u32) { - self.vanilla_conditional_order_count = v; - } - - // uint32 reduce_only_conditional_order_count = 6; - - - pub fn get_reduce_only_conditional_order_count(&self) -> u32 { - self.reduce_only_conditional_order_count - } - pub fn clear_reduce_only_conditional_order_count(&mut self) { - self.reduce_only_conditional_order_count = 0; - } - - // Param is passed by value, moved - pub fn set_reduce_only_conditional_order_count(&mut self, v: u32) { - self.reduce_only_conditional_order_count = v; - } -} - -impl ::protobuf::Message for SubaccountOrderbookMetadata { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.vanilla_limit_order_count = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.reduce_only_limit_order_count = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.aggregate_reduce_only_quantity)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.aggregate_vanilla_quantity)?; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.vanilla_conditional_order_count = tmp; - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.reduce_only_conditional_order_count = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.vanilla_limit_order_count != 0 { - my_size += ::protobuf::rt::value_size(1, self.vanilla_limit_order_count, ::protobuf::wire_format::WireTypeVarint); - } - if self.reduce_only_limit_order_count != 0 { - my_size += ::protobuf::rt::value_size(2, self.reduce_only_limit_order_count, ::protobuf::wire_format::WireTypeVarint); - } - if !self.aggregate_reduce_only_quantity.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.aggregate_reduce_only_quantity); - } - if !self.aggregate_vanilla_quantity.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.aggregate_vanilla_quantity); - } - if self.vanilla_conditional_order_count != 0 { - my_size += ::protobuf::rt::value_size(5, self.vanilla_conditional_order_count, ::protobuf::wire_format::WireTypeVarint); - } - if self.reduce_only_conditional_order_count != 0 { - my_size += ::protobuf::rt::value_size(6, self.reduce_only_conditional_order_count, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.vanilla_limit_order_count != 0 { - os.write_uint32(1, self.vanilla_limit_order_count)?; - } - if self.reduce_only_limit_order_count != 0 { - os.write_uint32(2, self.reduce_only_limit_order_count)?; - } - if !self.aggregate_reduce_only_quantity.is_empty() { - os.write_string(3, &self.aggregate_reduce_only_quantity)?; - } - if !self.aggregate_vanilla_quantity.is_empty() { - os.write_string(4, &self.aggregate_vanilla_quantity)?; - } - if self.vanilla_conditional_order_count != 0 { - os.write_uint32(5, self.vanilla_conditional_order_count)?; - } - if self.reduce_only_conditional_order_count != 0 { - os.write_uint32(6, self.reduce_only_conditional_order_count)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SubaccountOrderbookMetadata { - SubaccountOrderbookMetadata::new() - } - - fn default_instance() -> &'static SubaccountOrderbookMetadata { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SubaccountOrderbookMetadata::new) - } -} - -impl ::protobuf::Clear for SubaccountOrderbookMetadata { - fn clear(&mut self) { - self.vanilla_limit_order_count = 0; - self.reduce_only_limit_order_count = 0; - self.aggregate_reduce_only_quantity.clear(); - self.aggregate_vanilla_quantity.clear(); - self.vanilla_conditional_order_count = 0; - self.reduce_only_conditional_order_count = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SubaccountOrderbookMetadata { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SubaccountOrder { - // message fields - pub price: ::std::string::String, - pub quantity: ::std::string::String, - pub isReduceOnly: bool, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SubaccountOrder { - fn default() -> &'a SubaccountOrder { - ::default_instance() - } -} - -impl SubaccountOrder { - pub fn new() -> SubaccountOrder { - ::std::default::Default::default() - } - - // string price = 1; - - - pub fn get_price(&self) -> &str { - &self.price - } - pub fn clear_price(&mut self) { - self.price.clear(); - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: ::std::string::String) { - self.price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price(&mut self) -> &mut ::std::string::String { - &mut self.price - } - - // Take field - pub fn take_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price, ::std::string::String::new()) - } - - // string quantity = 2; - - - pub fn get_quantity(&self) -> &str { - &self.quantity - } - pub fn clear_quantity(&mut self) { - self.quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_quantity(&mut self, v: ::std::string::String) { - self.quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quantity(&mut self) -> &mut ::std::string::String { - &mut self.quantity - } - - // Take field - pub fn take_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quantity, ::std::string::String::new()) - } - - // bool isReduceOnly = 3; - - - pub fn get_isReduceOnly(&self) -> bool { - self.isReduceOnly - } - pub fn clear_isReduceOnly(&mut self) { - self.isReduceOnly = false; - } - - // Param is passed by value, moved - pub fn set_isReduceOnly(&mut self, v: bool) { - self.isReduceOnly = v; - } -} - -impl ::protobuf::Message for SubaccountOrder { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quantity)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.isReduceOnly = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.price.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.price); - } - if !self.quantity.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.quantity); - } - if self.isReduceOnly != false { - my_size += 2; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.price.is_empty() { - os.write_string(1, &self.price)?; - } - if !self.quantity.is_empty() { - os.write_string(2, &self.quantity)?; - } - if self.isReduceOnly != false { - os.write_bool(3, self.isReduceOnly)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SubaccountOrder { - SubaccountOrder::new() - } - - fn default_instance() -> &'static SubaccountOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SubaccountOrder::new) - } -} - -impl ::protobuf::Clear for SubaccountOrder { - fn clear(&mut self) { - self.price.clear(); - self.quantity.clear(); - self.isReduceOnly = false; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SubaccountOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SubaccountOrderData { - // message fields - pub order: ::protobuf::SingularPtrField, - pub order_hash: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SubaccountOrderData { - fn default() -> &'a SubaccountOrderData { - ::default_instance() - } -} - -impl SubaccountOrderData { - pub fn new() -> SubaccountOrderData { - ::std::default::Default::default() - } - - // .injective.exchange.v1beta1.SubaccountOrder order = 1; - - - pub fn get_order(&self) -> &SubaccountOrder { - self.order.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order(&mut self) { - self.order.clear(); - } - - pub fn has_order(&self) -> bool { - self.order.is_some() - } - - // Param is passed by value, moved - pub fn set_order(&mut self, v: SubaccountOrder) { - self.order = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order(&mut self) -> &mut SubaccountOrder { - if self.order.is_none() { - self.order.set_default(); - } - self.order.as_mut().unwrap() - } - - // Take field - pub fn take_order(&mut self) -> SubaccountOrder { - self.order.take().unwrap_or_else(|| SubaccountOrder::new()) - } - - // bytes order_hash = 2; - - - pub fn get_order_hash(&self) -> &[u8] { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::vec::Vec) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::vec::Vec { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.order_hash, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for SubaccountOrderData { - fn is_initialized(&self) -> bool { - for v in &self.order { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.order_hash)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.order.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.order_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.order.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if !self.order_hash.is_empty() { - os.write_bytes(2, &self.order_hash)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SubaccountOrderData { - SubaccountOrderData::new() - } - - fn default_instance() -> &'static SubaccountOrderData { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SubaccountOrderData::new) - } -} - -impl ::protobuf::Clear for SubaccountOrderData { - fn clear(&mut self) { - self.order.clear(); - self.order_hash.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SubaccountOrderData { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DerivativeLimitOrder { - // message fields - pub order_info: ::protobuf::SingularPtrField, - pub order_type: OrderType, - pub margin: ::std::string::String, - pub fillable: ::std::string::String, - pub trigger_price: ::std::string::String, - pub order_hash: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DerivativeLimitOrder { - fn default() -> &'a DerivativeLimitOrder { - ::default_instance() - } -} - -impl DerivativeLimitOrder { - pub fn new() -> DerivativeLimitOrder { - ::std::default::Default::default() - } - - // .injective.exchange.v1beta1.OrderInfo order_info = 1; - - - pub fn get_order_info(&self) -> &OrderInfo { - self.order_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order_info(&mut self) { - self.order_info.clear(); - } - - pub fn has_order_info(&self) -> bool { - self.order_info.is_some() - } - - // Param is passed by value, moved - pub fn set_order_info(&mut self, v: OrderInfo) { - self.order_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_info(&mut self) -> &mut OrderInfo { - if self.order_info.is_none() { - self.order_info.set_default(); - } - self.order_info.as_mut().unwrap() - } - - // Take field - pub fn take_order_info(&mut self) -> OrderInfo { - self.order_info.take().unwrap_or_else(|| OrderInfo::new()) - } - - // .injective.exchange.v1beta1.OrderType order_type = 2; - - - pub fn get_order_type(&self) -> OrderType { - self.order_type - } - pub fn clear_order_type(&mut self) { - self.order_type = OrderType::UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_order_type(&mut self, v: OrderType) { - self.order_type = v; - } - - // string margin = 3; - - - pub fn get_margin(&self) -> &str { - &self.margin - } - pub fn clear_margin(&mut self) { - self.margin.clear(); - } - - // Param is passed by value, moved - pub fn set_margin(&mut self, v: ::std::string::String) { - self.margin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_margin(&mut self) -> &mut ::std::string::String { - &mut self.margin - } - - // Take field - pub fn take_margin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.margin, ::std::string::String::new()) - } - - // string fillable = 4; - - - pub fn get_fillable(&self) -> &str { - &self.fillable - } - pub fn clear_fillable(&mut self) { - self.fillable.clear(); - } - - // Param is passed by value, moved - pub fn set_fillable(&mut self, v: ::std::string::String) { - self.fillable = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fillable(&mut self) -> &mut ::std::string::String { - &mut self.fillable - } - - // Take field - pub fn take_fillable(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.fillable, ::std::string::String::new()) - } - - // string trigger_price = 5; - - - pub fn get_trigger_price(&self) -> &str { - &self.trigger_price - } - pub fn clear_trigger_price(&mut self) { - self.trigger_price.clear(); - } - - // Param is passed by value, moved - pub fn set_trigger_price(&mut self, v: ::std::string::String) { - self.trigger_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_trigger_price(&mut self) -> &mut ::std::string::String { - &mut self.trigger_price - } - - // Take field - pub fn take_trigger_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.trigger_price, ::std::string::String::new()) - } - - // bytes order_hash = 6; - - - pub fn get_order_hash(&self) -> &[u8] { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::vec::Vec) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::vec::Vec { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.order_hash, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for DerivativeLimitOrder { - fn is_initialized(&self) -> bool { - for v in &self.order_info { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order_info)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.order_type, 2, &mut self.unknown_fields)? - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.margin)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.fillable)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.trigger_price)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.order_hash)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.order_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if self.order_type != OrderType::UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(2, self.order_type); - } - if !self.margin.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.margin); - } - if !self.fillable.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.fillable); - } - if !self.trigger_price.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.trigger_price); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(6, &self.order_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.order_info.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.order_type != OrderType::UNSPECIFIED { - os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.order_type))?; - } - if !self.margin.is_empty() { - os.write_string(3, &self.margin)?; - } - if !self.fillable.is_empty() { - os.write_string(4, &self.fillable)?; - } - if !self.trigger_price.is_empty() { - os.write_string(5, &self.trigger_price)?; - } - if !self.order_hash.is_empty() { - os.write_bytes(6, &self.order_hash)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DerivativeLimitOrder { - DerivativeLimitOrder::new() - } - - fn default_instance() -> &'static DerivativeLimitOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DerivativeLimitOrder::new) - } -} - -impl ::protobuf::Clear for DerivativeLimitOrder { - fn clear(&mut self) { - self.order_info.clear(); - self.order_type = OrderType::UNSPECIFIED; - self.margin.clear(); - self.fillable.clear(); - self.trigger_price.clear(); - self.order_hash.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DerivativeLimitOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DerivativeMarketOrder { - // message fields - pub order_info: ::protobuf::SingularPtrField, - pub order_type: OrderType, - pub margin: ::std::string::String, - pub margin_hold: ::std::string::String, - pub trigger_price: ::std::string::String, - pub order_hash: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DerivativeMarketOrder { - fn default() -> &'a DerivativeMarketOrder { - ::default_instance() - } -} - -impl DerivativeMarketOrder { - pub fn new() -> DerivativeMarketOrder { - ::std::default::Default::default() - } - - // .injective.exchange.v1beta1.OrderInfo order_info = 1; - - - pub fn get_order_info(&self) -> &OrderInfo { - self.order_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order_info(&mut self) { - self.order_info.clear(); - } - - pub fn has_order_info(&self) -> bool { - self.order_info.is_some() - } - - // Param is passed by value, moved - pub fn set_order_info(&mut self, v: OrderInfo) { - self.order_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_info(&mut self) -> &mut OrderInfo { - if self.order_info.is_none() { - self.order_info.set_default(); - } - self.order_info.as_mut().unwrap() - } - - // Take field - pub fn take_order_info(&mut self) -> OrderInfo { - self.order_info.take().unwrap_or_else(|| OrderInfo::new()) - } - - // .injective.exchange.v1beta1.OrderType order_type = 2; - - - pub fn get_order_type(&self) -> OrderType { - self.order_type - } - pub fn clear_order_type(&mut self) { - self.order_type = OrderType::UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_order_type(&mut self, v: OrderType) { - self.order_type = v; - } - - // string margin = 3; - - - pub fn get_margin(&self) -> &str { - &self.margin - } - pub fn clear_margin(&mut self) { - self.margin.clear(); - } - - // Param is passed by value, moved - pub fn set_margin(&mut self, v: ::std::string::String) { - self.margin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_margin(&mut self) -> &mut ::std::string::String { - &mut self.margin - } - - // Take field - pub fn take_margin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.margin, ::std::string::String::new()) - } - - // string margin_hold = 4; - - - pub fn get_margin_hold(&self) -> &str { - &self.margin_hold - } - pub fn clear_margin_hold(&mut self) { - self.margin_hold.clear(); - } - - // Param is passed by value, moved - pub fn set_margin_hold(&mut self, v: ::std::string::String) { - self.margin_hold = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_margin_hold(&mut self) -> &mut ::std::string::String { - &mut self.margin_hold - } - - // Take field - pub fn take_margin_hold(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.margin_hold, ::std::string::String::new()) - } - - // string trigger_price = 5; - - - pub fn get_trigger_price(&self) -> &str { - &self.trigger_price - } - pub fn clear_trigger_price(&mut self) { - self.trigger_price.clear(); - } - - // Param is passed by value, moved - pub fn set_trigger_price(&mut self, v: ::std::string::String) { - self.trigger_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_trigger_price(&mut self) -> &mut ::std::string::String { - &mut self.trigger_price - } - - // Take field - pub fn take_trigger_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.trigger_price, ::std::string::String::new()) - } - - // bytes order_hash = 6; - - - pub fn get_order_hash(&self) -> &[u8] { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::vec::Vec) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::vec::Vec { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.order_hash, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for DerivativeMarketOrder { - fn is_initialized(&self) -> bool { - for v in &self.order_info { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order_info)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.order_type, 2, &mut self.unknown_fields)? - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.margin)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.margin_hold)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.trigger_price)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.order_hash)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.order_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if self.order_type != OrderType::UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(2, self.order_type); - } - if !self.margin.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.margin); - } - if !self.margin_hold.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.margin_hold); - } - if !self.trigger_price.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.trigger_price); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(6, &self.order_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.order_info.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if self.order_type != OrderType::UNSPECIFIED { - os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.order_type))?; - } - if !self.margin.is_empty() { - os.write_string(3, &self.margin)?; - } - if !self.margin_hold.is_empty() { - os.write_string(4, &self.margin_hold)?; - } - if !self.trigger_price.is_empty() { - os.write_string(5, &self.trigger_price)?; - } - if !self.order_hash.is_empty() { - os.write_bytes(6, &self.order_hash)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DerivativeMarketOrder { - DerivativeMarketOrder::new() - } - - fn default_instance() -> &'static DerivativeMarketOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DerivativeMarketOrder::new) - } -} - -impl ::protobuf::Clear for DerivativeMarketOrder { - fn clear(&mut self) { - self.order_info.clear(); - self.order_type = OrderType::UNSPECIFIED; - self.margin.clear(); - self.margin_hold.clear(); - self.trigger_price.clear(); - self.order_hash.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DerivativeMarketOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Position { - // message fields - pub isLong: bool, - pub quantity: ::std::string::String, - pub entry_price: ::std::string::String, - pub margin: ::std::string::String, - pub cumulative_funding_entry: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Position { - fn default() -> &'a Position { - ::default_instance() - } -} - -impl Position { - pub fn new() -> Position { - ::std::default::Default::default() - } - - // bool isLong = 1; - - - pub fn get_isLong(&self) -> bool { - self.isLong - } - pub fn clear_isLong(&mut self) { - self.isLong = false; - } - - // Param is passed by value, moved - pub fn set_isLong(&mut self, v: bool) { - self.isLong = v; - } - - // string quantity = 2; - - - pub fn get_quantity(&self) -> &str { - &self.quantity - } - pub fn clear_quantity(&mut self) { - self.quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_quantity(&mut self, v: ::std::string::String) { - self.quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quantity(&mut self) -> &mut ::std::string::String { - &mut self.quantity - } - - // Take field - pub fn take_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quantity, ::std::string::String::new()) - } - - // string entry_price = 3; - - - pub fn get_entry_price(&self) -> &str { - &self.entry_price - } - pub fn clear_entry_price(&mut self) { - self.entry_price.clear(); - } - - // Param is passed by value, moved - pub fn set_entry_price(&mut self, v: ::std::string::String) { - self.entry_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_entry_price(&mut self) -> &mut ::std::string::String { - &mut self.entry_price - } - - // Take field - pub fn take_entry_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.entry_price, ::std::string::String::new()) - } - - // string margin = 4; - - - pub fn get_margin(&self) -> &str { - &self.margin - } - pub fn clear_margin(&mut self) { - self.margin.clear(); - } - - // Param is passed by value, moved - pub fn set_margin(&mut self, v: ::std::string::String) { - self.margin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_margin(&mut self) -> &mut ::std::string::String { - &mut self.margin - } - - // Take field - pub fn take_margin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.margin, ::std::string::String::new()) - } - - // string cumulative_funding_entry = 5; - - - pub fn get_cumulative_funding_entry(&self) -> &str { - &self.cumulative_funding_entry - } - pub fn clear_cumulative_funding_entry(&mut self) { - self.cumulative_funding_entry.clear(); - } - - // Param is passed by value, moved - pub fn set_cumulative_funding_entry(&mut self, v: ::std::string::String) { - self.cumulative_funding_entry = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_cumulative_funding_entry(&mut self) -> &mut ::std::string::String { - &mut self.cumulative_funding_entry - } - - // Take field - pub fn take_cumulative_funding_entry(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.cumulative_funding_entry, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for Position { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.isLong = tmp; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quantity)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.entry_price)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.margin)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.cumulative_funding_entry)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.isLong != false { - my_size += 2; - } - if !self.quantity.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.quantity); - } - if !self.entry_price.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.entry_price); - } - if !self.margin.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.margin); - } - if !self.cumulative_funding_entry.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.cumulative_funding_entry); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.isLong != false { - os.write_bool(1, self.isLong)?; - } - if !self.quantity.is_empty() { - os.write_string(2, &self.quantity)?; - } - if !self.entry_price.is_empty() { - os.write_string(3, &self.entry_price)?; - } - if !self.margin.is_empty() { - os.write_string(4, &self.margin)?; - } - if !self.cumulative_funding_entry.is_empty() { - os.write_string(5, &self.cumulative_funding_entry)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Position { - Position::new() - } - - fn default_instance() -> &'static Position { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Position::new) - } -} - -impl ::protobuf::Clear for Position { - fn clear(&mut self) { - self.isLong = false; - self.quantity.clear(); - self.entry_price.clear(); - self.margin.clear(); - self.cumulative_funding_entry.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for Position { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MarketOrderIndicator { - // message fields - pub market_id: ::std::string::String, - pub isBuy: bool, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MarketOrderIndicator { - fn default() -> &'a MarketOrderIndicator { - ::default_instance() - } -} - -impl MarketOrderIndicator { - pub fn new() -> MarketOrderIndicator { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // bool isBuy = 2; - - - pub fn get_isBuy(&self) -> bool { - self.isBuy - } - pub fn clear_isBuy(&mut self) { - self.isBuy = false; - } - - // Param is passed by value, moved - pub fn set_isBuy(&mut self, v: bool) { - self.isBuy = v; - } -} - -impl ::protobuf::Message for MarketOrderIndicator { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.isBuy = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - if self.isBuy != false { - my_size += 2; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - if self.isBuy != false { - os.write_bool(2, self.isBuy)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MarketOrderIndicator { - MarketOrderIndicator::new() - } - - fn default_instance() -> &'static MarketOrderIndicator { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MarketOrderIndicator::new) - } -} - -impl ::protobuf::Clear for MarketOrderIndicator { - fn clear(&mut self) { - self.market_id.clear(); - self.isBuy = false; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MarketOrderIndicator { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TradeLog { - // message fields - pub quantity: ::std::string::String, - pub price: ::std::string::String, - pub subaccount_id: ::std::vec::Vec, - pub fee: ::std::string::String, - pub order_hash: ::std::vec::Vec, - pub fee_recipient_address: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a TradeLog { - fn default() -> &'a TradeLog { - ::default_instance() - } -} - -impl TradeLog { - pub fn new() -> TradeLog { - ::std::default::Default::default() - } - - // string quantity = 1; - - - pub fn get_quantity(&self) -> &str { - &self.quantity - } - pub fn clear_quantity(&mut self) { - self.quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_quantity(&mut self, v: ::std::string::String) { - self.quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quantity(&mut self) -> &mut ::std::string::String { - &mut self.quantity - } - - // Take field - pub fn take_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quantity, ::std::string::String::new()) - } - - // string price = 2; - - - pub fn get_price(&self) -> &str { - &self.price - } - pub fn clear_price(&mut self) { - self.price.clear(); - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: ::std::string::String) { - self.price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price(&mut self) -> &mut ::std::string::String { - &mut self.price - } - - // Take field - pub fn take_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price, ::std::string::String::new()) - } - - // bytes subaccount_id = 3; - - - pub fn get_subaccount_id(&self) -> &[u8] { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::vec::Vec) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::vec::Vec { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.subaccount_id, ::std::vec::Vec::new()) - } - - // string fee = 4; - - - pub fn get_fee(&self) -> &str { - &self.fee - } - pub fn clear_fee(&mut self) { - self.fee.clear(); - } - - // Param is passed by value, moved - pub fn set_fee(&mut self, v: ::std::string::String) { - self.fee = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fee(&mut self) -> &mut ::std::string::String { - &mut self.fee - } - - // Take field - pub fn take_fee(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.fee, ::std::string::String::new()) - } - - // bytes order_hash = 5; - - - pub fn get_order_hash(&self) -> &[u8] { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::vec::Vec) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::vec::Vec { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.order_hash, ::std::vec::Vec::new()) - } - - // bytes fee_recipient_address = 6; - - - pub fn get_fee_recipient_address(&self) -> &[u8] { - &self.fee_recipient_address - } - pub fn clear_fee_recipient_address(&mut self) { - self.fee_recipient_address.clear(); - } - - // Param is passed by value, moved - pub fn set_fee_recipient_address(&mut self, v: ::std::vec::Vec) { - self.fee_recipient_address = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fee_recipient_address(&mut self) -> &mut ::std::vec::Vec { - &mut self.fee_recipient_address - } - - // Take field - pub fn take_fee_recipient_address(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.fee_recipient_address, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for TradeLog { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quantity)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.subaccount_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.fee)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.order_hash)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.fee_recipient_address)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.quantity.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.quantity); - } - if !self.price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.price); - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.subaccount_id); - } - if !self.fee.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.fee); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(5, &self.order_hash); - } - if !self.fee_recipient_address.is_empty() { - my_size += ::protobuf::rt::bytes_size(6, &self.fee_recipient_address); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.quantity.is_empty() { - os.write_string(1, &self.quantity)?; - } - if !self.price.is_empty() { - os.write_string(2, &self.price)?; - } - if !self.subaccount_id.is_empty() { - os.write_bytes(3, &self.subaccount_id)?; - } - if !self.fee.is_empty() { - os.write_string(4, &self.fee)?; - } - if !self.order_hash.is_empty() { - os.write_bytes(5, &self.order_hash)?; - } - if !self.fee_recipient_address.is_empty() { - os.write_bytes(6, &self.fee_recipient_address)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> TradeLog { - TradeLog::new() - } - - fn default_instance() -> &'static TradeLog { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(TradeLog::new) - } -} - -impl ::protobuf::Clear for TradeLog { - fn clear(&mut self) { - self.quantity.clear(); - self.price.clear(); - self.subaccount_id.clear(); - self.fee.clear(); - self.order_hash.clear(); - self.fee_recipient_address.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for TradeLog { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PositionDelta { - // message fields - pub is_long: bool, - pub execution_quantity: ::std::string::String, - pub execution_margin: ::std::string::String, - pub execution_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PositionDelta { - fn default() -> &'a PositionDelta { - ::default_instance() - } -} - -impl PositionDelta { - pub fn new() -> PositionDelta { - ::std::default::Default::default() - } - - // bool is_long = 1; - - - pub fn get_is_long(&self) -> bool { - self.is_long - } - pub fn clear_is_long(&mut self) { - self.is_long = false; - } - - // Param is passed by value, moved - pub fn set_is_long(&mut self, v: bool) { - self.is_long = v; - } - - // string execution_quantity = 2; - - - pub fn get_execution_quantity(&self) -> &str { - &self.execution_quantity - } - pub fn clear_execution_quantity(&mut self) { - self.execution_quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_execution_quantity(&mut self, v: ::std::string::String) { - self.execution_quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_execution_quantity(&mut self) -> &mut ::std::string::String { - &mut self.execution_quantity - } - - // Take field - pub fn take_execution_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.execution_quantity, ::std::string::String::new()) - } - - // string execution_margin = 3; - - - pub fn get_execution_margin(&self) -> &str { - &self.execution_margin - } - pub fn clear_execution_margin(&mut self) { - self.execution_margin.clear(); - } - - // Param is passed by value, moved - pub fn set_execution_margin(&mut self, v: ::std::string::String) { - self.execution_margin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_execution_margin(&mut self) -> &mut ::std::string::String { - &mut self.execution_margin - } - - // Take field - pub fn take_execution_margin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.execution_margin, ::std::string::String::new()) - } - - // string execution_price = 4; - - - pub fn get_execution_price(&self) -> &str { - &self.execution_price - } - pub fn clear_execution_price(&mut self) { - self.execution_price.clear(); - } - - // Param is passed by value, moved - pub fn set_execution_price(&mut self, v: ::std::string::String) { - self.execution_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_execution_price(&mut self) -> &mut ::std::string::String { - &mut self.execution_price - } - - // Take field - pub fn take_execution_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.execution_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for PositionDelta { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.is_long = tmp; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.execution_quantity)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.execution_margin)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.execution_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.is_long != false { - my_size += 2; - } - if !self.execution_quantity.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.execution_quantity); - } - if !self.execution_margin.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.execution_margin); - } - if !self.execution_price.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.execution_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.is_long != false { - os.write_bool(1, self.is_long)?; - } - if !self.execution_quantity.is_empty() { - os.write_string(2, &self.execution_quantity)?; - } - if !self.execution_margin.is_empty() { - os.write_string(3, &self.execution_margin)?; - } - if !self.execution_price.is_empty() { - os.write_string(4, &self.execution_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PositionDelta { - PositionDelta::new() - } - - fn default_instance() -> &'static PositionDelta { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PositionDelta::new) - } -} - -impl ::protobuf::Clear for PositionDelta { - fn clear(&mut self) { - self.is_long = false; - self.execution_quantity.clear(); - self.execution_margin.clear(); - self.execution_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PositionDelta { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DerivativeTradeLog { - // message fields - pub subaccount_id: ::std::vec::Vec, - pub position_delta: ::protobuf::SingularPtrField, - pub payout: ::std::string::String, - pub fee: ::std::string::String, - pub order_hash: ::std::vec::Vec, - pub fee_recipient_address: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DerivativeTradeLog { - fn default() -> &'a DerivativeTradeLog { - ::default_instance() - } -} - -impl DerivativeTradeLog { - pub fn new() -> DerivativeTradeLog { - ::std::default::Default::default() - } - - // bytes subaccount_id = 1; - - - pub fn get_subaccount_id(&self) -> &[u8] { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::vec::Vec) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::vec::Vec { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.subaccount_id, ::std::vec::Vec::new()) - } - - // .injective.exchange.v1beta1.PositionDelta position_delta = 2; - - - pub fn get_position_delta(&self) -> &PositionDelta { - self.position_delta.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_position_delta(&mut self) { - self.position_delta.clear(); - } - - pub fn has_position_delta(&self) -> bool { - self.position_delta.is_some() - } - - // Param is passed by value, moved - pub fn set_position_delta(&mut self, v: PositionDelta) { - self.position_delta = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_position_delta(&mut self) -> &mut PositionDelta { - if self.position_delta.is_none() { - self.position_delta.set_default(); - } - self.position_delta.as_mut().unwrap() - } - - // Take field - pub fn take_position_delta(&mut self) -> PositionDelta { - self.position_delta.take().unwrap_or_else(|| PositionDelta::new()) - } - - // string payout = 3; - - - pub fn get_payout(&self) -> &str { - &self.payout - } - pub fn clear_payout(&mut self) { - self.payout.clear(); - } - - // Param is passed by value, moved - pub fn set_payout(&mut self, v: ::std::string::String) { - self.payout = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_payout(&mut self) -> &mut ::std::string::String { - &mut self.payout - } - - // Take field - pub fn take_payout(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.payout, ::std::string::String::new()) - } - - // string fee = 4; - - - pub fn get_fee(&self) -> &str { - &self.fee - } - pub fn clear_fee(&mut self) { - self.fee.clear(); - } - - // Param is passed by value, moved - pub fn set_fee(&mut self, v: ::std::string::String) { - self.fee = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fee(&mut self) -> &mut ::std::string::String { - &mut self.fee - } - - // Take field - pub fn take_fee(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.fee, ::std::string::String::new()) - } - - // bytes order_hash = 5; - - - pub fn get_order_hash(&self) -> &[u8] { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::vec::Vec) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::vec::Vec { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.order_hash, ::std::vec::Vec::new()) - } - - // bytes fee_recipient_address = 6; - - - pub fn get_fee_recipient_address(&self) -> &[u8] { - &self.fee_recipient_address - } - pub fn clear_fee_recipient_address(&mut self) { - self.fee_recipient_address.clear(); - } - - // Param is passed by value, moved - pub fn set_fee_recipient_address(&mut self, v: ::std::vec::Vec) { - self.fee_recipient_address = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fee_recipient_address(&mut self) -> &mut ::std::vec::Vec { - &mut self.fee_recipient_address - } - - // Take field - pub fn take_fee_recipient_address(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.fee_recipient_address, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for DerivativeTradeLog { - fn is_initialized(&self) -> bool { - for v in &self.position_delta { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.subaccount_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.position_delta)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.payout)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.fee)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.order_hash)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.fee_recipient_address)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.subaccount_id); - } - if let Some(ref v) = self.position_delta.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if !self.payout.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.payout); - } - if !self.fee.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.fee); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(5, &self.order_hash); - } - if !self.fee_recipient_address.is_empty() { - my_size += ::protobuf::rt::bytes_size(6, &self.fee_recipient_address); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.subaccount_id.is_empty() { - os.write_bytes(1, &self.subaccount_id)?; - } - if let Some(ref v) = self.position_delta.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if !self.payout.is_empty() { - os.write_string(3, &self.payout)?; - } - if !self.fee.is_empty() { - os.write_string(4, &self.fee)?; - } - if !self.order_hash.is_empty() { - os.write_bytes(5, &self.order_hash)?; - } - if !self.fee_recipient_address.is_empty() { - os.write_bytes(6, &self.fee_recipient_address)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DerivativeTradeLog { - DerivativeTradeLog::new() - } - - fn default_instance() -> &'static DerivativeTradeLog { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DerivativeTradeLog::new) - } -} - -impl ::protobuf::Clear for DerivativeTradeLog { - fn clear(&mut self) { - self.subaccount_id.clear(); - self.position_delta.clear(); - self.payout.clear(); - self.fee.clear(); - self.order_hash.clear(); - self.fee_recipient_address.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DerivativeTradeLog { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SubaccountPosition { - // message fields - pub position: ::protobuf::SingularPtrField, - pub subaccount_id: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SubaccountPosition { - fn default() -> &'a SubaccountPosition { - ::default_instance() - } -} - -impl SubaccountPosition { - pub fn new() -> SubaccountPosition { - ::std::default::Default::default() - } - - // .injective.exchange.v1beta1.Position position = 1; - - - pub fn get_position(&self) -> &Position { - self.position.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_position(&mut self) { - self.position.clear(); - } - - pub fn has_position(&self) -> bool { - self.position.is_some() - } - - // Param is passed by value, moved - pub fn set_position(&mut self, v: Position) { - self.position = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_position(&mut self) -> &mut Position { - if self.position.is_none() { - self.position.set_default(); - } - self.position.as_mut().unwrap() - } - - // Take field - pub fn take_position(&mut self) -> Position { - self.position.take().unwrap_or_else(|| Position::new()) - } - - // bytes subaccount_id = 2; - - - pub fn get_subaccount_id(&self) -> &[u8] { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::vec::Vec) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::vec::Vec { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.subaccount_id, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for SubaccountPosition { - fn is_initialized(&self) -> bool { - for v in &self.position { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.position)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.subaccount_id)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.position.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.subaccount_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.position.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if !self.subaccount_id.is_empty() { - os.write_bytes(2, &self.subaccount_id)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SubaccountPosition { - SubaccountPosition::new() - } - - fn default_instance() -> &'static SubaccountPosition { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SubaccountPosition::new) - } -} - -impl ::protobuf::Clear for SubaccountPosition { - fn clear(&mut self) { - self.position.clear(); - self.subaccount_id.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SubaccountPosition { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SubaccountDeposit { - // message fields - pub subaccount_id: ::std::vec::Vec, - pub deposit: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SubaccountDeposit { - fn default() -> &'a SubaccountDeposit { - ::default_instance() - } -} - -impl SubaccountDeposit { - pub fn new() -> SubaccountDeposit { - ::std::default::Default::default() - } - - // bytes subaccount_id = 1; - - - pub fn get_subaccount_id(&self) -> &[u8] { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::vec::Vec) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::vec::Vec { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.subaccount_id, ::std::vec::Vec::new()) - } - - // .injective.exchange.v1beta1.Deposit deposit = 2; - - - pub fn get_deposit(&self) -> &Deposit { - self.deposit.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_deposit(&mut self) { - self.deposit.clear(); - } - - pub fn has_deposit(&self) -> bool { - self.deposit.is_some() - } - - // Param is passed by value, moved - pub fn set_deposit(&mut self, v: Deposit) { - self.deposit = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_deposit(&mut self) -> &mut Deposit { - if self.deposit.is_none() { - self.deposit.set_default(); - } - self.deposit.as_mut().unwrap() - } - - // Take field - pub fn take_deposit(&mut self) -> Deposit { - self.deposit.take().unwrap_or_else(|| Deposit::new()) - } -} - -impl ::protobuf::Message for SubaccountDeposit { - fn is_initialized(&self) -> bool { - for v in &self.deposit { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.subaccount_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.deposit)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.subaccount_id); - } - if let Some(ref v) = self.deposit.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.subaccount_id.is_empty() { - os.write_bytes(1, &self.subaccount_id)?; - } - if let Some(ref v) = self.deposit.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SubaccountDeposit { - SubaccountDeposit::new() - } - - fn default_instance() -> &'static SubaccountDeposit { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SubaccountDeposit::new) - } -} - -impl ::protobuf::Clear for SubaccountDeposit { - fn clear(&mut self) { - self.subaccount_id.clear(); - self.deposit.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SubaccountDeposit { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DepositUpdate { - // message fields - pub denom: ::std::string::String, - pub deposits: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DepositUpdate { - fn default() -> &'a DepositUpdate { - ::default_instance() - } -} - -impl DepositUpdate { - pub fn new() -> DepositUpdate { - ::std::default::Default::default() - } - - // string denom = 1; - - - pub fn get_denom(&self) -> &str { - &self.denom - } - pub fn clear_denom(&mut self) { - self.denom.clear(); - } - - // Param is passed by value, moved - pub fn set_denom(&mut self, v: ::std::string::String) { - self.denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_denom(&mut self) -> &mut ::std::string::String { - &mut self.denom - } - - // Take field - pub fn take_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.denom, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.SubaccountDeposit deposits = 2; - - - pub fn get_deposits(&self) -> &[SubaccountDeposit] { - &self.deposits - } - pub fn clear_deposits(&mut self) { - self.deposits.clear(); - } - - // Param is passed by value, moved - pub fn set_deposits(&mut self, v: ::protobuf::RepeatedField) { - self.deposits = v; - } - - // Mutable pointer to the field. - pub fn mut_deposits(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.deposits - } - - // Take field - pub fn take_deposits(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.deposits, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for DepositUpdate { - fn is_initialized(&self) -> bool { - for v in &self.deposits { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.denom)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.deposits)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.denom.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.denom); - } - for value in &self.deposits { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.denom.is_empty() { - os.write_string(1, &self.denom)?; - } - for v in &self.deposits { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DepositUpdate { - DepositUpdate::new() - } - - fn default_instance() -> &'static DepositUpdate { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DepositUpdate::new) - } -} - -impl ::protobuf::Clear for DepositUpdate { - fn clear(&mut self) { - self.denom.clear(); - self.deposits.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DepositUpdate { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PointsMultiplier { - // message fields - pub maker_points_multiplier: ::std::string::String, - pub taker_points_multiplier: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PointsMultiplier { - fn default() -> &'a PointsMultiplier { - ::default_instance() - } -} - -impl PointsMultiplier { - pub fn new() -> PointsMultiplier { - ::std::default::Default::default() - } - - // string maker_points_multiplier = 1; - - - pub fn get_maker_points_multiplier(&self) -> &str { - &self.maker_points_multiplier - } - pub fn clear_maker_points_multiplier(&mut self) { - self.maker_points_multiplier.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_points_multiplier(&mut self, v: ::std::string::String) { - self.maker_points_multiplier = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_points_multiplier(&mut self) -> &mut ::std::string::String { - &mut self.maker_points_multiplier - } - - // Take field - pub fn take_maker_points_multiplier(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_points_multiplier, ::std::string::String::new()) - } - - // string taker_points_multiplier = 2; - - - pub fn get_taker_points_multiplier(&self) -> &str { - &self.taker_points_multiplier - } - pub fn clear_taker_points_multiplier(&mut self) { - self.taker_points_multiplier.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_points_multiplier(&mut self, v: ::std::string::String) { - self.taker_points_multiplier = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_points_multiplier(&mut self) -> &mut ::std::string::String { - &mut self.taker_points_multiplier - } - - // Take field - pub fn take_taker_points_multiplier(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_points_multiplier, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for PointsMultiplier { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_points_multiplier)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_points_multiplier)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.maker_points_multiplier.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.maker_points_multiplier); - } - if !self.taker_points_multiplier.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.taker_points_multiplier); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.maker_points_multiplier.is_empty() { - os.write_string(1, &self.maker_points_multiplier)?; - } - if !self.taker_points_multiplier.is_empty() { - os.write_string(2, &self.taker_points_multiplier)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PointsMultiplier { - PointsMultiplier::new() - } - - fn default_instance() -> &'static PointsMultiplier { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PointsMultiplier::new) - } -} - -impl ::protobuf::Clear for PointsMultiplier { - fn clear(&mut self) { - self.maker_points_multiplier.clear(); - self.taker_points_multiplier.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PointsMultiplier { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TradingRewardCampaignBoostInfo { - // message fields - pub boosted_spot_market_ids: ::protobuf::RepeatedField<::std::string::String>, - pub spot_market_multipliers: ::protobuf::RepeatedField, - pub boosted_derivative_market_ids: ::protobuf::RepeatedField<::std::string::String>, - pub derivative_market_multipliers: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a TradingRewardCampaignBoostInfo { - fn default() -> &'a TradingRewardCampaignBoostInfo { - ::default_instance() - } -} - -impl TradingRewardCampaignBoostInfo { - pub fn new() -> TradingRewardCampaignBoostInfo { - ::std::default::Default::default() - } - - // repeated string boosted_spot_market_ids = 1; - - - pub fn get_boosted_spot_market_ids(&self) -> &[::std::string::String] { - &self.boosted_spot_market_ids - } - pub fn clear_boosted_spot_market_ids(&mut self) { - self.boosted_spot_market_ids.clear(); - } - - // Param is passed by value, moved - pub fn set_boosted_spot_market_ids(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.boosted_spot_market_ids = v; - } - - // Mutable pointer to the field. - pub fn mut_boosted_spot_market_ids(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.boosted_spot_market_ids - } - - // Take field - pub fn take_boosted_spot_market_ids(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.boosted_spot_market_ids, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.PointsMultiplier spot_market_multipliers = 2; - - - pub fn get_spot_market_multipliers(&self) -> &[PointsMultiplier] { - &self.spot_market_multipliers - } - pub fn clear_spot_market_multipliers(&mut self) { - self.spot_market_multipliers.clear(); - } - - // Param is passed by value, moved - pub fn set_spot_market_multipliers(&mut self, v: ::protobuf::RepeatedField) { - self.spot_market_multipliers = v; - } - - // Mutable pointer to the field. - pub fn mut_spot_market_multipliers(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.spot_market_multipliers - } - - // Take field - pub fn take_spot_market_multipliers(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.spot_market_multipliers, ::protobuf::RepeatedField::new()) - } - - // repeated string boosted_derivative_market_ids = 3; - - - pub fn get_boosted_derivative_market_ids(&self) -> &[::std::string::String] { - &self.boosted_derivative_market_ids - } - pub fn clear_boosted_derivative_market_ids(&mut self) { - self.boosted_derivative_market_ids.clear(); - } - - // Param is passed by value, moved - pub fn set_boosted_derivative_market_ids(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.boosted_derivative_market_ids = v; - } - - // Mutable pointer to the field. - pub fn mut_boosted_derivative_market_ids(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.boosted_derivative_market_ids - } - - // Take field - pub fn take_boosted_derivative_market_ids(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.boosted_derivative_market_ids, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.PointsMultiplier derivative_market_multipliers = 4; - - - pub fn get_derivative_market_multipliers(&self) -> &[PointsMultiplier] { - &self.derivative_market_multipliers - } - pub fn clear_derivative_market_multipliers(&mut self) { - self.derivative_market_multipliers.clear(); - } - - // Param is passed by value, moved - pub fn set_derivative_market_multipliers(&mut self, v: ::protobuf::RepeatedField) { - self.derivative_market_multipliers = v; - } - - // Mutable pointer to the field. - pub fn mut_derivative_market_multipliers(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.derivative_market_multipliers - } - - // Take field - pub fn take_derivative_market_multipliers(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.derivative_market_multipliers, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for TradingRewardCampaignBoostInfo { - fn is_initialized(&self) -> bool { - for v in &self.spot_market_multipliers { - if !v.is_initialized() { - return false; - } - }; - for v in &self.derivative_market_multipliers { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.boosted_spot_market_ids)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.spot_market_multipliers)?; - }, - 3 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.boosted_derivative_market_ids)?; - }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.derivative_market_multipliers)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.boosted_spot_market_ids { - my_size += ::protobuf::rt::string_size(1, &value); - }; - for value in &self.spot_market_multipliers { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.boosted_derivative_market_ids { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.derivative_market_multipliers { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.boosted_spot_market_ids { - os.write_string(1, &v)?; - }; - for v in &self.spot_market_multipliers { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.boosted_derivative_market_ids { - os.write_string(3, &v)?; - }; - for v in &self.derivative_market_multipliers { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> TradingRewardCampaignBoostInfo { - TradingRewardCampaignBoostInfo::new() - } - - fn default_instance() -> &'static TradingRewardCampaignBoostInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(TradingRewardCampaignBoostInfo::new) - } -} - -impl ::protobuf::Clear for TradingRewardCampaignBoostInfo { - fn clear(&mut self) { - self.boosted_spot_market_ids.clear(); - self.spot_market_multipliers.clear(); - self.boosted_derivative_market_ids.clear(); - self.derivative_market_multipliers.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for TradingRewardCampaignBoostInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CampaignRewardPool { - // message fields - pub start_timestamp: i64, - pub max_campaign_rewards: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CampaignRewardPool { - fn default() -> &'a CampaignRewardPool { - ::default_instance() - } -} - -impl CampaignRewardPool { - pub fn new() -> CampaignRewardPool { - ::std::default::Default::default() - } - - // int64 start_timestamp = 1; - - - pub fn get_start_timestamp(&self) -> i64 { - self.start_timestamp - } - pub fn clear_start_timestamp(&mut self) { - self.start_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_start_timestamp(&mut self, v: i64) { - self.start_timestamp = v; - } - - // repeated .cosmos.base.v1beta1.Coin max_campaign_rewards = 2; - - - pub fn get_max_campaign_rewards(&self) -> &[super::coin::Coin] { - &self.max_campaign_rewards - } - pub fn clear_max_campaign_rewards(&mut self) { - self.max_campaign_rewards.clear(); - } - - // Param is passed by value, moved - pub fn set_max_campaign_rewards(&mut self, v: ::protobuf::RepeatedField) { - self.max_campaign_rewards = v; - } - - // Mutable pointer to the field. - pub fn mut_max_campaign_rewards(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.max_campaign_rewards - } - - // Take field - pub fn take_max_campaign_rewards(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.max_campaign_rewards, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for CampaignRewardPool { - fn is_initialized(&self) -> bool { - for v in &self.max_campaign_rewards { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.start_timestamp = tmp; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.max_campaign_rewards)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.start_timestamp != 0 { - my_size += ::protobuf::rt::value_size(1, self.start_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - for value in &self.max_campaign_rewards { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.start_timestamp != 0 { - os.write_int64(1, self.start_timestamp)?; - } - for v in &self.max_campaign_rewards { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CampaignRewardPool { - CampaignRewardPool::new() - } - - fn default_instance() -> &'static CampaignRewardPool { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CampaignRewardPool::new) - } -} - -impl ::protobuf::Clear for CampaignRewardPool { - fn clear(&mut self) { - self.start_timestamp = 0; - self.max_campaign_rewards.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for CampaignRewardPool { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TradingRewardCampaignInfo { - // message fields - pub campaign_duration_seconds: i64, - pub quote_denoms: ::protobuf::RepeatedField<::std::string::String>, - pub trading_reward_boost_info: ::protobuf::SingularPtrField, - pub disqualified_market_ids: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a TradingRewardCampaignInfo { - fn default() -> &'a TradingRewardCampaignInfo { - ::default_instance() - } -} - -impl TradingRewardCampaignInfo { - pub fn new() -> TradingRewardCampaignInfo { - ::std::default::Default::default() - } - - // int64 campaign_duration_seconds = 1; - - - pub fn get_campaign_duration_seconds(&self) -> i64 { - self.campaign_duration_seconds - } - pub fn clear_campaign_duration_seconds(&mut self) { - self.campaign_duration_seconds = 0; - } - - // Param is passed by value, moved - pub fn set_campaign_duration_seconds(&mut self, v: i64) { - self.campaign_duration_seconds = v; - } - - // repeated string quote_denoms = 2; - - - pub fn get_quote_denoms(&self) -> &[::std::string::String] { - &self.quote_denoms - } - pub fn clear_quote_denoms(&mut self) { - self.quote_denoms.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denoms(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.quote_denoms = v; - } - - // Mutable pointer to the field. - pub fn mut_quote_denoms(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.quote_denoms - } - - // Take field - pub fn take_quote_denoms(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.quote_denoms, ::protobuf::RepeatedField::new()) - } - - // .injective.exchange.v1beta1.TradingRewardCampaignBoostInfo trading_reward_boost_info = 3; - - - pub fn get_trading_reward_boost_info(&self) -> &TradingRewardCampaignBoostInfo { - self.trading_reward_boost_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_trading_reward_boost_info(&mut self) { - self.trading_reward_boost_info.clear(); - } - - pub fn has_trading_reward_boost_info(&self) -> bool { - self.trading_reward_boost_info.is_some() - } - - // Param is passed by value, moved - pub fn set_trading_reward_boost_info(&mut self, v: TradingRewardCampaignBoostInfo) { - self.trading_reward_boost_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_trading_reward_boost_info(&mut self) -> &mut TradingRewardCampaignBoostInfo { - if self.trading_reward_boost_info.is_none() { - self.trading_reward_boost_info.set_default(); - } - self.trading_reward_boost_info.as_mut().unwrap() - } - - // Take field - pub fn take_trading_reward_boost_info(&mut self) -> TradingRewardCampaignBoostInfo { - self.trading_reward_boost_info.take().unwrap_or_else(|| TradingRewardCampaignBoostInfo::new()) - } - - // repeated string disqualified_market_ids = 4; - - - pub fn get_disqualified_market_ids(&self) -> &[::std::string::String] { - &self.disqualified_market_ids - } - pub fn clear_disqualified_market_ids(&mut self) { - self.disqualified_market_ids.clear(); - } - - // Param is passed by value, moved - pub fn set_disqualified_market_ids(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.disqualified_market_ids = v; - } - - // Mutable pointer to the field. - pub fn mut_disqualified_market_ids(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.disqualified_market_ids - } - - // Take field - pub fn take_disqualified_market_ids(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.disqualified_market_ids, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for TradingRewardCampaignInfo { - fn is_initialized(&self) -> bool { - for v in &self.trading_reward_boost_info { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.campaign_duration_seconds = tmp; - }, - 2 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.quote_denoms)?; - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.trading_reward_boost_info)?; - }, - 4 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.disqualified_market_ids)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.campaign_duration_seconds != 0 { - my_size += ::protobuf::rt::value_size(1, self.campaign_duration_seconds, ::protobuf::wire_format::WireTypeVarint); - } - for value in &self.quote_denoms { - my_size += ::protobuf::rt::string_size(2, &value); - }; - if let Some(ref v) = self.trading_reward_boost_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - for value in &self.disqualified_market_ids { - my_size += ::protobuf::rt::string_size(4, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.campaign_duration_seconds != 0 { - os.write_int64(1, self.campaign_duration_seconds)?; - } - for v in &self.quote_denoms { - os.write_string(2, &v)?; - }; - if let Some(ref v) = self.trading_reward_boost_info.as_ref() { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - for v in &self.disqualified_market_ids { - os.write_string(4, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> TradingRewardCampaignInfo { - TradingRewardCampaignInfo::new() - } - - fn default_instance() -> &'static TradingRewardCampaignInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(TradingRewardCampaignInfo::new) - } -} - -impl ::protobuf::Clear for TradingRewardCampaignInfo { - fn clear(&mut self) { - self.campaign_duration_seconds = 0; - self.quote_denoms.clear(); - self.trading_reward_boost_info.clear(); - self.disqualified_market_ids.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for TradingRewardCampaignInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct FeeDiscountTierInfo { - // message fields - pub maker_discount_rate: ::std::string::String, - pub taker_discount_rate: ::std::string::String, - pub staked_amount: ::std::string::String, - pub volume: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a FeeDiscountTierInfo { - fn default() -> &'a FeeDiscountTierInfo { - ::default_instance() - } -} - -impl FeeDiscountTierInfo { - pub fn new() -> FeeDiscountTierInfo { - ::std::default::Default::default() - } - - // string maker_discount_rate = 1; - - - pub fn get_maker_discount_rate(&self) -> &str { - &self.maker_discount_rate - } - pub fn clear_maker_discount_rate(&mut self) { - self.maker_discount_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_discount_rate(&mut self, v: ::std::string::String) { - self.maker_discount_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_discount_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_discount_rate - } - - // Take field - pub fn take_maker_discount_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_discount_rate, ::std::string::String::new()) - } - - // string taker_discount_rate = 2; - - - pub fn get_taker_discount_rate(&self) -> &str { - &self.taker_discount_rate - } - pub fn clear_taker_discount_rate(&mut self) { - self.taker_discount_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_discount_rate(&mut self, v: ::std::string::String) { - self.taker_discount_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_discount_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_discount_rate - } - - // Take field - pub fn take_taker_discount_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_discount_rate, ::std::string::String::new()) - } - - // string staked_amount = 3; - - - pub fn get_staked_amount(&self) -> &str { - &self.staked_amount - } - pub fn clear_staked_amount(&mut self) { - self.staked_amount.clear(); - } - - // Param is passed by value, moved - pub fn set_staked_amount(&mut self, v: ::std::string::String) { - self.staked_amount = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_staked_amount(&mut self) -> &mut ::std::string::String { - &mut self.staked_amount - } - - // Take field - pub fn take_staked_amount(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.staked_amount, ::std::string::String::new()) - } - - // string volume = 4; - - - pub fn get_volume(&self) -> &str { - &self.volume - } - pub fn clear_volume(&mut self) { - self.volume.clear(); - } - - // Param is passed by value, moved - pub fn set_volume(&mut self, v: ::std::string::String) { - self.volume = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_volume(&mut self) -> &mut ::std::string::String { - &mut self.volume - } - - // Take field - pub fn take_volume(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.volume, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for FeeDiscountTierInfo { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_discount_rate)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_discount_rate)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.staked_amount)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.volume)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.maker_discount_rate.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.maker_discount_rate); - } - if !self.taker_discount_rate.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.taker_discount_rate); - } - if !self.staked_amount.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.staked_amount); - } - if !self.volume.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.volume); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.maker_discount_rate.is_empty() { - os.write_string(1, &self.maker_discount_rate)?; - } - if !self.taker_discount_rate.is_empty() { - os.write_string(2, &self.taker_discount_rate)?; - } - if !self.staked_amount.is_empty() { - os.write_string(3, &self.staked_amount)?; - } - if !self.volume.is_empty() { - os.write_string(4, &self.volume)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> FeeDiscountTierInfo { - FeeDiscountTierInfo::new() - } - - fn default_instance() -> &'static FeeDiscountTierInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(FeeDiscountTierInfo::new) - } -} - -impl ::protobuf::Clear for FeeDiscountTierInfo { - fn clear(&mut self) { - self.maker_discount_rate.clear(); - self.taker_discount_rate.clear(); - self.staked_amount.clear(); - self.volume.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for FeeDiscountTierInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct FeeDiscountSchedule { - // message fields - pub bucket_count: u64, - pub bucket_duration: i64, - pub quote_denoms: ::protobuf::RepeatedField<::std::string::String>, - pub tier_infos: ::protobuf::RepeatedField, - pub disqualified_market_ids: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a FeeDiscountSchedule { - fn default() -> &'a FeeDiscountSchedule { - ::default_instance() - } -} - -impl FeeDiscountSchedule { - pub fn new() -> FeeDiscountSchedule { - ::std::default::Default::default() - } - - // uint64 bucket_count = 1; - - - pub fn get_bucket_count(&self) -> u64 { - self.bucket_count - } - pub fn clear_bucket_count(&mut self) { - self.bucket_count = 0; - } - - // Param is passed by value, moved - pub fn set_bucket_count(&mut self, v: u64) { - self.bucket_count = v; - } - - // int64 bucket_duration = 2; - - - pub fn get_bucket_duration(&self) -> i64 { - self.bucket_duration - } - pub fn clear_bucket_duration(&mut self) { - self.bucket_duration = 0; - } - - // Param is passed by value, moved - pub fn set_bucket_duration(&mut self, v: i64) { - self.bucket_duration = v; - } - - // repeated string quote_denoms = 3; - - - pub fn get_quote_denoms(&self) -> &[::std::string::String] { - &self.quote_denoms - } - pub fn clear_quote_denoms(&mut self) { - self.quote_denoms.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denoms(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.quote_denoms = v; - } - - // Mutable pointer to the field. - pub fn mut_quote_denoms(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.quote_denoms - } - - // Take field - pub fn take_quote_denoms(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.quote_denoms, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.FeeDiscountTierInfo tier_infos = 4; - - - pub fn get_tier_infos(&self) -> &[FeeDiscountTierInfo] { - &self.tier_infos - } - pub fn clear_tier_infos(&mut self) { - self.tier_infos.clear(); - } - - // Param is passed by value, moved - pub fn set_tier_infos(&mut self, v: ::protobuf::RepeatedField) { - self.tier_infos = v; - } - - // Mutable pointer to the field. - pub fn mut_tier_infos(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.tier_infos - } - - // Take field - pub fn take_tier_infos(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.tier_infos, ::protobuf::RepeatedField::new()) - } - - // repeated string disqualified_market_ids = 5; - - - pub fn get_disqualified_market_ids(&self) -> &[::std::string::String] { - &self.disqualified_market_ids - } - pub fn clear_disqualified_market_ids(&mut self) { - self.disqualified_market_ids.clear(); - } - - // Param is passed by value, moved - pub fn set_disqualified_market_ids(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.disqualified_market_ids = v; - } - - // Mutable pointer to the field. - pub fn mut_disqualified_market_ids(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.disqualified_market_ids - } - - // Take field - pub fn take_disqualified_market_ids(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.disqualified_market_ids, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for FeeDiscountSchedule { - fn is_initialized(&self) -> bool { - for v in &self.tier_infos { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.bucket_count = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.bucket_duration = tmp; - }, - 3 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.quote_denoms)?; - }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.tier_infos)?; - }, - 5 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.disqualified_market_ids)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.bucket_count != 0 { - my_size += ::protobuf::rt::value_size(1, self.bucket_count, ::protobuf::wire_format::WireTypeVarint); - } - if self.bucket_duration != 0 { - my_size += ::protobuf::rt::value_size(2, self.bucket_duration, ::protobuf::wire_format::WireTypeVarint); - } - for value in &self.quote_denoms { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.tier_infos { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.disqualified_market_ids { - my_size += ::protobuf::rt::string_size(5, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.bucket_count != 0 { - os.write_uint64(1, self.bucket_count)?; - } - if self.bucket_duration != 0 { - os.write_int64(2, self.bucket_duration)?; - } - for v in &self.quote_denoms { - os.write_string(3, &v)?; - }; - for v in &self.tier_infos { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.disqualified_market_ids { - os.write_string(5, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> FeeDiscountSchedule { - FeeDiscountSchedule::new() - } - - fn default_instance() -> &'static FeeDiscountSchedule { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(FeeDiscountSchedule::new) - } -} - -impl ::protobuf::Clear for FeeDiscountSchedule { - fn clear(&mut self) { - self.bucket_count = 0; - self.bucket_duration = 0; - self.quote_denoms.clear(); - self.tier_infos.clear(); - self.disqualified_market_ids.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for FeeDiscountSchedule { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct FeeDiscountTierTTL { - // message fields - pub tier: u64, - pub ttl_timestamp: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a FeeDiscountTierTTL { - fn default() -> &'a FeeDiscountTierTTL { - ::default_instance() - } -} - -impl FeeDiscountTierTTL { - pub fn new() -> FeeDiscountTierTTL { - ::std::default::Default::default() - } - - // uint64 tier = 1; - - - pub fn get_tier(&self) -> u64 { - self.tier - } - pub fn clear_tier(&mut self) { - self.tier = 0; - } - - // Param is passed by value, moved - pub fn set_tier(&mut self, v: u64) { - self.tier = v; - } - - // int64 ttl_timestamp = 2; - - - pub fn get_ttl_timestamp(&self) -> i64 { - self.ttl_timestamp - } - pub fn clear_ttl_timestamp(&mut self) { - self.ttl_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_ttl_timestamp(&mut self, v: i64) { - self.ttl_timestamp = v; - } -} - -impl ::protobuf::Message for FeeDiscountTierTTL { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.tier = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.ttl_timestamp = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.tier != 0 { - my_size += ::protobuf::rt::value_size(1, self.tier, ::protobuf::wire_format::WireTypeVarint); - } - if self.ttl_timestamp != 0 { - my_size += ::protobuf::rt::value_size(2, self.ttl_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.tier != 0 { - os.write_uint64(1, self.tier)?; - } - if self.ttl_timestamp != 0 { - os.write_int64(2, self.ttl_timestamp)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> FeeDiscountTierTTL { - FeeDiscountTierTTL::new() - } - - fn default_instance() -> &'static FeeDiscountTierTTL { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(FeeDiscountTierTTL::new) - } -} - -impl ::protobuf::Clear for FeeDiscountTierTTL { - fn clear(&mut self) { - self.tier = 0; - self.ttl_timestamp = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for FeeDiscountTierTTL { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct VolumeRecord { - // message fields - pub maker_volume: ::std::string::String, - pub taker_volume: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a VolumeRecord { - fn default() -> &'a VolumeRecord { - ::default_instance() - } -} - -impl VolumeRecord { - pub fn new() -> VolumeRecord { - ::std::default::Default::default() - } - - // string maker_volume = 1; - - - pub fn get_maker_volume(&self) -> &str { - &self.maker_volume - } - pub fn clear_maker_volume(&mut self) { - self.maker_volume.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_volume(&mut self, v: ::std::string::String) { - self.maker_volume = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_volume(&mut self) -> &mut ::std::string::String { - &mut self.maker_volume - } - - // Take field - pub fn take_maker_volume(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_volume, ::std::string::String::new()) - } - - // string taker_volume = 2; - - - pub fn get_taker_volume(&self) -> &str { - &self.taker_volume - } - pub fn clear_taker_volume(&mut self) { - self.taker_volume.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_volume(&mut self, v: ::std::string::String) { - self.taker_volume = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_volume(&mut self) -> &mut ::std::string::String { - &mut self.taker_volume - } - - // Take field - pub fn take_taker_volume(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_volume, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for VolumeRecord { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_volume)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_volume)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.maker_volume.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.maker_volume); - } - if !self.taker_volume.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.taker_volume); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.maker_volume.is_empty() { - os.write_string(1, &self.maker_volume)?; - } - if !self.taker_volume.is_empty() { - os.write_string(2, &self.taker_volume)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> VolumeRecord { - VolumeRecord::new() - } - - fn default_instance() -> &'static VolumeRecord { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(VolumeRecord::new) - } -} - -impl ::protobuf::Clear for VolumeRecord { - fn clear(&mut self) { - self.maker_volume.clear(); - self.taker_volume.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for VolumeRecord { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct AccountRewards { - // message fields - pub account: ::std::string::String, - pub rewards: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a AccountRewards { - fn default() -> &'a AccountRewards { - ::default_instance() - } -} - -impl AccountRewards { - pub fn new() -> AccountRewards { - ::std::default::Default::default() - } - - // string account = 1; - - - pub fn get_account(&self) -> &str { - &self.account - } - pub fn clear_account(&mut self) { - self.account.clear(); - } - - // Param is passed by value, moved - pub fn set_account(&mut self, v: ::std::string::String) { - self.account = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_account(&mut self) -> &mut ::std::string::String { - &mut self.account - } - - // Take field - pub fn take_account(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.account, ::std::string::String::new()) - } - - // repeated .cosmos.base.v1beta1.Coin rewards = 2; - - - pub fn get_rewards(&self) -> &[super::coin::Coin] { - &self.rewards - } - pub fn clear_rewards(&mut self) { - self.rewards.clear(); - } - - // Param is passed by value, moved - pub fn set_rewards(&mut self, v: ::protobuf::RepeatedField) { - self.rewards = v; - } - - // Mutable pointer to the field. - pub fn mut_rewards(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.rewards - } - - // Take field - pub fn take_rewards(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.rewards, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for AccountRewards { - fn is_initialized(&self) -> bool { - for v in &self.rewards { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.account)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.rewards)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.account.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.account); - } - for value in &self.rewards { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.account.is_empty() { - os.write_string(1, &self.account)?; - } - for v in &self.rewards { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> AccountRewards { - AccountRewards::new() - } - - fn default_instance() -> &'static AccountRewards { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(AccountRewards::new) - } -} - -impl ::protobuf::Clear for AccountRewards { - fn clear(&mut self) { - self.account.clear(); - self.rewards.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for AccountRewards { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TradeRecords { - // message fields - pub market_id: ::std::string::String, - pub latest_trade_records: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a TradeRecords { - fn default() -> &'a TradeRecords { - ::default_instance() - } -} - -impl TradeRecords { - pub fn new() -> TradeRecords { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.TradeRecord latest_trade_records = 2; - - - pub fn get_latest_trade_records(&self) -> &[TradeRecord] { - &self.latest_trade_records - } - pub fn clear_latest_trade_records(&mut self) { - self.latest_trade_records.clear(); - } - - // Param is passed by value, moved - pub fn set_latest_trade_records(&mut self, v: ::protobuf::RepeatedField) { - self.latest_trade_records = v; - } - - // Mutable pointer to the field. - pub fn mut_latest_trade_records(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.latest_trade_records - } - - // Take field - pub fn take_latest_trade_records(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.latest_trade_records, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for TradeRecords { - fn is_initialized(&self) -> bool { - for v in &self.latest_trade_records { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.latest_trade_records)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - for value in &self.latest_trade_records { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - for v in &self.latest_trade_records { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> TradeRecords { - TradeRecords::new() - } - - fn default_instance() -> &'static TradeRecords { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(TradeRecords::new) - } -} - -impl ::protobuf::Clear for TradeRecords { - fn clear(&mut self) { - self.market_id.clear(); - self.latest_trade_records.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for TradeRecords { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SubaccountIDs { - // message fields - pub subaccount_ids: ::protobuf::RepeatedField<::std::vec::Vec>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SubaccountIDs { - fn default() -> &'a SubaccountIDs { - ::default_instance() - } -} - -impl SubaccountIDs { - pub fn new() -> SubaccountIDs { - ::std::default::Default::default() - } - - // repeated bytes subaccount_ids = 1; - - - pub fn get_subaccount_ids(&self) -> &[::std::vec::Vec] { - &self.subaccount_ids - } - pub fn clear_subaccount_ids(&mut self) { - self.subaccount_ids.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_ids(&mut self, v: ::protobuf::RepeatedField<::std::vec::Vec>) { - self.subaccount_ids = v; - } - - // Mutable pointer to the field. - pub fn mut_subaccount_ids(&mut self) -> &mut ::protobuf::RepeatedField<::std::vec::Vec> { - &mut self.subaccount_ids - } - - // Take field - pub fn take_subaccount_ids(&mut self) -> ::protobuf::RepeatedField<::std::vec::Vec> { - ::std::mem::replace(&mut self.subaccount_ids, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for SubaccountIDs { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_bytes_into(wire_type, is, &mut self.subaccount_ids)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.subaccount_ids { - my_size += ::protobuf::rt::bytes_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.subaccount_ids { - os.write_bytes(1, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SubaccountIDs { - SubaccountIDs::new() - } - - fn default_instance() -> &'static SubaccountIDs { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SubaccountIDs::new) - } -} - -impl ::protobuf::Clear for SubaccountIDs { - fn clear(&mut self) { - self.subaccount_ids.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SubaccountIDs { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TradeRecord { - // message fields - pub timestamp: i64, - pub price: ::std::string::String, - pub quantity: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a TradeRecord { - fn default() -> &'a TradeRecord { - ::default_instance() - } -} - -impl TradeRecord { - pub fn new() -> TradeRecord { - ::std::default::Default::default() - } - - // int64 timestamp = 1; - - - pub fn get_timestamp(&self) -> i64 { - self.timestamp - } - pub fn clear_timestamp(&mut self) { - self.timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_timestamp(&mut self, v: i64) { - self.timestamp = v; - } - - // string price = 2; - - - pub fn get_price(&self) -> &str { - &self.price - } - pub fn clear_price(&mut self) { - self.price.clear(); - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: ::std::string::String) { - self.price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price(&mut self) -> &mut ::std::string::String { - &mut self.price - } - - // Take field - pub fn take_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price, ::std::string::String::new()) - } - - // string quantity = 3; - - - pub fn get_quantity(&self) -> &str { - &self.quantity - } - pub fn clear_quantity(&mut self) { - self.quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_quantity(&mut self, v: ::std::string::String) { - self.quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quantity(&mut self) -> &mut ::std::string::String { - &mut self.quantity - } - - // Take field - pub fn take_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quantity, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for TradeRecord { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.timestamp = tmp; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quantity)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.timestamp != 0 { - my_size += ::protobuf::rt::value_size(1, self.timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if !self.price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.price); - } - if !self.quantity.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.quantity); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.timestamp != 0 { - os.write_int64(1, self.timestamp)?; - } - if !self.price.is_empty() { - os.write_string(2, &self.price)?; - } - if !self.quantity.is_empty() { - os.write_string(3, &self.quantity)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> TradeRecord { - TradeRecord::new() - } - - fn default_instance() -> &'static TradeRecord { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(TradeRecord::new) - } -} - -impl ::protobuf::Clear for TradeRecord { - fn clear(&mut self) { - self.timestamp = 0; - self.price.clear(); - self.quantity.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for TradeRecord { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Level { - // message fields - pub p: ::std::string::String, - pub q: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Level { - fn default() -> &'a Level { - ::default_instance() - } -} - -impl Level { - pub fn new() -> Level { - ::std::default::Default::default() - } - - // string p = 1; - - - pub fn get_p(&self) -> &str { - &self.p - } - pub fn clear_p(&mut self) { - self.p.clear(); - } - - // Param is passed by value, moved - pub fn set_p(&mut self, v: ::std::string::String) { - self.p = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_p(&mut self) -> &mut ::std::string::String { - &mut self.p - } - - // Take field - pub fn take_p(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.p, ::std::string::String::new()) - } - - // string q = 2; - - - pub fn get_q(&self) -> &str { - &self.q - } - pub fn clear_q(&mut self) { - self.q.clear(); - } - - // Param is passed by value, moved - pub fn set_q(&mut self, v: ::std::string::String) { - self.q = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_q(&mut self) -> &mut ::std::string::String { - &mut self.q - } - - // Take field - pub fn take_q(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.q, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for Level { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.p)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.q)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.p.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.p); - } - if !self.q.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.q); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.p.is_empty() { - os.write_string(1, &self.p)?; - } - if !self.q.is_empty() { - os.write_string(2, &self.q)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Level { - Level::new() - } - - fn default_instance() -> &'static Level { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Level::new) - } -} - -impl ::protobuf::Clear for Level { - fn clear(&mut self) { - self.p.clear(); - self.q.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for Level { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct AggregateSubaccountVolumeRecord { - // message fields - pub subaccount_id: ::std::string::String, - pub market_volumes: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a AggregateSubaccountVolumeRecord { - fn default() -> &'a AggregateSubaccountVolumeRecord { - ::default_instance() - } -} - -impl AggregateSubaccountVolumeRecord { - pub fn new() -> AggregateSubaccountVolumeRecord { - ::std::default::Default::default() - } - - // string subaccount_id = 1; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.MarketVolume market_volumes = 2; - - - pub fn get_market_volumes(&self) -> &[MarketVolume] { - &self.market_volumes - } - pub fn clear_market_volumes(&mut self) { - self.market_volumes.clear(); - } - - // Param is passed by value, moved - pub fn set_market_volumes(&mut self, v: ::protobuf::RepeatedField) { - self.market_volumes = v; - } - - // Mutable pointer to the field. - pub fn mut_market_volumes(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.market_volumes - } - - // Take field - pub fn take_market_volumes(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.market_volumes, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for AggregateSubaccountVolumeRecord { - fn is_initialized(&self) -> bool { - for v in &self.market_volumes { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.market_volumes)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.subaccount_id); - } - for value in &self.market_volumes { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.subaccount_id.is_empty() { - os.write_string(1, &self.subaccount_id)?; - } - for v in &self.market_volumes { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> AggregateSubaccountVolumeRecord { - AggregateSubaccountVolumeRecord::new() - } - - fn default_instance() -> &'static AggregateSubaccountVolumeRecord { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(AggregateSubaccountVolumeRecord::new) - } -} - -impl ::protobuf::Clear for AggregateSubaccountVolumeRecord { - fn clear(&mut self) { - self.subaccount_id.clear(); - self.market_volumes.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for AggregateSubaccountVolumeRecord { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct AggregateAccountVolumeRecord { - // message fields - pub account: ::std::string::String, - pub market_volumes: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a AggregateAccountVolumeRecord { - fn default() -> &'a AggregateAccountVolumeRecord { - ::default_instance() - } -} - -impl AggregateAccountVolumeRecord { - pub fn new() -> AggregateAccountVolumeRecord { - ::std::default::Default::default() - } - - // string account = 1; - - - pub fn get_account(&self) -> &str { - &self.account - } - pub fn clear_account(&mut self) { - self.account.clear(); - } - - // Param is passed by value, moved - pub fn set_account(&mut self, v: ::std::string::String) { - self.account = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_account(&mut self) -> &mut ::std::string::String { - &mut self.account - } - - // Take field - pub fn take_account(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.account, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.MarketVolume market_volumes = 2; - - - pub fn get_market_volumes(&self) -> &[MarketVolume] { - &self.market_volumes - } - pub fn clear_market_volumes(&mut self) { - self.market_volumes.clear(); - } - - // Param is passed by value, moved - pub fn set_market_volumes(&mut self, v: ::protobuf::RepeatedField) { - self.market_volumes = v; - } - - // Mutable pointer to the field. - pub fn mut_market_volumes(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.market_volumes - } - - // Take field - pub fn take_market_volumes(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.market_volumes, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for AggregateAccountVolumeRecord { - fn is_initialized(&self) -> bool { - for v in &self.market_volumes { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.account)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.market_volumes)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.account.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.account); - } - for value in &self.market_volumes { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.account.is_empty() { - os.write_string(1, &self.account)?; - } - for v in &self.market_volumes { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> AggregateAccountVolumeRecord { - AggregateAccountVolumeRecord::new() - } - - fn default_instance() -> &'static AggregateAccountVolumeRecord { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(AggregateAccountVolumeRecord::new) - } -} - -impl ::protobuf::Clear for AggregateAccountVolumeRecord { - fn clear(&mut self) { - self.account.clear(); - self.market_volumes.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for AggregateAccountVolumeRecord { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MarketVolume { - // message fields - pub market_id: ::std::string::String, - pub volume: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MarketVolume { - fn default() -> &'a MarketVolume { - ::default_instance() - } -} - -impl MarketVolume { - pub fn new() -> MarketVolume { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.VolumeRecord volume = 2; - - - pub fn get_volume(&self) -> &VolumeRecord { - self.volume.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_volume(&mut self) { - self.volume.clear(); - } - - pub fn has_volume(&self) -> bool { - self.volume.is_some() - } - - // Param is passed by value, moved - pub fn set_volume(&mut self, v: VolumeRecord) { - self.volume = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_volume(&mut self) -> &mut VolumeRecord { - if self.volume.is_none() { - self.volume.set_default(); - } - self.volume.as_mut().unwrap() - } - - // Take field - pub fn take_volume(&mut self) -> VolumeRecord { - self.volume.take().unwrap_or_else(|| VolumeRecord::new()) - } -} - -impl ::protobuf::Message for MarketVolume { - fn is_initialized(&self) -> bool { - for v in &self.volume { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.volume)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - if let Some(ref v) = self.volume.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - if let Some(ref v) = self.volume.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MarketVolume { - MarketVolume::new() - } - - fn default_instance() -> &'static MarketVolume { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MarketVolume::new) - } -} - -impl ::protobuf::Clear for MarketVolume { - fn clear(&mut self) { - self.market_id.clear(); - self.volume.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MarketVolume { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DenomDecimals { - // message fields - pub denom: ::std::string::String, - pub decimals: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DenomDecimals { - fn default() -> &'a DenomDecimals { - ::default_instance() - } -} - -impl DenomDecimals { - pub fn new() -> DenomDecimals { - ::std::default::Default::default() - } - - // string denom = 1; - - - pub fn get_denom(&self) -> &str { - &self.denom - } - pub fn clear_denom(&mut self) { - self.denom.clear(); - } - - // Param is passed by value, moved - pub fn set_denom(&mut self, v: ::std::string::String) { - self.denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_denom(&mut self) -> &mut ::std::string::String { - &mut self.denom - } - - // Take field - pub fn take_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.denom, ::std::string::String::new()) - } - - // uint64 decimals = 2; - - - pub fn get_decimals(&self) -> u64 { - self.decimals - } - pub fn clear_decimals(&mut self) { - self.decimals = 0; - } - - // Param is passed by value, moved - pub fn set_decimals(&mut self, v: u64) { - self.decimals = v; - } -} - -impl ::protobuf::Message for DenomDecimals { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.denom)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.decimals = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.denom.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.denom); - } - if self.decimals != 0 { - my_size += ::protobuf::rt::value_size(2, self.decimals, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.denom.is_empty() { - os.write_string(1, &self.denom)?; - } - if self.decimals != 0 { - os.write_uint64(2, self.decimals)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DenomDecimals { - DenomDecimals::new() - } - - fn default_instance() -> &'static DenomDecimals { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DenomDecimals::new) - } -} - -impl ::protobuf::Clear for DenomDecimals { - fn clear(&mut self) { - self.denom.clear(); - self.decimals = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DenomDecimals { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum AtomicMarketOrderAccessLevel { - Nobody = 0, - BeginBlockerSmartContractsOnly = 1, - SmartContractsOnly = 2, - Everyone = 3, -} - -impl ::protobuf::ProtobufEnum for AtomicMarketOrderAccessLevel { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AtomicMarketOrderAccessLevel::Nobody), - 1 => ::std::option::Option::Some(AtomicMarketOrderAccessLevel::BeginBlockerSmartContractsOnly), - 2 => ::std::option::Option::Some(AtomicMarketOrderAccessLevel::SmartContractsOnly), - 3 => ::std::option::Option::Some(AtomicMarketOrderAccessLevel::Everyone), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [AtomicMarketOrderAccessLevel] = &[ - AtomicMarketOrderAccessLevel::Nobody, - AtomicMarketOrderAccessLevel::BeginBlockerSmartContractsOnly, - AtomicMarketOrderAccessLevel::SmartContractsOnly, - AtomicMarketOrderAccessLevel::Everyone, - ]; - values - } -} - -impl ::std::marker::Copy for AtomicMarketOrderAccessLevel { -} - -impl ::std::default::Default for AtomicMarketOrderAccessLevel { - fn default() -> Self { - AtomicMarketOrderAccessLevel::Nobody - } -} - -impl ::protobuf::reflect::ProtobufValue for AtomicMarketOrderAccessLevel { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum MarketStatus { - Unspecified = 0, - Active = 1, - Paused = 2, - Demolished = 3, - Expired = 4, -} - -impl ::protobuf::ProtobufEnum for MarketStatus { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(MarketStatus::Unspecified), - 1 => ::std::option::Option::Some(MarketStatus::Active), - 2 => ::std::option::Option::Some(MarketStatus::Paused), - 3 => ::std::option::Option::Some(MarketStatus::Demolished), - 4 => ::std::option::Option::Some(MarketStatus::Expired), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [MarketStatus] = &[ - MarketStatus::Unspecified, - MarketStatus::Active, - MarketStatus::Paused, - MarketStatus::Demolished, - MarketStatus::Expired, - ]; - values - } -} - -impl ::std::marker::Copy for MarketStatus { -} - -impl ::std::default::Default for MarketStatus { - fn default() -> Self { - MarketStatus::Unspecified - } -} - -impl ::protobuf::reflect::ProtobufValue for MarketStatus { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum OrderType { - UNSPECIFIED = 0, - BUY = 1, - SELL = 2, - STOP_BUY = 3, - STOP_SELL = 4, - TAKE_BUY = 5, - TAKE_SELL = 6, - BUY_PO = 7, - SELL_PO = 8, - BUY_ATOMIC = 9, - SELL_ATOMIC = 10, -} - -impl ::protobuf::ProtobufEnum for OrderType { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(OrderType::UNSPECIFIED), - 1 => ::std::option::Option::Some(OrderType::BUY), - 2 => ::std::option::Option::Some(OrderType::SELL), - 3 => ::std::option::Option::Some(OrderType::STOP_BUY), - 4 => ::std::option::Option::Some(OrderType::STOP_SELL), - 5 => ::std::option::Option::Some(OrderType::TAKE_BUY), - 6 => ::std::option::Option::Some(OrderType::TAKE_SELL), - 7 => ::std::option::Option::Some(OrderType::BUY_PO), - 8 => ::std::option::Option::Some(OrderType::SELL_PO), - 9 => ::std::option::Option::Some(OrderType::BUY_ATOMIC), - 10 => ::std::option::Option::Some(OrderType::SELL_ATOMIC), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [OrderType] = &[ - OrderType::UNSPECIFIED, - OrderType::BUY, - OrderType::SELL, - OrderType::STOP_BUY, - OrderType::STOP_SELL, - OrderType::TAKE_BUY, - OrderType::TAKE_SELL, - OrderType::BUY_PO, - OrderType::SELL_PO, - OrderType::BUY_ATOMIC, - OrderType::SELL_ATOMIC, - ]; - values - } -} - -impl ::std::marker::Copy for OrderType { -} - -impl ::std::default::Default for OrderType { - fn default() -> Self { - OrderType::UNSPECIFIED - } -} - -impl ::protobuf::reflect::ProtobufValue for OrderType { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum ExecutionType { - UnspecifiedExecutionType = 0, - Market = 1, - LimitFill = 2, - LimitMatchRestingOrder = 3, - LimitMatchNewOrder = 4, - MarketLiquidation = 5, - ExpiryMarketSettlement = 6, -} - -impl ::protobuf::ProtobufEnum for ExecutionType { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ExecutionType::UnspecifiedExecutionType), - 1 => ::std::option::Option::Some(ExecutionType::Market), - 2 => ::std::option::Option::Some(ExecutionType::LimitFill), - 3 => ::std::option::Option::Some(ExecutionType::LimitMatchRestingOrder), - 4 => ::std::option::Option::Some(ExecutionType::LimitMatchNewOrder), - 5 => ::std::option::Option::Some(ExecutionType::MarketLiquidation), - 6 => ::std::option::Option::Some(ExecutionType::ExpiryMarketSettlement), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [ExecutionType] = &[ - ExecutionType::UnspecifiedExecutionType, - ExecutionType::Market, - ExecutionType::LimitFill, - ExecutionType::LimitMatchRestingOrder, - ExecutionType::LimitMatchNewOrder, - ExecutionType::MarketLiquidation, - ExecutionType::ExpiryMarketSettlement, - ]; - values - } -} - -impl ::std::marker::Copy for ExecutionType { -} - -impl ::std::default::Default for ExecutionType { - fn default() -> Self { - ExecutionType::UnspecifiedExecutionType - } -} - -impl ::protobuf::reflect::ProtobufValue for ExecutionType { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum OrderMask { - UNUSED = 0, - ANY = 1, - REGULAR = 2, - CONDITIONAL = 4, - DIRECTION_BUY_OR_HIGHER = 8, - DIRECTION_SELL_OR_LOWER = 16, - TYPE_MARKET = 32, - TYPE_LIMIT = 64, -} - -impl ::protobuf::ProtobufEnum for OrderMask { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(OrderMask::UNUSED), - 1 => ::std::option::Option::Some(OrderMask::ANY), - 2 => ::std::option::Option::Some(OrderMask::REGULAR), - 4 => ::std::option::Option::Some(OrderMask::CONDITIONAL), - 8 => ::std::option::Option::Some(OrderMask::DIRECTION_BUY_OR_HIGHER), - 16 => ::std::option::Option::Some(OrderMask::DIRECTION_SELL_OR_LOWER), - 32 => ::std::option::Option::Some(OrderMask::TYPE_MARKET), - 64 => ::std::option::Option::Some(OrderMask::TYPE_LIMIT), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [OrderMask] = &[ - OrderMask::UNUSED, - OrderMask::ANY, - OrderMask::REGULAR, - OrderMask::CONDITIONAL, - OrderMask::DIRECTION_BUY_OR_HIGHER, - OrderMask::DIRECTION_SELL_OR_LOWER, - OrderMask::TYPE_MARKET, - OrderMask::TYPE_LIMIT, - ]; - values - } -} - -impl ::std::marker::Copy for OrderMask { -} - -impl ::std::default::Default for OrderMask { - fn default() -> Self { - OrderMask::UNUSED - } -} - -impl ::protobuf::reflect::ProtobufValue for OrderMask { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) - } -} diff --git a/packages/injective-protobuf/src/proto/mod.rs b/packages/injective-protobuf/src/proto/mod.rs deleted file mode 100644 index de6005c4..00000000 --- a/packages/injective-protobuf/src/proto/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -// @generated - -pub mod auth; -pub mod coin; -pub mod distribution; -pub mod exchange; -pub mod tx; -pub mod oracle; -pub mod account; diff --git a/packages/injective-protobuf/src/proto/oracle.rs b/packages/injective-protobuf/src/proto/oracle.rs deleted file mode 100644 index 12caaeb0..00000000 --- a/packages/injective-protobuf/src/proto/oracle.rs +++ /dev/null @@ -1,5059 +0,0 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `injective/oracle/v1beta1/oracle.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct Params { - // message fields - pub pyth_contract: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a Params { - fn default() -> &'a Params { - ::default_instance() - } -} - -impl Params { - pub fn new() -> Params { - ::std::default::Default::default() - } - - // string pyth_contract = 1; - - - pub fn get_pyth_contract(&self) -> &str { - &self.pyth_contract - } - pub fn clear_pyth_contract(&mut self) { - self.pyth_contract.clear(); - } - - // Param is passed by value, moved - pub fn set_pyth_contract(&mut self, v: ::std::string::String) { - self.pyth_contract = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_pyth_contract(&mut self) -> &mut ::std::string::String { - &mut self.pyth_contract - } - - // Take field - pub fn take_pyth_contract(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.pyth_contract, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for Params { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.pyth_contract)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.pyth_contract.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.pyth_contract); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.pyth_contract.is_empty() { - os.write_string(1, &self.pyth_contract)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> Params { - Params::new() - } - - fn default_instance() -> &'static Params { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(Params::new) - } -} - -impl ::protobuf::Clear for Params { - fn clear(&mut self) { - self.pyth_contract.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for Params { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct OracleInfo { - // message fields - pub symbol: ::std::string::String, - pub oracle_type: OracleType, - pub scale_factor: u32, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a OracleInfo { - fn default() -> &'a OracleInfo { - ::default_instance() - } -} - -impl OracleInfo { - pub fn new() -> OracleInfo { - ::std::default::Default::default() - } - - // string symbol = 1; - - - pub fn get_symbol(&self) -> &str { - &self.symbol - } - pub fn clear_symbol(&mut self) { - self.symbol.clear(); - } - - // Param is passed by value, moved - pub fn set_symbol(&mut self, v: ::std::string::String) { - self.symbol = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_symbol(&mut self) -> &mut ::std::string::String { - &mut self.symbol - } - - // Take field - pub fn take_symbol(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.symbol, ::std::string::String::new()) - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 2; - - - pub fn get_oracle_type(&self) -> OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: OracleType) { - self.oracle_type = v; - } - - // uint32 scale_factor = 3; - - - pub fn get_scale_factor(&self) -> u32 { - self.scale_factor - } - pub fn clear_scale_factor(&mut self) { - self.scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_scale_factor(&mut self, v: u32) { - self.scale_factor = v; - } -} - -impl ::protobuf::Message for OracleInfo { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.symbol)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 2, &mut self.unknown_fields)? - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.scale_factor = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.symbol.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.symbol); - } - if self.oracle_type != OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(2, self.oracle_type); - } - if self.scale_factor != 0 { - my_size += ::protobuf::rt::value_size(3, self.scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.symbol.is_empty() { - os.write_string(1, &self.symbol)?; - } - if self.oracle_type != OracleType::Unspecified { - os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - if self.scale_factor != 0 { - os.write_uint32(3, self.scale_factor)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> OracleInfo { - OracleInfo::new() - } - - fn default_instance() -> &'static OracleInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(OracleInfo::new) - } -} - -impl ::protobuf::Clear for OracleInfo { - fn clear(&mut self) { - self.symbol.clear(); - self.oracle_type = OracleType::Unspecified; - self.scale_factor = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for OracleInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ChainlinkPriceState { - // message fields - pub feed_id: ::std::string::String, - pub answer: ::std::string::String, - pub timestamp: u64, - pub price_state: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ChainlinkPriceState { - fn default() -> &'a ChainlinkPriceState { - ::default_instance() - } -} - -impl ChainlinkPriceState { - pub fn new() -> ChainlinkPriceState { - ::std::default::Default::default() - } - - // string feed_id = 1; - - - pub fn get_feed_id(&self) -> &str { - &self.feed_id - } - pub fn clear_feed_id(&mut self) { - self.feed_id.clear(); - } - - // Param is passed by value, moved - pub fn set_feed_id(&mut self, v: ::std::string::String) { - self.feed_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_feed_id(&mut self) -> &mut ::std::string::String { - &mut self.feed_id - } - - // Take field - pub fn take_feed_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.feed_id, ::std::string::String::new()) - } - - // string answer = 2; - - - pub fn get_answer(&self) -> &str { - &self.answer - } - pub fn clear_answer(&mut self) { - self.answer.clear(); - } - - // Param is passed by value, moved - pub fn set_answer(&mut self, v: ::std::string::String) { - self.answer = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_answer(&mut self) -> &mut ::std::string::String { - &mut self.answer - } - - // Take field - pub fn take_answer(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.answer, ::std::string::String::new()) - } - - // uint64 timestamp = 3; - - - pub fn get_timestamp(&self) -> u64 { - self.timestamp - } - pub fn clear_timestamp(&mut self) { - self.timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_timestamp(&mut self, v: u64) { - self.timestamp = v; - } - - // .injective.oracle.v1beta1.PriceState price_state = 4; - - - pub fn get_price_state(&self) -> &PriceState { - self.price_state.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_price_state(&mut self) { - self.price_state.clear(); - } - - pub fn has_price_state(&self) -> bool { - self.price_state.is_some() - } - - // Param is passed by value, moved - pub fn set_price_state(&mut self, v: PriceState) { - self.price_state = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price_state(&mut self) -> &mut PriceState { - if self.price_state.is_none() { - self.price_state.set_default(); - } - self.price_state.as_mut().unwrap() - } - - // Take field - pub fn take_price_state(&mut self) -> PriceState { - self.price_state.take().unwrap_or_else(|| PriceState::new()) - } -} - -impl ::protobuf::Message for ChainlinkPriceState { - fn is_initialized(&self) -> bool { - for v in &self.price_state { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.feed_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.answer)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.timestamp = tmp; - }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.price_state)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.feed_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.feed_id); - } - if !self.answer.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.answer); - } - if self.timestamp != 0 { - my_size += ::protobuf::rt::value_size(3, self.timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if let Some(ref v) = self.price_state.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.feed_id.is_empty() { - os.write_string(1, &self.feed_id)?; - } - if !self.answer.is_empty() { - os.write_string(2, &self.answer)?; - } - if self.timestamp != 0 { - os.write_uint64(3, self.timestamp)?; - } - if let Some(ref v) = self.price_state.as_ref() { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ChainlinkPriceState { - ChainlinkPriceState::new() - } - - fn default_instance() -> &'static ChainlinkPriceState { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ChainlinkPriceState::new) - } -} - -impl ::protobuf::Clear for ChainlinkPriceState { - fn clear(&mut self) { - self.feed_id.clear(); - self.answer.clear(); - self.timestamp = 0; - self.price_state.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ChainlinkPriceState { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BandPriceState { - // message fields - pub symbol: ::std::string::String, - pub rate: ::std::string::String, - pub resolve_time: u64, - pub request_ID: u64, - pub price_state: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BandPriceState { - fn default() -> &'a BandPriceState { - ::default_instance() - } -} - -impl BandPriceState { - pub fn new() -> BandPriceState { - ::std::default::Default::default() - } - - // string symbol = 1; - - - pub fn get_symbol(&self) -> &str { - &self.symbol - } - pub fn clear_symbol(&mut self) { - self.symbol.clear(); - } - - // Param is passed by value, moved - pub fn set_symbol(&mut self, v: ::std::string::String) { - self.symbol = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_symbol(&mut self) -> &mut ::std::string::String { - &mut self.symbol - } - - // Take field - pub fn take_symbol(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.symbol, ::std::string::String::new()) - } - - // string rate = 2; - - - pub fn get_rate(&self) -> &str { - &self.rate - } - pub fn clear_rate(&mut self) { - self.rate.clear(); - } - - // Param is passed by value, moved - pub fn set_rate(&mut self, v: ::std::string::String) { - self.rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_rate(&mut self) -> &mut ::std::string::String { - &mut self.rate - } - - // Take field - pub fn take_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.rate, ::std::string::String::new()) - } - - // uint64 resolve_time = 3; - - - pub fn get_resolve_time(&self) -> u64 { - self.resolve_time - } - pub fn clear_resolve_time(&mut self) { - self.resolve_time = 0; - } - - // Param is passed by value, moved - pub fn set_resolve_time(&mut self, v: u64) { - self.resolve_time = v; - } - - // uint64 request_ID = 4; - - - pub fn get_request_ID(&self) -> u64 { - self.request_ID - } - pub fn clear_request_ID(&mut self) { - self.request_ID = 0; - } - - // Param is passed by value, moved - pub fn set_request_ID(&mut self, v: u64) { - self.request_ID = v; - } - - // .injective.oracle.v1beta1.PriceState price_state = 5; - - - pub fn get_price_state(&self) -> &PriceState { - self.price_state.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_price_state(&mut self) { - self.price_state.clear(); - } - - pub fn has_price_state(&self) -> bool { - self.price_state.is_some() - } - - // Param is passed by value, moved - pub fn set_price_state(&mut self, v: PriceState) { - self.price_state = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price_state(&mut self) -> &mut PriceState { - if self.price_state.is_none() { - self.price_state.set_default(); - } - self.price_state.as_mut().unwrap() - } - - // Take field - pub fn take_price_state(&mut self) -> PriceState { - self.price_state.take().unwrap_or_else(|| PriceState::new()) - } -} - -impl ::protobuf::Message for BandPriceState { - fn is_initialized(&self) -> bool { - for v in &self.price_state { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.symbol)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.rate)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.resolve_time = tmp; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.request_ID = tmp; - }, - 5 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.price_state)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.symbol.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.symbol); - } - if !self.rate.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.rate); - } - if self.resolve_time != 0 { - my_size += ::protobuf::rt::value_size(3, self.resolve_time, ::protobuf::wire_format::WireTypeVarint); - } - if self.request_ID != 0 { - my_size += ::protobuf::rt::value_size(4, self.request_ID, ::protobuf::wire_format::WireTypeVarint); - } - if let Some(ref v) = self.price_state.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.symbol.is_empty() { - os.write_string(1, &self.symbol)?; - } - if !self.rate.is_empty() { - os.write_string(2, &self.rate)?; - } - if self.resolve_time != 0 { - os.write_uint64(3, self.resolve_time)?; - } - if self.request_ID != 0 { - os.write_uint64(4, self.request_ID)?; - } - if let Some(ref v) = self.price_state.as_ref() { - os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BandPriceState { - BandPriceState::new() - } - - fn default_instance() -> &'static BandPriceState { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BandPriceState::new) - } -} - -impl ::protobuf::Clear for BandPriceState { - fn clear(&mut self) { - self.symbol.clear(); - self.rate.clear(); - self.resolve_time = 0; - self.request_ID = 0; - self.price_state.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for BandPriceState { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PriceFeedState { - // message fields - pub base: ::std::string::String, - pub quote: ::std::string::String, - pub price_state: ::protobuf::SingularPtrField, - pub relayers: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PriceFeedState { - fn default() -> &'a PriceFeedState { - ::default_instance() - } -} - -impl PriceFeedState { - pub fn new() -> PriceFeedState { - ::std::default::Default::default() - } - - // string base = 1; - - - pub fn get_base(&self) -> &str { - &self.base - } - pub fn clear_base(&mut self) { - self.base.clear(); - } - - // Param is passed by value, moved - pub fn set_base(&mut self, v: ::std::string::String) { - self.base = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_base(&mut self) -> &mut ::std::string::String { - &mut self.base - } - - // Take field - pub fn take_base(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.base, ::std::string::String::new()) - } - - // string quote = 2; - - - pub fn get_quote(&self) -> &str { - &self.quote - } - pub fn clear_quote(&mut self) { - self.quote.clear(); - } - - // Param is passed by value, moved - pub fn set_quote(&mut self, v: ::std::string::String) { - self.quote = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote(&mut self) -> &mut ::std::string::String { - &mut self.quote - } - - // Take field - pub fn take_quote(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote, ::std::string::String::new()) - } - - // .injective.oracle.v1beta1.PriceState price_state = 3; - - - pub fn get_price_state(&self) -> &PriceState { - self.price_state.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_price_state(&mut self) { - self.price_state.clear(); - } - - pub fn has_price_state(&self) -> bool { - self.price_state.is_some() - } - - // Param is passed by value, moved - pub fn set_price_state(&mut self, v: PriceState) { - self.price_state = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price_state(&mut self) -> &mut PriceState { - if self.price_state.is_none() { - self.price_state.set_default(); - } - self.price_state.as_mut().unwrap() - } - - // Take field - pub fn take_price_state(&mut self) -> PriceState { - self.price_state.take().unwrap_or_else(|| PriceState::new()) - } - - // repeated string relayers = 4; - - - pub fn get_relayers(&self) -> &[::std::string::String] { - &self.relayers - } - pub fn clear_relayers(&mut self) { - self.relayers.clear(); - } - - // Param is passed by value, moved - pub fn set_relayers(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.relayers = v; - } - - // Mutable pointer to the field. - pub fn mut_relayers(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.relayers - } - - // Take field - pub fn take_relayers(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.relayers, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for PriceFeedState { - fn is_initialized(&self) -> bool { - for v in &self.price_state { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.base)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote)?; - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.price_state)?; - }, - 4 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.relayers)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.base.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.base); - } - if !self.quote.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.quote); - } - if let Some(ref v) = self.price_state.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - for value in &self.relayers { - my_size += ::protobuf::rt::string_size(4, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.base.is_empty() { - os.write_string(1, &self.base)?; - } - if !self.quote.is_empty() { - os.write_string(2, &self.quote)?; - } - if let Some(ref v) = self.price_state.as_ref() { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - for v in &self.relayers { - os.write_string(4, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PriceFeedState { - PriceFeedState::new() - } - - fn default_instance() -> &'static PriceFeedState { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PriceFeedState::new) - } -} - -impl ::protobuf::Clear for PriceFeedState { - fn clear(&mut self) { - self.base.clear(); - self.quote.clear(); - self.price_state.clear(); - self.relayers.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PriceFeedState { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ProviderInfo { - // message fields - pub provider: ::std::string::String, - pub relayers: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ProviderInfo { - fn default() -> &'a ProviderInfo { - ::default_instance() - } -} - -impl ProviderInfo { - pub fn new() -> ProviderInfo { - ::std::default::Default::default() - } - - // string provider = 1; - - - pub fn get_provider(&self) -> &str { - &self.provider - } - pub fn clear_provider(&mut self) { - self.provider.clear(); - } - - // Param is passed by value, moved - pub fn set_provider(&mut self, v: ::std::string::String) { - self.provider = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_provider(&mut self) -> &mut ::std::string::String { - &mut self.provider - } - - // Take field - pub fn take_provider(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.provider, ::std::string::String::new()) - } - - // repeated string relayers = 2; - - - pub fn get_relayers(&self) -> &[::std::string::String] { - &self.relayers - } - pub fn clear_relayers(&mut self) { - self.relayers.clear(); - } - - // Param is passed by value, moved - pub fn set_relayers(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.relayers = v; - } - - // Mutable pointer to the field. - pub fn mut_relayers(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.relayers - } - - // Take field - pub fn take_relayers(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.relayers, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for ProviderInfo { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.provider)?; - }, - 2 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.relayers)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.provider.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.provider); - } - for value in &self.relayers { - my_size += ::protobuf::rt::string_size(2, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.provider.is_empty() { - os.write_string(1, &self.provider)?; - } - for v in &self.relayers { - os.write_string(2, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ProviderInfo { - ProviderInfo::new() - } - - fn default_instance() -> &'static ProviderInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ProviderInfo::new) - } -} - -impl ::protobuf::Clear for ProviderInfo { - fn clear(&mut self) { - self.provider.clear(); - self.relayers.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ProviderInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ProviderState { - // message fields - pub provider_info: ::protobuf::SingularPtrField, - pub provider_price_states: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ProviderState { - fn default() -> &'a ProviderState { - ::default_instance() - } -} - -impl ProviderState { - pub fn new() -> ProviderState { - ::std::default::Default::default() - } - - // .injective.oracle.v1beta1.ProviderInfo provider_info = 1; - - - pub fn get_provider_info(&self) -> &ProviderInfo { - self.provider_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_provider_info(&mut self) { - self.provider_info.clear(); - } - - pub fn has_provider_info(&self) -> bool { - self.provider_info.is_some() - } - - // Param is passed by value, moved - pub fn set_provider_info(&mut self, v: ProviderInfo) { - self.provider_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_provider_info(&mut self) -> &mut ProviderInfo { - if self.provider_info.is_none() { - self.provider_info.set_default(); - } - self.provider_info.as_mut().unwrap() - } - - // Take field - pub fn take_provider_info(&mut self) -> ProviderInfo { - self.provider_info.take().unwrap_or_else(|| ProviderInfo::new()) - } - - // repeated .injective.oracle.v1beta1.ProviderPriceState provider_price_states = 2; - - - pub fn get_provider_price_states(&self) -> &[ProviderPriceState] { - &self.provider_price_states - } - pub fn clear_provider_price_states(&mut self) { - self.provider_price_states.clear(); - } - - // Param is passed by value, moved - pub fn set_provider_price_states(&mut self, v: ::protobuf::RepeatedField) { - self.provider_price_states = v; - } - - // Mutable pointer to the field. - pub fn mut_provider_price_states(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.provider_price_states - } - - // Take field - pub fn take_provider_price_states(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.provider_price_states, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for ProviderState { - fn is_initialized(&self) -> bool { - for v in &self.provider_info { - if !v.is_initialized() { - return false; - } - }; - for v in &self.provider_price_states { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.provider_info)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.provider_price_states)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.provider_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - for value in &self.provider_price_states { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.provider_info.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - for v in &self.provider_price_states { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ProviderState { - ProviderState::new() - } - - fn default_instance() -> &'static ProviderState { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ProviderState::new) - } -} - -impl ::protobuf::Clear for ProviderState { - fn clear(&mut self) { - self.provider_info.clear(); - self.provider_price_states.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ProviderState { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ProviderPriceState { - // message fields - pub symbol: ::std::string::String, - pub state: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ProviderPriceState { - fn default() -> &'a ProviderPriceState { - ::default_instance() - } -} - -impl ProviderPriceState { - pub fn new() -> ProviderPriceState { - ::std::default::Default::default() - } - - // string symbol = 1; - - - pub fn get_symbol(&self) -> &str { - &self.symbol - } - pub fn clear_symbol(&mut self) { - self.symbol.clear(); - } - - // Param is passed by value, moved - pub fn set_symbol(&mut self, v: ::std::string::String) { - self.symbol = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_symbol(&mut self) -> &mut ::std::string::String { - &mut self.symbol - } - - // Take field - pub fn take_symbol(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.symbol, ::std::string::String::new()) - } - - // .injective.oracle.v1beta1.PriceState state = 2; - - - pub fn get_state(&self) -> &PriceState { - self.state.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_state(&mut self) { - self.state.clear(); - } - - pub fn has_state(&self) -> bool { - self.state.is_some() - } - - // Param is passed by value, moved - pub fn set_state(&mut self, v: PriceState) { - self.state = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_state(&mut self) -> &mut PriceState { - if self.state.is_none() { - self.state.set_default(); - } - self.state.as_mut().unwrap() - } - - // Take field - pub fn take_state(&mut self) -> PriceState { - self.state.take().unwrap_or_else(|| PriceState::new()) - } -} - -impl ::protobuf::Message for ProviderPriceState { - fn is_initialized(&self) -> bool { - for v in &self.state { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.symbol)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.state)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.symbol.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.symbol); - } - if let Some(ref v) = self.state.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.symbol.is_empty() { - os.write_string(1, &self.symbol)?; - } - if let Some(ref v) = self.state.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ProviderPriceState { - ProviderPriceState::new() - } - - fn default_instance() -> &'static ProviderPriceState { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ProviderPriceState::new) - } -} - -impl ::protobuf::Clear for ProviderPriceState { - fn clear(&mut self) { - self.symbol.clear(); - self.state.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ProviderPriceState { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PriceFeedInfo { - // message fields - pub base: ::std::string::String, - pub quote: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PriceFeedInfo { - fn default() -> &'a PriceFeedInfo { - ::default_instance() - } -} - -impl PriceFeedInfo { - pub fn new() -> PriceFeedInfo { - ::std::default::Default::default() - } - - // string base = 1; - - - pub fn get_base(&self) -> &str { - &self.base - } - pub fn clear_base(&mut self) { - self.base.clear(); - } - - // Param is passed by value, moved - pub fn set_base(&mut self, v: ::std::string::String) { - self.base = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_base(&mut self) -> &mut ::std::string::String { - &mut self.base - } - - // Take field - pub fn take_base(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.base, ::std::string::String::new()) - } - - // string quote = 2; - - - pub fn get_quote(&self) -> &str { - &self.quote - } - pub fn clear_quote(&mut self) { - self.quote.clear(); - } - - // Param is passed by value, moved - pub fn set_quote(&mut self, v: ::std::string::String) { - self.quote = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote(&mut self) -> &mut ::std::string::String { - &mut self.quote - } - - // Take field - pub fn take_quote(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for PriceFeedInfo { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.base)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.base.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.base); - } - if !self.quote.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.quote); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.base.is_empty() { - os.write_string(1, &self.base)?; - } - if !self.quote.is_empty() { - os.write_string(2, &self.quote)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PriceFeedInfo { - PriceFeedInfo::new() - } - - fn default_instance() -> &'static PriceFeedInfo { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PriceFeedInfo::new) - } -} - -impl ::protobuf::Clear for PriceFeedInfo { - fn clear(&mut self) { - self.base.clear(); - self.quote.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PriceFeedInfo { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PriceFeedPrice { - // message fields - pub price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PriceFeedPrice { - fn default() -> &'a PriceFeedPrice { - ::default_instance() - } -} - -impl PriceFeedPrice { - pub fn new() -> PriceFeedPrice { - ::std::default::Default::default() - } - - // string price = 1; - - - pub fn get_price(&self) -> &str { - &self.price - } - pub fn clear_price(&mut self) { - self.price.clear(); - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: ::std::string::String) { - self.price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price(&mut self) -> &mut ::std::string::String { - &mut self.price - } - - // Take field - pub fn take_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for PriceFeedPrice { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.price.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.price.is_empty() { - os.write_string(1, &self.price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PriceFeedPrice { - PriceFeedPrice::new() - } - - fn default_instance() -> &'static PriceFeedPrice { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PriceFeedPrice::new) - } -} - -impl ::protobuf::Clear for PriceFeedPrice { - fn clear(&mut self) { - self.price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PriceFeedPrice { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct CoinbasePriceState { - // message fields - pub kind: ::std::string::String, - pub timestamp: u64, - pub key: ::std::string::String, - pub value: u64, - pub price_state: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CoinbasePriceState { - fn default() -> &'a CoinbasePriceState { - ::default_instance() - } -} - -impl CoinbasePriceState { - pub fn new() -> CoinbasePriceState { - ::std::default::Default::default() - } - - // string kind = 1; - - - pub fn get_kind(&self) -> &str { - &self.kind - } - pub fn clear_kind(&mut self) { - self.kind.clear(); - } - - // Param is passed by value, moved - pub fn set_kind(&mut self, v: ::std::string::String) { - self.kind = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_kind(&mut self) -> &mut ::std::string::String { - &mut self.kind - } - - // Take field - pub fn take_kind(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.kind, ::std::string::String::new()) - } - - // uint64 timestamp = 2; - - - pub fn get_timestamp(&self) -> u64 { - self.timestamp - } - pub fn clear_timestamp(&mut self) { - self.timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_timestamp(&mut self, v: u64) { - self.timestamp = v; - } - - // string key = 3; - - - pub fn get_key(&self) -> &str { - &self.key - } - pub fn clear_key(&mut self) { - self.key.clear(); - } - - // Param is passed by value, moved - pub fn set_key(&mut self, v: ::std::string::String) { - self.key = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_key(&mut self) -> &mut ::std::string::String { - &mut self.key - } - - // Take field - pub fn take_key(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.key, ::std::string::String::new()) - } - - // uint64 value = 4; - - - pub fn get_value(&self) -> u64 { - self.value - } - pub fn clear_value(&mut self) { - self.value = 0; - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: u64) { - self.value = v; - } - - // .injective.oracle.v1beta1.PriceState price_state = 5; - - - pub fn get_price_state(&self) -> &PriceState { - self.price_state.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_price_state(&mut self) { - self.price_state.clear(); - } - - pub fn has_price_state(&self) -> bool { - self.price_state.is_some() - } - - // Param is passed by value, moved - pub fn set_price_state(&mut self, v: PriceState) { - self.price_state = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price_state(&mut self) -> &mut PriceState { - if self.price_state.is_none() { - self.price_state.set_default(); - } - self.price_state.as_mut().unwrap() - } - - // Take field - pub fn take_price_state(&mut self) -> PriceState { - self.price_state.take().unwrap_or_else(|| PriceState::new()) - } -} - -impl ::protobuf::Message for CoinbasePriceState { - fn is_initialized(&self) -> bool { - for v in &self.price_state { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.kind)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.timestamp = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.key)?; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.value = tmp; - }, - 5 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.price_state)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.kind.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.kind); - } - if self.timestamp != 0 { - my_size += ::protobuf::rt::value_size(2, self.timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if !self.key.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.key); - } - if self.value != 0 { - my_size += ::protobuf::rt::value_size(4, self.value, ::protobuf::wire_format::WireTypeVarint); - } - if let Some(ref v) = self.price_state.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.kind.is_empty() { - os.write_string(1, &self.kind)?; - } - if self.timestamp != 0 { - os.write_uint64(2, self.timestamp)?; - } - if !self.key.is_empty() { - os.write_string(3, &self.key)?; - } - if self.value != 0 { - os.write_uint64(4, self.value)?; - } - if let Some(ref v) = self.price_state.as_ref() { - os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CoinbasePriceState { - CoinbasePriceState::new() - } - - fn default_instance() -> &'static CoinbasePriceState { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(CoinbasePriceState::new) - } -} - -impl ::protobuf::Clear for CoinbasePriceState { - fn clear(&mut self) { - self.kind.clear(); - self.timestamp = 0; - self.key.clear(); - self.value = 0; - self.price_state.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for CoinbasePriceState { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PriceState { - // message fields - pub price: ::std::string::String, - pub cumulative_price: ::std::string::String, - pub timestamp: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PriceState { - fn default() -> &'a PriceState { - ::default_instance() - } -} - -impl PriceState { - pub fn new() -> PriceState { - ::std::default::Default::default() - } - - // string price = 1; - - - pub fn get_price(&self) -> &str { - &self.price - } - pub fn clear_price(&mut self) { - self.price.clear(); - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: ::std::string::String) { - self.price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price(&mut self) -> &mut ::std::string::String { - &mut self.price - } - - // Take field - pub fn take_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price, ::std::string::String::new()) - } - - // string cumulative_price = 2; - - - pub fn get_cumulative_price(&self) -> &str { - &self.cumulative_price - } - pub fn clear_cumulative_price(&mut self) { - self.cumulative_price.clear(); - } - - // Param is passed by value, moved - pub fn set_cumulative_price(&mut self, v: ::std::string::String) { - self.cumulative_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_cumulative_price(&mut self) -> &mut ::std::string::String { - &mut self.cumulative_price - } - - // Take field - pub fn take_cumulative_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.cumulative_price, ::std::string::String::new()) - } - - // int64 timestamp = 3; - - - pub fn get_timestamp(&self) -> i64 { - self.timestamp - } - pub fn clear_timestamp(&mut self) { - self.timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_timestamp(&mut self, v: i64) { - self.timestamp = v; - } -} - -impl ::protobuf::Message for PriceState { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.cumulative_price)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.timestamp = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.price.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.price); - } - if !self.cumulative_price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.cumulative_price); - } - if self.timestamp != 0 { - my_size += ::protobuf::rt::value_size(3, self.timestamp, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.price.is_empty() { - os.write_string(1, &self.price)?; - } - if !self.cumulative_price.is_empty() { - os.write_string(2, &self.cumulative_price)?; - } - if self.timestamp != 0 { - os.write_int64(3, self.timestamp)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PriceState { - PriceState::new() - } - - fn default_instance() -> &'static PriceState { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PriceState::new) - } -} - -impl ::protobuf::Clear for PriceState { - fn clear(&mut self) { - self.price.clear(); - self.cumulative_price.clear(); - self.timestamp = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PriceState { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PythPriceState { - // message fields - pub price_id: ::std::string::String, - pub ema_price: ::std::string::String, - pub ema_conf: ::std::string::String, - pub conf: ::std::string::String, - pub publish_time: u64, - pub price_state: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PythPriceState { - fn default() -> &'a PythPriceState { - ::default_instance() - } -} - -impl PythPriceState { - pub fn new() -> PythPriceState { - ::std::default::Default::default() - } - - // string price_id = 1; - - - pub fn get_price_id(&self) -> &str { - &self.price_id - } - pub fn clear_price_id(&mut self) { - self.price_id.clear(); - } - - // Param is passed by value, moved - pub fn set_price_id(&mut self, v: ::std::string::String) { - self.price_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price_id(&mut self) -> &mut ::std::string::String { - &mut self.price_id - } - - // Take field - pub fn take_price_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price_id, ::std::string::String::new()) - } - - // string ema_price = 2; - - - pub fn get_ema_price(&self) -> &str { - &self.ema_price - } - pub fn clear_ema_price(&mut self) { - self.ema_price.clear(); - } - - // Param is passed by value, moved - pub fn set_ema_price(&mut self, v: ::std::string::String) { - self.ema_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ema_price(&mut self) -> &mut ::std::string::String { - &mut self.ema_price - } - - // Take field - pub fn take_ema_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ema_price, ::std::string::String::new()) - } - - // string ema_conf = 3; - - - pub fn get_ema_conf(&self) -> &str { - &self.ema_conf - } - pub fn clear_ema_conf(&mut self) { - self.ema_conf.clear(); - } - - // Param is passed by value, moved - pub fn set_ema_conf(&mut self, v: ::std::string::String) { - self.ema_conf = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ema_conf(&mut self) -> &mut ::std::string::String { - &mut self.ema_conf - } - - // Take field - pub fn take_ema_conf(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ema_conf, ::std::string::String::new()) - } - - // string conf = 4; - - - pub fn get_conf(&self) -> &str { - &self.conf - } - pub fn clear_conf(&mut self) { - self.conf.clear(); - } - - // Param is passed by value, moved - pub fn set_conf(&mut self, v: ::std::string::String) { - self.conf = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_conf(&mut self) -> &mut ::std::string::String { - &mut self.conf - } - - // Take field - pub fn take_conf(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.conf, ::std::string::String::new()) - } - - // uint64 publish_time = 5; - - - pub fn get_publish_time(&self) -> u64 { - self.publish_time - } - pub fn clear_publish_time(&mut self) { - self.publish_time = 0; - } - - // Param is passed by value, moved - pub fn set_publish_time(&mut self, v: u64) { - self.publish_time = v; - } - - // .injective.oracle.v1beta1.PriceState price_state = 6; - - - pub fn get_price_state(&self) -> &PriceState { - self.price_state.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_price_state(&mut self) { - self.price_state.clear(); - } - - pub fn has_price_state(&self) -> bool { - self.price_state.is_some() - } - - // Param is passed by value, moved - pub fn set_price_state(&mut self, v: PriceState) { - self.price_state = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price_state(&mut self) -> &mut PriceState { - if self.price_state.is_none() { - self.price_state.set_default(); - } - self.price_state.as_mut().unwrap() - } - - // Take field - pub fn take_price_state(&mut self) -> PriceState { - self.price_state.take().unwrap_or_else(|| PriceState::new()) - } -} - -impl ::protobuf::Message for PythPriceState { - fn is_initialized(&self) -> bool { - for v in &self.price_state { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ema_price)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ema_conf)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.conf)?; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.publish_time = tmp; - }, - 6 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.price_state)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.price_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.price_id); - } - if !self.ema_price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.ema_price); - } - if !self.ema_conf.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.ema_conf); - } - if !self.conf.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.conf); - } - if self.publish_time != 0 { - my_size += ::protobuf::rt::value_size(5, self.publish_time, ::protobuf::wire_format::WireTypeVarint); - } - if let Some(ref v) = self.price_state.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.price_id.is_empty() { - os.write_string(1, &self.price_id)?; - } - if !self.ema_price.is_empty() { - os.write_string(2, &self.ema_price)?; - } - if !self.ema_conf.is_empty() { - os.write_string(3, &self.ema_conf)?; - } - if !self.conf.is_empty() { - os.write_string(4, &self.conf)?; - } - if self.publish_time != 0 { - os.write_uint64(5, self.publish_time)?; - } - if let Some(ref v) = self.price_state.as_ref() { - os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PythPriceState { - PythPriceState::new() - } - - fn default_instance() -> &'static PythPriceState { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PythPriceState::new) - } -} - -impl ::protobuf::Clear for PythPriceState { - fn clear(&mut self) { - self.price_id.clear(); - self.ema_price.clear(); - self.ema_conf.clear(); - self.conf.clear(); - self.publish_time = 0; - self.price_state.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PythPriceState { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BandOracleRequest { - // message fields - pub request_id: u64, - pub oracle_script_id: i64, - pub symbols: ::protobuf::RepeatedField<::std::string::String>, - pub ask_count: u64, - pub min_count: u64, - pub fee_limit: ::protobuf::RepeatedField, - pub prepare_gas: u64, - pub execute_gas: u64, - pub min_source_count: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BandOracleRequest { - fn default() -> &'a BandOracleRequest { - ::default_instance() - } -} - -impl BandOracleRequest { - pub fn new() -> BandOracleRequest { - ::std::default::Default::default() - } - - // uint64 request_id = 1; - - - pub fn get_request_id(&self) -> u64 { - self.request_id - } - pub fn clear_request_id(&mut self) { - self.request_id = 0; - } - - // Param is passed by value, moved - pub fn set_request_id(&mut self, v: u64) { - self.request_id = v; - } - - // int64 oracle_script_id = 2; - - - pub fn get_oracle_script_id(&self) -> i64 { - self.oracle_script_id - } - pub fn clear_oracle_script_id(&mut self) { - self.oracle_script_id = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_script_id(&mut self, v: i64) { - self.oracle_script_id = v; - } - - // repeated string symbols = 3; - - - pub fn get_symbols(&self) -> &[::std::string::String] { - &self.symbols - } - pub fn clear_symbols(&mut self) { - self.symbols.clear(); - } - - // Param is passed by value, moved - pub fn set_symbols(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.symbols = v; - } - - // Mutable pointer to the field. - pub fn mut_symbols(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.symbols - } - - // Take field - pub fn take_symbols(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.symbols, ::protobuf::RepeatedField::new()) - } - - // uint64 ask_count = 4; - - - pub fn get_ask_count(&self) -> u64 { - self.ask_count - } - pub fn clear_ask_count(&mut self) { - self.ask_count = 0; - } - - // Param is passed by value, moved - pub fn set_ask_count(&mut self, v: u64) { - self.ask_count = v; - } - - // uint64 min_count = 5; - - - pub fn get_min_count(&self) -> u64 { - self.min_count - } - pub fn clear_min_count(&mut self) { - self.min_count = 0; - } - - // Param is passed by value, moved - pub fn set_min_count(&mut self, v: u64) { - self.min_count = v; - } - - // repeated .cosmos.base.v1beta1.Coin fee_limit = 6; - - - pub fn get_fee_limit(&self) -> &[super::coin::Coin] { - &self.fee_limit - } - pub fn clear_fee_limit(&mut self) { - self.fee_limit.clear(); - } - - // Param is passed by value, moved - pub fn set_fee_limit(&mut self, v: ::protobuf::RepeatedField) { - self.fee_limit = v; - } - - // Mutable pointer to the field. - pub fn mut_fee_limit(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.fee_limit - } - - // Take field - pub fn take_fee_limit(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.fee_limit, ::protobuf::RepeatedField::new()) - } - - // uint64 prepare_gas = 7; - - - pub fn get_prepare_gas(&self) -> u64 { - self.prepare_gas - } - pub fn clear_prepare_gas(&mut self) { - self.prepare_gas = 0; - } - - // Param is passed by value, moved - pub fn set_prepare_gas(&mut self, v: u64) { - self.prepare_gas = v; - } - - // uint64 execute_gas = 8; - - - pub fn get_execute_gas(&self) -> u64 { - self.execute_gas - } - pub fn clear_execute_gas(&mut self) { - self.execute_gas = 0; - } - - // Param is passed by value, moved - pub fn set_execute_gas(&mut self, v: u64) { - self.execute_gas = v; - } - - // uint64 min_source_count = 9; - - - pub fn get_min_source_count(&self) -> u64 { - self.min_source_count - } - pub fn clear_min_source_count(&mut self) { - self.min_source_count = 0; - } - - // Param is passed by value, moved - pub fn set_min_source_count(&mut self, v: u64) { - self.min_source_count = v; - } -} - -impl ::protobuf::Message for BandOracleRequest { - fn is_initialized(&self) -> bool { - for v in &self.fee_limit { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.request_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.oracle_script_id = tmp; - }, - 3 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.symbols)?; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.ask_count = tmp; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.min_count = tmp; - }, - 6 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.fee_limit)?; - }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.prepare_gas = tmp; - }, - 8 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.execute_gas = tmp; - }, - 9 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.min_source_count = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.request_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.request_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.oracle_script_id != 0 { - my_size += ::protobuf::rt::value_size(2, self.oracle_script_id, ::protobuf::wire_format::WireTypeVarint); - } - for value in &self.symbols { - my_size += ::protobuf::rt::string_size(3, &value); - }; - if self.ask_count != 0 { - my_size += ::protobuf::rt::value_size(4, self.ask_count, ::protobuf::wire_format::WireTypeVarint); - } - if self.min_count != 0 { - my_size += ::protobuf::rt::value_size(5, self.min_count, ::protobuf::wire_format::WireTypeVarint); - } - for value in &self.fee_limit { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - if self.prepare_gas != 0 { - my_size += ::protobuf::rt::value_size(7, self.prepare_gas, ::protobuf::wire_format::WireTypeVarint); - } - if self.execute_gas != 0 { - my_size += ::protobuf::rt::value_size(8, self.execute_gas, ::protobuf::wire_format::WireTypeVarint); - } - if self.min_source_count != 0 { - my_size += ::protobuf::rt::value_size(9, self.min_source_count, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.request_id != 0 { - os.write_uint64(1, self.request_id)?; - } - if self.oracle_script_id != 0 { - os.write_int64(2, self.oracle_script_id)?; - } - for v in &self.symbols { - os.write_string(3, &v)?; - }; - if self.ask_count != 0 { - os.write_uint64(4, self.ask_count)?; - } - if self.min_count != 0 { - os.write_uint64(5, self.min_count)?; - } - for v in &self.fee_limit { - os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - if self.prepare_gas != 0 { - os.write_uint64(7, self.prepare_gas)?; - } - if self.execute_gas != 0 { - os.write_uint64(8, self.execute_gas)?; - } - if self.min_source_count != 0 { - os.write_uint64(9, self.min_source_count)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BandOracleRequest { - BandOracleRequest::new() - } - - fn default_instance() -> &'static BandOracleRequest { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BandOracleRequest::new) - } -} - -impl ::protobuf::Clear for BandOracleRequest { - fn clear(&mut self) { - self.request_id = 0; - self.oracle_script_id = 0; - self.symbols.clear(); - self.ask_count = 0; - self.min_count = 0; - self.fee_limit.clear(); - self.prepare_gas = 0; - self.execute_gas = 0; - self.min_source_count = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for BandOracleRequest { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BandIBCParams { - // message fields - pub band_ibc_enabled: bool, - pub ibc_request_interval: i64, - pub ibc_source_channel: ::std::string::String, - pub ibc_version: ::std::string::String, - pub ibc_port_id: ::std::string::String, - pub legacy_oracle_ids: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BandIBCParams { - fn default() -> &'a BandIBCParams { - ::default_instance() - } -} - -impl BandIBCParams { - pub fn new() -> BandIBCParams { - ::std::default::Default::default() - } - - // bool band_ibc_enabled = 1; - - - pub fn get_band_ibc_enabled(&self) -> bool { - self.band_ibc_enabled - } - pub fn clear_band_ibc_enabled(&mut self) { - self.band_ibc_enabled = false; - } - - // Param is passed by value, moved - pub fn set_band_ibc_enabled(&mut self, v: bool) { - self.band_ibc_enabled = v; - } - - // int64 ibc_request_interval = 2; - - - pub fn get_ibc_request_interval(&self) -> i64 { - self.ibc_request_interval - } - pub fn clear_ibc_request_interval(&mut self) { - self.ibc_request_interval = 0; - } - - // Param is passed by value, moved - pub fn set_ibc_request_interval(&mut self, v: i64) { - self.ibc_request_interval = v; - } - - // string ibc_source_channel = 3; - - - pub fn get_ibc_source_channel(&self) -> &str { - &self.ibc_source_channel - } - pub fn clear_ibc_source_channel(&mut self) { - self.ibc_source_channel.clear(); - } - - // Param is passed by value, moved - pub fn set_ibc_source_channel(&mut self, v: ::std::string::String) { - self.ibc_source_channel = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ibc_source_channel(&mut self) -> &mut ::std::string::String { - &mut self.ibc_source_channel - } - - // Take field - pub fn take_ibc_source_channel(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ibc_source_channel, ::std::string::String::new()) - } - - // string ibc_version = 4; - - - pub fn get_ibc_version(&self) -> &str { - &self.ibc_version - } - pub fn clear_ibc_version(&mut self) { - self.ibc_version.clear(); - } - - // Param is passed by value, moved - pub fn set_ibc_version(&mut self, v: ::std::string::String) { - self.ibc_version = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ibc_version(&mut self) -> &mut ::std::string::String { - &mut self.ibc_version - } - - // Take field - pub fn take_ibc_version(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ibc_version, ::std::string::String::new()) - } - - // string ibc_port_id = 5; - - - pub fn get_ibc_port_id(&self) -> &str { - &self.ibc_port_id - } - pub fn clear_ibc_port_id(&mut self) { - self.ibc_port_id.clear(); - } - - // Param is passed by value, moved - pub fn set_ibc_port_id(&mut self, v: ::std::string::String) { - self.ibc_port_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ibc_port_id(&mut self) -> &mut ::std::string::String { - &mut self.ibc_port_id - } - - // Take field - pub fn take_ibc_port_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ibc_port_id, ::std::string::String::new()) - } - - // repeated int64 legacy_oracle_ids = 6; - - - pub fn get_legacy_oracle_ids(&self) -> &[i64] { - &self.legacy_oracle_ids - } - pub fn clear_legacy_oracle_ids(&mut self) { - self.legacy_oracle_ids.clear(); - } - - // Param is passed by value, moved - pub fn set_legacy_oracle_ids(&mut self, v: ::std::vec::Vec) { - self.legacy_oracle_ids = v; - } - - // Mutable pointer to the field. - pub fn mut_legacy_oracle_ids(&mut self) -> &mut ::std::vec::Vec { - &mut self.legacy_oracle_ids - } - - // Take field - pub fn take_legacy_oracle_ids(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.legacy_oracle_ids, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for BandIBCParams { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.band_ibc_enabled = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.ibc_request_interval = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ibc_source_channel)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ibc_version)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ibc_port_id)?; - }, - 6 => { - ::protobuf::rt::read_repeated_int64_into(wire_type, is, &mut self.legacy_oracle_ids)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.band_ibc_enabled != false { - my_size += 2; - } - if self.ibc_request_interval != 0 { - my_size += ::protobuf::rt::value_size(2, self.ibc_request_interval, ::protobuf::wire_format::WireTypeVarint); - } - if !self.ibc_source_channel.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.ibc_source_channel); - } - if !self.ibc_version.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.ibc_version); - } - if !self.ibc_port_id.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.ibc_port_id); - } - for value in &self.legacy_oracle_ids { - my_size += ::protobuf::rt::value_size(6, *value, ::protobuf::wire_format::WireTypeVarint); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.band_ibc_enabled != false { - os.write_bool(1, self.band_ibc_enabled)?; - } - if self.ibc_request_interval != 0 { - os.write_int64(2, self.ibc_request_interval)?; - } - if !self.ibc_source_channel.is_empty() { - os.write_string(3, &self.ibc_source_channel)?; - } - if !self.ibc_version.is_empty() { - os.write_string(4, &self.ibc_version)?; - } - if !self.ibc_port_id.is_empty() { - os.write_string(5, &self.ibc_port_id)?; - } - for v in &self.legacy_oracle_ids { - os.write_int64(6, *v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BandIBCParams { - BandIBCParams::new() - } - - fn default_instance() -> &'static BandIBCParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BandIBCParams::new) - } -} - -impl ::protobuf::Clear for BandIBCParams { - fn clear(&mut self) { - self.band_ibc_enabled = false; - self.ibc_request_interval = 0; - self.ibc_source_channel.clear(); - self.ibc_version.clear(); - self.ibc_port_id.clear(); - self.legacy_oracle_ids.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for BandIBCParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SymbolPriceTimestamp { - // message fields - pub oracle: OracleType, - pub symbol_id: ::std::string::String, - pub timestamp: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SymbolPriceTimestamp { - fn default() -> &'a SymbolPriceTimestamp { - ::default_instance() - } -} - -impl SymbolPriceTimestamp { - pub fn new() -> SymbolPriceTimestamp { - ::std::default::Default::default() - } - - // .injective.oracle.v1beta1.OracleType oracle = 1; - - - pub fn get_oracle(&self) -> OracleType { - self.oracle - } - pub fn clear_oracle(&mut self) { - self.oracle = OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle(&mut self, v: OracleType) { - self.oracle = v; - } - - // string symbol_id = 2; - - - pub fn get_symbol_id(&self) -> &str { - &self.symbol_id - } - pub fn clear_symbol_id(&mut self) { - self.symbol_id.clear(); - } - - // Param is passed by value, moved - pub fn set_symbol_id(&mut self, v: ::std::string::String) { - self.symbol_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_symbol_id(&mut self) -> &mut ::std::string::String { - &mut self.symbol_id - } - - // Take field - pub fn take_symbol_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.symbol_id, ::std::string::String::new()) - } - - // int64 timestamp = 3; - - - pub fn get_timestamp(&self) -> i64 { - self.timestamp - } - pub fn clear_timestamp(&mut self) { - self.timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_timestamp(&mut self, v: i64) { - self.timestamp = v; - } -} - -impl ::protobuf::Message for SymbolPriceTimestamp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle, 1, &mut self.unknown_fields)? - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.symbol_id)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.timestamp = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.oracle != OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(1, self.oracle); - } - if !self.symbol_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.symbol_id); - } - if self.timestamp != 0 { - my_size += ::protobuf::rt::value_size(3, self.timestamp, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.oracle != OracleType::Unspecified { - os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.oracle))?; - } - if !self.symbol_id.is_empty() { - os.write_string(2, &self.symbol_id)?; - } - if self.timestamp != 0 { - os.write_int64(3, self.timestamp)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SymbolPriceTimestamp { - SymbolPriceTimestamp::new() - } - - fn default_instance() -> &'static SymbolPriceTimestamp { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SymbolPriceTimestamp::new) - } -} - -impl ::protobuf::Clear for SymbolPriceTimestamp { - fn clear(&mut self) { - self.oracle = OracleType::Unspecified; - self.symbol_id.clear(); - self.timestamp = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SymbolPriceTimestamp { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct LastPriceTimestamps { - // message fields - pub last_price_timestamps: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a LastPriceTimestamps { - fn default() -> &'a LastPriceTimestamps { - ::default_instance() - } -} - -impl LastPriceTimestamps { - pub fn new() -> LastPriceTimestamps { - ::std::default::Default::default() - } - - // repeated .injective.oracle.v1beta1.SymbolPriceTimestamp last_price_timestamps = 1; - - - pub fn get_last_price_timestamps(&self) -> &[SymbolPriceTimestamp] { - &self.last_price_timestamps - } - pub fn clear_last_price_timestamps(&mut self) { - self.last_price_timestamps.clear(); - } - - // Param is passed by value, moved - pub fn set_last_price_timestamps(&mut self, v: ::protobuf::RepeatedField) { - self.last_price_timestamps = v; - } - - // Mutable pointer to the field. - pub fn mut_last_price_timestamps(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.last_price_timestamps - } - - // Take field - pub fn take_last_price_timestamps(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.last_price_timestamps, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for LastPriceTimestamps { - fn is_initialized(&self) -> bool { - for v in &self.last_price_timestamps { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.last_price_timestamps)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.last_price_timestamps { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.last_price_timestamps { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> LastPriceTimestamps { - LastPriceTimestamps::new() - } - - fn default_instance() -> &'static LastPriceTimestamps { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(LastPriceTimestamps::new) - } -} - -impl ::protobuf::Clear for LastPriceTimestamps { - fn clear(&mut self) { - self.last_price_timestamps.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for LastPriceTimestamps { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PriceRecords { - // message fields - pub oracle: OracleType, - pub symbol_id: ::std::string::String, - pub latest_price_records: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PriceRecords { - fn default() -> &'a PriceRecords { - ::default_instance() - } -} - -impl PriceRecords { - pub fn new() -> PriceRecords { - ::std::default::Default::default() - } - - // .injective.oracle.v1beta1.OracleType oracle = 1; - - - pub fn get_oracle(&self) -> OracleType { - self.oracle - } - pub fn clear_oracle(&mut self) { - self.oracle = OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle(&mut self, v: OracleType) { - self.oracle = v; - } - - // string symbol_id = 2; - - - pub fn get_symbol_id(&self) -> &str { - &self.symbol_id - } - pub fn clear_symbol_id(&mut self) { - self.symbol_id.clear(); - } - - // Param is passed by value, moved - pub fn set_symbol_id(&mut self, v: ::std::string::String) { - self.symbol_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_symbol_id(&mut self) -> &mut ::std::string::String { - &mut self.symbol_id - } - - // Take field - pub fn take_symbol_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.symbol_id, ::std::string::String::new()) - } - - // repeated .injective.oracle.v1beta1.PriceRecord latest_price_records = 3; - - - pub fn get_latest_price_records(&self) -> &[PriceRecord] { - &self.latest_price_records - } - pub fn clear_latest_price_records(&mut self) { - self.latest_price_records.clear(); - } - - // Param is passed by value, moved - pub fn set_latest_price_records(&mut self, v: ::protobuf::RepeatedField) { - self.latest_price_records = v; - } - - // Mutable pointer to the field. - pub fn mut_latest_price_records(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.latest_price_records - } - - // Take field - pub fn take_latest_price_records(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.latest_price_records, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for PriceRecords { - fn is_initialized(&self) -> bool { - for v in &self.latest_price_records { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle, 1, &mut self.unknown_fields)? - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.symbol_id)?; - }, - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.latest_price_records)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.oracle != OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(1, self.oracle); - } - if !self.symbol_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.symbol_id); - } - for value in &self.latest_price_records { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.oracle != OracleType::Unspecified { - os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.oracle))?; - } - if !self.symbol_id.is_empty() { - os.write_string(2, &self.symbol_id)?; - } - for v in &self.latest_price_records { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PriceRecords { - PriceRecords::new() - } - - fn default_instance() -> &'static PriceRecords { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PriceRecords::new) - } -} - -impl ::protobuf::Clear for PriceRecords { - fn clear(&mut self) { - self.oracle = OracleType::Unspecified; - self.symbol_id.clear(); - self.latest_price_records.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PriceRecords { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PriceRecord { - // message fields - pub timestamp: i64, - pub price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PriceRecord { - fn default() -> &'a PriceRecord { - ::default_instance() - } -} - -impl PriceRecord { - pub fn new() -> PriceRecord { - ::std::default::Default::default() - } - - // int64 timestamp = 1; - - - pub fn get_timestamp(&self) -> i64 { - self.timestamp - } - pub fn clear_timestamp(&mut self) { - self.timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_timestamp(&mut self, v: i64) { - self.timestamp = v; - } - - // string price = 2; - - - pub fn get_price(&self) -> &str { - &self.price - } - pub fn clear_price(&mut self) { - self.price.clear(); - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: ::std::string::String) { - self.price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price(&mut self) -> &mut ::std::string::String { - &mut self.price - } - - // Take field - pub fn take_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for PriceRecord { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.timestamp = tmp; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.timestamp != 0 { - my_size += ::protobuf::rt::value_size(1, self.timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if !self.price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.timestamp != 0 { - os.write_int64(1, self.timestamp)?; - } - if !self.price.is_empty() { - os.write_string(2, &self.price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PriceRecord { - PriceRecord::new() - } - - fn default_instance() -> &'static PriceRecord { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PriceRecord::new) - } -} - -impl ::protobuf::Clear for PriceRecord { - fn clear(&mut self) { - self.timestamp = 0; - self.price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PriceRecord { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MetadataStatistics { - // message fields - pub group_count: u32, - pub records_sample_size: u32, - pub mean: ::std::string::String, - pub twap: ::std::string::String, - pub first_timestamp: i64, - pub last_timestamp: i64, - pub min_price: ::std::string::String, - pub max_price: ::std::string::String, - pub median_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MetadataStatistics { - fn default() -> &'a MetadataStatistics { - ::default_instance() - } -} - -impl MetadataStatistics { - pub fn new() -> MetadataStatistics { - ::std::default::Default::default() - } - - // uint32 group_count = 1; - - - pub fn get_group_count(&self) -> u32 { - self.group_count - } - pub fn clear_group_count(&mut self) { - self.group_count = 0; - } - - // Param is passed by value, moved - pub fn set_group_count(&mut self, v: u32) { - self.group_count = v; - } - - // uint32 records_sample_size = 2; - - - pub fn get_records_sample_size(&self) -> u32 { - self.records_sample_size - } - pub fn clear_records_sample_size(&mut self) { - self.records_sample_size = 0; - } - - // Param is passed by value, moved - pub fn set_records_sample_size(&mut self, v: u32) { - self.records_sample_size = v; - } - - // string mean = 3; - - - pub fn get_mean(&self) -> &str { - &self.mean - } - pub fn clear_mean(&mut self) { - self.mean.clear(); - } - - // Param is passed by value, moved - pub fn set_mean(&mut self, v: ::std::string::String) { - self.mean = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_mean(&mut self) -> &mut ::std::string::String { - &mut self.mean - } - - // Take field - pub fn take_mean(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.mean, ::std::string::String::new()) - } - - // string twap = 4; - - - pub fn get_twap(&self) -> &str { - &self.twap - } - pub fn clear_twap(&mut self) { - self.twap.clear(); - } - - // Param is passed by value, moved - pub fn set_twap(&mut self, v: ::std::string::String) { - self.twap = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_twap(&mut self) -> &mut ::std::string::String { - &mut self.twap - } - - // Take field - pub fn take_twap(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.twap, ::std::string::String::new()) - } - - // int64 first_timestamp = 5; - - - pub fn get_first_timestamp(&self) -> i64 { - self.first_timestamp - } - pub fn clear_first_timestamp(&mut self) { - self.first_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_first_timestamp(&mut self, v: i64) { - self.first_timestamp = v; - } - - // int64 last_timestamp = 6; - - - pub fn get_last_timestamp(&self) -> i64 { - self.last_timestamp - } - pub fn clear_last_timestamp(&mut self) { - self.last_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_last_timestamp(&mut self, v: i64) { - self.last_timestamp = v; - } - - // string min_price = 7; - - - pub fn get_min_price(&self) -> &str { - &self.min_price - } - pub fn clear_min_price(&mut self) { - self.min_price.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price(&mut self, v: ::std::string::String) { - self.min_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price(&mut self) -> &mut ::std::string::String { - &mut self.min_price - } - - // Take field - pub fn take_min_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price, ::std::string::String::new()) - } - - // string max_price = 8; - - - pub fn get_max_price(&self) -> &str { - &self.max_price - } - pub fn clear_max_price(&mut self) { - self.max_price.clear(); - } - - // Param is passed by value, moved - pub fn set_max_price(&mut self, v: ::std::string::String) { - self.max_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_max_price(&mut self) -> &mut ::std::string::String { - &mut self.max_price - } - - // Take field - pub fn take_max_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.max_price, ::std::string::String::new()) - } - - // string median_price = 9; - - - pub fn get_median_price(&self) -> &str { - &self.median_price - } - pub fn clear_median_price(&mut self) { - self.median_price.clear(); - } - - // Param is passed by value, moved - pub fn set_median_price(&mut self, v: ::std::string::String) { - self.median_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_median_price(&mut self) -> &mut ::std::string::String { - &mut self.median_price - } - - // Take field - pub fn take_median_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.median_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MetadataStatistics { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.group_count = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.records_sample_size = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.mean)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.twap)?; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.first_timestamp = tmp; - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.last_timestamp = tmp; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price)?; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.max_price)?; - }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.median_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.group_count != 0 { - my_size += ::protobuf::rt::value_size(1, self.group_count, ::protobuf::wire_format::WireTypeVarint); - } - if self.records_sample_size != 0 { - my_size += ::protobuf::rt::value_size(2, self.records_sample_size, ::protobuf::wire_format::WireTypeVarint); - } - if !self.mean.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.mean); - } - if !self.twap.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.twap); - } - if self.first_timestamp != 0 { - my_size += ::protobuf::rt::value_size(5, self.first_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if self.last_timestamp != 0 { - my_size += ::protobuf::rt::value_size(6, self.last_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if !self.min_price.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.min_price); - } - if !self.max_price.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.max_price); - } - if !self.median_price.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.median_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if self.group_count != 0 { - os.write_uint32(1, self.group_count)?; - } - if self.records_sample_size != 0 { - os.write_uint32(2, self.records_sample_size)?; - } - if !self.mean.is_empty() { - os.write_string(3, &self.mean)?; - } - if !self.twap.is_empty() { - os.write_string(4, &self.twap)?; - } - if self.first_timestamp != 0 { - os.write_int64(5, self.first_timestamp)?; - } - if self.last_timestamp != 0 { - os.write_int64(6, self.last_timestamp)?; - } - if !self.min_price.is_empty() { - os.write_string(7, &self.min_price)?; - } - if !self.max_price.is_empty() { - os.write_string(8, &self.max_price)?; - } - if !self.median_price.is_empty() { - os.write_string(9, &self.median_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MetadataStatistics { - MetadataStatistics::new() - } - - fn default_instance() -> &'static MetadataStatistics { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MetadataStatistics::new) - } -} - -impl ::protobuf::Clear for MetadataStatistics { - fn clear(&mut self) { - self.group_count = 0; - self.records_sample_size = 0; - self.mean.clear(); - self.twap.clear(); - self.first_timestamp = 0; - self.last_timestamp = 0; - self.min_price.clear(); - self.max_price.clear(); - self.median_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MetadataStatistics { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PriceAttestation { - // message fields - pub price_id: ::std::string::String, - pub price: i64, - pub conf: u64, - pub expo: i32, - pub ema_price: i64, - pub ema_conf: u64, - pub ema_expo: i32, - pub publish_time: i64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PriceAttestation { - fn default() -> &'a PriceAttestation { - ::default_instance() - } -} - -impl PriceAttestation { - pub fn new() -> PriceAttestation { - ::std::default::Default::default() - } - - // string price_id = 1; - - - pub fn get_price_id(&self) -> &str { - &self.price_id - } - pub fn clear_price_id(&mut self) { - self.price_id.clear(); - } - - // Param is passed by value, moved - pub fn set_price_id(&mut self, v: ::std::string::String) { - self.price_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price_id(&mut self) -> &mut ::std::string::String { - &mut self.price_id - } - - // Take field - pub fn take_price_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price_id, ::std::string::String::new()) - } - - // int64 price = 2; - - - pub fn get_price(&self) -> i64 { - self.price - } - pub fn clear_price(&mut self) { - self.price = 0; - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: i64) { - self.price = v; - } - - // uint64 conf = 3; - - - pub fn get_conf(&self) -> u64 { - self.conf - } - pub fn clear_conf(&mut self) { - self.conf = 0; - } - - // Param is passed by value, moved - pub fn set_conf(&mut self, v: u64) { - self.conf = v; - } - - // int32 expo = 4; - - - pub fn get_expo(&self) -> i32 { - self.expo - } - pub fn clear_expo(&mut self) { - self.expo = 0; - } - - // Param is passed by value, moved - pub fn set_expo(&mut self, v: i32) { - self.expo = v; - } - - // int64 ema_price = 5; - - - pub fn get_ema_price(&self) -> i64 { - self.ema_price - } - pub fn clear_ema_price(&mut self) { - self.ema_price = 0; - } - - // Param is passed by value, moved - pub fn set_ema_price(&mut self, v: i64) { - self.ema_price = v; - } - - // uint64 ema_conf = 6; - - - pub fn get_ema_conf(&self) -> u64 { - self.ema_conf - } - pub fn clear_ema_conf(&mut self) { - self.ema_conf = 0; - } - - // Param is passed by value, moved - pub fn set_ema_conf(&mut self, v: u64) { - self.ema_conf = v; - } - - // int32 ema_expo = 7; - - - pub fn get_ema_expo(&self) -> i32 { - self.ema_expo - } - pub fn clear_ema_expo(&mut self) { - self.ema_expo = 0; - } - - // Param is passed by value, moved - pub fn set_ema_expo(&mut self, v: i32) { - self.ema_expo = v; - } - - // int64 publish_time = 8; - - - pub fn get_publish_time(&self) -> i64 { - self.publish_time - } - pub fn clear_publish_time(&mut self) { - self.publish_time = 0; - } - - // Param is passed by value, moved - pub fn set_publish_time(&mut self, v: i64) { - self.publish_time = v; - } -} - -impl ::protobuf::Message for PriceAttestation { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price_id)?; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.price = tmp; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.conf = tmp; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int32()?; - self.expo = tmp; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.ema_price = tmp; - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.ema_conf = tmp; - }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int32()?; - self.ema_expo = tmp; - }, - 8 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.publish_time = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.price_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.price_id); - } - if self.price != 0 { - my_size += ::protobuf::rt::value_size(2, self.price, ::protobuf::wire_format::WireTypeVarint); - } - if self.conf != 0 { - my_size += ::protobuf::rt::value_size(3, self.conf, ::protobuf::wire_format::WireTypeVarint); - } - if self.expo != 0 { - my_size += ::protobuf::rt::value_size(4, self.expo, ::protobuf::wire_format::WireTypeVarint); - } - if self.ema_price != 0 { - my_size += ::protobuf::rt::value_size(5, self.ema_price, ::protobuf::wire_format::WireTypeVarint); - } - if self.ema_conf != 0 { - my_size += ::protobuf::rt::value_size(6, self.ema_conf, ::protobuf::wire_format::WireTypeVarint); - } - if self.ema_expo != 0 { - my_size += ::protobuf::rt::value_size(7, self.ema_expo, ::protobuf::wire_format::WireTypeVarint); - } - if self.publish_time != 0 { - my_size += ::protobuf::rt::value_size(8, self.publish_time, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.price_id.is_empty() { - os.write_string(1, &self.price_id)?; - } - if self.price != 0 { - os.write_int64(2, self.price)?; - } - if self.conf != 0 { - os.write_uint64(3, self.conf)?; - } - if self.expo != 0 { - os.write_int32(4, self.expo)?; - } - if self.ema_price != 0 { - os.write_int64(5, self.ema_price)?; - } - if self.ema_conf != 0 { - os.write_uint64(6, self.ema_conf)?; - } - if self.ema_expo != 0 { - os.write_int32(7, self.ema_expo)?; - } - if self.publish_time != 0 { - os.write_int64(8, self.publish_time)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PriceAttestation { - PriceAttestation::new() - } - - fn default_instance() -> &'static PriceAttestation { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PriceAttestation::new) - } -} - -impl ::protobuf::Clear for PriceAttestation { - fn clear(&mut self) { - self.price_id.clear(); - self.price = 0; - self.conf = 0; - self.expo = 0; - self.ema_price = 0; - self.ema_conf = 0; - self.ema_expo = 0; - self.publish_time = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PriceAttestation { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum OracleType { - Unspecified = 0, - Band = 1, - PriceFeed = 2, - Coinbase = 3, - Chainlink = 4, - Razor = 5, - Dia = 6, - API3 = 7, - Uma = 8, - Pyth = 9, - BandIBC = 10, - Provider = 11, -} - -impl ::protobuf::ProtobufEnum for OracleType { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(OracleType::Unspecified), - 1 => ::std::option::Option::Some(OracleType::Band), - 2 => ::std::option::Option::Some(OracleType::PriceFeed), - 3 => ::std::option::Option::Some(OracleType::Coinbase), - 4 => ::std::option::Option::Some(OracleType::Chainlink), - 5 => ::std::option::Option::Some(OracleType::Razor), - 6 => ::std::option::Option::Some(OracleType::Dia), - 7 => ::std::option::Option::Some(OracleType::API3), - 8 => ::std::option::Option::Some(OracleType::Uma), - 9 => ::std::option::Option::Some(OracleType::Pyth), - 10 => ::std::option::Option::Some(OracleType::BandIBC), - 11 => ::std::option::Option::Some(OracleType::Provider), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [OracleType] = &[ - OracleType::Unspecified, - OracleType::Band, - OracleType::PriceFeed, - OracleType::Coinbase, - OracleType::Chainlink, - OracleType::Razor, - OracleType::Dia, - OracleType::API3, - OracleType::Uma, - OracleType::Pyth, - OracleType::BandIBC, - OracleType::Provider, - ]; - values - } -} - -impl ::std::marker::Copy for OracleType { -} - -impl ::std::default::Default for OracleType { - fn default() -> Self { - OracleType::Unspecified - } -} - -impl ::protobuf::reflect::ProtobufValue for OracleType { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) - } -} diff --git a/packages/injective-protobuf/src/proto/tx.rs b/packages/injective-protobuf/src/proto/tx.rs deleted file mode 100644 index d073c817..00000000 --- a/packages/injective-protobuf/src/proto/tx.rs +++ /dev/null @@ -1,20268 +0,0 @@ -// This file is generated by rust-protobuf 2.28.0. Do not edit -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `injective/exchange/v1beta1/tx.proto` - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_28_0; - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgUpdateParams { - // message fields - pub authority: ::std::string::String, - pub params: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgUpdateParams { - fn default() -> &'a MsgUpdateParams { - ::default_instance() - } -} - -impl MsgUpdateParams { - pub fn new() -> MsgUpdateParams { - ::std::default::Default::default() - } - - // string authority = 1; - - - pub fn get_authority(&self) -> &str { - &self.authority - } - pub fn clear_authority(&mut self) { - self.authority.clear(); - } - - // Param is passed by value, moved - pub fn set_authority(&mut self, v: ::std::string::String) { - self.authority = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_authority(&mut self) -> &mut ::std::string::String { - &mut self.authority - } - - // Take field - pub fn take_authority(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.authority, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.Params params = 2; - - - pub fn get_params(&self) -> &super::exchange::Params { - self.params.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_params(&mut self) { - self.params.clear(); - } - - pub fn has_params(&self) -> bool { - self.params.is_some() - } - - // Param is passed by value, moved - pub fn set_params(&mut self, v: super::exchange::Params) { - self.params = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_params(&mut self) -> &mut super::exchange::Params { - if self.params.is_none() { - self.params.set_default(); - } - self.params.as_mut().unwrap() - } - - // Take field - pub fn take_params(&mut self) -> super::exchange::Params { - self.params.take().unwrap_or_else(|| super::exchange::Params::new()) - } -} - -impl ::protobuf::Message for MsgUpdateParams { - fn is_initialized(&self) -> bool { - for v in &self.params { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.authority)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.params)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.authority.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.authority); - } - if let Some(ref v) = self.params.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.authority.is_empty() { - os.write_string(1, &self.authority)?; - } - if let Some(ref v) = self.params.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgUpdateParams { - MsgUpdateParams::new() - } - - fn default_instance() -> &'static MsgUpdateParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgUpdateParams::new) - } -} - -impl ::protobuf::Clear for MsgUpdateParams { - fn clear(&mut self) { - self.authority.clear(); - self.params.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgUpdateParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgUpdateParamsResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgUpdateParamsResponse { - fn default() -> &'a MsgUpdateParamsResponse { - ::default_instance() - } -} - -impl MsgUpdateParamsResponse { - pub fn new() -> MsgUpdateParamsResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgUpdateParamsResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgUpdateParamsResponse { - MsgUpdateParamsResponse::new() - } - - fn default_instance() -> &'static MsgUpdateParamsResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgUpdateParamsResponse::new) - } -} - -impl ::protobuf::Clear for MsgUpdateParamsResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgUpdateParamsResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgDeposit { - // message fields - pub sender: ::std::string::String, - pub subaccount_id: ::std::string::String, - pub amount: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgDeposit { - fn default() -> &'a MsgDeposit { - ::default_instance() - } -} - -impl MsgDeposit { - pub fn new() -> MsgDeposit { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string subaccount_id = 2; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // .cosmos.base.v1beta1.Coin amount = 3; - - - pub fn get_amount(&self) -> &super::coin::Coin { - self.amount.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_amount(&mut self) { - self.amount.clear(); - } - - pub fn has_amount(&self) -> bool { - self.amount.is_some() - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: super::coin::Coin) { - self.amount = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_amount(&mut self) -> &mut super::coin::Coin { - if self.amount.is_none() { - self.amount.set_default(); - } - self.amount.as_mut().unwrap() - } - - // Take field - pub fn take_amount(&mut self) -> super::coin::Coin { - self.amount.take().unwrap_or_else(|| super::coin::Coin::new()) - } -} - -impl ::protobuf::Message for MsgDeposit { - fn is_initialized(&self) -> bool { - for v in &self.amount { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.amount)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.subaccount_id); - } - if let Some(ref v) = self.amount.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.subaccount_id.is_empty() { - os.write_string(2, &self.subaccount_id)?; - } - if let Some(ref v) = self.amount.as_ref() { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgDeposit { - MsgDeposit::new() - } - - fn default_instance() -> &'static MsgDeposit { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgDeposit::new) - } -} - -impl ::protobuf::Clear for MsgDeposit { - fn clear(&mut self) { - self.sender.clear(); - self.subaccount_id.clear(); - self.amount.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgDeposit { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgDepositResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgDepositResponse { - fn default() -> &'a MsgDepositResponse { - ::default_instance() - } -} - -impl MsgDepositResponse { - pub fn new() -> MsgDepositResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgDepositResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgDepositResponse { - MsgDepositResponse::new() - } - - fn default_instance() -> &'static MsgDepositResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgDepositResponse::new) - } -} - -impl ::protobuf::Clear for MsgDepositResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgDepositResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgWithdraw { - // message fields - pub sender: ::std::string::String, - pub subaccount_id: ::std::string::String, - pub amount: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgWithdraw { - fn default() -> &'a MsgWithdraw { - ::default_instance() - } -} - -impl MsgWithdraw { - pub fn new() -> MsgWithdraw { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string subaccount_id = 2; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // .cosmos.base.v1beta1.Coin amount = 3; - - - pub fn get_amount(&self) -> &super::coin::Coin { - self.amount.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_amount(&mut self) { - self.amount.clear(); - } - - pub fn has_amount(&self) -> bool { - self.amount.is_some() - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: super::coin::Coin) { - self.amount = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_amount(&mut self) -> &mut super::coin::Coin { - if self.amount.is_none() { - self.amount.set_default(); - } - self.amount.as_mut().unwrap() - } - - // Take field - pub fn take_amount(&mut self) -> super::coin::Coin { - self.amount.take().unwrap_or_else(|| super::coin::Coin::new()) - } -} - -impl ::protobuf::Message for MsgWithdraw { - fn is_initialized(&self) -> bool { - for v in &self.amount { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.amount)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.subaccount_id); - } - if let Some(ref v) = self.amount.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.subaccount_id.is_empty() { - os.write_string(2, &self.subaccount_id)?; - } - if let Some(ref v) = self.amount.as_ref() { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgWithdraw { - MsgWithdraw::new() - } - - fn default_instance() -> &'static MsgWithdraw { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgWithdraw::new) - } -} - -impl ::protobuf::Clear for MsgWithdraw { - fn clear(&mut self) { - self.sender.clear(); - self.subaccount_id.clear(); - self.amount.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgWithdraw { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgWithdrawResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgWithdrawResponse { - fn default() -> &'a MsgWithdrawResponse { - ::default_instance() - } -} - -impl MsgWithdrawResponse { - pub fn new() -> MsgWithdrawResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgWithdrawResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgWithdrawResponse { - MsgWithdrawResponse::new() - } - - fn default_instance() -> &'static MsgWithdrawResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgWithdrawResponse::new) - } -} - -impl ::protobuf::Clear for MsgWithdrawResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgWithdrawResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateSpotLimitOrder { - // message fields - pub sender: ::std::string::String, - pub order: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateSpotLimitOrder { - fn default() -> &'a MsgCreateSpotLimitOrder { - ::default_instance() - } -} - -impl MsgCreateSpotLimitOrder { - pub fn new() -> MsgCreateSpotLimitOrder { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.SpotOrder order = 2; - - - pub fn get_order(&self) -> &super::exchange::SpotOrder { - self.order.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order(&mut self) { - self.order.clear(); - } - - pub fn has_order(&self) -> bool { - self.order.is_some() - } - - // Param is passed by value, moved - pub fn set_order(&mut self, v: super::exchange::SpotOrder) { - self.order = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order(&mut self) -> &mut super::exchange::SpotOrder { - if self.order.is_none() { - self.order.set_default(); - } - self.order.as_mut().unwrap() - } - - // Take field - pub fn take_order(&mut self) -> super::exchange::SpotOrder { - self.order.take().unwrap_or_else(|| super::exchange::SpotOrder::new()) - } -} - -impl ::protobuf::Message for MsgCreateSpotLimitOrder { - fn is_initialized(&self) -> bool { - for v in &self.order { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if let Some(ref v) = self.order.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if let Some(ref v) = self.order.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateSpotLimitOrder { - MsgCreateSpotLimitOrder::new() - } - - fn default_instance() -> &'static MsgCreateSpotLimitOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateSpotLimitOrder::new) - } -} - -impl ::protobuf::Clear for MsgCreateSpotLimitOrder { - fn clear(&mut self) { - self.sender.clear(); - self.order.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateSpotLimitOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateSpotLimitOrderResponse { - // message fields - pub order_hash: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateSpotLimitOrderResponse { - fn default() -> &'a MsgCreateSpotLimitOrderResponse { - ::default_instance() - } -} - -impl MsgCreateSpotLimitOrderResponse { - pub fn new() -> MsgCreateSpotLimitOrderResponse { - ::std::default::Default::default() - } - - // string order_hash = 1; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgCreateSpotLimitOrderResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.order_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.order_hash.is_empty() { - os.write_string(1, &self.order_hash)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateSpotLimitOrderResponse { - MsgCreateSpotLimitOrderResponse::new() - } - - fn default_instance() -> &'static MsgCreateSpotLimitOrderResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateSpotLimitOrderResponse::new) - } -} - -impl ::protobuf::Clear for MsgCreateSpotLimitOrderResponse { - fn clear(&mut self) { - self.order_hash.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateSpotLimitOrderResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCreateSpotLimitOrders { - // message fields - pub sender: ::std::string::String, - pub orders: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCreateSpotLimitOrders { - fn default() -> &'a MsgBatchCreateSpotLimitOrders { - ::default_instance() - } -} - -impl MsgBatchCreateSpotLimitOrders { - pub fn new() -> MsgBatchCreateSpotLimitOrders { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.SpotOrder orders = 2; - - - pub fn get_orders(&self) -> &[super::exchange::SpotOrder] { - &self.orders - } - pub fn clear_orders(&mut self) { - self.orders.clear(); - } - - // Param is passed by value, moved - pub fn set_orders(&mut self, v: ::protobuf::RepeatedField) { - self.orders = v; - } - - // Mutable pointer to the field. - pub fn mut_orders(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.orders - } - - // Take field - pub fn take_orders(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.orders, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgBatchCreateSpotLimitOrders { - fn is_initialized(&self) -> bool { - for v in &self.orders { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.orders)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - for value in &self.orders { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - for v in &self.orders { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCreateSpotLimitOrders { - MsgBatchCreateSpotLimitOrders::new() - } - - fn default_instance() -> &'static MsgBatchCreateSpotLimitOrders { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCreateSpotLimitOrders::new) - } -} - -impl ::protobuf::Clear for MsgBatchCreateSpotLimitOrders { - fn clear(&mut self) { - self.sender.clear(); - self.orders.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCreateSpotLimitOrders { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCreateSpotLimitOrdersResponse { - // message fields - pub order_hashes: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCreateSpotLimitOrdersResponse { - fn default() -> &'a MsgBatchCreateSpotLimitOrdersResponse { - ::default_instance() - } -} - -impl MsgBatchCreateSpotLimitOrdersResponse { - pub fn new() -> MsgBatchCreateSpotLimitOrdersResponse { - ::std::default::Default::default() - } - - // repeated string order_hashes = 1; - - - pub fn get_order_hashes(&self) -> &[::std::string::String] { - &self.order_hashes - } - pub fn clear_order_hashes(&mut self) { - self.order_hashes.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hashes(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.order_hashes = v; - } - - // Mutable pointer to the field. - pub fn mut_order_hashes(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.order_hashes - } - - // Take field - pub fn take_order_hashes(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.order_hashes, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgBatchCreateSpotLimitOrdersResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.order_hashes)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.order_hashes { - my_size += ::protobuf::rt::string_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.order_hashes { - os.write_string(1, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCreateSpotLimitOrdersResponse { - MsgBatchCreateSpotLimitOrdersResponse::new() - } - - fn default_instance() -> &'static MsgBatchCreateSpotLimitOrdersResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCreateSpotLimitOrdersResponse::new) - } -} - -impl ::protobuf::Clear for MsgBatchCreateSpotLimitOrdersResponse { - fn clear(&mut self) { - self.order_hashes.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCreateSpotLimitOrdersResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgInstantSpotMarketLaunch { - // message fields - pub sender: ::std::string::String, - pub ticker: ::std::string::String, - pub base_denom: ::std::string::String, - pub quote_denom: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgInstantSpotMarketLaunch { - fn default() -> &'a MsgInstantSpotMarketLaunch { - ::default_instance() - } -} - -impl MsgInstantSpotMarketLaunch { - pub fn new() -> MsgInstantSpotMarketLaunch { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string ticker = 2; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string base_denom = 3; - - - pub fn get_base_denom(&self) -> &str { - &self.base_denom - } - pub fn clear_base_denom(&mut self) { - self.base_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_base_denom(&mut self, v: ::std::string::String) { - self.base_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_base_denom(&mut self) -> &mut ::std::string::String { - &mut self.base_denom - } - - // Take field - pub fn take_base_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.base_denom, ::std::string::String::new()) - } - - // string quote_denom = 4; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string min_price_tick_size = 5; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 6; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgInstantSpotMarketLaunch { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.base_denom)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.ticker); - } - if !self.base_denom.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.base_denom); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.quote_denom); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.min_quantity_tick_size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.ticker.is_empty() { - os.write_string(2, &self.ticker)?; - } - if !self.base_denom.is_empty() { - os.write_string(3, &self.base_denom)?; - } - if !self.quote_denom.is_empty() { - os.write_string(4, &self.quote_denom)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(5, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(6, &self.min_quantity_tick_size)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgInstantSpotMarketLaunch { - MsgInstantSpotMarketLaunch::new() - } - - fn default_instance() -> &'static MsgInstantSpotMarketLaunch { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgInstantSpotMarketLaunch::new) - } -} - -impl ::protobuf::Clear for MsgInstantSpotMarketLaunch { - fn clear(&mut self) { - self.sender.clear(); - self.ticker.clear(); - self.base_denom.clear(); - self.quote_denom.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgInstantSpotMarketLaunch { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgInstantSpotMarketLaunchResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgInstantSpotMarketLaunchResponse { - fn default() -> &'a MsgInstantSpotMarketLaunchResponse { - ::default_instance() - } -} - -impl MsgInstantSpotMarketLaunchResponse { - pub fn new() -> MsgInstantSpotMarketLaunchResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgInstantSpotMarketLaunchResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgInstantSpotMarketLaunchResponse { - MsgInstantSpotMarketLaunchResponse::new() - } - - fn default_instance() -> &'static MsgInstantSpotMarketLaunchResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgInstantSpotMarketLaunchResponse::new) - } -} - -impl ::protobuf::Clear for MsgInstantSpotMarketLaunchResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgInstantSpotMarketLaunchResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgInstantPerpetualMarketLaunch { - // message fields - pub sender: ::std::string::String, - pub ticker: ::std::string::String, - pub quote_denom: ::std::string::String, - pub oracle_base: ::std::string::String, - pub oracle_quote: ::std::string::String, - pub oracle_scale_factor: u32, - pub oracle_type: super::oracle::OracleType, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub initial_margin_ratio: ::std::string::String, - pub maintenance_margin_ratio: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgInstantPerpetualMarketLaunch { - fn default() -> &'a MsgInstantPerpetualMarketLaunch { - ::default_instance() - } -} - -impl MsgInstantPerpetualMarketLaunch { - pub fn new() -> MsgInstantPerpetualMarketLaunch { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string ticker = 2; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string quote_denom = 3; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string oracle_base = 4; - - - pub fn get_oracle_base(&self) -> &str { - &self.oracle_base - } - pub fn clear_oracle_base(&mut self) { - self.oracle_base.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_base(&mut self, v: ::std::string::String) { - self.oracle_base = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_base(&mut self) -> &mut ::std::string::String { - &mut self.oracle_base - } - - // Take field - pub fn take_oracle_base(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_base, ::std::string::String::new()) - } - - // string oracle_quote = 5; - - - pub fn get_oracle_quote(&self) -> &str { - &self.oracle_quote - } - pub fn clear_oracle_quote(&mut self) { - self.oracle_quote.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_quote(&mut self, v: ::std::string::String) { - self.oracle_quote = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_quote(&mut self) -> &mut ::std::string::String { - &mut self.oracle_quote - } - - // Take field - pub fn take_oracle_quote(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_quote, ::std::string::String::new()) - } - - // uint32 oracle_scale_factor = 6; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 7; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } - - // string maker_fee_rate = 8; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 9; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string initial_margin_ratio = 10; - - - pub fn get_initial_margin_ratio(&self) -> &str { - &self.initial_margin_ratio - } - pub fn clear_initial_margin_ratio(&mut self) { - self.initial_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_initial_margin_ratio(&mut self, v: ::std::string::String) { - self.initial_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_initial_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.initial_margin_ratio - } - - // Take field - pub fn take_initial_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.initial_margin_ratio, ::std::string::String::new()) - } - - // string maintenance_margin_ratio = 11; - - - pub fn get_maintenance_margin_ratio(&self) -> &str { - &self.maintenance_margin_ratio - } - pub fn clear_maintenance_margin_ratio(&mut self) { - self.maintenance_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_maintenance_margin_ratio(&mut self, v: ::std::string::String) { - self.maintenance_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maintenance_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.maintenance_margin_ratio - } - - // Take field - pub fn take_maintenance_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maintenance_margin_ratio, ::std::string::String::new()) - } - - // string min_price_tick_size = 12; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 13; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgInstantPerpetualMarketLaunch { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_base)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_quote)?; - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 7 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 7, &mut self.unknown_fields)? - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.initial_margin_ratio)?; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maintenance_margin_ratio)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 13 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.ticker); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.quote_denom); - } - if !self.oracle_base.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.oracle_base); - } - if !self.oracle_quote.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.oracle_quote); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(6, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(7, self.oracle_type); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.taker_fee_rate); - } - if !self.initial_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.initial_margin_ratio); - } - if !self.maintenance_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.maintenance_margin_ratio); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(13, &self.min_quantity_tick_size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.ticker.is_empty() { - os.write_string(2, &self.ticker)?; - } - if !self.quote_denom.is_empty() { - os.write_string(3, &self.quote_denom)?; - } - if !self.oracle_base.is_empty() { - os.write_string(4, &self.oracle_base)?; - } - if !self.oracle_quote.is_empty() { - os.write_string(5, &self.oracle_quote)?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(6, self.oracle_scale_factor)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(7, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(8, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(9, &self.taker_fee_rate)?; - } - if !self.initial_margin_ratio.is_empty() { - os.write_string(10, &self.initial_margin_ratio)?; - } - if !self.maintenance_margin_ratio.is_empty() { - os.write_string(11, &self.maintenance_margin_ratio)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(12, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(13, &self.min_quantity_tick_size)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgInstantPerpetualMarketLaunch { - MsgInstantPerpetualMarketLaunch::new() - } - - fn default_instance() -> &'static MsgInstantPerpetualMarketLaunch { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgInstantPerpetualMarketLaunch::new) - } -} - -impl ::protobuf::Clear for MsgInstantPerpetualMarketLaunch { - fn clear(&mut self) { - self.sender.clear(); - self.ticker.clear(); - self.quote_denom.clear(); - self.oracle_base.clear(); - self.oracle_quote.clear(); - self.oracle_scale_factor = 0; - self.oracle_type = super::oracle::OracleType::Unspecified; - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.initial_margin_ratio.clear(); - self.maintenance_margin_ratio.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgInstantPerpetualMarketLaunch { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgInstantPerpetualMarketLaunchResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgInstantPerpetualMarketLaunchResponse { - fn default() -> &'a MsgInstantPerpetualMarketLaunchResponse { - ::default_instance() - } -} - -impl MsgInstantPerpetualMarketLaunchResponse { - pub fn new() -> MsgInstantPerpetualMarketLaunchResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgInstantPerpetualMarketLaunchResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgInstantPerpetualMarketLaunchResponse { - MsgInstantPerpetualMarketLaunchResponse::new() - } - - fn default_instance() -> &'static MsgInstantPerpetualMarketLaunchResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgInstantPerpetualMarketLaunchResponse::new) - } -} - -impl ::protobuf::Clear for MsgInstantPerpetualMarketLaunchResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgInstantPerpetualMarketLaunchResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgInstantBinaryOptionsMarketLaunch { - // message fields - pub sender: ::std::string::String, - pub ticker: ::std::string::String, - pub oracle_symbol: ::std::string::String, - pub oracle_provider: ::std::string::String, - pub oracle_type: super::oracle::OracleType, - pub oracle_scale_factor: u32, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub expiration_timestamp: i64, - pub settlement_timestamp: i64, - pub admin: ::std::string::String, - pub quote_denom: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgInstantBinaryOptionsMarketLaunch { - fn default() -> &'a MsgInstantBinaryOptionsMarketLaunch { - ::default_instance() - } -} - -impl MsgInstantBinaryOptionsMarketLaunch { - pub fn new() -> MsgInstantBinaryOptionsMarketLaunch { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string ticker = 2; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string oracle_symbol = 3; - - - pub fn get_oracle_symbol(&self) -> &str { - &self.oracle_symbol - } - pub fn clear_oracle_symbol(&mut self) { - self.oracle_symbol.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_symbol(&mut self, v: ::std::string::String) { - self.oracle_symbol = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_symbol(&mut self) -> &mut ::std::string::String { - &mut self.oracle_symbol - } - - // Take field - pub fn take_oracle_symbol(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_symbol, ::std::string::String::new()) - } - - // string oracle_provider = 4; - - - pub fn get_oracle_provider(&self) -> &str { - &self.oracle_provider - } - pub fn clear_oracle_provider(&mut self) { - self.oracle_provider.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_provider(&mut self, v: ::std::string::String) { - self.oracle_provider = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_provider(&mut self) -> &mut ::std::string::String { - &mut self.oracle_provider - } - - // Take field - pub fn take_oracle_provider(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_provider, ::std::string::String::new()) - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 5; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } - - // uint32 oracle_scale_factor = 6; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // string maker_fee_rate = 7; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 8; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // int64 expiration_timestamp = 9; - - - pub fn get_expiration_timestamp(&self) -> i64 { - self.expiration_timestamp - } - pub fn clear_expiration_timestamp(&mut self) { - self.expiration_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_expiration_timestamp(&mut self, v: i64) { - self.expiration_timestamp = v; - } - - // int64 settlement_timestamp = 10; - - - pub fn get_settlement_timestamp(&self) -> i64 { - self.settlement_timestamp - } - pub fn clear_settlement_timestamp(&mut self) { - self.settlement_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_settlement_timestamp(&mut self, v: i64) { - self.settlement_timestamp = v; - } - - // string admin = 11; - - - pub fn get_admin(&self) -> &str { - &self.admin - } - pub fn clear_admin(&mut self) { - self.admin.clear(); - } - - // Param is passed by value, moved - pub fn set_admin(&mut self, v: ::std::string::String) { - self.admin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_admin(&mut self) -> &mut ::std::string::String { - &mut self.admin - } - - // Take field - pub fn take_admin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.admin, ::std::string::String::new()) - } - - // string quote_denom = 12; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string min_price_tick_size = 13; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 14; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgInstantBinaryOptionsMarketLaunch { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_symbol)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_provider)?; - }, - 5 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 5, &mut self.unknown_fields)? - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 9 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.expiration_timestamp = tmp; - }, - 10 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.settlement_timestamp = tmp; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.admin)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 13 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 14 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.ticker); - } - if !self.oracle_symbol.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.oracle_symbol); - } - if !self.oracle_provider.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.oracle_provider); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(5, self.oracle_type); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(6, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.taker_fee_rate); - } - if self.expiration_timestamp != 0 { - my_size += ::protobuf::rt::value_size(9, self.expiration_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if self.settlement_timestamp != 0 { - my_size += ::protobuf::rt::value_size(10, self.settlement_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if !self.admin.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.admin); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.quote_denom); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(13, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(14, &self.min_quantity_tick_size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.ticker.is_empty() { - os.write_string(2, &self.ticker)?; - } - if !self.oracle_symbol.is_empty() { - os.write_string(3, &self.oracle_symbol)?; - } - if !self.oracle_provider.is_empty() { - os.write_string(4, &self.oracle_provider)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(6, self.oracle_scale_factor)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(7, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(8, &self.taker_fee_rate)?; - } - if self.expiration_timestamp != 0 { - os.write_int64(9, self.expiration_timestamp)?; - } - if self.settlement_timestamp != 0 { - os.write_int64(10, self.settlement_timestamp)?; - } - if !self.admin.is_empty() { - os.write_string(11, &self.admin)?; - } - if !self.quote_denom.is_empty() { - os.write_string(12, &self.quote_denom)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(13, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(14, &self.min_quantity_tick_size)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgInstantBinaryOptionsMarketLaunch { - MsgInstantBinaryOptionsMarketLaunch::new() - } - - fn default_instance() -> &'static MsgInstantBinaryOptionsMarketLaunch { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgInstantBinaryOptionsMarketLaunch::new) - } -} - -impl ::protobuf::Clear for MsgInstantBinaryOptionsMarketLaunch { - fn clear(&mut self) { - self.sender.clear(); - self.ticker.clear(); - self.oracle_symbol.clear(); - self.oracle_provider.clear(); - self.oracle_type = super::oracle::OracleType::Unspecified; - self.oracle_scale_factor = 0; - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.expiration_timestamp = 0; - self.settlement_timestamp = 0; - self.admin.clear(); - self.quote_denom.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgInstantBinaryOptionsMarketLaunch { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgInstantBinaryOptionsMarketLaunchResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgInstantBinaryOptionsMarketLaunchResponse { - fn default() -> &'a MsgInstantBinaryOptionsMarketLaunchResponse { - ::default_instance() - } -} - -impl MsgInstantBinaryOptionsMarketLaunchResponse { - pub fn new() -> MsgInstantBinaryOptionsMarketLaunchResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgInstantBinaryOptionsMarketLaunchResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgInstantBinaryOptionsMarketLaunchResponse { - MsgInstantBinaryOptionsMarketLaunchResponse::new() - } - - fn default_instance() -> &'static MsgInstantBinaryOptionsMarketLaunchResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgInstantBinaryOptionsMarketLaunchResponse::new) - } -} - -impl ::protobuf::Clear for MsgInstantBinaryOptionsMarketLaunchResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgInstantBinaryOptionsMarketLaunchResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgInstantExpiryFuturesMarketLaunch { - // message fields - pub sender: ::std::string::String, - pub ticker: ::std::string::String, - pub quote_denom: ::std::string::String, - pub oracle_base: ::std::string::String, - pub oracle_quote: ::std::string::String, - pub oracle_type: super::oracle::OracleType, - pub oracle_scale_factor: u32, - pub expiry: i64, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub initial_margin_ratio: ::std::string::String, - pub maintenance_margin_ratio: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgInstantExpiryFuturesMarketLaunch { - fn default() -> &'a MsgInstantExpiryFuturesMarketLaunch { - ::default_instance() - } -} - -impl MsgInstantExpiryFuturesMarketLaunch { - pub fn new() -> MsgInstantExpiryFuturesMarketLaunch { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string ticker = 2; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string quote_denom = 3; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string oracle_base = 4; - - - pub fn get_oracle_base(&self) -> &str { - &self.oracle_base - } - pub fn clear_oracle_base(&mut self) { - self.oracle_base.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_base(&mut self, v: ::std::string::String) { - self.oracle_base = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_base(&mut self) -> &mut ::std::string::String { - &mut self.oracle_base - } - - // Take field - pub fn take_oracle_base(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_base, ::std::string::String::new()) - } - - // string oracle_quote = 5; - - - pub fn get_oracle_quote(&self) -> &str { - &self.oracle_quote - } - pub fn clear_oracle_quote(&mut self) { - self.oracle_quote.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_quote(&mut self, v: ::std::string::String) { - self.oracle_quote = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_quote(&mut self) -> &mut ::std::string::String { - &mut self.oracle_quote - } - - // Take field - pub fn take_oracle_quote(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_quote, ::std::string::String::new()) - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 6; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } - - // uint32 oracle_scale_factor = 7; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // int64 expiry = 8; - - - pub fn get_expiry(&self) -> i64 { - self.expiry - } - pub fn clear_expiry(&mut self) { - self.expiry = 0; - } - - // Param is passed by value, moved - pub fn set_expiry(&mut self, v: i64) { - self.expiry = v; - } - - // string maker_fee_rate = 9; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 10; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string initial_margin_ratio = 11; - - - pub fn get_initial_margin_ratio(&self) -> &str { - &self.initial_margin_ratio - } - pub fn clear_initial_margin_ratio(&mut self) { - self.initial_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_initial_margin_ratio(&mut self, v: ::std::string::String) { - self.initial_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_initial_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.initial_margin_ratio - } - - // Take field - pub fn take_initial_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.initial_margin_ratio, ::std::string::String::new()) - } - - // string maintenance_margin_ratio = 12; - - - pub fn get_maintenance_margin_ratio(&self) -> &str { - &self.maintenance_margin_ratio - } - pub fn clear_maintenance_margin_ratio(&mut self) { - self.maintenance_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_maintenance_margin_ratio(&mut self, v: ::std::string::String) { - self.maintenance_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maintenance_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.maintenance_margin_ratio - } - - // Take field - pub fn take_maintenance_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maintenance_margin_ratio, ::std::string::String::new()) - } - - // string min_price_tick_size = 13; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 14; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgInstantExpiryFuturesMarketLaunch { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_base)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_quote)?; - }, - 6 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 6, &mut self.unknown_fields)? - }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 8 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.expiry = tmp; - }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.initial_margin_ratio)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maintenance_margin_ratio)?; - }, - 13 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 14 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.ticker); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.quote_denom); - } - if !self.oracle_base.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.oracle_base); - } - if !self.oracle_quote.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.oracle_quote); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(6, self.oracle_type); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(7, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if self.expiry != 0 { - my_size += ::protobuf::rt::value_size(8, self.expiry, ::protobuf::wire_format::WireTypeVarint); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.taker_fee_rate); - } - if !self.initial_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.initial_margin_ratio); - } - if !self.maintenance_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.maintenance_margin_ratio); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(13, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(14, &self.min_quantity_tick_size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.ticker.is_empty() { - os.write_string(2, &self.ticker)?; - } - if !self.quote_denom.is_empty() { - os.write_string(3, &self.quote_denom)?; - } - if !self.oracle_base.is_empty() { - os.write_string(4, &self.oracle_base)?; - } - if !self.oracle_quote.is_empty() { - os.write_string(5, &self.oracle_quote)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(6, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(7, self.oracle_scale_factor)?; - } - if self.expiry != 0 { - os.write_int64(8, self.expiry)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(9, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(10, &self.taker_fee_rate)?; - } - if !self.initial_margin_ratio.is_empty() { - os.write_string(11, &self.initial_margin_ratio)?; - } - if !self.maintenance_margin_ratio.is_empty() { - os.write_string(12, &self.maintenance_margin_ratio)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(13, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(14, &self.min_quantity_tick_size)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgInstantExpiryFuturesMarketLaunch { - MsgInstantExpiryFuturesMarketLaunch::new() - } - - fn default_instance() -> &'static MsgInstantExpiryFuturesMarketLaunch { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgInstantExpiryFuturesMarketLaunch::new) - } -} - -impl ::protobuf::Clear for MsgInstantExpiryFuturesMarketLaunch { - fn clear(&mut self) { - self.sender.clear(); - self.ticker.clear(); - self.quote_denom.clear(); - self.oracle_base.clear(); - self.oracle_quote.clear(); - self.oracle_type = super::oracle::OracleType::Unspecified; - self.oracle_scale_factor = 0; - self.expiry = 0; - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.initial_margin_ratio.clear(); - self.maintenance_margin_ratio.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgInstantExpiryFuturesMarketLaunch { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgInstantExpiryFuturesMarketLaunchResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgInstantExpiryFuturesMarketLaunchResponse { - fn default() -> &'a MsgInstantExpiryFuturesMarketLaunchResponse { - ::default_instance() - } -} - -impl MsgInstantExpiryFuturesMarketLaunchResponse { - pub fn new() -> MsgInstantExpiryFuturesMarketLaunchResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgInstantExpiryFuturesMarketLaunchResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgInstantExpiryFuturesMarketLaunchResponse { - MsgInstantExpiryFuturesMarketLaunchResponse::new() - } - - fn default_instance() -> &'static MsgInstantExpiryFuturesMarketLaunchResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgInstantExpiryFuturesMarketLaunchResponse::new) - } -} - -impl ::protobuf::Clear for MsgInstantExpiryFuturesMarketLaunchResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgInstantExpiryFuturesMarketLaunchResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateSpotMarketOrder { - // message fields - pub sender: ::std::string::String, - pub order: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateSpotMarketOrder { - fn default() -> &'a MsgCreateSpotMarketOrder { - ::default_instance() - } -} - -impl MsgCreateSpotMarketOrder { - pub fn new() -> MsgCreateSpotMarketOrder { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.SpotOrder order = 2; - - - pub fn get_order(&self) -> &super::exchange::SpotOrder { - self.order.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order(&mut self) { - self.order.clear(); - } - - pub fn has_order(&self) -> bool { - self.order.is_some() - } - - // Param is passed by value, moved - pub fn set_order(&mut self, v: super::exchange::SpotOrder) { - self.order = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order(&mut self) -> &mut super::exchange::SpotOrder { - if self.order.is_none() { - self.order.set_default(); - } - self.order.as_mut().unwrap() - } - - // Take field - pub fn take_order(&mut self) -> super::exchange::SpotOrder { - self.order.take().unwrap_or_else(|| super::exchange::SpotOrder::new()) - } -} - -impl ::protobuf::Message for MsgCreateSpotMarketOrder { - fn is_initialized(&self) -> bool { - for v in &self.order { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if let Some(ref v) = self.order.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if let Some(ref v) = self.order.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateSpotMarketOrder { - MsgCreateSpotMarketOrder::new() - } - - fn default_instance() -> &'static MsgCreateSpotMarketOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateSpotMarketOrder::new) - } -} - -impl ::protobuf::Clear for MsgCreateSpotMarketOrder { - fn clear(&mut self) { - self.sender.clear(); - self.order.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateSpotMarketOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateSpotMarketOrderResponse { - // message fields - pub order_hash: ::std::string::String, - pub results: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateSpotMarketOrderResponse { - fn default() -> &'a MsgCreateSpotMarketOrderResponse { - ::default_instance() - } -} - -impl MsgCreateSpotMarketOrderResponse { - pub fn new() -> MsgCreateSpotMarketOrderResponse { - ::std::default::Default::default() - } - - // string order_hash = 1; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.SpotMarketOrderResults results = 2; - - - pub fn get_results(&self) -> &SpotMarketOrderResults { - self.results.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_results(&mut self) { - self.results.clear(); - } - - pub fn has_results(&self) -> bool { - self.results.is_some() - } - - // Param is passed by value, moved - pub fn set_results(&mut self, v: SpotMarketOrderResults) { - self.results = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_results(&mut self) -> &mut SpotMarketOrderResults { - if self.results.is_none() { - self.results.set_default(); - } - self.results.as_mut().unwrap() - } - - // Take field - pub fn take_results(&mut self) -> SpotMarketOrderResults { - self.results.take().unwrap_or_else(|| SpotMarketOrderResults::new()) - } -} - -impl ::protobuf::Message for MsgCreateSpotMarketOrderResponse { - fn is_initialized(&self) -> bool { - for v in &self.results { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.results)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.order_hash); - } - if let Some(ref v) = self.results.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.order_hash.is_empty() { - os.write_string(1, &self.order_hash)?; - } - if let Some(ref v) = self.results.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateSpotMarketOrderResponse { - MsgCreateSpotMarketOrderResponse::new() - } - - fn default_instance() -> &'static MsgCreateSpotMarketOrderResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateSpotMarketOrderResponse::new) - } -} - -impl ::protobuf::Clear for MsgCreateSpotMarketOrderResponse { - fn clear(&mut self) { - self.order_hash.clear(); - self.results.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateSpotMarketOrderResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SpotMarketOrderResults { - // message fields - pub quantity: ::std::string::String, - pub price: ::std::string::String, - pub fee: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SpotMarketOrderResults { - fn default() -> &'a SpotMarketOrderResults { - ::default_instance() - } -} - -impl SpotMarketOrderResults { - pub fn new() -> SpotMarketOrderResults { - ::std::default::Default::default() - } - - // string quantity = 1; - - - pub fn get_quantity(&self) -> &str { - &self.quantity - } - pub fn clear_quantity(&mut self) { - self.quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_quantity(&mut self, v: ::std::string::String) { - self.quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quantity(&mut self) -> &mut ::std::string::String { - &mut self.quantity - } - - // Take field - pub fn take_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quantity, ::std::string::String::new()) - } - - // string price = 2; - - - pub fn get_price(&self) -> &str { - &self.price - } - pub fn clear_price(&mut self) { - self.price.clear(); - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: ::std::string::String) { - self.price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price(&mut self) -> &mut ::std::string::String { - &mut self.price - } - - // Take field - pub fn take_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price, ::std::string::String::new()) - } - - // string fee = 3; - - - pub fn get_fee(&self) -> &str { - &self.fee - } - pub fn clear_fee(&mut self) { - self.fee.clear(); - } - - // Param is passed by value, moved - pub fn set_fee(&mut self, v: ::std::string::String) { - self.fee = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fee(&mut self) -> &mut ::std::string::String { - &mut self.fee - } - - // Take field - pub fn take_fee(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.fee, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for SpotMarketOrderResults { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quantity)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.fee)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.quantity.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.quantity); - } - if !self.price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.price); - } - if !self.fee.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.fee); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.quantity.is_empty() { - os.write_string(1, &self.quantity)?; - } - if !self.price.is_empty() { - os.write_string(2, &self.price)?; - } - if !self.fee.is_empty() { - os.write_string(3, &self.fee)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SpotMarketOrderResults { - SpotMarketOrderResults::new() - } - - fn default_instance() -> &'static SpotMarketOrderResults { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SpotMarketOrderResults::new) - } -} - -impl ::protobuf::Clear for SpotMarketOrderResults { - fn clear(&mut self) { - self.quantity.clear(); - self.price.clear(); - self.fee.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SpotMarketOrderResults { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateDerivativeLimitOrder { - // message fields - pub sender: ::std::string::String, - pub order: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateDerivativeLimitOrder { - fn default() -> &'a MsgCreateDerivativeLimitOrder { - ::default_instance() - } -} - -impl MsgCreateDerivativeLimitOrder { - pub fn new() -> MsgCreateDerivativeLimitOrder { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.DerivativeOrder order = 2; - - - pub fn get_order(&self) -> &super::exchange::DerivativeOrder { - self.order.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order(&mut self) { - self.order.clear(); - } - - pub fn has_order(&self) -> bool { - self.order.is_some() - } - - // Param is passed by value, moved - pub fn set_order(&mut self, v: super::exchange::DerivativeOrder) { - self.order = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order(&mut self) -> &mut super::exchange::DerivativeOrder { - if self.order.is_none() { - self.order.set_default(); - } - self.order.as_mut().unwrap() - } - - // Take field - pub fn take_order(&mut self) -> super::exchange::DerivativeOrder { - self.order.take().unwrap_or_else(|| super::exchange::DerivativeOrder::new()) - } -} - -impl ::protobuf::Message for MsgCreateDerivativeLimitOrder { - fn is_initialized(&self) -> bool { - for v in &self.order { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if let Some(ref v) = self.order.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if let Some(ref v) = self.order.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateDerivativeLimitOrder { - MsgCreateDerivativeLimitOrder::new() - } - - fn default_instance() -> &'static MsgCreateDerivativeLimitOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateDerivativeLimitOrder::new) - } -} - -impl ::protobuf::Clear for MsgCreateDerivativeLimitOrder { - fn clear(&mut self) { - self.sender.clear(); - self.order.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateDerivativeLimitOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateDerivativeLimitOrderResponse { - // message fields - pub order_hash: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateDerivativeLimitOrderResponse { - fn default() -> &'a MsgCreateDerivativeLimitOrderResponse { - ::default_instance() - } -} - -impl MsgCreateDerivativeLimitOrderResponse { - pub fn new() -> MsgCreateDerivativeLimitOrderResponse { - ::std::default::Default::default() - } - - // string order_hash = 1; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgCreateDerivativeLimitOrderResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.order_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.order_hash.is_empty() { - os.write_string(1, &self.order_hash)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateDerivativeLimitOrderResponse { - MsgCreateDerivativeLimitOrderResponse::new() - } - - fn default_instance() -> &'static MsgCreateDerivativeLimitOrderResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateDerivativeLimitOrderResponse::new) - } -} - -impl ::protobuf::Clear for MsgCreateDerivativeLimitOrderResponse { - fn clear(&mut self) { - self.order_hash.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateDerivativeLimitOrderResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateBinaryOptionsLimitOrder { - // message fields - pub sender: ::std::string::String, - pub order: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateBinaryOptionsLimitOrder { - fn default() -> &'a MsgCreateBinaryOptionsLimitOrder { - ::default_instance() - } -} - -impl MsgCreateBinaryOptionsLimitOrder { - pub fn new() -> MsgCreateBinaryOptionsLimitOrder { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.DerivativeOrder order = 2; - - - pub fn get_order(&self) -> &super::exchange::DerivativeOrder { - self.order.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order(&mut self) { - self.order.clear(); - } - - pub fn has_order(&self) -> bool { - self.order.is_some() - } - - // Param is passed by value, moved - pub fn set_order(&mut self, v: super::exchange::DerivativeOrder) { - self.order = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order(&mut self) -> &mut super::exchange::DerivativeOrder { - if self.order.is_none() { - self.order.set_default(); - } - self.order.as_mut().unwrap() - } - - // Take field - pub fn take_order(&mut self) -> super::exchange::DerivativeOrder { - self.order.take().unwrap_or_else(|| super::exchange::DerivativeOrder::new()) - } -} - -impl ::protobuf::Message for MsgCreateBinaryOptionsLimitOrder { - fn is_initialized(&self) -> bool { - for v in &self.order { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if let Some(ref v) = self.order.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if let Some(ref v) = self.order.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateBinaryOptionsLimitOrder { - MsgCreateBinaryOptionsLimitOrder::new() - } - - fn default_instance() -> &'static MsgCreateBinaryOptionsLimitOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateBinaryOptionsLimitOrder::new) - } -} - -impl ::protobuf::Clear for MsgCreateBinaryOptionsLimitOrder { - fn clear(&mut self) { - self.sender.clear(); - self.order.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateBinaryOptionsLimitOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateBinaryOptionsLimitOrderResponse { - // message fields - pub order_hash: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateBinaryOptionsLimitOrderResponse { - fn default() -> &'a MsgCreateBinaryOptionsLimitOrderResponse { - ::default_instance() - } -} - -impl MsgCreateBinaryOptionsLimitOrderResponse { - pub fn new() -> MsgCreateBinaryOptionsLimitOrderResponse { - ::std::default::Default::default() - } - - // string order_hash = 1; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgCreateBinaryOptionsLimitOrderResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.order_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.order_hash.is_empty() { - os.write_string(1, &self.order_hash)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateBinaryOptionsLimitOrderResponse { - MsgCreateBinaryOptionsLimitOrderResponse::new() - } - - fn default_instance() -> &'static MsgCreateBinaryOptionsLimitOrderResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateBinaryOptionsLimitOrderResponse::new) - } -} - -impl ::protobuf::Clear for MsgCreateBinaryOptionsLimitOrderResponse { - fn clear(&mut self) { - self.order_hash.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateBinaryOptionsLimitOrderResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCreateDerivativeLimitOrders { - // message fields - pub sender: ::std::string::String, - pub orders: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCreateDerivativeLimitOrders { - fn default() -> &'a MsgBatchCreateDerivativeLimitOrders { - ::default_instance() - } -} - -impl MsgBatchCreateDerivativeLimitOrders { - pub fn new() -> MsgBatchCreateDerivativeLimitOrders { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.DerivativeOrder orders = 2; - - - pub fn get_orders(&self) -> &[super::exchange::DerivativeOrder] { - &self.orders - } - pub fn clear_orders(&mut self) { - self.orders.clear(); - } - - // Param is passed by value, moved - pub fn set_orders(&mut self, v: ::protobuf::RepeatedField) { - self.orders = v; - } - - // Mutable pointer to the field. - pub fn mut_orders(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.orders - } - - // Take field - pub fn take_orders(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.orders, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgBatchCreateDerivativeLimitOrders { - fn is_initialized(&self) -> bool { - for v in &self.orders { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.orders)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - for value in &self.orders { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - for v in &self.orders { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCreateDerivativeLimitOrders { - MsgBatchCreateDerivativeLimitOrders::new() - } - - fn default_instance() -> &'static MsgBatchCreateDerivativeLimitOrders { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCreateDerivativeLimitOrders::new) - } -} - -impl ::protobuf::Clear for MsgBatchCreateDerivativeLimitOrders { - fn clear(&mut self) { - self.sender.clear(); - self.orders.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCreateDerivativeLimitOrders { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCreateDerivativeLimitOrdersResponse { - // message fields - pub order_hashes: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCreateDerivativeLimitOrdersResponse { - fn default() -> &'a MsgBatchCreateDerivativeLimitOrdersResponse { - ::default_instance() - } -} - -impl MsgBatchCreateDerivativeLimitOrdersResponse { - pub fn new() -> MsgBatchCreateDerivativeLimitOrdersResponse { - ::std::default::Default::default() - } - - // repeated string order_hashes = 1; - - - pub fn get_order_hashes(&self) -> &[::std::string::String] { - &self.order_hashes - } - pub fn clear_order_hashes(&mut self) { - self.order_hashes.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hashes(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.order_hashes = v; - } - - // Mutable pointer to the field. - pub fn mut_order_hashes(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.order_hashes - } - - // Take field - pub fn take_order_hashes(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.order_hashes, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgBatchCreateDerivativeLimitOrdersResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.order_hashes)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.order_hashes { - my_size += ::protobuf::rt::string_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.order_hashes { - os.write_string(1, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCreateDerivativeLimitOrdersResponse { - MsgBatchCreateDerivativeLimitOrdersResponse::new() - } - - fn default_instance() -> &'static MsgBatchCreateDerivativeLimitOrdersResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCreateDerivativeLimitOrdersResponse::new) - } -} - -impl ::protobuf::Clear for MsgBatchCreateDerivativeLimitOrdersResponse { - fn clear(&mut self) { - self.order_hashes.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCreateDerivativeLimitOrdersResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCancelSpotOrder { - // message fields - pub sender: ::std::string::String, - pub market_id: ::std::string::String, - pub subaccount_id: ::std::string::String, - pub order_hash: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCancelSpotOrder { - fn default() -> &'a MsgCancelSpotOrder { - ::default_instance() - } -} - -impl MsgCancelSpotOrder { - pub fn new() -> MsgCancelSpotOrder { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string market_id = 2; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string subaccount_id = 3; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // string order_hash = 4; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgCancelSpotOrder { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.market_id); - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.subaccount_id); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.order_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.market_id.is_empty() { - os.write_string(2, &self.market_id)?; - } - if !self.subaccount_id.is_empty() { - os.write_string(3, &self.subaccount_id)?; - } - if !self.order_hash.is_empty() { - os.write_string(4, &self.order_hash)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCancelSpotOrder { - MsgCancelSpotOrder::new() - } - - fn default_instance() -> &'static MsgCancelSpotOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCancelSpotOrder::new) - } -} - -impl ::protobuf::Clear for MsgCancelSpotOrder { - fn clear(&mut self) { - self.sender.clear(); - self.market_id.clear(); - self.subaccount_id.clear(); - self.order_hash.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCancelSpotOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCancelSpotOrderResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCancelSpotOrderResponse { - fn default() -> &'a MsgCancelSpotOrderResponse { - ::default_instance() - } -} - -impl MsgCancelSpotOrderResponse { - pub fn new() -> MsgCancelSpotOrderResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgCancelSpotOrderResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCancelSpotOrderResponse { - MsgCancelSpotOrderResponse::new() - } - - fn default_instance() -> &'static MsgCancelSpotOrderResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCancelSpotOrderResponse::new) - } -} - -impl ::protobuf::Clear for MsgCancelSpotOrderResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCancelSpotOrderResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCancelSpotOrders { - // message fields - pub sender: ::std::string::String, - pub data: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCancelSpotOrders { - fn default() -> &'a MsgBatchCancelSpotOrders { - ::default_instance() - } -} - -impl MsgBatchCancelSpotOrders { - pub fn new() -> MsgBatchCancelSpotOrders { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.OrderData data = 2; - - - pub fn get_data(&self) -> &[OrderData] { - &self.data - } - pub fn clear_data(&mut self) { - self.data.clear(); - } - - // Param is passed by value, moved - pub fn set_data(&mut self, v: ::protobuf::RepeatedField) { - self.data = v; - } - - // Mutable pointer to the field. - pub fn mut_data(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.data - } - - // Take field - pub fn take_data(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.data, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgBatchCancelSpotOrders { - fn is_initialized(&self) -> bool { - for v in &self.data { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.data)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - for value in &self.data { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - for v in &self.data { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCancelSpotOrders { - MsgBatchCancelSpotOrders::new() - } - - fn default_instance() -> &'static MsgBatchCancelSpotOrders { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCancelSpotOrders::new) - } -} - -impl ::protobuf::Clear for MsgBatchCancelSpotOrders { - fn clear(&mut self) { - self.sender.clear(); - self.data.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCancelSpotOrders { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCancelSpotOrdersResponse { - // message fields - pub success: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCancelSpotOrdersResponse { - fn default() -> &'a MsgBatchCancelSpotOrdersResponse { - ::default_instance() - } -} - -impl MsgBatchCancelSpotOrdersResponse { - pub fn new() -> MsgBatchCancelSpotOrdersResponse { - ::std::default::Default::default() - } - - // repeated bool success = 1; - - - pub fn get_success(&self) -> &[bool] { - &self.success - } - pub fn clear_success(&mut self) { - self.success.clear(); - } - - // Param is passed by value, moved - pub fn set_success(&mut self, v: ::std::vec::Vec) { - self.success = v; - } - - // Mutable pointer to the field. - pub fn mut_success(&mut self) -> &mut ::std::vec::Vec { - &mut self.success - } - - // Take field - pub fn take_success(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.success, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for MsgBatchCancelSpotOrdersResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_bool_into(wire_type, is, &mut self.success)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += 2 * self.success.len() as u32; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.success { - os.write_bool(1, *v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCancelSpotOrdersResponse { - MsgBatchCancelSpotOrdersResponse::new() - } - - fn default_instance() -> &'static MsgBatchCancelSpotOrdersResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCancelSpotOrdersResponse::new) - } -} - -impl ::protobuf::Clear for MsgBatchCancelSpotOrdersResponse { - fn clear(&mut self) { - self.success.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCancelSpotOrdersResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCancelBinaryOptionsOrders { - // message fields - pub sender: ::std::string::String, - pub data: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCancelBinaryOptionsOrders { - fn default() -> &'a MsgBatchCancelBinaryOptionsOrders { - ::default_instance() - } -} - -impl MsgBatchCancelBinaryOptionsOrders { - pub fn new() -> MsgBatchCancelBinaryOptionsOrders { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.OrderData data = 2; - - - pub fn get_data(&self) -> &[OrderData] { - &self.data - } - pub fn clear_data(&mut self) { - self.data.clear(); - } - - // Param is passed by value, moved - pub fn set_data(&mut self, v: ::protobuf::RepeatedField) { - self.data = v; - } - - // Mutable pointer to the field. - pub fn mut_data(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.data - } - - // Take field - pub fn take_data(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.data, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgBatchCancelBinaryOptionsOrders { - fn is_initialized(&self) -> bool { - for v in &self.data { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.data)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - for value in &self.data { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - for v in &self.data { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCancelBinaryOptionsOrders { - MsgBatchCancelBinaryOptionsOrders::new() - } - - fn default_instance() -> &'static MsgBatchCancelBinaryOptionsOrders { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCancelBinaryOptionsOrders::new) - } -} - -impl ::protobuf::Clear for MsgBatchCancelBinaryOptionsOrders { - fn clear(&mut self) { - self.sender.clear(); - self.data.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCancelBinaryOptionsOrders { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCancelBinaryOptionsOrdersResponse { - // message fields - pub success: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCancelBinaryOptionsOrdersResponse { - fn default() -> &'a MsgBatchCancelBinaryOptionsOrdersResponse { - ::default_instance() - } -} - -impl MsgBatchCancelBinaryOptionsOrdersResponse { - pub fn new() -> MsgBatchCancelBinaryOptionsOrdersResponse { - ::std::default::Default::default() - } - - // repeated bool success = 1; - - - pub fn get_success(&self) -> &[bool] { - &self.success - } - pub fn clear_success(&mut self) { - self.success.clear(); - } - - // Param is passed by value, moved - pub fn set_success(&mut self, v: ::std::vec::Vec) { - self.success = v; - } - - // Mutable pointer to the field. - pub fn mut_success(&mut self) -> &mut ::std::vec::Vec { - &mut self.success - } - - // Take field - pub fn take_success(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.success, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for MsgBatchCancelBinaryOptionsOrdersResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_bool_into(wire_type, is, &mut self.success)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += 2 * self.success.len() as u32; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.success { - os.write_bool(1, *v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCancelBinaryOptionsOrdersResponse { - MsgBatchCancelBinaryOptionsOrdersResponse::new() - } - - fn default_instance() -> &'static MsgBatchCancelBinaryOptionsOrdersResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCancelBinaryOptionsOrdersResponse::new) - } -} - -impl ::protobuf::Clear for MsgBatchCancelBinaryOptionsOrdersResponse { - fn clear(&mut self) { - self.success.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCancelBinaryOptionsOrdersResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchUpdateOrders { - // message fields - pub sender: ::std::string::String, - pub subaccount_id: ::std::string::String, - pub spot_market_ids_to_cancel_all: ::protobuf::RepeatedField<::std::string::String>, - pub derivative_market_ids_to_cancel_all: ::protobuf::RepeatedField<::std::string::String>, - pub spot_orders_to_cancel: ::protobuf::RepeatedField, - pub derivative_orders_to_cancel: ::protobuf::RepeatedField, - pub spot_orders_to_create: ::protobuf::RepeatedField, - pub derivative_orders_to_create: ::protobuf::RepeatedField, - pub binary_options_orders_to_cancel: ::protobuf::RepeatedField, - pub binary_options_market_ids_to_cancel_all: ::protobuf::RepeatedField<::std::string::String>, - pub binary_options_orders_to_create: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchUpdateOrders { - fn default() -> &'a MsgBatchUpdateOrders { - ::default_instance() - } -} - -impl MsgBatchUpdateOrders { - pub fn new() -> MsgBatchUpdateOrders { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string subaccount_id = 2; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // repeated string spot_market_ids_to_cancel_all = 3; - - - pub fn get_spot_market_ids_to_cancel_all(&self) -> &[::std::string::String] { - &self.spot_market_ids_to_cancel_all - } - pub fn clear_spot_market_ids_to_cancel_all(&mut self) { - self.spot_market_ids_to_cancel_all.clear(); - } - - // Param is passed by value, moved - pub fn set_spot_market_ids_to_cancel_all(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.spot_market_ids_to_cancel_all = v; - } - - // Mutable pointer to the field. - pub fn mut_spot_market_ids_to_cancel_all(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.spot_market_ids_to_cancel_all - } - - // Take field - pub fn take_spot_market_ids_to_cancel_all(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.spot_market_ids_to_cancel_all, ::protobuf::RepeatedField::new()) - } - - // repeated string derivative_market_ids_to_cancel_all = 4; - - - pub fn get_derivative_market_ids_to_cancel_all(&self) -> &[::std::string::String] { - &self.derivative_market_ids_to_cancel_all - } - pub fn clear_derivative_market_ids_to_cancel_all(&mut self) { - self.derivative_market_ids_to_cancel_all.clear(); - } - - // Param is passed by value, moved - pub fn set_derivative_market_ids_to_cancel_all(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.derivative_market_ids_to_cancel_all = v; - } - - // Mutable pointer to the field. - pub fn mut_derivative_market_ids_to_cancel_all(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.derivative_market_ids_to_cancel_all - } - - // Take field - pub fn take_derivative_market_ids_to_cancel_all(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.derivative_market_ids_to_cancel_all, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.OrderData spot_orders_to_cancel = 5; - - - pub fn get_spot_orders_to_cancel(&self) -> &[OrderData] { - &self.spot_orders_to_cancel - } - pub fn clear_spot_orders_to_cancel(&mut self) { - self.spot_orders_to_cancel.clear(); - } - - // Param is passed by value, moved - pub fn set_spot_orders_to_cancel(&mut self, v: ::protobuf::RepeatedField) { - self.spot_orders_to_cancel = v; - } - - // Mutable pointer to the field. - pub fn mut_spot_orders_to_cancel(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.spot_orders_to_cancel - } - - // Take field - pub fn take_spot_orders_to_cancel(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.spot_orders_to_cancel, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.OrderData derivative_orders_to_cancel = 6; - - - pub fn get_derivative_orders_to_cancel(&self) -> &[OrderData] { - &self.derivative_orders_to_cancel - } - pub fn clear_derivative_orders_to_cancel(&mut self) { - self.derivative_orders_to_cancel.clear(); - } - - // Param is passed by value, moved - pub fn set_derivative_orders_to_cancel(&mut self, v: ::protobuf::RepeatedField) { - self.derivative_orders_to_cancel = v; - } - - // Mutable pointer to the field. - pub fn mut_derivative_orders_to_cancel(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.derivative_orders_to_cancel - } - - // Take field - pub fn take_derivative_orders_to_cancel(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.derivative_orders_to_cancel, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.SpotOrder spot_orders_to_create = 7; - - - pub fn get_spot_orders_to_create(&self) -> &[super::exchange::SpotOrder] { - &self.spot_orders_to_create - } - pub fn clear_spot_orders_to_create(&mut self) { - self.spot_orders_to_create.clear(); - } - - // Param is passed by value, moved - pub fn set_spot_orders_to_create(&mut self, v: ::protobuf::RepeatedField) { - self.spot_orders_to_create = v; - } - - // Mutable pointer to the field. - pub fn mut_spot_orders_to_create(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.spot_orders_to_create - } - - // Take field - pub fn take_spot_orders_to_create(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.spot_orders_to_create, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.DerivativeOrder derivative_orders_to_create = 8; - - - pub fn get_derivative_orders_to_create(&self) -> &[super::exchange::DerivativeOrder] { - &self.derivative_orders_to_create - } - pub fn clear_derivative_orders_to_create(&mut self) { - self.derivative_orders_to_create.clear(); - } - - // Param is passed by value, moved - pub fn set_derivative_orders_to_create(&mut self, v: ::protobuf::RepeatedField) { - self.derivative_orders_to_create = v; - } - - // Mutable pointer to the field. - pub fn mut_derivative_orders_to_create(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.derivative_orders_to_create - } - - // Take field - pub fn take_derivative_orders_to_create(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.derivative_orders_to_create, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.OrderData binary_options_orders_to_cancel = 9; - - - pub fn get_binary_options_orders_to_cancel(&self) -> &[OrderData] { - &self.binary_options_orders_to_cancel - } - pub fn clear_binary_options_orders_to_cancel(&mut self) { - self.binary_options_orders_to_cancel.clear(); - } - - // Param is passed by value, moved - pub fn set_binary_options_orders_to_cancel(&mut self, v: ::protobuf::RepeatedField) { - self.binary_options_orders_to_cancel = v; - } - - // Mutable pointer to the field. - pub fn mut_binary_options_orders_to_cancel(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.binary_options_orders_to_cancel - } - - // Take field - pub fn take_binary_options_orders_to_cancel(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.binary_options_orders_to_cancel, ::protobuf::RepeatedField::new()) - } - - // repeated string binary_options_market_ids_to_cancel_all = 10; - - - pub fn get_binary_options_market_ids_to_cancel_all(&self) -> &[::std::string::String] { - &self.binary_options_market_ids_to_cancel_all - } - pub fn clear_binary_options_market_ids_to_cancel_all(&mut self) { - self.binary_options_market_ids_to_cancel_all.clear(); - } - - // Param is passed by value, moved - pub fn set_binary_options_market_ids_to_cancel_all(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.binary_options_market_ids_to_cancel_all = v; - } - - // Mutable pointer to the field. - pub fn mut_binary_options_market_ids_to_cancel_all(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.binary_options_market_ids_to_cancel_all - } - - // Take field - pub fn take_binary_options_market_ids_to_cancel_all(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.binary_options_market_ids_to_cancel_all, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.DerivativeOrder binary_options_orders_to_create = 11; - - - pub fn get_binary_options_orders_to_create(&self) -> &[super::exchange::DerivativeOrder] { - &self.binary_options_orders_to_create - } - pub fn clear_binary_options_orders_to_create(&mut self) { - self.binary_options_orders_to_create.clear(); - } - - // Param is passed by value, moved - pub fn set_binary_options_orders_to_create(&mut self, v: ::protobuf::RepeatedField) { - self.binary_options_orders_to_create = v; - } - - // Mutable pointer to the field. - pub fn mut_binary_options_orders_to_create(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.binary_options_orders_to_create - } - - // Take field - pub fn take_binary_options_orders_to_create(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.binary_options_orders_to_create, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgBatchUpdateOrders { - fn is_initialized(&self) -> bool { - for v in &self.spot_orders_to_cancel { - if !v.is_initialized() { - return false; - } - }; - for v in &self.derivative_orders_to_cancel { - if !v.is_initialized() { - return false; - } - }; - for v in &self.spot_orders_to_create { - if !v.is_initialized() { - return false; - } - }; - for v in &self.derivative_orders_to_create { - if !v.is_initialized() { - return false; - } - }; - for v in &self.binary_options_orders_to_cancel { - if !v.is_initialized() { - return false; - } - }; - for v in &self.binary_options_orders_to_create { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 3 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.spot_market_ids_to_cancel_all)?; - }, - 4 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.derivative_market_ids_to_cancel_all)?; - }, - 5 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.spot_orders_to_cancel)?; - }, - 6 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.derivative_orders_to_cancel)?; - }, - 7 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.spot_orders_to_create)?; - }, - 8 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.derivative_orders_to_create)?; - }, - 9 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.binary_options_orders_to_cancel)?; - }, - 10 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.binary_options_market_ids_to_cancel_all)?; - }, - 11 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.binary_options_orders_to_create)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.subaccount_id); - } - for value in &self.spot_market_ids_to_cancel_all { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.derivative_market_ids_to_cancel_all { - my_size += ::protobuf::rt::string_size(4, &value); - }; - for value in &self.spot_orders_to_cancel { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.derivative_orders_to_cancel { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.spot_orders_to_create { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.derivative_orders_to_create { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.binary_options_orders_to_cancel { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.binary_options_market_ids_to_cancel_all { - my_size += ::protobuf::rt::string_size(10, &value); - }; - for value in &self.binary_options_orders_to_create { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.subaccount_id.is_empty() { - os.write_string(2, &self.subaccount_id)?; - } - for v in &self.spot_market_ids_to_cancel_all { - os.write_string(3, &v)?; - }; - for v in &self.derivative_market_ids_to_cancel_all { - os.write_string(4, &v)?; - }; - for v in &self.spot_orders_to_cancel { - os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.derivative_orders_to_cancel { - os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.spot_orders_to_create { - os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.derivative_orders_to_create { - os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.binary_options_orders_to_cancel { - os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.binary_options_market_ids_to_cancel_all { - os.write_string(10, &v)?; - }; - for v in &self.binary_options_orders_to_create { - os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchUpdateOrders { - MsgBatchUpdateOrders::new() - } - - fn default_instance() -> &'static MsgBatchUpdateOrders { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchUpdateOrders::new) - } -} - -impl ::protobuf::Clear for MsgBatchUpdateOrders { - fn clear(&mut self) { - self.sender.clear(); - self.subaccount_id.clear(); - self.spot_market_ids_to_cancel_all.clear(); - self.derivative_market_ids_to_cancel_all.clear(); - self.spot_orders_to_cancel.clear(); - self.derivative_orders_to_cancel.clear(); - self.spot_orders_to_create.clear(); - self.derivative_orders_to_create.clear(); - self.binary_options_orders_to_cancel.clear(); - self.binary_options_market_ids_to_cancel_all.clear(); - self.binary_options_orders_to_create.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchUpdateOrders { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchUpdateOrdersResponse { - // message fields - pub spot_cancel_success: ::std::vec::Vec, - pub derivative_cancel_success: ::std::vec::Vec, - pub spot_order_hashes: ::protobuf::RepeatedField<::std::string::String>, - pub derivative_order_hashes: ::protobuf::RepeatedField<::std::string::String>, - pub binary_options_cancel_success: ::std::vec::Vec, - pub binary_options_order_hashes: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchUpdateOrdersResponse { - fn default() -> &'a MsgBatchUpdateOrdersResponse { - ::default_instance() - } -} - -impl MsgBatchUpdateOrdersResponse { - pub fn new() -> MsgBatchUpdateOrdersResponse { - ::std::default::Default::default() - } - - // repeated bool spot_cancel_success = 1; - - - pub fn get_spot_cancel_success(&self) -> &[bool] { - &self.spot_cancel_success - } - pub fn clear_spot_cancel_success(&mut self) { - self.spot_cancel_success.clear(); - } - - // Param is passed by value, moved - pub fn set_spot_cancel_success(&mut self, v: ::std::vec::Vec) { - self.spot_cancel_success = v; - } - - // Mutable pointer to the field. - pub fn mut_spot_cancel_success(&mut self) -> &mut ::std::vec::Vec { - &mut self.spot_cancel_success - } - - // Take field - pub fn take_spot_cancel_success(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.spot_cancel_success, ::std::vec::Vec::new()) - } - - // repeated bool derivative_cancel_success = 2; - - - pub fn get_derivative_cancel_success(&self) -> &[bool] { - &self.derivative_cancel_success - } - pub fn clear_derivative_cancel_success(&mut self) { - self.derivative_cancel_success.clear(); - } - - // Param is passed by value, moved - pub fn set_derivative_cancel_success(&mut self, v: ::std::vec::Vec) { - self.derivative_cancel_success = v; - } - - // Mutable pointer to the field. - pub fn mut_derivative_cancel_success(&mut self) -> &mut ::std::vec::Vec { - &mut self.derivative_cancel_success - } - - // Take field - pub fn take_derivative_cancel_success(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.derivative_cancel_success, ::std::vec::Vec::new()) - } - - // repeated string spot_order_hashes = 3; - - - pub fn get_spot_order_hashes(&self) -> &[::std::string::String] { - &self.spot_order_hashes - } - pub fn clear_spot_order_hashes(&mut self) { - self.spot_order_hashes.clear(); - } - - // Param is passed by value, moved - pub fn set_spot_order_hashes(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.spot_order_hashes = v; - } - - // Mutable pointer to the field. - pub fn mut_spot_order_hashes(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.spot_order_hashes - } - - // Take field - pub fn take_spot_order_hashes(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.spot_order_hashes, ::protobuf::RepeatedField::new()) - } - - // repeated string derivative_order_hashes = 4; - - - pub fn get_derivative_order_hashes(&self) -> &[::std::string::String] { - &self.derivative_order_hashes - } - pub fn clear_derivative_order_hashes(&mut self) { - self.derivative_order_hashes.clear(); - } - - // Param is passed by value, moved - pub fn set_derivative_order_hashes(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.derivative_order_hashes = v; - } - - // Mutable pointer to the field. - pub fn mut_derivative_order_hashes(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.derivative_order_hashes - } - - // Take field - pub fn take_derivative_order_hashes(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.derivative_order_hashes, ::protobuf::RepeatedField::new()) - } - - // repeated bool binary_options_cancel_success = 5; - - - pub fn get_binary_options_cancel_success(&self) -> &[bool] { - &self.binary_options_cancel_success - } - pub fn clear_binary_options_cancel_success(&mut self) { - self.binary_options_cancel_success.clear(); - } - - // Param is passed by value, moved - pub fn set_binary_options_cancel_success(&mut self, v: ::std::vec::Vec) { - self.binary_options_cancel_success = v; - } - - // Mutable pointer to the field. - pub fn mut_binary_options_cancel_success(&mut self) -> &mut ::std::vec::Vec { - &mut self.binary_options_cancel_success - } - - // Take field - pub fn take_binary_options_cancel_success(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.binary_options_cancel_success, ::std::vec::Vec::new()) - } - - // repeated string binary_options_order_hashes = 6; - - - pub fn get_binary_options_order_hashes(&self) -> &[::std::string::String] { - &self.binary_options_order_hashes - } - pub fn clear_binary_options_order_hashes(&mut self) { - self.binary_options_order_hashes.clear(); - } - - // Param is passed by value, moved - pub fn set_binary_options_order_hashes(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.binary_options_order_hashes = v; - } - - // Mutable pointer to the field. - pub fn mut_binary_options_order_hashes(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.binary_options_order_hashes - } - - // Take field - pub fn take_binary_options_order_hashes(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.binary_options_order_hashes, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgBatchUpdateOrdersResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_bool_into(wire_type, is, &mut self.spot_cancel_success)?; - }, - 2 => { - ::protobuf::rt::read_repeated_bool_into(wire_type, is, &mut self.derivative_cancel_success)?; - }, - 3 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.spot_order_hashes)?; - }, - 4 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.derivative_order_hashes)?; - }, - 5 => { - ::protobuf::rt::read_repeated_bool_into(wire_type, is, &mut self.binary_options_cancel_success)?; - }, - 6 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.binary_options_order_hashes)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += 2 * self.spot_cancel_success.len() as u32; - my_size += 2 * self.derivative_cancel_success.len() as u32; - for value in &self.spot_order_hashes { - my_size += ::protobuf::rt::string_size(3, &value); - }; - for value in &self.derivative_order_hashes { - my_size += ::protobuf::rt::string_size(4, &value); - }; - my_size += 2 * self.binary_options_cancel_success.len() as u32; - for value in &self.binary_options_order_hashes { - my_size += ::protobuf::rt::string_size(6, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.spot_cancel_success { - os.write_bool(1, *v)?; - }; - for v in &self.derivative_cancel_success { - os.write_bool(2, *v)?; - }; - for v in &self.spot_order_hashes { - os.write_string(3, &v)?; - }; - for v in &self.derivative_order_hashes { - os.write_string(4, &v)?; - }; - for v in &self.binary_options_cancel_success { - os.write_bool(5, *v)?; - }; - for v in &self.binary_options_order_hashes { - os.write_string(6, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchUpdateOrdersResponse { - MsgBatchUpdateOrdersResponse::new() - } - - fn default_instance() -> &'static MsgBatchUpdateOrdersResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchUpdateOrdersResponse::new) - } -} - -impl ::protobuf::Clear for MsgBatchUpdateOrdersResponse { - fn clear(&mut self) { - self.spot_cancel_success.clear(); - self.derivative_cancel_success.clear(); - self.spot_order_hashes.clear(); - self.derivative_order_hashes.clear(); - self.binary_options_cancel_success.clear(); - self.binary_options_order_hashes.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchUpdateOrdersResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateDerivativeMarketOrder { - // message fields - pub sender: ::std::string::String, - pub order: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateDerivativeMarketOrder { - fn default() -> &'a MsgCreateDerivativeMarketOrder { - ::default_instance() - } -} - -impl MsgCreateDerivativeMarketOrder { - pub fn new() -> MsgCreateDerivativeMarketOrder { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.DerivativeOrder order = 2; - - - pub fn get_order(&self) -> &super::exchange::DerivativeOrder { - self.order.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order(&mut self) { - self.order.clear(); - } - - pub fn has_order(&self) -> bool { - self.order.is_some() - } - - // Param is passed by value, moved - pub fn set_order(&mut self, v: super::exchange::DerivativeOrder) { - self.order = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order(&mut self) -> &mut super::exchange::DerivativeOrder { - if self.order.is_none() { - self.order.set_default(); - } - self.order.as_mut().unwrap() - } - - // Take field - pub fn take_order(&mut self) -> super::exchange::DerivativeOrder { - self.order.take().unwrap_or_else(|| super::exchange::DerivativeOrder::new()) - } -} - -impl ::protobuf::Message for MsgCreateDerivativeMarketOrder { - fn is_initialized(&self) -> bool { - for v in &self.order { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if let Some(ref v) = self.order.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if let Some(ref v) = self.order.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateDerivativeMarketOrder { - MsgCreateDerivativeMarketOrder::new() - } - - fn default_instance() -> &'static MsgCreateDerivativeMarketOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateDerivativeMarketOrder::new) - } -} - -impl ::protobuf::Clear for MsgCreateDerivativeMarketOrder { - fn clear(&mut self) { - self.sender.clear(); - self.order.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateDerivativeMarketOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateDerivativeMarketOrderResponse { - // message fields - pub order_hash: ::std::string::String, - pub results: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateDerivativeMarketOrderResponse { - fn default() -> &'a MsgCreateDerivativeMarketOrderResponse { - ::default_instance() - } -} - -impl MsgCreateDerivativeMarketOrderResponse { - pub fn new() -> MsgCreateDerivativeMarketOrderResponse { - ::std::default::Default::default() - } - - // string order_hash = 1; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.DerivativeMarketOrderResults results = 2; - - - pub fn get_results(&self) -> &DerivativeMarketOrderResults { - self.results.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_results(&mut self) { - self.results.clear(); - } - - pub fn has_results(&self) -> bool { - self.results.is_some() - } - - // Param is passed by value, moved - pub fn set_results(&mut self, v: DerivativeMarketOrderResults) { - self.results = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_results(&mut self) -> &mut DerivativeMarketOrderResults { - if self.results.is_none() { - self.results.set_default(); - } - self.results.as_mut().unwrap() - } - - // Take field - pub fn take_results(&mut self) -> DerivativeMarketOrderResults { - self.results.take().unwrap_or_else(|| DerivativeMarketOrderResults::new()) - } -} - -impl ::protobuf::Message for MsgCreateDerivativeMarketOrderResponse { - fn is_initialized(&self) -> bool { - for v in &self.results { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.results)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.order_hash); - } - if let Some(ref v) = self.results.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.order_hash.is_empty() { - os.write_string(1, &self.order_hash)?; - } - if let Some(ref v) = self.results.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateDerivativeMarketOrderResponse { - MsgCreateDerivativeMarketOrderResponse::new() - } - - fn default_instance() -> &'static MsgCreateDerivativeMarketOrderResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateDerivativeMarketOrderResponse::new) - } -} - -impl ::protobuf::Clear for MsgCreateDerivativeMarketOrderResponse { - fn clear(&mut self) { - self.order_hash.clear(); - self.results.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateDerivativeMarketOrderResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DerivativeMarketOrderResults { - // message fields - pub quantity: ::std::string::String, - pub price: ::std::string::String, - pub fee: ::std::string::String, - pub position_delta: ::protobuf::SingularPtrField, - pub payout: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DerivativeMarketOrderResults { - fn default() -> &'a DerivativeMarketOrderResults { - ::default_instance() - } -} - -impl DerivativeMarketOrderResults { - pub fn new() -> DerivativeMarketOrderResults { - ::std::default::Default::default() - } - - // string quantity = 1; - - - pub fn get_quantity(&self) -> &str { - &self.quantity - } - pub fn clear_quantity(&mut self) { - self.quantity.clear(); - } - - // Param is passed by value, moved - pub fn set_quantity(&mut self, v: ::std::string::String) { - self.quantity = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quantity(&mut self) -> &mut ::std::string::String { - &mut self.quantity - } - - // Take field - pub fn take_quantity(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quantity, ::std::string::String::new()) - } - - // string price = 2; - - - pub fn get_price(&self) -> &str { - &self.price - } - pub fn clear_price(&mut self) { - self.price.clear(); - } - - // Param is passed by value, moved - pub fn set_price(&mut self, v: ::std::string::String) { - self.price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_price(&mut self) -> &mut ::std::string::String { - &mut self.price - } - - // Take field - pub fn take_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.price, ::std::string::String::new()) - } - - // string fee = 3; - - - pub fn get_fee(&self) -> &str { - &self.fee - } - pub fn clear_fee(&mut self) { - self.fee.clear(); - } - - // Param is passed by value, moved - pub fn set_fee(&mut self, v: ::std::string::String) { - self.fee = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_fee(&mut self) -> &mut ::std::string::String { - &mut self.fee - } - - // Take field - pub fn take_fee(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.fee, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.PositionDelta position_delta = 4; - - - pub fn get_position_delta(&self) -> &super::exchange::PositionDelta { - self.position_delta.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_position_delta(&mut self) { - self.position_delta.clear(); - } - - pub fn has_position_delta(&self) -> bool { - self.position_delta.is_some() - } - - // Param is passed by value, moved - pub fn set_position_delta(&mut self, v: super::exchange::PositionDelta) { - self.position_delta = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_position_delta(&mut self) -> &mut super::exchange::PositionDelta { - if self.position_delta.is_none() { - self.position_delta.set_default(); - } - self.position_delta.as_mut().unwrap() - } - - // Take field - pub fn take_position_delta(&mut self) -> super::exchange::PositionDelta { - self.position_delta.take().unwrap_or_else(|| super::exchange::PositionDelta::new()) - } - - // string payout = 5; - - - pub fn get_payout(&self) -> &str { - &self.payout - } - pub fn clear_payout(&mut self) { - self.payout.clear(); - } - - // Param is passed by value, moved - pub fn set_payout(&mut self, v: ::std::string::String) { - self.payout = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_payout(&mut self) -> &mut ::std::string::String { - &mut self.payout - } - - // Take field - pub fn take_payout(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.payout, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for DerivativeMarketOrderResults { - fn is_initialized(&self) -> bool { - for v in &self.position_delta { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quantity)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.price)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.fee)?; - }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.position_delta)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.payout)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.quantity.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.quantity); - } - if !self.price.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.price); - } - if !self.fee.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.fee); - } - if let Some(ref v) = self.position_delta.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if !self.payout.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.payout); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.quantity.is_empty() { - os.write_string(1, &self.quantity)?; - } - if !self.price.is_empty() { - os.write_string(2, &self.price)?; - } - if !self.fee.is_empty() { - os.write_string(3, &self.fee)?; - } - if let Some(ref v) = self.position_delta.as_ref() { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if !self.payout.is_empty() { - os.write_string(5, &self.payout)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DerivativeMarketOrderResults { - DerivativeMarketOrderResults::new() - } - - fn default_instance() -> &'static DerivativeMarketOrderResults { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DerivativeMarketOrderResults::new) - } -} - -impl ::protobuf::Clear for DerivativeMarketOrderResults { - fn clear(&mut self) { - self.quantity.clear(); - self.price.clear(); - self.fee.clear(); - self.position_delta.clear(); - self.payout.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DerivativeMarketOrderResults { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateBinaryOptionsMarketOrder { - // message fields - pub sender: ::std::string::String, - pub order: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateBinaryOptionsMarketOrder { - fn default() -> &'a MsgCreateBinaryOptionsMarketOrder { - ::default_instance() - } -} - -impl MsgCreateBinaryOptionsMarketOrder { - pub fn new() -> MsgCreateBinaryOptionsMarketOrder { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.DerivativeOrder order = 2; - - - pub fn get_order(&self) -> &super::exchange::DerivativeOrder { - self.order.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order(&mut self) { - self.order.clear(); - } - - pub fn has_order(&self) -> bool { - self.order.is_some() - } - - // Param is passed by value, moved - pub fn set_order(&mut self, v: super::exchange::DerivativeOrder) { - self.order = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order(&mut self) -> &mut super::exchange::DerivativeOrder { - if self.order.is_none() { - self.order.set_default(); - } - self.order.as_mut().unwrap() - } - - // Take field - pub fn take_order(&mut self) -> super::exchange::DerivativeOrder { - self.order.take().unwrap_or_else(|| super::exchange::DerivativeOrder::new()) - } -} - -impl ::protobuf::Message for MsgCreateBinaryOptionsMarketOrder { - fn is_initialized(&self) -> bool { - for v in &self.order { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if let Some(ref v) = self.order.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if let Some(ref v) = self.order.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateBinaryOptionsMarketOrder { - MsgCreateBinaryOptionsMarketOrder::new() - } - - fn default_instance() -> &'static MsgCreateBinaryOptionsMarketOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateBinaryOptionsMarketOrder::new) - } -} - -impl ::protobuf::Clear for MsgCreateBinaryOptionsMarketOrder { - fn clear(&mut self) { - self.sender.clear(); - self.order.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateBinaryOptionsMarketOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCreateBinaryOptionsMarketOrderResponse { - // message fields - pub order_hash: ::std::string::String, - pub results: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCreateBinaryOptionsMarketOrderResponse { - fn default() -> &'a MsgCreateBinaryOptionsMarketOrderResponse { - ::default_instance() - } -} - -impl MsgCreateBinaryOptionsMarketOrderResponse { - pub fn new() -> MsgCreateBinaryOptionsMarketOrderResponse { - ::std::default::Default::default() - } - - // string order_hash = 1; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.DerivativeMarketOrderResults results = 2; - - - pub fn get_results(&self) -> &DerivativeMarketOrderResults { - self.results.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_results(&mut self) { - self.results.clear(); - } - - pub fn has_results(&self) -> bool { - self.results.is_some() - } - - // Param is passed by value, moved - pub fn set_results(&mut self, v: DerivativeMarketOrderResults) { - self.results = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_results(&mut self) -> &mut DerivativeMarketOrderResults { - if self.results.is_none() { - self.results.set_default(); - } - self.results.as_mut().unwrap() - } - - // Take field - pub fn take_results(&mut self) -> DerivativeMarketOrderResults { - self.results.take().unwrap_or_else(|| DerivativeMarketOrderResults::new()) - } -} - -impl ::protobuf::Message for MsgCreateBinaryOptionsMarketOrderResponse { - fn is_initialized(&self) -> bool { - for v in &self.results { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.results)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.order_hash); - } - if let Some(ref v) = self.results.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.order_hash.is_empty() { - os.write_string(1, &self.order_hash)?; - } - if let Some(ref v) = self.results.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCreateBinaryOptionsMarketOrderResponse { - MsgCreateBinaryOptionsMarketOrderResponse::new() - } - - fn default_instance() -> &'static MsgCreateBinaryOptionsMarketOrderResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCreateBinaryOptionsMarketOrderResponse::new) - } -} - -impl ::protobuf::Clear for MsgCreateBinaryOptionsMarketOrderResponse { - fn clear(&mut self) { - self.order_hash.clear(); - self.results.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCreateBinaryOptionsMarketOrderResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCancelDerivativeOrder { - // message fields - pub sender: ::std::string::String, - pub market_id: ::std::string::String, - pub subaccount_id: ::std::string::String, - pub order_hash: ::std::string::String, - pub order_mask: i32, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCancelDerivativeOrder { - fn default() -> &'a MsgCancelDerivativeOrder { - ::default_instance() - } -} - -impl MsgCancelDerivativeOrder { - pub fn new() -> MsgCancelDerivativeOrder { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string market_id = 2; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string subaccount_id = 3; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // string order_hash = 4; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } - - // int32 order_mask = 5; - - - pub fn get_order_mask(&self) -> i32 { - self.order_mask - } - pub fn clear_order_mask(&mut self) { - self.order_mask = 0; - } - - // Param is passed by value, moved - pub fn set_order_mask(&mut self, v: i32) { - self.order_mask = v; - } -} - -impl ::protobuf::Message for MsgCancelDerivativeOrder { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int32()?; - self.order_mask = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.market_id); - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.subaccount_id); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.order_hash); - } - if self.order_mask != 0 { - my_size += ::protobuf::rt::value_size(5, self.order_mask, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.market_id.is_empty() { - os.write_string(2, &self.market_id)?; - } - if !self.subaccount_id.is_empty() { - os.write_string(3, &self.subaccount_id)?; - } - if !self.order_hash.is_empty() { - os.write_string(4, &self.order_hash)?; - } - if self.order_mask != 0 { - os.write_int32(5, self.order_mask)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCancelDerivativeOrder { - MsgCancelDerivativeOrder::new() - } - - fn default_instance() -> &'static MsgCancelDerivativeOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCancelDerivativeOrder::new) - } -} - -impl ::protobuf::Clear for MsgCancelDerivativeOrder { - fn clear(&mut self) { - self.sender.clear(); - self.market_id.clear(); - self.subaccount_id.clear(); - self.order_hash.clear(); - self.order_mask = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCancelDerivativeOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCancelDerivativeOrderResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCancelDerivativeOrderResponse { - fn default() -> &'a MsgCancelDerivativeOrderResponse { - ::default_instance() - } -} - -impl MsgCancelDerivativeOrderResponse { - pub fn new() -> MsgCancelDerivativeOrderResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgCancelDerivativeOrderResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCancelDerivativeOrderResponse { - MsgCancelDerivativeOrderResponse::new() - } - - fn default_instance() -> &'static MsgCancelDerivativeOrderResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCancelDerivativeOrderResponse::new) - } -} - -impl ::protobuf::Clear for MsgCancelDerivativeOrderResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCancelDerivativeOrderResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCancelBinaryOptionsOrder { - // message fields - pub sender: ::std::string::String, - pub market_id: ::std::string::String, - pub subaccount_id: ::std::string::String, - pub order_hash: ::std::string::String, - pub order_mask: i32, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCancelBinaryOptionsOrder { - fn default() -> &'a MsgCancelBinaryOptionsOrder { - ::default_instance() - } -} - -impl MsgCancelBinaryOptionsOrder { - pub fn new() -> MsgCancelBinaryOptionsOrder { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string market_id = 2; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string subaccount_id = 3; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // string order_hash = 4; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } - - // int32 order_mask = 5; - - - pub fn get_order_mask(&self) -> i32 { - self.order_mask - } - pub fn clear_order_mask(&mut self) { - self.order_mask = 0; - } - - // Param is passed by value, moved - pub fn set_order_mask(&mut self, v: i32) { - self.order_mask = v; - } -} - -impl ::protobuf::Message for MsgCancelBinaryOptionsOrder { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int32()?; - self.order_mask = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.market_id); - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.subaccount_id); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.order_hash); - } - if self.order_mask != 0 { - my_size += ::protobuf::rt::value_size(5, self.order_mask, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.market_id.is_empty() { - os.write_string(2, &self.market_id)?; - } - if !self.subaccount_id.is_empty() { - os.write_string(3, &self.subaccount_id)?; - } - if !self.order_hash.is_empty() { - os.write_string(4, &self.order_hash)?; - } - if self.order_mask != 0 { - os.write_int32(5, self.order_mask)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCancelBinaryOptionsOrder { - MsgCancelBinaryOptionsOrder::new() - } - - fn default_instance() -> &'static MsgCancelBinaryOptionsOrder { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCancelBinaryOptionsOrder::new) - } -} - -impl ::protobuf::Clear for MsgCancelBinaryOptionsOrder { - fn clear(&mut self) { - self.sender.clear(); - self.market_id.clear(); - self.subaccount_id.clear(); - self.order_hash.clear(); - self.order_mask = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCancelBinaryOptionsOrder { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgCancelBinaryOptionsOrderResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgCancelBinaryOptionsOrderResponse { - fn default() -> &'a MsgCancelBinaryOptionsOrderResponse { - ::default_instance() - } -} - -impl MsgCancelBinaryOptionsOrderResponse { - pub fn new() -> MsgCancelBinaryOptionsOrderResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgCancelBinaryOptionsOrderResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgCancelBinaryOptionsOrderResponse { - MsgCancelBinaryOptionsOrderResponse::new() - } - - fn default_instance() -> &'static MsgCancelBinaryOptionsOrderResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgCancelBinaryOptionsOrderResponse::new) - } -} - -impl ::protobuf::Clear for MsgCancelBinaryOptionsOrderResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgCancelBinaryOptionsOrderResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct OrderData { - // message fields - pub market_id: ::std::string::String, - pub subaccount_id: ::std::string::String, - pub order_hash: ::std::string::String, - pub order_mask: i32, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a OrderData { - fn default() -> &'a OrderData { - ::default_instance() - } -} - -impl OrderData { - pub fn new() -> OrderData { - ::std::default::Default::default() - } - - // string market_id = 1; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string subaccount_id = 2; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // string order_hash = 3; - - - pub fn get_order_hash(&self) -> &str { - &self.order_hash - } - pub fn clear_order_hash(&mut self) { - self.order_hash.clear(); - } - - // Param is passed by value, moved - pub fn set_order_hash(&mut self, v: ::std::string::String) { - self.order_hash = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order_hash(&mut self) -> &mut ::std::string::String { - &mut self.order_hash - } - - // Take field - pub fn take_order_hash(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.order_hash, ::std::string::String::new()) - } - - // int32 order_mask = 4; - - - pub fn get_order_mask(&self) -> i32 { - self.order_mask - } - pub fn clear_order_mask(&mut self) { - self.order_mask = 0; - } - - // Param is passed by value, moved - pub fn set_order_mask(&mut self, v: i32) { - self.order_mask = v; - } -} - -impl ::protobuf::Message for OrderData { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.order_hash)?; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int32()?; - self.order_mask = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.market_id); - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.subaccount_id); - } - if !self.order_hash.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.order_hash); - } - if self.order_mask != 0 { - my_size += ::protobuf::rt::value_size(4, self.order_mask, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.market_id.is_empty() { - os.write_string(1, &self.market_id)?; - } - if !self.subaccount_id.is_empty() { - os.write_string(2, &self.subaccount_id)?; - } - if !self.order_hash.is_empty() { - os.write_string(3, &self.order_hash)?; - } - if self.order_mask != 0 { - os.write_int32(4, self.order_mask)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> OrderData { - OrderData::new() - } - - fn default_instance() -> &'static OrderData { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(OrderData::new) - } -} - -impl ::protobuf::Clear for OrderData { - fn clear(&mut self) { - self.market_id.clear(); - self.subaccount_id.clear(); - self.order_hash.clear(); - self.order_mask = 0; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for OrderData { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCancelDerivativeOrders { - // message fields - pub sender: ::std::string::String, - pub data: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCancelDerivativeOrders { - fn default() -> &'a MsgBatchCancelDerivativeOrders { - ::default_instance() - } -} - -impl MsgBatchCancelDerivativeOrders { - pub fn new() -> MsgBatchCancelDerivativeOrders { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.OrderData data = 2; - - - pub fn get_data(&self) -> &[OrderData] { - &self.data - } - pub fn clear_data(&mut self) { - self.data.clear(); - } - - // Param is passed by value, moved - pub fn set_data(&mut self, v: ::protobuf::RepeatedField) { - self.data = v; - } - - // Mutable pointer to the field. - pub fn mut_data(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.data - } - - // Take field - pub fn take_data(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.data, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgBatchCancelDerivativeOrders { - fn is_initialized(&self) -> bool { - for v in &self.data { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.data)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - for value in &self.data { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - for v in &self.data { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCancelDerivativeOrders { - MsgBatchCancelDerivativeOrders::new() - } - - fn default_instance() -> &'static MsgBatchCancelDerivativeOrders { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCancelDerivativeOrders::new) - } -} - -impl ::protobuf::Clear for MsgBatchCancelDerivativeOrders { - fn clear(&mut self) { - self.sender.clear(); - self.data.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCancelDerivativeOrders { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgBatchCancelDerivativeOrdersResponse { - // message fields - pub success: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgBatchCancelDerivativeOrdersResponse { - fn default() -> &'a MsgBatchCancelDerivativeOrdersResponse { - ::default_instance() - } -} - -impl MsgBatchCancelDerivativeOrdersResponse { - pub fn new() -> MsgBatchCancelDerivativeOrdersResponse { - ::std::default::Default::default() - } - - // repeated bool success = 1; - - - pub fn get_success(&self) -> &[bool] { - &self.success - } - pub fn clear_success(&mut self) { - self.success.clear(); - } - - // Param is passed by value, moved - pub fn set_success(&mut self, v: ::std::vec::Vec) { - self.success = v; - } - - // Mutable pointer to the field. - pub fn mut_success(&mut self) -> &mut ::std::vec::Vec { - &mut self.success - } - - // Take field - pub fn take_success(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.success, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for MsgBatchCancelDerivativeOrdersResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_bool_into(wire_type, is, &mut self.success)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += 2 * self.success.len() as u32; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.success { - os.write_bool(1, *v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgBatchCancelDerivativeOrdersResponse { - MsgBatchCancelDerivativeOrdersResponse::new() - } - - fn default_instance() -> &'static MsgBatchCancelDerivativeOrdersResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgBatchCancelDerivativeOrdersResponse::new) - } -} - -impl ::protobuf::Clear for MsgBatchCancelDerivativeOrdersResponse { - fn clear(&mut self) { - self.success.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgBatchCancelDerivativeOrdersResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgSubaccountTransfer { - // message fields - pub sender: ::std::string::String, - pub source_subaccount_id: ::std::string::String, - pub destination_subaccount_id: ::std::string::String, - pub amount: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgSubaccountTransfer { - fn default() -> &'a MsgSubaccountTransfer { - ::default_instance() - } -} - -impl MsgSubaccountTransfer { - pub fn new() -> MsgSubaccountTransfer { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string source_subaccount_id = 2; - - - pub fn get_source_subaccount_id(&self) -> &str { - &self.source_subaccount_id - } - pub fn clear_source_subaccount_id(&mut self) { - self.source_subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_source_subaccount_id(&mut self, v: ::std::string::String) { - self.source_subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_source_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.source_subaccount_id - } - - // Take field - pub fn take_source_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.source_subaccount_id, ::std::string::String::new()) - } - - // string destination_subaccount_id = 3; - - - pub fn get_destination_subaccount_id(&self) -> &str { - &self.destination_subaccount_id - } - pub fn clear_destination_subaccount_id(&mut self) { - self.destination_subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_destination_subaccount_id(&mut self, v: ::std::string::String) { - self.destination_subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_destination_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.destination_subaccount_id - } - - // Take field - pub fn take_destination_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.destination_subaccount_id, ::std::string::String::new()) - } - - // .cosmos.base.v1beta1.Coin amount = 4; - - - pub fn get_amount(&self) -> &super::coin::Coin { - self.amount.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_amount(&mut self) { - self.amount.clear(); - } - - pub fn has_amount(&self) -> bool { - self.amount.is_some() - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: super::coin::Coin) { - self.amount = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_amount(&mut self) -> &mut super::coin::Coin { - if self.amount.is_none() { - self.amount.set_default(); - } - self.amount.as_mut().unwrap() - } - - // Take field - pub fn take_amount(&mut self) -> super::coin::Coin { - self.amount.take().unwrap_or_else(|| super::coin::Coin::new()) - } -} - -impl ::protobuf::Message for MsgSubaccountTransfer { - fn is_initialized(&self) -> bool { - for v in &self.amount { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.source_subaccount_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.destination_subaccount_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.amount)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.source_subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.source_subaccount_id); - } - if !self.destination_subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.destination_subaccount_id); - } - if let Some(ref v) = self.amount.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.source_subaccount_id.is_empty() { - os.write_string(2, &self.source_subaccount_id)?; - } - if !self.destination_subaccount_id.is_empty() { - os.write_string(3, &self.destination_subaccount_id)?; - } - if let Some(ref v) = self.amount.as_ref() { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgSubaccountTransfer { - MsgSubaccountTransfer::new() - } - - fn default_instance() -> &'static MsgSubaccountTransfer { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgSubaccountTransfer::new) - } -} - -impl ::protobuf::Clear for MsgSubaccountTransfer { - fn clear(&mut self) { - self.sender.clear(); - self.source_subaccount_id.clear(); - self.destination_subaccount_id.clear(); - self.amount.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgSubaccountTransfer { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgSubaccountTransferResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgSubaccountTransferResponse { - fn default() -> &'a MsgSubaccountTransferResponse { - ::default_instance() - } -} - -impl MsgSubaccountTransferResponse { - pub fn new() -> MsgSubaccountTransferResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgSubaccountTransferResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgSubaccountTransferResponse { - MsgSubaccountTransferResponse::new() - } - - fn default_instance() -> &'static MsgSubaccountTransferResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgSubaccountTransferResponse::new) - } -} - -impl ::protobuf::Clear for MsgSubaccountTransferResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgSubaccountTransferResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgExternalTransfer { - // message fields - pub sender: ::std::string::String, - pub source_subaccount_id: ::std::string::String, - pub destination_subaccount_id: ::std::string::String, - pub amount: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgExternalTransfer { - fn default() -> &'a MsgExternalTransfer { - ::default_instance() - } -} - -impl MsgExternalTransfer { - pub fn new() -> MsgExternalTransfer { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string source_subaccount_id = 2; - - - pub fn get_source_subaccount_id(&self) -> &str { - &self.source_subaccount_id - } - pub fn clear_source_subaccount_id(&mut self) { - self.source_subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_source_subaccount_id(&mut self, v: ::std::string::String) { - self.source_subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_source_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.source_subaccount_id - } - - // Take field - pub fn take_source_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.source_subaccount_id, ::std::string::String::new()) - } - - // string destination_subaccount_id = 3; - - - pub fn get_destination_subaccount_id(&self) -> &str { - &self.destination_subaccount_id - } - pub fn clear_destination_subaccount_id(&mut self) { - self.destination_subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_destination_subaccount_id(&mut self, v: ::std::string::String) { - self.destination_subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_destination_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.destination_subaccount_id - } - - // Take field - pub fn take_destination_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.destination_subaccount_id, ::std::string::String::new()) - } - - // .cosmos.base.v1beta1.Coin amount = 4; - - - pub fn get_amount(&self) -> &super::coin::Coin { - self.amount.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_amount(&mut self) { - self.amount.clear(); - } - - pub fn has_amount(&self) -> bool { - self.amount.is_some() - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: super::coin::Coin) { - self.amount = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_amount(&mut self) -> &mut super::coin::Coin { - if self.amount.is_none() { - self.amount.set_default(); - } - self.amount.as_mut().unwrap() - } - - // Take field - pub fn take_amount(&mut self) -> super::coin::Coin { - self.amount.take().unwrap_or_else(|| super::coin::Coin::new()) - } -} - -impl ::protobuf::Message for MsgExternalTransfer { - fn is_initialized(&self) -> bool { - for v in &self.amount { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.source_subaccount_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.destination_subaccount_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.amount)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.source_subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.source_subaccount_id); - } - if !self.destination_subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.destination_subaccount_id); - } - if let Some(ref v) = self.amount.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.source_subaccount_id.is_empty() { - os.write_string(2, &self.source_subaccount_id)?; - } - if !self.destination_subaccount_id.is_empty() { - os.write_string(3, &self.destination_subaccount_id)?; - } - if let Some(ref v) = self.amount.as_ref() { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgExternalTransfer { - MsgExternalTransfer::new() - } - - fn default_instance() -> &'static MsgExternalTransfer { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgExternalTransfer::new) - } -} - -impl ::protobuf::Clear for MsgExternalTransfer { - fn clear(&mut self) { - self.sender.clear(); - self.source_subaccount_id.clear(); - self.destination_subaccount_id.clear(); - self.amount.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgExternalTransfer { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgExternalTransferResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgExternalTransferResponse { - fn default() -> &'a MsgExternalTransferResponse { - ::default_instance() - } -} - -impl MsgExternalTransferResponse { - pub fn new() -> MsgExternalTransferResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgExternalTransferResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgExternalTransferResponse { - MsgExternalTransferResponse::new() - } - - fn default_instance() -> &'static MsgExternalTransferResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgExternalTransferResponse::new) - } -} - -impl ::protobuf::Clear for MsgExternalTransferResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgExternalTransferResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgLiquidatePosition { - // message fields - pub sender: ::std::string::String, - pub subaccount_id: ::std::string::String, - pub market_id: ::std::string::String, - pub order: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgLiquidatePosition { - fn default() -> &'a MsgLiquidatePosition { - ::default_instance() - } -} - -impl MsgLiquidatePosition { - pub fn new() -> MsgLiquidatePosition { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string subaccount_id = 2; - - - pub fn get_subaccount_id(&self) -> &str { - &self.subaccount_id - } - pub fn clear_subaccount_id(&mut self) { - self.subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_subaccount_id(&mut self, v: ::std::string::String) { - self.subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.subaccount_id - } - - // Take field - pub fn take_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.subaccount_id, ::std::string::String::new()) - } - - // string market_id = 3; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.DerivativeOrder order = 4; - - - pub fn get_order(&self) -> &super::exchange::DerivativeOrder { - self.order.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_order(&mut self) { - self.order.clear(); - } - - pub fn has_order(&self) -> bool { - self.order.is_some() - } - - // Param is passed by value, moved - pub fn set_order(&mut self, v: super::exchange::DerivativeOrder) { - self.order = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_order(&mut self) -> &mut super::exchange::DerivativeOrder { - if self.order.is_none() { - self.order.set_default(); - } - self.order.as_mut().unwrap() - } - - // Take field - pub fn take_order(&mut self) -> super::exchange::DerivativeOrder { - self.order.take().unwrap_or_else(|| super::exchange::DerivativeOrder::new()) - } -} - -impl ::protobuf::Message for MsgLiquidatePosition { - fn is_initialized(&self) -> bool { - for v in &self.order { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.subaccount_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.order)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.subaccount_id); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.market_id); - } - if let Some(ref v) = self.order.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.subaccount_id.is_empty() { - os.write_string(2, &self.subaccount_id)?; - } - if !self.market_id.is_empty() { - os.write_string(3, &self.market_id)?; - } - if let Some(ref v) = self.order.as_ref() { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgLiquidatePosition { - MsgLiquidatePosition::new() - } - - fn default_instance() -> &'static MsgLiquidatePosition { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgLiquidatePosition::new) - } -} - -impl ::protobuf::Clear for MsgLiquidatePosition { - fn clear(&mut self) { - self.sender.clear(); - self.subaccount_id.clear(); - self.market_id.clear(); - self.order.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgLiquidatePosition { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgLiquidatePositionResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgLiquidatePositionResponse { - fn default() -> &'a MsgLiquidatePositionResponse { - ::default_instance() - } -} - -impl MsgLiquidatePositionResponse { - pub fn new() -> MsgLiquidatePositionResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgLiquidatePositionResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgLiquidatePositionResponse { - MsgLiquidatePositionResponse::new() - } - - fn default_instance() -> &'static MsgLiquidatePositionResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgLiquidatePositionResponse::new) - } -} - -impl ::protobuf::Clear for MsgLiquidatePositionResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgLiquidatePositionResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgIncreasePositionMargin { - // message fields - pub sender: ::std::string::String, - pub source_subaccount_id: ::std::string::String, - pub destination_subaccount_id: ::std::string::String, - pub market_id: ::std::string::String, - pub amount: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgIncreasePositionMargin { - fn default() -> &'a MsgIncreasePositionMargin { - ::default_instance() - } -} - -impl MsgIncreasePositionMargin { - pub fn new() -> MsgIncreasePositionMargin { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string source_subaccount_id = 2; - - - pub fn get_source_subaccount_id(&self) -> &str { - &self.source_subaccount_id - } - pub fn clear_source_subaccount_id(&mut self) { - self.source_subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_source_subaccount_id(&mut self, v: ::std::string::String) { - self.source_subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_source_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.source_subaccount_id - } - - // Take field - pub fn take_source_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.source_subaccount_id, ::std::string::String::new()) - } - - // string destination_subaccount_id = 3; - - - pub fn get_destination_subaccount_id(&self) -> &str { - &self.destination_subaccount_id - } - pub fn clear_destination_subaccount_id(&mut self) { - self.destination_subaccount_id.clear(); - } - - // Param is passed by value, moved - pub fn set_destination_subaccount_id(&mut self, v: ::std::string::String) { - self.destination_subaccount_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_destination_subaccount_id(&mut self) -> &mut ::std::string::String { - &mut self.destination_subaccount_id - } - - // Take field - pub fn take_destination_subaccount_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.destination_subaccount_id, ::std::string::String::new()) - } - - // string market_id = 4; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string amount = 5; - - - pub fn get_amount(&self) -> &str { - &self.amount - } - pub fn clear_amount(&mut self) { - self.amount.clear(); - } - - // Param is passed by value, moved - pub fn set_amount(&mut self, v: ::std::string::String) { - self.amount = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_amount(&mut self) -> &mut ::std::string::String { - &mut self.amount - } - - // Take field - pub fn take_amount(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.amount, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgIncreasePositionMargin { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.source_subaccount_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.destination_subaccount_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.amount)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.source_subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.source_subaccount_id); - } - if !self.destination_subaccount_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.destination_subaccount_id); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.market_id); - } - if !self.amount.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.amount); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.source_subaccount_id.is_empty() { - os.write_string(2, &self.source_subaccount_id)?; - } - if !self.destination_subaccount_id.is_empty() { - os.write_string(3, &self.destination_subaccount_id)?; - } - if !self.market_id.is_empty() { - os.write_string(4, &self.market_id)?; - } - if !self.amount.is_empty() { - os.write_string(5, &self.amount)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgIncreasePositionMargin { - MsgIncreasePositionMargin::new() - } - - fn default_instance() -> &'static MsgIncreasePositionMargin { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgIncreasePositionMargin::new) - } -} - -impl ::protobuf::Clear for MsgIncreasePositionMargin { - fn clear(&mut self) { - self.sender.clear(); - self.source_subaccount_id.clear(); - self.destination_subaccount_id.clear(); - self.market_id.clear(); - self.amount.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgIncreasePositionMargin { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgIncreasePositionMarginResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgIncreasePositionMarginResponse { - fn default() -> &'a MsgIncreasePositionMarginResponse { - ::default_instance() - } -} - -impl MsgIncreasePositionMarginResponse { - pub fn new() -> MsgIncreasePositionMarginResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgIncreasePositionMarginResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgIncreasePositionMarginResponse { - MsgIncreasePositionMarginResponse::new() - } - - fn default_instance() -> &'static MsgIncreasePositionMarginResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgIncreasePositionMarginResponse::new) - } -} - -impl ::protobuf::Clear for MsgIncreasePositionMarginResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgIncreasePositionMarginResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgPrivilegedExecuteContract { - // message fields - pub sender: ::std::string::String, - pub funds: ::std::string::String, - pub contract_address: ::std::string::String, - pub data: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgPrivilegedExecuteContract { - fn default() -> &'a MsgPrivilegedExecuteContract { - ::default_instance() - } -} - -impl MsgPrivilegedExecuteContract { - pub fn new() -> MsgPrivilegedExecuteContract { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string funds = 2; - - - pub fn get_funds(&self) -> &str { - &self.funds - } - pub fn clear_funds(&mut self) { - self.funds.clear(); - } - - // Param is passed by value, moved - pub fn set_funds(&mut self, v: ::std::string::String) { - self.funds = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_funds(&mut self) -> &mut ::std::string::String { - &mut self.funds - } - - // Take field - pub fn take_funds(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.funds, ::std::string::String::new()) - } - - // string contract_address = 3; - - - pub fn get_contract_address(&self) -> &str { - &self.contract_address - } - pub fn clear_contract_address(&mut self) { - self.contract_address.clear(); - } - - // Param is passed by value, moved - pub fn set_contract_address(&mut self, v: ::std::string::String) { - self.contract_address = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_contract_address(&mut self) -> &mut ::std::string::String { - &mut self.contract_address - } - - // Take field - pub fn take_contract_address(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.contract_address, ::std::string::String::new()) - } - - // string data = 4; - - - pub fn get_data(&self) -> &str { - &self.data - } - pub fn clear_data(&mut self) { - self.data.clear(); - } - - // Param is passed by value, moved - pub fn set_data(&mut self, v: ::std::string::String) { - self.data = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_data(&mut self) -> &mut ::std::string::String { - &mut self.data - } - - // Take field - pub fn take_data(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.data, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgPrivilegedExecuteContract { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.funds)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.contract_address)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.data)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.funds.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.funds); - } - if !self.contract_address.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.contract_address); - } - if !self.data.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.data); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.funds.is_empty() { - os.write_string(2, &self.funds)?; - } - if !self.contract_address.is_empty() { - os.write_string(3, &self.contract_address)?; - } - if !self.data.is_empty() { - os.write_string(4, &self.data)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgPrivilegedExecuteContract { - MsgPrivilegedExecuteContract::new() - } - - fn default_instance() -> &'static MsgPrivilegedExecuteContract { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgPrivilegedExecuteContract::new) - } -} - -impl ::protobuf::Clear for MsgPrivilegedExecuteContract { - fn clear(&mut self) { - self.sender.clear(); - self.funds.clear(); - self.contract_address.clear(); - self.data.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgPrivilegedExecuteContract { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgPrivilegedExecuteContractResponse { - // message fields - pub funds_diff: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgPrivilegedExecuteContractResponse { - fn default() -> &'a MsgPrivilegedExecuteContractResponse { - ::default_instance() - } -} - -impl MsgPrivilegedExecuteContractResponse { - pub fn new() -> MsgPrivilegedExecuteContractResponse { - ::std::default::Default::default() - } - - // repeated .cosmos.base.v1beta1.Coin funds_diff = 1; - - - pub fn get_funds_diff(&self) -> &[super::coin::Coin] { - &self.funds_diff - } - pub fn clear_funds_diff(&mut self) { - self.funds_diff.clear(); - } - - // Param is passed by value, moved - pub fn set_funds_diff(&mut self, v: ::protobuf::RepeatedField) { - self.funds_diff = v; - } - - // Mutable pointer to the field. - pub fn mut_funds_diff(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.funds_diff - } - - // Take field - pub fn take_funds_diff(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.funds_diff, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for MsgPrivilegedExecuteContractResponse { - fn is_initialized(&self) -> bool { - for v in &self.funds_diff { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.funds_diff)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - for value in &self.funds_diff { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - for v in &self.funds_diff { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgPrivilegedExecuteContractResponse { - MsgPrivilegedExecuteContractResponse::new() - } - - fn default_instance() -> &'static MsgPrivilegedExecuteContractResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgPrivilegedExecuteContractResponse::new) - } -} - -impl ::protobuf::Clear for MsgPrivilegedExecuteContractResponse { - fn clear(&mut self) { - self.funds_diff.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgPrivilegedExecuteContractResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SpotMarketParamUpdateProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub market_id: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub relayer_fee_share_rate: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - pub status: super::exchange::MarketStatus, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SpotMarketParamUpdateProposal { - fn default() -> &'a SpotMarketParamUpdateProposal { - ::default_instance() - } -} - -impl SpotMarketParamUpdateProposal { - pub fn new() -> SpotMarketParamUpdateProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string market_id = 3; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string maker_fee_rate = 4; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 5; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string relayer_fee_share_rate = 6; - - - pub fn get_relayer_fee_share_rate(&self) -> &str { - &self.relayer_fee_share_rate - } - pub fn clear_relayer_fee_share_rate(&mut self) { - self.relayer_fee_share_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_relayer_fee_share_rate(&mut self, v: ::std::string::String) { - self.relayer_fee_share_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_relayer_fee_share_rate(&mut self) -> &mut ::std::string::String { - &mut self.relayer_fee_share_rate - } - - // Take field - pub fn take_relayer_fee_share_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.relayer_fee_share_rate, ::std::string::String::new()) - } - - // string min_price_tick_size = 7; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 8; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.MarketStatus status = 9; - - - pub fn get_status(&self) -> super::exchange::MarketStatus { - self.status - } - pub fn clear_status(&mut self) { - self.status = super::exchange::MarketStatus::Unspecified; - } - - // Param is passed by value, moved - pub fn set_status(&mut self, v: super::exchange::MarketStatus) { - self.status = v; - } -} - -impl ::protobuf::Message for SpotMarketParamUpdateProposal { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.relayer_fee_share_rate)?; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - 9 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 9, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.market_id); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.taker_fee_rate); - } - if !self.relayer_fee_share_rate.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.relayer_fee_share_rate); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.min_quantity_tick_size); - } - if self.status != super::exchange::MarketStatus::Unspecified { - my_size += ::protobuf::rt::enum_size(9, self.status); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.market_id.is_empty() { - os.write_string(3, &self.market_id)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(4, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(5, &self.taker_fee_rate)?; - } - if !self.relayer_fee_share_rate.is_empty() { - os.write_string(6, &self.relayer_fee_share_rate)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(7, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(8, &self.min_quantity_tick_size)?; - } - if self.status != super::exchange::MarketStatus::Unspecified { - os.write_enum(9, ::protobuf::ProtobufEnum::value(&self.status))?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SpotMarketParamUpdateProposal { - SpotMarketParamUpdateProposal::new() - } - - fn default_instance() -> &'static SpotMarketParamUpdateProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SpotMarketParamUpdateProposal::new) - } -} - -impl ::protobuf::Clear for SpotMarketParamUpdateProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.market_id.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.relayer_fee_share_rate.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.status = super::exchange::MarketStatus::Unspecified; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SpotMarketParamUpdateProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ExchangeEnableProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub exchangeType: ExchangeType, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ExchangeEnableProposal { - fn default() -> &'a ExchangeEnableProposal { - ::default_instance() - } -} - -impl ExchangeEnableProposal { - pub fn new() -> ExchangeEnableProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.ExchangeType exchangeType = 3; - - - pub fn get_exchangeType(&self) -> ExchangeType { - self.exchangeType - } - pub fn clear_exchangeType(&mut self) { - self.exchangeType = ExchangeType::EXCHANGE_UNSPECIFIED; - } - - // Param is passed by value, moved - pub fn set_exchangeType(&mut self, v: ExchangeType) { - self.exchangeType = v; - } -} - -impl ::protobuf::Message for ExchangeEnableProposal { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.exchangeType, 3, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if self.exchangeType != ExchangeType::EXCHANGE_UNSPECIFIED { - my_size += ::protobuf::rt::enum_size(3, self.exchangeType); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if self.exchangeType != ExchangeType::EXCHANGE_UNSPECIFIED { - os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.exchangeType))?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ExchangeEnableProposal { - ExchangeEnableProposal::new() - } - - fn default_instance() -> &'static ExchangeEnableProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ExchangeEnableProposal::new) - } -} - -impl ::protobuf::Clear for ExchangeEnableProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.exchangeType = ExchangeType::EXCHANGE_UNSPECIFIED; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ExchangeEnableProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BatchExchangeModificationProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub spot_market_param_update_proposals: ::protobuf::RepeatedField, - pub derivative_market_param_update_proposals: ::protobuf::RepeatedField, - pub spot_market_launch_proposals: ::protobuf::RepeatedField, - pub perpetual_market_launch_proposals: ::protobuf::RepeatedField, - pub expiry_futures_market_launch_proposals: ::protobuf::RepeatedField, - pub trading_reward_campaign_update_proposal: ::protobuf::SingularPtrField, - pub binary_options_market_launch_proposals: ::protobuf::RepeatedField, - pub binary_options_param_update_proposals: ::protobuf::RepeatedField, - pub denom_decimals_update_proposal: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BatchExchangeModificationProposal { - fn default() -> &'a BatchExchangeModificationProposal { - ::default_instance() - } -} - -impl BatchExchangeModificationProposal { - pub fn new() -> BatchExchangeModificationProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.SpotMarketParamUpdateProposal spot_market_param_update_proposals = 3; - - - pub fn get_spot_market_param_update_proposals(&self) -> &[SpotMarketParamUpdateProposal] { - &self.spot_market_param_update_proposals - } - pub fn clear_spot_market_param_update_proposals(&mut self) { - self.spot_market_param_update_proposals.clear(); - } - - // Param is passed by value, moved - pub fn set_spot_market_param_update_proposals(&mut self, v: ::protobuf::RepeatedField) { - self.spot_market_param_update_proposals = v; - } - - // Mutable pointer to the field. - pub fn mut_spot_market_param_update_proposals(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.spot_market_param_update_proposals - } - - // Take field - pub fn take_spot_market_param_update_proposals(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.spot_market_param_update_proposals, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.DerivativeMarketParamUpdateProposal derivative_market_param_update_proposals = 4; - - - pub fn get_derivative_market_param_update_proposals(&self) -> &[DerivativeMarketParamUpdateProposal] { - &self.derivative_market_param_update_proposals - } - pub fn clear_derivative_market_param_update_proposals(&mut self) { - self.derivative_market_param_update_proposals.clear(); - } - - // Param is passed by value, moved - pub fn set_derivative_market_param_update_proposals(&mut self, v: ::protobuf::RepeatedField) { - self.derivative_market_param_update_proposals = v; - } - - // Mutable pointer to the field. - pub fn mut_derivative_market_param_update_proposals(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.derivative_market_param_update_proposals - } - - // Take field - pub fn take_derivative_market_param_update_proposals(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.derivative_market_param_update_proposals, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.SpotMarketLaunchProposal spot_market_launch_proposals = 5; - - - pub fn get_spot_market_launch_proposals(&self) -> &[SpotMarketLaunchProposal] { - &self.spot_market_launch_proposals - } - pub fn clear_spot_market_launch_proposals(&mut self) { - self.spot_market_launch_proposals.clear(); - } - - // Param is passed by value, moved - pub fn set_spot_market_launch_proposals(&mut self, v: ::protobuf::RepeatedField) { - self.spot_market_launch_proposals = v; - } - - // Mutable pointer to the field. - pub fn mut_spot_market_launch_proposals(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.spot_market_launch_proposals - } - - // Take field - pub fn take_spot_market_launch_proposals(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.spot_market_launch_proposals, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.PerpetualMarketLaunchProposal perpetual_market_launch_proposals = 6; - - - pub fn get_perpetual_market_launch_proposals(&self) -> &[PerpetualMarketLaunchProposal] { - &self.perpetual_market_launch_proposals - } - pub fn clear_perpetual_market_launch_proposals(&mut self) { - self.perpetual_market_launch_proposals.clear(); - } - - // Param is passed by value, moved - pub fn set_perpetual_market_launch_proposals(&mut self, v: ::protobuf::RepeatedField) { - self.perpetual_market_launch_proposals = v; - } - - // Mutable pointer to the field. - pub fn mut_perpetual_market_launch_proposals(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.perpetual_market_launch_proposals - } - - // Take field - pub fn take_perpetual_market_launch_proposals(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.perpetual_market_launch_proposals, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.ExpiryFuturesMarketLaunchProposal expiry_futures_market_launch_proposals = 7; - - - pub fn get_expiry_futures_market_launch_proposals(&self) -> &[ExpiryFuturesMarketLaunchProposal] { - &self.expiry_futures_market_launch_proposals - } - pub fn clear_expiry_futures_market_launch_proposals(&mut self) { - self.expiry_futures_market_launch_proposals.clear(); - } - - // Param is passed by value, moved - pub fn set_expiry_futures_market_launch_proposals(&mut self, v: ::protobuf::RepeatedField) { - self.expiry_futures_market_launch_proposals = v; - } - - // Mutable pointer to the field. - pub fn mut_expiry_futures_market_launch_proposals(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.expiry_futures_market_launch_proposals - } - - // Take field - pub fn take_expiry_futures_market_launch_proposals(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.expiry_futures_market_launch_proposals, ::protobuf::RepeatedField::new()) - } - - // .injective.exchange.v1beta1.TradingRewardCampaignUpdateProposal trading_reward_campaign_update_proposal = 8; - - - pub fn get_trading_reward_campaign_update_proposal(&self) -> &TradingRewardCampaignUpdateProposal { - self.trading_reward_campaign_update_proposal.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_trading_reward_campaign_update_proposal(&mut self) { - self.trading_reward_campaign_update_proposal.clear(); - } - - pub fn has_trading_reward_campaign_update_proposal(&self) -> bool { - self.trading_reward_campaign_update_proposal.is_some() - } - - // Param is passed by value, moved - pub fn set_trading_reward_campaign_update_proposal(&mut self, v: TradingRewardCampaignUpdateProposal) { - self.trading_reward_campaign_update_proposal = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_trading_reward_campaign_update_proposal(&mut self) -> &mut TradingRewardCampaignUpdateProposal { - if self.trading_reward_campaign_update_proposal.is_none() { - self.trading_reward_campaign_update_proposal.set_default(); - } - self.trading_reward_campaign_update_proposal.as_mut().unwrap() - } - - // Take field - pub fn take_trading_reward_campaign_update_proposal(&mut self) -> TradingRewardCampaignUpdateProposal { - self.trading_reward_campaign_update_proposal.take().unwrap_or_else(|| TradingRewardCampaignUpdateProposal::new()) - } - - // repeated .injective.exchange.v1beta1.BinaryOptionsMarketLaunchProposal binary_options_market_launch_proposals = 9; - - - pub fn get_binary_options_market_launch_proposals(&self) -> &[BinaryOptionsMarketLaunchProposal] { - &self.binary_options_market_launch_proposals - } - pub fn clear_binary_options_market_launch_proposals(&mut self) { - self.binary_options_market_launch_proposals.clear(); - } - - // Param is passed by value, moved - pub fn set_binary_options_market_launch_proposals(&mut self, v: ::protobuf::RepeatedField) { - self.binary_options_market_launch_proposals = v; - } - - // Mutable pointer to the field. - pub fn mut_binary_options_market_launch_proposals(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.binary_options_market_launch_proposals - } - - // Take field - pub fn take_binary_options_market_launch_proposals(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.binary_options_market_launch_proposals, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.BinaryOptionsMarketParamUpdateProposal binary_options_param_update_proposals = 10; - - - pub fn get_binary_options_param_update_proposals(&self) -> &[BinaryOptionsMarketParamUpdateProposal] { - &self.binary_options_param_update_proposals - } - pub fn clear_binary_options_param_update_proposals(&mut self) { - self.binary_options_param_update_proposals.clear(); - } - - // Param is passed by value, moved - pub fn set_binary_options_param_update_proposals(&mut self, v: ::protobuf::RepeatedField) { - self.binary_options_param_update_proposals = v; - } - - // Mutable pointer to the field. - pub fn mut_binary_options_param_update_proposals(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.binary_options_param_update_proposals - } - - // Take field - pub fn take_binary_options_param_update_proposals(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.binary_options_param_update_proposals, ::protobuf::RepeatedField::new()) - } - - // .injective.exchange.v1beta1.UpdateDenomDecimalsProposal denom_decimals_update_proposal = 11; - - - pub fn get_denom_decimals_update_proposal(&self) -> &UpdateDenomDecimalsProposal { - self.denom_decimals_update_proposal.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_denom_decimals_update_proposal(&mut self) { - self.denom_decimals_update_proposal.clear(); - } - - pub fn has_denom_decimals_update_proposal(&self) -> bool { - self.denom_decimals_update_proposal.is_some() - } - - // Param is passed by value, moved - pub fn set_denom_decimals_update_proposal(&mut self, v: UpdateDenomDecimalsProposal) { - self.denom_decimals_update_proposal = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_denom_decimals_update_proposal(&mut self) -> &mut UpdateDenomDecimalsProposal { - if self.denom_decimals_update_proposal.is_none() { - self.denom_decimals_update_proposal.set_default(); - } - self.denom_decimals_update_proposal.as_mut().unwrap() - } - - // Take field - pub fn take_denom_decimals_update_proposal(&mut self) -> UpdateDenomDecimalsProposal { - self.denom_decimals_update_proposal.take().unwrap_or_else(|| UpdateDenomDecimalsProposal::new()) - } -} - -impl ::protobuf::Message for BatchExchangeModificationProposal { - fn is_initialized(&self) -> bool { - for v in &self.spot_market_param_update_proposals { - if !v.is_initialized() { - return false; - } - }; - for v in &self.derivative_market_param_update_proposals { - if !v.is_initialized() { - return false; - } - }; - for v in &self.spot_market_launch_proposals { - if !v.is_initialized() { - return false; - } - }; - for v in &self.perpetual_market_launch_proposals { - if !v.is_initialized() { - return false; - } - }; - for v in &self.expiry_futures_market_launch_proposals { - if !v.is_initialized() { - return false; - } - }; - for v in &self.trading_reward_campaign_update_proposal { - if !v.is_initialized() { - return false; - } - }; - for v in &self.binary_options_market_launch_proposals { - if !v.is_initialized() { - return false; - } - }; - for v in &self.binary_options_param_update_proposals { - if !v.is_initialized() { - return false; - } - }; - for v in &self.denom_decimals_update_proposal { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.spot_market_param_update_proposals)?; - }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.derivative_market_param_update_proposals)?; - }, - 5 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.spot_market_launch_proposals)?; - }, - 6 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.perpetual_market_launch_proposals)?; - }, - 7 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.expiry_futures_market_launch_proposals)?; - }, - 8 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.trading_reward_campaign_update_proposal)?; - }, - 9 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.binary_options_market_launch_proposals)?; - }, - 10 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.binary_options_param_update_proposals)?; - }, - 11 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.denom_decimals_update_proposal)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - for value in &self.spot_market_param_update_proposals { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.derivative_market_param_update_proposals { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.spot_market_launch_proposals { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.perpetual_market_launch_proposals { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.expiry_futures_market_launch_proposals { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - if let Some(ref v) = self.trading_reward_campaign_update_proposal.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - for value in &self.binary_options_market_launch_proposals { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.binary_options_param_update_proposals { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - if let Some(ref v) = self.denom_decimals_update_proposal.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - for v in &self.spot_market_param_update_proposals { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.derivative_market_param_update_proposals { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.spot_market_launch_proposals { - os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.perpetual_market_launch_proposals { - os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.expiry_futures_market_launch_proposals { - os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - if let Some(ref v) = self.trading_reward_campaign_update_proposal.as_ref() { - os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - for v in &self.binary_options_market_launch_proposals { - os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.binary_options_param_update_proposals { - os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - if let Some(ref v) = self.denom_decimals_update_proposal.as_ref() { - os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BatchExchangeModificationProposal { - BatchExchangeModificationProposal::new() - } - - fn default_instance() -> &'static BatchExchangeModificationProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BatchExchangeModificationProposal::new) - } -} - -impl ::protobuf::Clear for BatchExchangeModificationProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.spot_market_param_update_proposals.clear(); - self.derivative_market_param_update_proposals.clear(); - self.spot_market_launch_proposals.clear(); - self.perpetual_market_launch_proposals.clear(); - self.expiry_futures_market_launch_proposals.clear(); - self.trading_reward_campaign_update_proposal.clear(); - self.binary_options_market_launch_proposals.clear(); - self.binary_options_param_update_proposals.clear(); - self.denom_decimals_update_proposal.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for BatchExchangeModificationProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct SpotMarketLaunchProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub ticker: ::std::string::String, - pub base_denom: ::std::string::String, - pub quote_denom: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SpotMarketLaunchProposal { - fn default() -> &'a SpotMarketLaunchProposal { - ::default_instance() - } -} - -impl SpotMarketLaunchProposal { - pub fn new() -> SpotMarketLaunchProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string ticker = 3; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string base_denom = 4; - - - pub fn get_base_denom(&self) -> &str { - &self.base_denom - } - pub fn clear_base_denom(&mut self) { - self.base_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_base_denom(&mut self, v: ::std::string::String) { - self.base_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_base_denom(&mut self) -> &mut ::std::string::String { - &mut self.base_denom - } - - // Take field - pub fn take_base_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.base_denom, ::std::string::String::new()) - } - - // string quote_denom = 5; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string min_price_tick_size = 6; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 7; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } - - // string maker_fee_rate = 8; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 9; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for SpotMarketLaunchProposal { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.base_denom)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.ticker); - } - if !self.base_denom.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.base_denom); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.quote_denom); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.min_quantity_tick_size); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.taker_fee_rate); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.ticker.is_empty() { - os.write_string(3, &self.ticker)?; - } - if !self.base_denom.is_empty() { - os.write_string(4, &self.base_denom)?; - } - if !self.quote_denom.is_empty() { - os.write_string(5, &self.quote_denom)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(6, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(7, &self.min_quantity_tick_size)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(8, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(9, &self.taker_fee_rate)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SpotMarketLaunchProposal { - SpotMarketLaunchProposal::new() - } - - fn default_instance() -> &'static SpotMarketLaunchProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(SpotMarketLaunchProposal::new) - } -} - -impl ::protobuf::Clear for SpotMarketLaunchProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.ticker.clear(); - self.base_denom.clear(); - self.quote_denom.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for SpotMarketLaunchProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct PerpetualMarketLaunchProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub ticker: ::std::string::String, - pub quote_denom: ::std::string::String, - pub oracle_base: ::std::string::String, - pub oracle_quote: ::std::string::String, - pub oracle_scale_factor: u32, - pub oracle_type: super::oracle::OracleType, - pub initial_margin_ratio: ::std::string::String, - pub maintenance_margin_ratio: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PerpetualMarketLaunchProposal { - fn default() -> &'a PerpetualMarketLaunchProposal { - ::default_instance() - } -} - -impl PerpetualMarketLaunchProposal { - pub fn new() -> PerpetualMarketLaunchProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string ticker = 3; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string quote_denom = 4; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string oracle_base = 5; - - - pub fn get_oracle_base(&self) -> &str { - &self.oracle_base - } - pub fn clear_oracle_base(&mut self) { - self.oracle_base.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_base(&mut self, v: ::std::string::String) { - self.oracle_base = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_base(&mut self) -> &mut ::std::string::String { - &mut self.oracle_base - } - - // Take field - pub fn take_oracle_base(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_base, ::std::string::String::new()) - } - - // string oracle_quote = 6; - - - pub fn get_oracle_quote(&self) -> &str { - &self.oracle_quote - } - pub fn clear_oracle_quote(&mut self) { - self.oracle_quote.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_quote(&mut self, v: ::std::string::String) { - self.oracle_quote = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_quote(&mut self) -> &mut ::std::string::String { - &mut self.oracle_quote - } - - // Take field - pub fn take_oracle_quote(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_quote, ::std::string::String::new()) - } - - // uint32 oracle_scale_factor = 7; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 8; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } - - // string initial_margin_ratio = 9; - - - pub fn get_initial_margin_ratio(&self) -> &str { - &self.initial_margin_ratio - } - pub fn clear_initial_margin_ratio(&mut self) { - self.initial_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_initial_margin_ratio(&mut self, v: ::std::string::String) { - self.initial_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_initial_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.initial_margin_ratio - } - - // Take field - pub fn take_initial_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.initial_margin_ratio, ::std::string::String::new()) - } - - // string maintenance_margin_ratio = 10; - - - pub fn get_maintenance_margin_ratio(&self) -> &str { - &self.maintenance_margin_ratio - } - pub fn clear_maintenance_margin_ratio(&mut self) { - self.maintenance_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_maintenance_margin_ratio(&mut self, v: ::std::string::String) { - self.maintenance_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maintenance_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.maintenance_margin_ratio - } - - // Take field - pub fn take_maintenance_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maintenance_margin_ratio, ::std::string::String::new()) - } - - // string maker_fee_rate = 11; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 12; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string min_price_tick_size = 13; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 14; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for PerpetualMarketLaunchProposal { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_base)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_quote)?; - }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 8 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 8, &mut self.unknown_fields)? - }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.initial_margin_ratio)?; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maintenance_margin_ratio)?; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 13 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 14 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.ticker); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.quote_denom); - } - if !self.oracle_base.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.oracle_base); - } - if !self.oracle_quote.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.oracle_quote); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(7, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(8, self.oracle_type); - } - if !self.initial_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.initial_margin_ratio); - } - if !self.maintenance_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.maintenance_margin_ratio); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.taker_fee_rate); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(13, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(14, &self.min_quantity_tick_size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.ticker.is_empty() { - os.write_string(3, &self.ticker)?; - } - if !self.quote_denom.is_empty() { - os.write_string(4, &self.quote_denom)?; - } - if !self.oracle_base.is_empty() { - os.write_string(5, &self.oracle_base)?; - } - if !self.oracle_quote.is_empty() { - os.write_string(6, &self.oracle_quote)?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(7, self.oracle_scale_factor)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(8, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - if !self.initial_margin_ratio.is_empty() { - os.write_string(9, &self.initial_margin_ratio)?; - } - if !self.maintenance_margin_ratio.is_empty() { - os.write_string(10, &self.maintenance_margin_ratio)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(11, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(12, &self.taker_fee_rate)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(13, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(14, &self.min_quantity_tick_size)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PerpetualMarketLaunchProposal { - PerpetualMarketLaunchProposal::new() - } - - fn default_instance() -> &'static PerpetualMarketLaunchProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(PerpetualMarketLaunchProposal::new) - } -} - -impl ::protobuf::Clear for PerpetualMarketLaunchProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.ticker.clear(); - self.quote_denom.clear(); - self.oracle_base.clear(); - self.oracle_quote.clear(); - self.oracle_scale_factor = 0; - self.oracle_type = super::oracle::OracleType::Unspecified; - self.initial_margin_ratio.clear(); - self.maintenance_margin_ratio.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for PerpetualMarketLaunchProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinaryOptionsMarketLaunchProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub ticker: ::std::string::String, - pub oracle_symbol: ::std::string::String, - pub oracle_provider: ::std::string::String, - pub oracle_type: super::oracle::OracleType, - pub oracle_scale_factor: u32, - pub expiration_timestamp: i64, - pub settlement_timestamp: i64, - pub admin: ::std::string::String, - pub quote_denom: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BinaryOptionsMarketLaunchProposal { - fn default() -> &'a BinaryOptionsMarketLaunchProposal { - ::default_instance() - } -} - -impl BinaryOptionsMarketLaunchProposal { - pub fn new() -> BinaryOptionsMarketLaunchProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string ticker = 3; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string oracle_symbol = 4; - - - pub fn get_oracle_symbol(&self) -> &str { - &self.oracle_symbol - } - pub fn clear_oracle_symbol(&mut self) { - self.oracle_symbol.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_symbol(&mut self, v: ::std::string::String) { - self.oracle_symbol = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_symbol(&mut self) -> &mut ::std::string::String { - &mut self.oracle_symbol - } - - // Take field - pub fn take_oracle_symbol(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_symbol, ::std::string::String::new()) - } - - // string oracle_provider = 5; - - - pub fn get_oracle_provider(&self) -> &str { - &self.oracle_provider - } - pub fn clear_oracle_provider(&mut self) { - self.oracle_provider.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_provider(&mut self, v: ::std::string::String) { - self.oracle_provider = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_provider(&mut self) -> &mut ::std::string::String { - &mut self.oracle_provider - } - - // Take field - pub fn take_oracle_provider(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_provider, ::std::string::String::new()) - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 6; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } - - // uint32 oracle_scale_factor = 7; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // int64 expiration_timestamp = 8; - - - pub fn get_expiration_timestamp(&self) -> i64 { - self.expiration_timestamp - } - pub fn clear_expiration_timestamp(&mut self) { - self.expiration_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_expiration_timestamp(&mut self, v: i64) { - self.expiration_timestamp = v; - } - - // int64 settlement_timestamp = 9; - - - pub fn get_settlement_timestamp(&self) -> i64 { - self.settlement_timestamp - } - pub fn clear_settlement_timestamp(&mut self) { - self.settlement_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_settlement_timestamp(&mut self, v: i64) { - self.settlement_timestamp = v; - } - - // string admin = 10; - - - pub fn get_admin(&self) -> &str { - &self.admin - } - pub fn clear_admin(&mut self) { - self.admin.clear(); - } - - // Param is passed by value, moved - pub fn set_admin(&mut self, v: ::std::string::String) { - self.admin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_admin(&mut self) -> &mut ::std::string::String { - &mut self.admin - } - - // Take field - pub fn take_admin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.admin, ::std::string::String::new()) - } - - // string quote_denom = 11; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string maker_fee_rate = 12; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 13; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string min_price_tick_size = 14; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 15; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for BinaryOptionsMarketLaunchProposal { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_symbol)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_provider)?; - }, - 6 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 6, &mut self.unknown_fields)? - }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 8 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.expiration_timestamp = tmp; - }, - 9 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.settlement_timestamp = tmp; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.admin)?; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 13 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 14 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 15 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.ticker); - } - if !self.oracle_symbol.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.oracle_symbol); - } - if !self.oracle_provider.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.oracle_provider); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(6, self.oracle_type); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(7, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if self.expiration_timestamp != 0 { - my_size += ::protobuf::rt::value_size(8, self.expiration_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if self.settlement_timestamp != 0 { - my_size += ::protobuf::rt::value_size(9, self.settlement_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if !self.admin.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.admin); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.quote_denom); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(13, &self.taker_fee_rate); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(14, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(15, &self.min_quantity_tick_size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.ticker.is_empty() { - os.write_string(3, &self.ticker)?; - } - if !self.oracle_symbol.is_empty() { - os.write_string(4, &self.oracle_symbol)?; - } - if !self.oracle_provider.is_empty() { - os.write_string(5, &self.oracle_provider)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(6, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(7, self.oracle_scale_factor)?; - } - if self.expiration_timestamp != 0 { - os.write_int64(8, self.expiration_timestamp)?; - } - if self.settlement_timestamp != 0 { - os.write_int64(9, self.settlement_timestamp)?; - } - if !self.admin.is_empty() { - os.write_string(10, &self.admin)?; - } - if !self.quote_denom.is_empty() { - os.write_string(11, &self.quote_denom)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(12, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(13, &self.taker_fee_rate)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(14, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(15, &self.min_quantity_tick_size)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BinaryOptionsMarketLaunchProposal { - BinaryOptionsMarketLaunchProposal::new() - } - - fn default_instance() -> &'static BinaryOptionsMarketLaunchProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BinaryOptionsMarketLaunchProposal::new) - } -} - -impl ::protobuf::Clear for BinaryOptionsMarketLaunchProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.ticker.clear(); - self.oracle_symbol.clear(); - self.oracle_provider.clear(); - self.oracle_type = super::oracle::OracleType::Unspecified; - self.oracle_scale_factor = 0; - self.expiration_timestamp = 0; - self.settlement_timestamp = 0; - self.admin.clear(); - self.quote_denom.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for BinaryOptionsMarketLaunchProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ExpiryFuturesMarketLaunchProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub ticker: ::std::string::String, - pub quote_denom: ::std::string::String, - pub oracle_base: ::std::string::String, - pub oracle_quote: ::std::string::String, - pub oracle_scale_factor: u32, - pub oracle_type: super::oracle::OracleType, - pub expiry: i64, - pub initial_margin_ratio: ::std::string::String, - pub maintenance_margin_ratio: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ExpiryFuturesMarketLaunchProposal { - fn default() -> &'a ExpiryFuturesMarketLaunchProposal { - ::default_instance() - } -} - -impl ExpiryFuturesMarketLaunchProposal { - pub fn new() -> ExpiryFuturesMarketLaunchProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string ticker = 3; - - - pub fn get_ticker(&self) -> &str { - &self.ticker - } - pub fn clear_ticker(&mut self) { - self.ticker.clear(); - } - - // Param is passed by value, moved - pub fn set_ticker(&mut self, v: ::std::string::String) { - self.ticker = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ticker(&mut self) -> &mut ::std::string::String { - &mut self.ticker - } - - // Take field - pub fn take_ticker(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ticker, ::std::string::String::new()) - } - - // string quote_denom = 4; - - - pub fn get_quote_denom(&self) -> &str { - &self.quote_denom - } - pub fn clear_quote_denom(&mut self) { - self.quote_denom.clear(); - } - - // Param is passed by value, moved - pub fn set_quote_denom(&mut self, v: ::std::string::String) { - self.quote_denom = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_quote_denom(&mut self) -> &mut ::std::string::String { - &mut self.quote_denom - } - - // Take field - pub fn take_quote_denom(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.quote_denom, ::std::string::String::new()) - } - - // string oracle_base = 5; - - - pub fn get_oracle_base(&self) -> &str { - &self.oracle_base - } - pub fn clear_oracle_base(&mut self) { - self.oracle_base.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_base(&mut self, v: ::std::string::String) { - self.oracle_base = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_base(&mut self) -> &mut ::std::string::String { - &mut self.oracle_base - } - - // Take field - pub fn take_oracle_base(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_base, ::std::string::String::new()) - } - - // string oracle_quote = 6; - - - pub fn get_oracle_quote(&self) -> &str { - &self.oracle_quote - } - pub fn clear_oracle_quote(&mut self) { - self.oracle_quote.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_quote(&mut self, v: ::std::string::String) { - self.oracle_quote = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_quote(&mut self) -> &mut ::std::string::String { - &mut self.oracle_quote - } - - // Take field - pub fn take_oracle_quote(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_quote, ::std::string::String::new()) - } - - // uint32 oracle_scale_factor = 7; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 8; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } - - // int64 expiry = 9; - - - pub fn get_expiry(&self) -> i64 { - self.expiry - } - pub fn clear_expiry(&mut self) { - self.expiry = 0; - } - - // Param is passed by value, moved - pub fn set_expiry(&mut self, v: i64) { - self.expiry = v; - } - - // string initial_margin_ratio = 10; - - - pub fn get_initial_margin_ratio(&self) -> &str { - &self.initial_margin_ratio - } - pub fn clear_initial_margin_ratio(&mut self) { - self.initial_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_initial_margin_ratio(&mut self, v: ::std::string::String) { - self.initial_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_initial_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.initial_margin_ratio - } - - // Take field - pub fn take_initial_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.initial_margin_ratio, ::std::string::String::new()) - } - - // string maintenance_margin_ratio = 11; - - - pub fn get_maintenance_margin_ratio(&self) -> &str { - &self.maintenance_margin_ratio - } - pub fn clear_maintenance_margin_ratio(&mut self) { - self.maintenance_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_maintenance_margin_ratio(&mut self, v: ::std::string::String) { - self.maintenance_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maintenance_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.maintenance_margin_ratio - } - - // Take field - pub fn take_maintenance_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maintenance_margin_ratio, ::std::string::String::new()) - } - - // string maker_fee_rate = 12; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 13; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string min_price_tick_size = 14; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 15; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for ExpiryFuturesMarketLaunchProposal { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ticker)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.quote_denom)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_base)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_quote)?; - }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 8 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 8, &mut self.unknown_fields)? - }, - 9 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.expiry = tmp; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.initial_margin_ratio)?; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maintenance_margin_ratio)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 13 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 14 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 15 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.ticker.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.ticker); - } - if !self.quote_denom.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.quote_denom); - } - if !self.oracle_base.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.oracle_base); - } - if !self.oracle_quote.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.oracle_quote); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(7, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(8, self.oracle_type); - } - if self.expiry != 0 { - my_size += ::protobuf::rt::value_size(9, self.expiry, ::protobuf::wire_format::WireTypeVarint); - } - if !self.initial_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.initial_margin_ratio); - } - if !self.maintenance_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.maintenance_margin_ratio); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(13, &self.taker_fee_rate); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(14, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(15, &self.min_quantity_tick_size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.ticker.is_empty() { - os.write_string(3, &self.ticker)?; - } - if !self.quote_denom.is_empty() { - os.write_string(4, &self.quote_denom)?; - } - if !self.oracle_base.is_empty() { - os.write_string(5, &self.oracle_base)?; - } - if !self.oracle_quote.is_empty() { - os.write_string(6, &self.oracle_quote)?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(7, self.oracle_scale_factor)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(8, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - if self.expiry != 0 { - os.write_int64(9, self.expiry)?; - } - if !self.initial_margin_ratio.is_empty() { - os.write_string(10, &self.initial_margin_ratio)?; - } - if !self.maintenance_margin_ratio.is_empty() { - os.write_string(11, &self.maintenance_margin_ratio)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(12, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(13, &self.taker_fee_rate)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(14, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(15, &self.min_quantity_tick_size)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ExpiryFuturesMarketLaunchProposal { - ExpiryFuturesMarketLaunchProposal::new() - } - - fn default_instance() -> &'static ExpiryFuturesMarketLaunchProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ExpiryFuturesMarketLaunchProposal::new) - } -} - -impl ::protobuf::Clear for ExpiryFuturesMarketLaunchProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.ticker.clear(); - self.quote_denom.clear(); - self.oracle_base.clear(); - self.oracle_quote.clear(); - self.oracle_scale_factor = 0; - self.oracle_type = super::oracle::OracleType::Unspecified; - self.expiry = 0; - self.initial_margin_ratio.clear(); - self.maintenance_margin_ratio.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ExpiryFuturesMarketLaunchProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct DerivativeMarketParamUpdateProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub market_id: ::std::string::String, - pub initial_margin_ratio: ::std::string::String, - pub maintenance_margin_ratio: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub relayer_fee_share_rate: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - pub HourlyInterestRate: ::std::string::String, - pub HourlyFundingRateCap: ::std::string::String, - pub status: super::exchange::MarketStatus, - pub oracle_params: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DerivativeMarketParamUpdateProposal { - fn default() -> &'a DerivativeMarketParamUpdateProposal { - ::default_instance() - } -} - -impl DerivativeMarketParamUpdateProposal { - pub fn new() -> DerivativeMarketParamUpdateProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string market_id = 3; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string initial_margin_ratio = 4; - - - pub fn get_initial_margin_ratio(&self) -> &str { - &self.initial_margin_ratio - } - pub fn clear_initial_margin_ratio(&mut self) { - self.initial_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_initial_margin_ratio(&mut self, v: ::std::string::String) { - self.initial_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_initial_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.initial_margin_ratio - } - - // Take field - pub fn take_initial_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.initial_margin_ratio, ::std::string::String::new()) - } - - // string maintenance_margin_ratio = 5; - - - pub fn get_maintenance_margin_ratio(&self) -> &str { - &self.maintenance_margin_ratio - } - pub fn clear_maintenance_margin_ratio(&mut self) { - self.maintenance_margin_ratio.clear(); - } - - // Param is passed by value, moved - pub fn set_maintenance_margin_ratio(&mut self, v: ::std::string::String) { - self.maintenance_margin_ratio = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maintenance_margin_ratio(&mut self) -> &mut ::std::string::String { - &mut self.maintenance_margin_ratio - } - - // Take field - pub fn take_maintenance_margin_ratio(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maintenance_margin_ratio, ::std::string::String::new()) - } - - // string maker_fee_rate = 6; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 7; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string relayer_fee_share_rate = 8; - - - pub fn get_relayer_fee_share_rate(&self) -> &str { - &self.relayer_fee_share_rate - } - pub fn clear_relayer_fee_share_rate(&mut self) { - self.relayer_fee_share_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_relayer_fee_share_rate(&mut self, v: ::std::string::String) { - self.relayer_fee_share_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_relayer_fee_share_rate(&mut self) -> &mut ::std::string::String { - &mut self.relayer_fee_share_rate - } - - // Take field - pub fn take_relayer_fee_share_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.relayer_fee_share_rate, ::std::string::String::new()) - } - - // string min_price_tick_size = 9; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 10; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } - - // string HourlyInterestRate = 11; - - - pub fn get_HourlyInterestRate(&self) -> &str { - &self.HourlyInterestRate - } - pub fn clear_HourlyInterestRate(&mut self) { - self.HourlyInterestRate.clear(); - } - - // Param is passed by value, moved - pub fn set_HourlyInterestRate(&mut self, v: ::std::string::String) { - self.HourlyInterestRate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_HourlyInterestRate(&mut self) -> &mut ::std::string::String { - &mut self.HourlyInterestRate - } - - // Take field - pub fn take_HourlyInterestRate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.HourlyInterestRate, ::std::string::String::new()) - } - - // string HourlyFundingRateCap = 12; - - - pub fn get_HourlyFundingRateCap(&self) -> &str { - &self.HourlyFundingRateCap - } - pub fn clear_HourlyFundingRateCap(&mut self) { - self.HourlyFundingRateCap.clear(); - } - - // Param is passed by value, moved - pub fn set_HourlyFundingRateCap(&mut self, v: ::std::string::String) { - self.HourlyFundingRateCap = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_HourlyFundingRateCap(&mut self) -> &mut ::std::string::String { - &mut self.HourlyFundingRateCap - } - - // Take field - pub fn take_HourlyFundingRateCap(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.HourlyFundingRateCap, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.MarketStatus status = 13; - - - pub fn get_status(&self) -> super::exchange::MarketStatus { - self.status - } - pub fn clear_status(&mut self) { - self.status = super::exchange::MarketStatus::Unspecified; - } - - // Param is passed by value, moved - pub fn set_status(&mut self, v: super::exchange::MarketStatus) { - self.status = v; - } - - // .injective.exchange.v1beta1.OracleParams oracle_params = 14; - - - pub fn get_oracle_params(&self) -> &OracleParams { - self.oracle_params.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_oracle_params(&mut self) { - self.oracle_params.clear(); - } - - pub fn has_oracle_params(&self) -> bool { - self.oracle_params.is_some() - } - - // Param is passed by value, moved - pub fn set_oracle_params(&mut self, v: OracleParams) { - self.oracle_params = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_params(&mut self) -> &mut OracleParams { - if self.oracle_params.is_none() { - self.oracle_params.set_default(); - } - self.oracle_params.as_mut().unwrap() - } - - // Take field - pub fn take_oracle_params(&mut self) -> OracleParams { - self.oracle_params.take().unwrap_or_else(|| OracleParams::new()) - } -} - -impl ::protobuf::Message for DerivativeMarketParamUpdateProposal { - fn is_initialized(&self) -> bool { - for v in &self.oracle_params { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.initial_margin_ratio)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maintenance_margin_ratio)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.relayer_fee_share_rate)?; - }, - 9 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 10 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.HourlyInterestRate)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.HourlyFundingRateCap)?; - }, - 13 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 13, &mut self.unknown_fields)? - }, - 14 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.oracle_params)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.market_id); - } - if !self.initial_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.initial_margin_ratio); - } - if !self.maintenance_margin_ratio.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.maintenance_margin_ratio); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.taker_fee_rate); - } - if !self.relayer_fee_share_rate.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.relayer_fee_share_rate); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(9, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(10, &self.min_quantity_tick_size); - } - if !self.HourlyInterestRate.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.HourlyInterestRate); - } - if !self.HourlyFundingRateCap.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.HourlyFundingRateCap); - } - if self.status != super::exchange::MarketStatus::Unspecified { - my_size += ::protobuf::rt::enum_size(13, self.status); - } - if let Some(ref v) = self.oracle_params.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.market_id.is_empty() { - os.write_string(3, &self.market_id)?; - } - if !self.initial_margin_ratio.is_empty() { - os.write_string(4, &self.initial_margin_ratio)?; - } - if !self.maintenance_margin_ratio.is_empty() { - os.write_string(5, &self.maintenance_margin_ratio)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(6, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(7, &self.taker_fee_rate)?; - } - if !self.relayer_fee_share_rate.is_empty() { - os.write_string(8, &self.relayer_fee_share_rate)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(9, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(10, &self.min_quantity_tick_size)?; - } - if !self.HourlyInterestRate.is_empty() { - os.write_string(11, &self.HourlyInterestRate)?; - } - if !self.HourlyFundingRateCap.is_empty() { - os.write_string(12, &self.HourlyFundingRateCap)?; - } - if self.status != super::exchange::MarketStatus::Unspecified { - os.write_enum(13, ::protobuf::ProtobufEnum::value(&self.status))?; - } - if let Some(ref v) = self.oracle_params.as_ref() { - os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DerivativeMarketParamUpdateProposal { - DerivativeMarketParamUpdateProposal::new() - } - - fn default_instance() -> &'static DerivativeMarketParamUpdateProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(DerivativeMarketParamUpdateProposal::new) - } -} - -impl ::protobuf::Clear for DerivativeMarketParamUpdateProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.market_id.clear(); - self.initial_margin_ratio.clear(); - self.maintenance_margin_ratio.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.relayer_fee_share_rate.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.HourlyInterestRate.clear(); - self.HourlyFundingRateCap.clear(); - self.status = super::exchange::MarketStatus::Unspecified; - self.oracle_params.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for DerivativeMarketParamUpdateProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MarketForcedSettlementProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub market_id: ::std::string::String, - pub settlement_price: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MarketForcedSettlementProposal { - fn default() -> &'a MarketForcedSettlementProposal { - ::default_instance() - } -} - -impl MarketForcedSettlementProposal { - pub fn new() -> MarketForcedSettlementProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string market_id = 3; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string settlement_price = 4; - - - pub fn get_settlement_price(&self) -> &str { - &self.settlement_price - } - pub fn clear_settlement_price(&mut self) { - self.settlement_price.clear(); - } - - // Param is passed by value, moved - pub fn set_settlement_price(&mut self, v: ::std::string::String) { - self.settlement_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_settlement_price(&mut self) -> &mut ::std::string::String { - &mut self.settlement_price - } - - // Take field - pub fn take_settlement_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.settlement_price, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MarketForcedSettlementProposal { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.settlement_price)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.market_id); - } - if !self.settlement_price.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.settlement_price); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.market_id.is_empty() { - os.write_string(3, &self.market_id)?; - } - if !self.settlement_price.is_empty() { - os.write_string(4, &self.settlement_price)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MarketForcedSettlementProposal { - MarketForcedSettlementProposal::new() - } - - fn default_instance() -> &'static MarketForcedSettlementProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MarketForcedSettlementProposal::new) - } -} - -impl ::protobuf::Clear for MarketForcedSettlementProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.market_id.clear(); - self.settlement_price.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MarketForcedSettlementProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct UpdateDenomDecimalsProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub denom_decimals: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a UpdateDenomDecimalsProposal { - fn default() -> &'a UpdateDenomDecimalsProposal { - ::default_instance() - } -} - -impl UpdateDenomDecimalsProposal { - pub fn new() -> UpdateDenomDecimalsProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.DenomDecimals denom_decimals = 3; - - - pub fn get_denom_decimals(&self) -> &[super::exchange::DenomDecimals] { - &self.denom_decimals - } - pub fn clear_denom_decimals(&mut self) { - self.denom_decimals.clear(); - } - - // Param is passed by value, moved - pub fn set_denom_decimals(&mut self, v: ::protobuf::RepeatedField) { - self.denom_decimals = v; - } - - // Mutable pointer to the field. - pub fn mut_denom_decimals(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.denom_decimals - } - - // Take field - pub fn take_denom_decimals(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.denom_decimals, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for UpdateDenomDecimalsProposal { - fn is_initialized(&self) -> bool { - for v in &self.denom_decimals { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.denom_decimals)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - for value in &self.denom_decimals { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - for v in &self.denom_decimals { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> UpdateDenomDecimalsProposal { - UpdateDenomDecimalsProposal::new() - } - - fn default_instance() -> &'static UpdateDenomDecimalsProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(UpdateDenomDecimalsProposal::new) - } -} - -impl ::protobuf::Clear for UpdateDenomDecimalsProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.denom_decimals.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for UpdateDenomDecimalsProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BinaryOptionsMarketParamUpdateProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub market_id: ::std::string::String, - pub maker_fee_rate: ::std::string::String, - pub taker_fee_rate: ::std::string::String, - pub relayer_fee_share_rate: ::std::string::String, - pub min_price_tick_size: ::std::string::String, - pub min_quantity_tick_size: ::std::string::String, - pub expiration_timestamp: i64, - pub settlement_timestamp: i64, - pub settlement_price: ::std::string::String, - pub admin: ::std::string::String, - pub status: super::exchange::MarketStatus, - pub oracle_params: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BinaryOptionsMarketParamUpdateProposal { - fn default() -> &'a BinaryOptionsMarketParamUpdateProposal { - ::default_instance() - } -} - -impl BinaryOptionsMarketParamUpdateProposal { - pub fn new() -> BinaryOptionsMarketParamUpdateProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // string market_id = 3; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string maker_fee_rate = 4; - - - pub fn get_maker_fee_rate(&self) -> &str { - &self.maker_fee_rate - } - pub fn clear_maker_fee_rate(&mut self) { - self.maker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_maker_fee_rate(&mut self, v: ::std::string::String) { - self.maker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_maker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.maker_fee_rate - } - - // Take field - pub fn take_maker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.maker_fee_rate, ::std::string::String::new()) - } - - // string taker_fee_rate = 5; - - - pub fn get_taker_fee_rate(&self) -> &str { - &self.taker_fee_rate - } - pub fn clear_taker_fee_rate(&mut self) { - self.taker_fee_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_taker_fee_rate(&mut self, v: ::std::string::String) { - self.taker_fee_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_taker_fee_rate(&mut self) -> &mut ::std::string::String { - &mut self.taker_fee_rate - } - - // Take field - pub fn take_taker_fee_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.taker_fee_rate, ::std::string::String::new()) - } - - // string relayer_fee_share_rate = 6; - - - pub fn get_relayer_fee_share_rate(&self) -> &str { - &self.relayer_fee_share_rate - } - pub fn clear_relayer_fee_share_rate(&mut self) { - self.relayer_fee_share_rate.clear(); - } - - // Param is passed by value, moved - pub fn set_relayer_fee_share_rate(&mut self, v: ::std::string::String) { - self.relayer_fee_share_rate = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_relayer_fee_share_rate(&mut self) -> &mut ::std::string::String { - &mut self.relayer_fee_share_rate - } - - // Take field - pub fn take_relayer_fee_share_rate(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.relayer_fee_share_rate, ::std::string::String::new()) - } - - // string min_price_tick_size = 7; - - - pub fn get_min_price_tick_size(&self) -> &str { - &self.min_price_tick_size - } - pub fn clear_min_price_tick_size(&mut self) { - self.min_price_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_price_tick_size(&mut self, v: ::std::string::String) { - self.min_price_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_price_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_price_tick_size - } - - // Take field - pub fn take_min_price_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_price_tick_size, ::std::string::String::new()) - } - - // string min_quantity_tick_size = 8; - - - pub fn get_min_quantity_tick_size(&self) -> &str { - &self.min_quantity_tick_size - } - pub fn clear_min_quantity_tick_size(&mut self) { - self.min_quantity_tick_size.clear(); - } - - // Param is passed by value, moved - pub fn set_min_quantity_tick_size(&mut self, v: ::std::string::String) { - self.min_quantity_tick_size = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_min_quantity_tick_size(&mut self) -> &mut ::std::string::String { - &mut self.min_quantity_tick_size - } - - // Take field - pub fn take_min_quantity_tick_size(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.min_quantity_tick_size, ::std::string::String::new()) - } - - // int64 expiration_timestamp = 9; - - - pub fn get_expiration_timestamp(&self) -> i64 { - self.expiration_timestamp - } - pub fn clear_expiration_timestamp(&mut self) { - self.expiration_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_expiration_timestamp(&mut self, v: i64) { - self.expiration_timestamp = v; - } - - // int64 settlement_timestamp = 10; - - - pub fn get_settlement_timestamp(&self) -> i64 { - self.settlement_timestamp - } - pub fn clear_settlement_timestamp(&mut self) { - self.settlement_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_settlement_timestamp(&mut self, v: i64) { - self.settlement_timestamp = v; - } - - // string settlement_price = 11; - - - pub fn get_settlement_price(&self) -> &str { - &self.settlement_price - } - pub fn clear_settlement_price(&mut self) { - self.settlement_price.clear(); - } - - // Param is passed by value, moved - pub fn set_settlement_price(&mut self, v: ::std::string::String) { - self.settlement_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_settlement_price(&mut self) -> &mut ::std::string::String { - &mut self.settlement_price - } - - // Take field - pub fn take_settlement_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.settlement_price, ::std::string::String::new()) - } - - // string admin = 12; - - - pub fn get_admin(&self) -> &str { - &self.admin - } - pub fn clear_admin(&mut self) { - self.admin.clear(); - } - - // Param is passed by value, moved - pub fn set_admin(&mut self, v: ::std::string::String) { - self.admin = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_admin(&mut self) -> &mut ::std::string::String { - &mut self.admin - } - - // Take field - pub fn take_admin(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.admin, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.MarketStatus status = 13; - - - pub fn get_status(&self) -> super::exchange::MarketStatus { - self.status - } - pub fn clear_status(&mut self) { - self.status = super::exchange::MarketStatus::Unspecified; - } - - // Param is passed by value, moved - pub fn set_status(&mut self, v: super::exchange::MarketStatus) { - self.status = v; - } - - // .injective.exchange.v1beta1.ProviderOracleParams oracle_params = 14; - - - pub fn get_oracle_params(&self) -> &ProviderOracleParams { - self.oracle_params.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_oracle_params(&mut self) { - self.oracle_params.clear(); - } - - pub fn has_oracle_params(&self) -> bool { - self.oracle_params.is_some() - } - - // Param is passed by value, moved - pub fn set_oracle_params(&mut self, v: ProviderOracleParams) { - self.oracle_params = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_params(&mut self) -> &mut ProviderOracleParams { - if self.oracle_params.is_none() { - self.oracle_params.set_default(); - } - self.oracle_params.as_mut().unwrap() - } - - // Take field - pub fn take_oracle_params(&mut self) -> ProviderOracleParams { - self.oracle_params.take().unwrap_or_else(|| ProviderOracleParams::new()) - } -} - -impl ::protobuf::Message for BinaryOptionsMarketParamUpdateProposal { - fn is_initialized(&self) -> bool { - for v in &self.oracle_params { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 4 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.maker_fee_rate)?; - }, - 5 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.taker_fee_rate)?; - }, - 6 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.relayer_fee_share_rate)?; - }, - 7 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_price_tick_size)?; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.min_quantity_tick_size)?; - }, - 9 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.expiration_timestamp = tmp; - }, - 10 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.settlement_timestamp = tmp; - }, - 11 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.settlement_price)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.admin)?; - }, - 13 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 13, &mut self.unknown_fields)? - }, - 14 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.oracle_params)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.market_id); - } - if !self.maker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.maker_fee_rate); - } - if !self.taker_fee_rate.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.taker_fee_rate); - } - if !self.relayer_fee_share_rate.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.relayer_fee_share_rate); - } - if !self.min_price_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(7, &self.min_price_tick_size); - } - if !self.min_quantity_tick_size.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.min_quantity_tick_size); - } - if self.expiration_timestamp != 0 { - my_size += ::protobuf::rt::value_size(9, self.expiration_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if self.settlement_timestamp != 0 { - my_size += ::protobuf::rt::value_size(10, self.settlement_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if !self.settlement_price.is_empty() { - my_size += ::protobuf::rt::string_size(11, &self.settlement_price); - } - if !self.admin.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.admin); - } - if self.status != super::exchange::MarketStatus::Unspecified { - my_size += ::protobuf::rt::enum_size(13, self.status); - } - if let Some(ref v) = self.oracle_params.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if !self.market_id.is_empty() { - os.write_string(3, &self.market_id)?; - } - if !self.maker_fee_rate.is_empty() { - os.write_string(4, &self.maker_fee_rate)?; - } - if !self.taker_fee_rate.is_empty() { - os.write_string(5, &self.taker_fee_rate)?; - } - if !self.relayer_fee_share_rate.is_empty() { - os.write_string(6, &self.relayer_fee_share_rate)?; - } - if !self.min_price_tick_size.is_empty() { - os.write_string(7, &self.min_price_tick_size)?; - } - if !self.min_quantity_tick_size.is_empty() { - os.write_string(8, &self.min_quantity_tick_size)?; - } - if self.expiration_timestamp != 0 { - os.write_int64(9, self.expiration_timestamp)?; - } - if self.settlement_timestamp != 0 { - os.write_int64(10, self.settlement_timestamp)?; - } - if !self.settlement_price.is_empty() { - os.write_string(11, &self.settlement_price)?; - } - if !self.admin.is_empty() { - os.write_string(12, &self.admin)?; - } - if self.status != super::exchange::MarketStatus::Unspecified { - os.write_enum(13, ::protobuf::ProtobufEnum::value(&self.status))?; - } - if let Some(ref v) = self.oracle_params.as_ref() { - os.write_tag(14, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BinaryOptionsMarketParamUpdateProposal { - BinaryOptionsMarketParamUpdateProposal::new() - } - - fn default_instance() -> &'static BinaryOptionsMarketParamUpdateProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BinaryOptionsMarketParamUpdateProposal::new) - } -} - -impl ::protobuf::Clear for BinaryOptionsMarketParamUpdateProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.market_id.clear(); - self.maker_fee_rate.clear(); - self.taker_fee_rate.clear(); - self.relayer_fee_share_rate.clear(); - self.min_price_tick_size.clear(); - self.min_quantity_tick_size.clear(); - self.expiration_timestamp = 0; - self.settlement_timestamp = 0; - self.settlement_price.clear(); - self.admin.clear(); - self.status = super::exchange::MarketStatus::Unspecified; - self.oracle_params.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for BinaryOptionsMarketParamUpdateProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct ProviderOracleParams { - // message fields - pub symbol: ::std::string::String, - pub provider: ::std::string::String, - pub oracle_scale_factor: u32, - pub oracle_type: super::oracle::OracleType, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ProviderOracleParams { - fn default() -> &'a ProviderOracleParams { - ::default_instance() - } -} - -impl ProviderOracleParams { - pub fn new() -> ProviderOracleParams { - ::std::default::Default::default() - } - - // string symbol = 1; - - - pub fn get_symbol(&self) -> &str { - &self.symbol - } - pub fn clear_symbol(&mut self) { - self.symbol.clear(); - } - - // Param is passed by value, moved - pub fn set_symbol(&mut self, v: ::std::string::String) { - self.symbol = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_symbol(&mut self) -> &mut ::std::string::String { - &mut self.symbol - } - - // Take field - pub fn take_symbol(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.symbol, ::std::string::String::new()) - } - - // string provider = 2; - - - pub fn get_provider(&self) -> &str { - &self.provider - } - pub fn clear_provider(&mut self) { - self.provider.clear(); - } - - // Param is passed by value, moved - pub fn set_provider(&mut self, v: ::std::string::String) { - self.provider = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_provider(&mut self) -> &mut ::std::string::String { - &mut self.provider - } - - // Take field - pub fn take_provider(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.provider, ::std::string::String::new()) - } - - // uint32 oracle_scale_factor = 3; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 4; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } -} - -impl ::protobuf::Message for ProviderOracleParams { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.symbol)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.provider)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 4 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 4, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.symbol.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.symbol); - } - if !self.provider.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.provider); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(3, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(4, self.oracle_type); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.symbol.is_empty() { - os.write_string(1, &self.symbol)?; - } - if !self.provider.is_empty() { - os.write_string(2, &self.provider)?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(3, self.oracle_scale_factor)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ProviderOracleParams { - ProviderOracleParams::new() - } - - fn default_instance() -> &'static ProviderOracleParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(ProviderOracleParams::new) - } -} - -impl ::protobuf::Clear for ProviderOracleParams { - fn clear(&mut self) { - self.symbol.clear(); - self.provider.clear(); - self.oracle_scale_factor = 0; - self.oracle_type = super::oracle::OracleType::Unspecified; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for ProviderOracleParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct OracleParams { - // message fields - pub oracle_base: ::std::string::String, - pub oracle_quote: ::std::string::String, - pub oracle_scale_factor: u32, - pub oracle_type: super::oracle::OracleType, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a OracleParams { - fn default() -> &'a OracleParams { - ::default_instance() - } -} - -impl OracleParams { - pub fn new() -> OracleParams { - ::std::default::Default::default() - } - - // string oracle_base = 1; - - - pub fn get_oracle_base(&self) -> &str { - &self.oracle_base - } - pub fn clear_oracle_base(&mut self) { - self.oracle_base.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_base(&mut self, v: ::std::string::String) { - self.oracle_base = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_base(&mut self) -> &mut ::std::string::String { - &mut self.oracle_base - } - - // Take field - pub fn take_oracle_base(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_base, ::std::string::String::new()) - } - - // string oracle_quote = 2; - - - pub fn get_oracle_quote(&self) -> &str { - &self.oracle_quote - } - pub fn clear_oracle_quote(&mut self) { - self.oracle_quote.clear(); - } - - // Param is passed by value, moved - pub fn set_oracle_quote(&mut self, v: ::std::string::String) { - self.oracle_quote = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_oracle_quote(&mut self) -> &mut ::std::string::String { - &mut self.oracle_quote - } - - // Take field - pub fn take_oracle_quote(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.oracle_quote, ::std::string::String::new()) - } - - // uint32 oracle_scale_factor = 3; - - - pub fn get_oracle_scale_factor(&self) -> u32 { - self.oracle_scale_factor - } - pub fn clear_oracle_scale_factor(&mut self) { - self.oracle_scale_factor = 0; - } - - // Param is passed by value, moved - pub fn set_oracle_scale_factor(&mut self, v: u32) { - self.oracle_scale_factor = v; - } - - // .injective.oracle.v1beta1.OracleType oracle_type = 4; - - - pub fn get_oracle_type(&self) -> super::oracle::OracleType { - self.oracle_type - } - pub fn clear_oracle_type(&mut self) { - self.oracle_type = super::oracle::OracleType::Unspecified; - } - - // Param is passed by value, moved - pub fn set_oracle_type(&mut self, v: super::oracle::OracleType) { - self.oracle_type = v; - } -} - -impl ::protobuf::Message for OracleParams { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_base)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.oracle_quote)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.oracle_scale_factor = tmp; - }, - 4 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.oracle_type, 4, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.oracle_base.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.oracle_base); - } - if !self.oracle_quote.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.oracle_quote); - } - if self.oracle_scale_factor != 0 { - my_size += ::protobuf::rt::value_size(3, self.oracle_scale_factor, ::protobuf::wire_format::WireTypeVarint); - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - my_size += ::protobuf::rt::enum_size(4, self.oracle_type); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.oracle_base.is_empty() { - os.write_string(1, &self.oracle_base)?; - } - if !self.oracle_quote.is_empty() { - os.write_string(2, &self.oracle_quote)?; - } - if self.oracle_scale_factor != 0 { - os.write_uint32(3, self.oracle_scale_factor)?; - } - if self.oracle_type != super::oracle::OracleType::Unspecified { - os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.oracle_type))?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> OracleParams { - OracleParams::new() - } - - fn default_instance() -> &'static OracleParams { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(OracleParams::new) - } -} - -impl ::protobuf::Clear for OracleParams { - fn clear(&mut self) { - self.oracle_base.clear(); - self.oracle_quote.clear(); - self.oracle_scale_factor = 0; - self.oracle_type = super::oracle::OracleType::Unspecified; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for OracleParams { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TradingRewardCampaignLaunchProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub campaign_info: ::protobuf::SingularPtrField, - pub campaign_reward_pools: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a TradingRewardCampaignLaunchProposal { - fn default() -> &'a TradingRewardCampaignLaunchProposal { - ::default_instance() - } -} - -impl TradingRewardCampaignLaunchProposal { - pub fn new() -> TradingRewardCampaignLaunchProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.TradingRewardCampaignInfo campaign_info = 3; - - - pub fn get_campaign_info(&self) -> &super::exchange::TradingRewardCampaignInfo { - self.campaign_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_campaign_info(&mut self) { - self.campaign_info.clear(); - } - - pub fn has_campaign_info(&self) -> bool { - self.campaign_info.is_some() - } - - // Param is passed by value, moved - pub fn set_campaign_info(&mut self, v: super::exchange::TradingRewardCampaignInfo) { - self.campaign_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_campaign_info(&mut self) -> &mut super::exchange::TradingRewardCampaignInfo { - if self.campaign_info.is_none() { - self.campaign_info.set_default(); - } - self.campaign_info.as_mut().unwrap() - } - - // Take field - pub fn take_campaign_info(&mut self) -> super::exchange::TradingRewardCampaignInfo { - self.campaign_info.take().unwrap_or_else(|| super::exchange::TradingRewardCampaignInfo::new()) - } - - // repeated .injective.exchange.v1beta1.CampaignRewardPool campaign_reward_pools = 4; - - - pub fn get_campaign_reward_pools(&self) -> &[super::exchange::CampaignRewardPool] { - &self.campaign_reward_pools - } - pub fn clear_campaign_reward_pools(&mut self) { - self.campaign_reward_pools.clear(); - } - - // Param is passed by value, moved - pub fn set_campaign_reward_pools(&mut self, v: ::protobuf::RepeatedField) { - self.campaign_reward_pools = v; - } - - // Mutable pointer to the field. - pub fn mut_campaign_reward_pools(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.campaign_reward_pools - } - - // Take field - pub fn take_campaign_reward_pools(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.campaign_reward_pools, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for TradingRewardCampaignLaunchProposal { - fn is_initialized(&self) -> bool { - for v in &self.campaign_info { - if !v.is_initialized() { - return false; - } - }; - for v in &self.campaign_reward_pools { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.campaign_info)?; - }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.campaign_reward_pools)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if let Some(ref v) = self.campaign_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - for value in &self.campaign_reward_pools { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if let Some(ref v) = self.campaign_info.as_ref() { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - for v in &self.campaign_reward_pools { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> TradingRewardCampaignLaunchProposal { - TradingRewardCampaignLaunchProposal::new() - } - - fn default_instance() -> &'static TradingRewardCampaignLaunchProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(TradingRewardCampaignLaunchProposal::new) - } -} - -impl ::protobuf::Clear for TradingRewardCampaignLaunchProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.campaign_info.clear(); - self.campaign_reward_pools.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for TradingRewardCampaignLaunchProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TradingRewardCampaignUpdateProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub campaign_info: ::protobuf::SingularPtrField, - pub campaign_reward_pools_additions: ::protobuf::RepeatedField, - pub campaign_reward_pools_updates: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a TradingRewardCampaignUpdateProposal { - fn default() -> &'a TradingRewardCampaignUpdateProposal { - ::default_instance() - } -} - -impl TradingRewardCampaignUpdateProposal { - pub fn new() -> TradingRewardCampaignUpdateProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.TradingRewardCampaignInfo campaign_info = 3; - - - pub fn get_campaign_info(&self) -> &super::exchange::TradingRewardCampaignInfo { - self.campaign_info.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_campaign_info(&mut self) { - self.campaign_info.clear(); - } - - pub fn has_campaign_info(&self) -> bool { - self.campaign_info.is_some() - } - - // Param is passed by value, moved - pub fn set_campaign_info(&mut self, v: super::exchange::TradingRewardCampaignInfo) { - self.campaign_info = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_campaign_info(&mut self) -> &mut super::exchange::TradingRewardCampaignInfo { - if self.campaign_info.is_none() { - self.campaign_info.set_default(); - } - self.campaign_info.as_mut().unwrap() - } - - // Take field - pub fn take_campaign_info(&mut self) -> super::exchange::TradingRewardCampaignInfo { - self.campaign_info.take().unwrap_or_else(|| super::exchange::TradingRewardCampaignInfo::new()) - } - - // repeated .injective.exchange.v1beta1.CampaignRewardPool campaign_reward_pools_additions = 4; - - - pub fn get_campaign_reward_pools_additions(&self) -> &[super::exchange::CampaignRewardPool] { - &self.campaign_reward_pools_additions - } - pub fn clear_campaign_reward_pools_additions(&mut self) { - self.campaign_reward_pools_additions.clear(); - } - - // Param is passed by value, moved - pub fn set_campaign_reward_pools_additions(&mut self, v: ::protobuf::RepeatedField) { - self.campaign_reward_pools_additions = v; - } - - // Mutable pointer to the field. - pub fn mut_campaign_reward_pools_additions(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.campaign_reward_pools_additions - } - - // Take field - pub fn take_campaign_reward_pools_additions(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.campaign_reward_pools_additions, ::protobuf::RepeatedField::new()) - } - - // repeated .injective.exchange.v1beta1.CampaignRewardPool campaign_reward_pools_updates = 5; - - - pub fn get_campaign_reward_pools_updates(&self) -> &[super::exchange::CampaignRewardPool] { - &self.campaign_reward_pools_updates - } - pub fn clear_campaign_reward_pools_updates(&mut self) { - self.campaign_reward_pools_updates.clear(); - } - - // Param is passed by value, moved - pub fn set_campaign_reward_pools_updates(&mut self, v: ::protobuf::RepeatedField) { - self.campaign_reward_pools_updates = v; - } - - // Mutable pointer to the field. - pub fn mut_campaign_reward_pools_updates(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.campaign_reward_pools_updates - } - - // Take field - pub fn take_campaign_reward_pools_updates(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.campaign_reward_pools_updates, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for TradingRewardCampaignUpdateProposal { - fn is_initialized(&self) -> bool { - for v in &self.campaign_info { - if !v.is_initialized() { - return false; - } - }; - for v in &self.campaign_reward_pools_additions { - if !v.is_initialized() { - return false; - } - }; - for v in &self.campaign_reward_pools_updates { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.campaign_info)?; - }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.campaign_reward_pools_additions)?; - }, - 5 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.campaign_reward_pools_updates)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if let Some(ref v) = self.campaign_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - for value in &self.campaign_reward_pools_additions { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - for value in &self.campaign_reward_pools_updates { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if let Some(ref v) = self.campaign_info.as_ref() { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - for v in &self.campaign_reward_pools_additions { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - for v in &self.campaign_reward_pools_updates { - os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> TradingRewardCampaignUpdateProposal { - TradingRewardCampaignUpdateProposal::new() - } - - fn default_instance() -> &'static TradingRewardCampaignUpdateProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(TradingRewardCampaignUpdateProposal::new) - } -} - -impl ::protobuf::Clear for TradingRewardCampaignUpdateProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.campaign_info.clear(); - self.campaign_reward_pools_additions.clear(); - self.campaign_reward_pools_updates.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for TradingRewardCampaignUpdateProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct RewardPointUpdate { - // message fields - pub account_address: ::std::string::String, - pub new_points: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a RewardPointUpdate { - fn default() -> &'a RewardPointUpdate { - ::default_instance() - } -} - -impl RewardPointUpdate { - pub fn new() -> RewardPointUpdate { - ::std::default::Default::default() - } - - // string account_address = 1; - - - pub fn get_account_address(&self) -> &str { - &self.account_address - } - pub fn clear_account_address(&mut self) { - self.account_address.clear(); - } - - // Param is passed by value, moved - pub fn set_account_address(&mut self, v: ::std::string::String) { - self.account_address = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_account_address(&mut self) -> &mut ::std::string::String { - &mut self.account_address - } - - // Take field - pub fn take_account_address(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.account_address, ::std::string::String::new()) - } - - // string new_points = 12; - - - pub fn get_new_points(&self) -> &str { - &self.new_points - } - pub fn clear_new_points(&mut self) { - self.new_points.clear(); - } - - // Param is passed by value, moved - pub fn set_new_points(&mut self, v: ::std::string::String) { - self.new_points = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_new_points(&mut self) -> &mut ::std::string::String { - &mut self.new_points - } - - // Take field - pub fn take_new_points(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.new_points, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for RewardPointUpdate { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.account_address)?; - }, - 12 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.new_points)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.account_address.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.account_address); - } - if !self.new_points.is_empty() { - my_size += ::protobuf::rt::string_size(12, &self.new_points); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.account_address.is_empty() { - os.write_string(1, &self.account_address)?; - } - if !self.new_points.is_empty() { - os.write_string(12, &self.new_points)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> RewardPointUpdate { - RewardPointUpdate::new() - } - - fn default_instance() -> &'static RewardPointUpdate { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(RewardPointUpdate::new) - } -} - -impl ::protobuf::Clear for RewardPointUpdate { - fn clear(&mut self) { - self.account_address.clear(); - self.new_points.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for RewardPointUpdate { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct TradingRewardPendingPointsUpdateProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub pending_pool_timestamp: i64, - pub reward_point_updates: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a TradingRewardPendingPointsUpdateProposal { - fn default() -> &'a TradingRewardPendingPointsUpdateProposal { - ::default_instance() - } -} - -impl TradingRewardPendingPointsUpdateProposal { - pub fn new() -> TradingRewardPendingPointsUpdateProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // int64 pending_pool_timestamp = 3; - - - pub fn get_pending_pool_timestamp(&self) -> i64 { - self.pending_pool_timestamp - } - pub fn clear_pending_pool_timestamp(&mut self) { - self.pending_pool_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_pending_pool_timestamp(&mut self, v: i64) { - self.pending_pool_timestamp = v; - } - - // repeated .injective.exchange.v1beta1.RewardPointUpdate reward_point_updates = 4; - - - pub fn get_reward_point_updates(&self) -> &[RewardPointUpdate] { - &self.reward_point_updates - } - pub fn clear_reward_point_updates(&mut self) { - self.reward_point_updates.clear(); - } - - // Param is passed by value, moved - pub fn set_reward_point_updates(&mut self, v: ::protobuf::RepeatedField) { - self.reward_point_updates = v; - } - - // Mutable pointer to the field. - pub fn mut_reward_point_updates(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.reward_point_updates - } - - // Take field - pub fn take_reward_point_updates(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.reward_point_updates, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for TradingRewardPendingPointsUpdateProposal { - fn is_initialized(&self) -> bool { - for v in &self.reward_point_updates { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.pending_pool_timestamp = tmp; - }, - 4 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.reward_point_updates)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if self.pending_pool_timestamp != 0 { - my_size += ::protobuf::rt::value_size(3, self.pending_pool_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - for value in &self.reward_point_updates { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if self.pending_pool_timestamp != 0 { - os.write_int64(3, self.pending_pool_timestamp)?; - } - for v in &self.reward_point_updates { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> TradingRewardPendingPointsUpdateProposal { - TradingRewardPendingPointsUpdateProposal::new() - } - - fn default_instance() -> &'static TradingRewardPendingPointsUpdateProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(TradingRewardPendingPointsUpdateProposal::new) - } -} - -impl ::protobuf::Clear for TradingRewardPendingPointsUpdateProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.pending_pool_timestamp = 0; - self.reward_point_updates.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for TradingRewardPendingPointsUpdateProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct FeeDiscountProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub schedule: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a FeeDiscountProposal { - fn default() -> &'a FeeDiscountProposal { - ::default_instance() - } -} - -impl FeeDiscountProposal { - pub fn new() -> FeeDiscountProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.FeeDiscountSchedule schedule = 3; - - - pub fn get_schedule(&self) -> &super::exchange::FeeDiscountSchedule { - self.schedule.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_schedule(&mut self) { - self.schedule.clear(); - } - - pub fn has_schedule(&self) -> bool { - self.schedule.is_some() - } - - // Param is passed by value, moved - pub fn set_schedule(&mut self, v: super::exchange::FeeDiscountSchedule) { - self.schedule = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_schedule(&mut self) -> &mut super::exchange::FeeDiscountSchedule { - if self.schedule.is_none() { - self.schedule.set_default(); - } - self.schedule.as_mut().unwrap() - } - - // Take field - pub fn take_schedule(&mut self) -> super::exchange::FeeDiscountSchedule { - self.schedule.take().unwrap_or_else(|| super::exchange::FeeDiscountSchedule::new()) - } -} - -impl ::protobuf::Message for FeeDiscountProposal { - fn is_initialized(&self) -> bool { - for v in &self.schedule { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.schedule)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - if let Some(ref v) = self.schedule.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - if let Some(ref v) = self.schedule.as_ref() { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> FeeDiscountProposal { - FeeDiscountProposal::new() - } - - fn default_instance() -> &'static FeeDiscountProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(FeeDiscountProposal::new) - } -} - -impl ::protobuf::Clear for FeeDiscountProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.schedule.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for FeeDiscountProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct BatchCommunityPoolSpendProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub proposals: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BatchCommunityPoolSpendProposal { - fn default() -> &'a BatchCommunityPoolSpendProposal { - ::default_instance() - } -} - -impl BatchCommunityPoolSpendProposal { - pub fn new() -> BatchCommunityPoolSpendProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // repeated .cosmos.distribution.v1beta1.CommunityPoolSpendProposal proposals = 3; - - - pub fn get_proposals(&self) -> &[super::distribution::CommunityPoolSpendProposal] { - &self.proposals - } - pub fn clear_proposals(&mut self) { - self.proposals.clear(); - } - - // Param is passed by value, moved - pub fn set_proposals(&mut self, v: ::protobuf::RepeatedField) { - self.proposals = v; - } - - // Mutable pointer to the field. - pub fn mut_proposals(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.proposals - } - - // Take field - pub fn take_proposals(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.proposals, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for BatchCommunityPoolSpendProposal { - fn is_initialized(&self) -> bool { - for v in &self.proposals { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.proposals)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - for value in &self.proposals { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - for v in &self.proposals { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BatchCommunityPoolSpendProposal { - BatchCommunityPoolSpendProposal::new() - } - - fn default_instance() -> &'static BatchCommunityPoolSpendProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(BatchCommunityPoolSpendProposal::new) - } -} - -impl ::protobuf::Clear for BatchCommunityPoolSpendProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.proposals.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for BatchCommunityPoolSpendProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgRewardsOptOut { - // message fields - pub sender: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgRewardsOptOut { - fn default() -> &'a MsgRewardsOptOut { - ::default_instance() - } -} - -impl MsgRewardsOptOut { - pub fn new() -> MsgRewardsOptOut { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for MsgRewardsOptOut { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgRewardsOptOut { - MsgRewardsOptOut::new() - } - - fn default_instance() -> &'static MsgRewardsOptOut { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgRewardsOptOut::new) - } -} - -impl ::protobuf::Clear for MsgRewardsOptOut { - fn clear(&mut self) { - self.sender.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgRewardsOptOut { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgRewardsOptOutResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgRewardsOptOutResponse { - fn default() -> &'a MsgRewardsOptOutResponse { - ::default_instance() - } -} - -impl MsgRewardsOptOutResponse { - pub fn new() -> MsgRewardsOptOutResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgRewardsOptOutResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgRewardsOptOutResponse { - MsgRewardsOptOutResponse::new() - } - - fn default_instance() -> &'static MsgRewardsOptOutResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgRewardsOptOutResponse::new) - } -} - -impl ::protobuf::Clear for MsgRewardsOptOutResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgRewardsOptOutResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgReclaimLockedFunds { - // message fields - pub sender: ::std::string::String, - pub lockedAccountPubKey: ::std::vec::Vec, - pub signature: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgReclaimLockedFunds { - fn default() -> &'a MsgReclaimLockedFunds { - ::default_instance() - } -} - -impl MsgReclaimLockedFunds { - pub fn new() -> MsgReclaimLockedFunds { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // bytes lockedAccountPubKey = 2; - - - pub fn get_lockedAccountPubKey(&self) -> &[u8] { - &self.lockedAccountPubKey - } - pub fn clear_lockedAccountPubKey(&mut self) { - self.lockedAccountPubKey.clear(); - } - - // Param is passed by value, moved - pub fn set_lockedAccountPubKey(&mut self, v: ::std::vec::Vec) { - self.lockedAccountPubKey = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_lockedAccountPubKey(&mut self) -> &mut ::std::vec::Vec { - &mut self.lockedAccountPubKey - } - - // Take field - pub fn take_lockedAccountPubKey(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.lockedAccountPubKey, ::std::vec::Vec::new()) - } - - // bytes signature = 3; - - - pub fn get_signature(&self) -> &[u8] { - &self.signature - } - pub fn clear_signature(&mut self) { - self.signature.clear(); - } - - // Param is passed by value, moved - pub fn set_signature(&mut self, v: ::std::vec::Vec) { - self.signature = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_signature(&mut self) -> &mut ::std::vec::Vec { - &mut self.signature - } - - // Take field - pub fn take_signature(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.signature, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for MsgReclaimLockedFunds { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.lockedAccountPubKey)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.signature)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.lockedAccountPubKey.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.lockedAccountPubKey); - } - if !self.signature.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.signature); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.lockedAccountPubKey.is_empty() { - os.write_bytes(2, &self.lockedAccountPubKey)?; - } - if !self.signature.is_empty() { - os.write_bytes(3, &self.signature)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgReclaimLockedFunds { - MsgReclaimLockedFunds::new() - } - - fn default_instance() -> &'static MsgReclaimLockedFunds { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgReclaimLockedFunds::new) - } -} - -impl ::protobuf::Clear for MsgReclaimLockedFunds { - fn clear(&mut self) { - self.sender.clear(); - self.lockedAccountPubKey.clear(); - self.signature.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgReclaimLockedFunds { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgReclaimLockedFundsResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgReclaimLockedFundsResponse { - fn default() -> &'a MsgReclaimLockedFundsResponse { - ::default_instance() - } -} - -impl MsgReclaimLockedFundsResponse { - pub fn new() -> MsgReclaimLockedFundsResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgReclaimLockedFundsResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgReclaimLockedFundsResponse { - MsgReclaimLockedFundsResponse::new() - } - - fn default_instance() -> &'static MsgReclaimLockedFundsResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgReclaimLockedFundsResponse::new) - } -} - -impl ::protobuf::Clear for MsgReclaimLockedFundsResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgReclaimLockedFundsResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgSignData { - // message fields - pub Signer: ::std::vec::Vec, - pub Data: ::std::vec::Vec, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgSignData { - fn default() -> &'a MsgSignData { - ::default_instance() - } -} - -impl MsgSignData { - pub fn new() -> MsgSignData { - ::std::default::Default::default() - } - - // bytes Signer = 1; - - - pub fn get_Signer(&self) -> &[u8] { - &self.Signer - } - pub fn clear_Signer(&mut self) { - self.Signer.clear(); - } - - // Param is passed by value, moved - pub fn set_Signer(&mut self, v: ::std::vec::Vec) { - self.Signer = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_Signer(&mut self) -> &mut ::std::vec::Vec { - &mut self.Signer - } - - // Take field - pub fn take_Signer(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.Signer, ::std::vec::Vec::new()) - } - - // bytes Data = 2; - - - pub fn get_Data(&self) -> &[u8] { - &self.Data - } - pub fn clear_Data(&mut self) { - self.Data.clear(); - } - - // Param is passed by value, moved - pub fn set_Data(&mut self, v: ::std::vec::Vec) { - self.Data = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_Data(&mut self) -> &mut ::std::vec::Vec { - &mut self.Data - } - - // Take field - pub fn take_Data(&mut self) -> ::std::vec::Vec { - ::std::mem::replace(&mut self.Data, ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for MsgSignData { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.Signer)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.Data)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.Signer.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.Signer); - } - if !self.Data.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.Data); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.Signer.is_empty() { - os.write_bytes(1, &self.Signer)?; - } - if !self.Data.is_empty() { - os.write_bytes(2, &self.Data)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgSignData { - MsgSignData::new() - } - - fn default_instance() -> &'static MsgSignData { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgSignData::new) - } -} - -impl ::protobuf::Clear for MsgSignData { - fn clear(&mut self) { - self.Signer.clear(); - self.Data.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgSignData { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgSignDoc { - // message fields - pub sign_type: ::std::string::String, - pub value: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgSignDoc { - fn default() -> &'a MsgSignDoc { - ::default_instance() - } -} - -impl MsgSignDoc { - pub fn new() -> MsgSignDoc { - ::std::default::Default::default() - } - - // string sign_type = 1; - - - pub fn get_sign_type(&self) -> &str { - &self.sign_type - } - pub fn clear_sign_type(&mut self) { - self.sign_type.clear(); - } - - // Param is passed by value, moved - pub fn set_sign_type(&mut self, v: ::std::string::String) { - self.sign_type = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sign_type(&mut self) -> &mut ::std::string::String { - &mut self.sign_type - } - - // Take field - pub fn take_sign_type(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sign_type, ::std::string::String::new()) - } - - // .injective.exchange.v1beta1.MsgSignData value = 2; - - - pub fn get_value(&self) -> &MsgSignData { - self.value.as_ref().unwrap_or_else(|| ::default_instance()) - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - pub fn has_value(&self) -> bool { - self.value.is_some() - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: MsgSignData) { - self.value = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut MsgSignData { - if self.value.is_none() { - self.value.set_default(); - } - self.value.as_mut().unwrap() - } - - // Take field - pub fn take_value(&mut self) -> MsgSignData { - self.value.take().unwrap_or_else(|| MsgSignData::new()) - } -} - -impl ::protobuf::Message for MsgSignDoc { - fn is_initialized(&self) -> bool { - for v in &self.value { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sign_type)?; - }, - 2 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.value)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sign_type.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sign_type); - } - if let Some(ref v) = self.value.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sign_type.is_empty() { - os.write_string(1, &self.sign_type)?; - } - if let Some(ref v) = self.value.as_ref() { - os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgSignDoc { - MsgSignDoc::new() - } - - fn default_instance() -> &'static MsgSignDoc { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgSignDoc::new) - } -} - -impl ::protobuf::Clear for MsgSignDoc { - fn clear(&mut self) { - self.sign_type.clear(); - self.value.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgSignDoc { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgAdminUpdateBinaryOptionsMarket { - // message fields - pub sender: ::std::string::String, - pub market_id: ::std::string::String, - pub settlement_price: ::std::string::String, - pub expiration_timestamp: i64, - pub settlement_timestamp: i64, - pub status: super::exchange::MarketStatus, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgAdminUpdateBinaryOptionsMarket { - fn default() -> &'a MsgAdminUpdateBinaryOptionsMarket { - ::default_instance() - } -} - -impl MsgAdminUpdateBinaryOptionsMarket { - pub fn new() -> MsgAdminUpdateBinaryOptionsMarket { - ::std::default::Default::default() - } - - // string sender = 1; - - - pub fn get_sender(&self) -> &str { - &self.sender - } - pub fn clear_sender(&mut self) { - self.sender.clear(); - } - - // Param is passed by value, moved - pub fn set_sender(&mut self, v: ::std::string::String) { - self.sender = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_sender(&mut self) -> &mut ::std::string::String { - &mut self.sender - } - - // Take field - pub fn take_sender(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.sender, ::std::string::String::new()) - } - - // string market_id = 2; - - - pub fn get_market_id(&self) -> &str { - &self.market_id - } - pub fn clear_market_id(&mut self) { - self.market_id.clear(); - } - - // Param is passed by value, moved - pub fn set_market_id(&mut self, v: ::std::string::String) { - self.market_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_market_id(&mut self) -> &mut ::std::string::String { - &mut self.market_id - } - - // Take field - pub fn take_market_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.market_id, ::std::string::String::new()) - } - - // string settlement_price = 3; - - - pub fn get_settlement_price(&self) -> &str { - &self.settlement_price - } - pub fn clear_settlement_price(&mut self) { - self.settlement_price.clear(); - } - - // Param is passed by value, moved - pub fn set_settlement_price(&mut self, v: ::std::string::String) { - self.settlement_price = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_settlement_price(&mut self) -> &mut ::std::string::String { - &mut self.settlement_price - } - - // Take field - pub fn take_settlement_price(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.settlement_price, ::std::string::String::new()) - } - - // int64 expiration_timestamp = 4; - - - pub fn get_expiration_timestamp(&self) -> i64 { - self.expiration_timestamp - } - pub fn clear_expiration_timestamp(&mut self) { - self.expiration_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_expiration_timestamp(&mut self, v: i64) { - self.expiration_timestamp = v; - } - - // int64 settlement_timestamp = 5; - - - pub fn get_settlement_timestamp(&self) -> i64 { - self.settlement_timestamp - } - pub fn clear_settlement_timestamp(&mut self) { - self.settlement_timestamp = 0; - } - - // Param is passed by value, moved - pub fn set_settlement_timestamp(&mut self, v: i64) { - self.settlement_timestamp = v; - } - - // .injective.exchange.v1beta1.MarketStatus status = 6; - - - pub fn get_status(&self) -> super::exchange::MarketStatus { - self.status - } - pub fn clear_status(&mut self) { - self.status = super::exchange::MarketStatus::Unspecified; - } - - // Param is passed by value, moved - pub fn set_status(&mut self, v: super::exchange::MarketStatus) { - self.status = v; - } -} - -impl ::protobuf::Message for MsgAdminUpdateBinaryOptionsMarket { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sender)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.market_id)?; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.settlement_price)?; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.expiration_timestamp = tmp; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_int64()?; - self.settlement_timestamp = tmp; - }, - 6 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 6, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.sender.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sender); - } - if !self.market_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.market_id); - } - if !self.settlement_price.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.settlement_price); - } - if self.expiration_timestamp != 0 { - my_size += ::protobuf::rt::value_size(4, self.expiration_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if self.settlement_timestamp != 0 { - my_size += ::protobuf::rt::value_size(5, self.settlement_timestamp, ::protobuf::wire_format::WireTypeVarint); - } - if self.status != super::exchange::MarketStatus::Unspecified { - my_size += ::protobuf::rt::enum_size(6, self.status); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.sender.is_empty() { - os.write_string(1, &self.sender)?; - } - if !self.market_id.is_empty() { - os.write_string(2, &self.market_id)?; - } - if !self.settlement_price.is_empty() { - os.write_string(3, &self.settlement_price)?; - } - if self.expiration_timestamp != 0 { - os.write_int64(4, self.expiration_timestamp)?; - } - if self.settlement_timestamp != 0 { - os.write_int64(5, self.settlement_timestamp)?; - } - if self.status != super::exchange::MarketStatus::Unspecified { - os.write_enum(6, ::protobuf::ProtobufEnum::value(&self.status))?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgAdminUpdateBinaryOptionsMarket { - MsgAdminUpdateBinaryOptionsMarket::new() - } - - fn default_instance() -> &'static MsgAdminUpdateBinaryOptionsMarket { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgAdminUpdateBinaryOptionsMarket::new) - } -} - -impl ::protobuf::Clear for MsgAdminUpdateBinaryOptionsMarket { - fn clear(&mut self) { - self.sender.clear(); - self.market_id.clear(); - self.settlement_price.clear(); - self.expiration_timestamp = 0; - self.settlement_timestamp = 0; - self.status = super::exchange::MarketStatus::Unspecified; - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgAdminUpdateBinaryOptionsMarket { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct MsgAdminUpdateBinaryOptionsMarketResponse { - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MsgAdminUpdateBinaryOptionsMarketResponse { - fn default() -> &'a MsgAdminUpdateBinaryOptionsMarketResponse { - ::default_instance() - } -} - -impl MsgAdminUpdateBinaryOptionsMarketResponse { - pub fn new() -> MsgAdminUpdateBinaryOptionsMarketResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MsgAdminUpdateBinaryOptionsMarketResponse { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MsgAdminUpdateBinaryOptionsMarketResponse { - MsgAdminUpdateBinaryOptionsMarketResponse::new() - } - - fn default_instance() -> &'static MsgAdminUpdateBinaryOptionsMarketResponse { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(MsgAdminUpdateBinaryOptionsMarketResponse::new) - } -} - -impl ::protobuf::Clear for MsgAdminUpdateBinaryOptionsMarketResponse { - fn clear(&mut self) { - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for MsgAdminUpdateBinaryOptionsMarketResponse { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -pub struct AtomicMarketOrderFeeMultiplierScheduleProposal { - // message fields - pub title: ::std::string::String, - pub description: ::std::string::String, - pub market_fee_multipliers: ::protobuf::RepeatedField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a AtomicMarketOrderFeeMultiplierScheduleProposal { - fn default() -> &'a AtomicMarketOrderFeeMultiplierScheduleProposal { - ::default_instance() - } -} - -impl AtomicMarketOrderFeeMultiplierScheduleProposal { - pub fn new() -> AtomicMarketOrderFeeMultiplierScheduleProposal { - ::std::default::Default::default() - } - - // string title = 1; - - - pub fn get_title(&self) -> &str { - &self.title - } - pub fn clear_title(&mut self) { - self.title.clear(); - } - - // Param is passed by value, moved - pub fn set_title(&mut self, v: ::std::string::String) { - self.title = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_title(&mut self) -> &mut ::std::string::String { - &mut self.title - } - - // Take field - pub fn take_title(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.title, ::std::string::String::new()) - } - - // string description = 2; - - - pub fn get_description(&self) -> &str { - &self.description - } - pub fn clear_description(&mut self) { - self.description.clear(); - } - - // Param is passed by value, moved - pub fn set_description(&mut self, v: ::std::string::String) { - self.description = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_description(&mut self) -> &mut ::std::string::String { - &mut self.description - } - - // Take field - pub fn take_description(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.description, ::std::string::String::new()) - } - - // repeated .injective.exchange.v1beta1.MarketFeeMultiplier market_fee_multipliers = 3; - - - pub fn get_market_fee_multipliers(&self) -> &[super::exchange::MarketFeeMultiplier] { - &self.market_fee_multipliers - } - pub fn clear_market_fee_multipliers(&mut self) { - self.market_fee_multipliers.clear(); - } - - // Param is passed by value, moved - pub fn set_market_fee_multipliers(&mut self, v: ::protobuf::RepeatedField) { - self.market_fee_multipliers = v; - } - - // Mutable pointer to the field. - pub fn mut_market_fee_multipliers(&mut self) -> &mut ::protobuf::RepeatedField { - &mut self.market_fee_multipliers - } - - // Take field - pub fn take_market_fee_multipliers(&mut self) -> ::protobuf::RepeatedField { - ::std::mem::replace(&mut self.market_fee_multipliers, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for AtomicMarketOrderFeeMultiplierScheduleProposal { - fn is_initialized(&self) -> bool { - for v in &self.market_fee_multipliers { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.title)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?; - }, - 3 => { - ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.market_fee_multipliers)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.title.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.title); - } - if !self.description.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.description); - } - for value in &self.market_fee_multipliers { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { - if !self.title.is_empty() { - os.write_string(1, &self.title)?; - } - if !self.description.is_empty() { - os.write_string(2, &self.description)?; - } - for v in &self.market_fee_multipliers { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> AtomicMarketOrderFeeMultiplierScheduleProposal { - AtomicMarketOrderFeeMultiplierScheduleProposal::new() - } - - fn default_instance() -> &'static AtomicMarketOrderFeeMultiplierScheduleProposal { - static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; - instance.get(AtomicMarketOrderFeeMultiplierScheduleProposal::new) - } -} - -impl ::protobuf::Clear for AtomicMarketOrderFeeMultiplierScheduleProposal { - fn clear(&mut self) { - self.title.clear(); - self.description.clear(); - self.market_fee_multipliers.clear(); - self.unknown_fields.clear(); - } -} - -impl ::protobuf::reflect::ProtobufValue for AtomicMarketOrderFeeMultiplierScheduleProposal { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Message(self) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum ExchangeType { - EXCHANGE_UNSPECIFIED = 0, - SPOT = 1, - DERIVATIVES = 2, -} - -impl ::protobuf::ProtobufEnum for ExchangeType { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ExchangeType::EXCHANGE_UNSPECIFIED), - 1 => ::std::option::Option::Some(ExchangeType::SPOT), - 2 => ::std::option::Option::Some(ExchangeType::DERIVATIVES), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [ExchangeType] = &[ - ExchangeType::EXCHANGE_UNSPECIFIED, - ExchangeType::SPOT, - ExchangeType::DERIVATIVES, - ]; - values - } -} - -impl ::std::marker::Copy for ExchangeType { -} - -impl ::std::default::Default for ExchangeType { - fn default() -> Self { - ExchangeType::EXCHANGE_UNSPECIFIED - } -} - -impl ::protobuf::reflect::ProtobufValue for ExchangeType { - fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { - ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) - } -} diff --git a/packages/injective-protobuf/third_party/proto/amino/amino.proto b/packages/injective-protobuf/third_party/proto/amino/amino.proto deleted file mode 100644 index fb099b8e..00000000 --- a/packages/injective-protobuf/third_party/proto/amino/amino.proto +++ /dev/null @@ -1,84 +0,0 @@ -syntax = "proto3"; - -package amino; - -import "google/protobuf/descriptor.proto"; - -// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated. -// We need this right now because gogoproto codegen needs to import the extension. -option go_package = "github.com/cosmos/cosmos-sdk/types/tx/amino"; - -extend google.protobuf.MessageOptions { - // name is the string used when registering a concrete - // type into the Amino type registry, via the Amino codec's - // `RegisterConcrete()` method. This string MUST be at most 39 - // characters long, or else the message will be rejected by the - // Ledger hardware device. - string name = 11110001; - - // encoding describes the encoding format used by Amino for the given - // message. The field type is chosen to be a string for - // flexibility, but it should ideally be short and expected to be - // machine-readable, for example "base64" or "utf8_json". We - // highly recommend to use underscores for word separation instead of spaces. - // - // If left empty, then the Amino encoding is expected to be the same as the - // Protobuf one. - // - // This annotation should not be confused with the `encoding` - // one which operates on the field level. - string message_encoding = 11110002; -} - -extend google.protobuf.FieldOptions { - // encoding describes the encoding format used by Amino for - // the given field. The field type is chosen to be a string for - // flexibility, but it should ideally be short and expected to be - // machine-readable, for example "base64" or "utf8_json". We - // highly recommend to use underscores for word separation instead of spaces. - // - // If left empty, then the Amino encoding is expected to be the same as the - // Protobuf one. - // - // This annotation should not be confused with the - // `message_encoding` one which operates on the message level. - string encoding = 11110003; - - // field_name sets a different field name (i.e. key name) in - // the amino JSON object for the given field. - // - // Example: - // - // message Foo { - // string bar = 1 [(amino.field_name) = "baz"]; - // } - // - // Then the Amino encoding of Foo will be: - // `{"baz":"some value"}` - string field_name = 11110004; - - // dont_omitempty sets the field in the JSON object even if - // its value is empty, i.e. equal to the Golang zero value. To learn what - // the zero values are, see https://go.dev/ref/spec#The_zero_value. - // - // Fields default to `omitempty`, which is the default behavior when this - // annotation is unset. When set to true, then the field value in the - // JSON object will be set, i.e. not `undefined`. - // - // Example: - // - // message Foo { - // string bar = 1; - // string baz = 2 [(amino.dont_omitempty) = true]; - // } - // - // f := Foo{}; - // out := AminoJSONEncoder(&f); - // out == {"baz":""} - bool dont_omitempty = 11110005; - - // oneof_name sets the type name for the given field oneof field. This is used - // by the Amino JSON encoder to encode the type of the oneof field, and must be the same string in - // the RegisterConcrete() method usage used to register the concrete type. - string oneof_name = 11110006; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/app/runtime/v1alpha1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/app/runtime/v1alpha1/module.proto deleted file mode 100644 index c0261217..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/app/runtime/v1alpha1/module.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; - -package cosmos.app.runtime.v1alpha1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object for the runtime module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/runtime" - use_package: {name: "cosmos.app.v1alpha1"} - }; - - // app_name is the name of the app. - string app_name = 1; - - // begin_blockers specifies the module names of begin blockers - // to call in the order in which they should be called. If this is left empty - // no begin blocker will be registered. - repeated string begin_blockers = 2; - - // end_blockers specifies the module names of the end blockers - // to call in the order in which they should be called. If this is left empty - // no end blocker will be registered. - repeated string end_blockers = 3; - - // init_genesis specifies the module names of init genesis functions - // to call in the order in which they should be called. If this is left empty - // no init genesis function will be registered. - repeated string init_genesis = 4; - - // export_genesis specifies the order in which to export module genesis data. - // If this is left empty, the init_genesis order will be used for export genesis - // if it is specified. - repeated string export_genesis = 5; - - // override_store_keys is an optional list of overrides for the module store keys - // to be used in keeper construction. - repeated StoreKeyConfig override_store_keys = 6; - - // order_migrations defines the order in which module migrations are performed. - // If this is left empty, it uses the default migration order. - // https://pkg.go.dev/github.com/cosmos/cosmos-sdk@v0.47.0-alpha2/types/module#DefaultMigrationsOrder - repeated string order_migrations = 7; - - // precommiters specifies the module names of the precommiters - // to call in the order in which they should be called. If this is left empty - // no precommit function will be registered. - repeated string precommiters = 8; - - // prepare_check_staters specifies the module names of the prepare_check_staters - // to call in the order in which they should be called. If this is left empty - // no preparecheckstate function will be registered. - repeated string prepare_check_staters = 9; -} - -// StoreKeyConfig may be supplied to override the default module store key, which -// is the module name. -message StoreKeyConfig { - // name of the module to override the store key of - string module_name = 1; - - // the kv store key to use instead of the module name. - string kv_store_key = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/config.proto b/packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/config.proto deleted file mode 100644 index ee3e7065..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/config.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; - -package cosmos.app.v1alpha1; - -import "google/protobuf/any.proto"; - -// Config represents the configuration for a Cosmos SDK ABCI app. -// It is intended that all state machine logic including the version of -// baseapp and tx handlers (and possibly even Tendermint) that an app needs -// can be described in a config object. For compatibility, the framework should -// allow a mixture of declarative and imperative app wiring, however, apps -// that strive for the maximum ease of maintainability should be able to describe -// their state machine with a config object alone. -message Config { - // modules are the module configurations for the app. - repeated ModuleConfig modules = 1; - - // golang_bindings specifies explicit interface to implementation type bindings which - // depinject uses to resolve interface inputs to provider functions. The scope of this - // field's configuration is global (not module specific). - repeated GolangBinding golang_bindings = 2; -} - -// ModuleConfig is a module configuration for an app. -message ModuleConfig { - // name is the unique name of the module within the app. It should be a name - // that persists between different versions of a module so that modules - // can be smoothly upgraded to new versions. - // - // For example, for the module cosmos.bank.module.v1.Module, we may chose - // to simply name the module "bank" in the app. When we upgrade to - // cosmos.bank.module.v2.Module, the app-specific name "bank" stays the same - // and the framework knows that the v2 module should receive all the same state - // that the v1 module had. Note: modules should provide info on which versions - // they can migrate from in the ModuleDescriptor.can_migration_from field. - string name = 1; - - // config is the config object for the module. Module config messages should - // define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. - google.protobuf.Any config = 2; - - // golang_bindings specifies explicit interface to implementation type bindings which - // depinject uses to resolve interface inputs to provider functions. The scope of this - // field's configuration is module specific. - repeated GolangBinding golang_bindings = 3; -} - -// GolangBinding is an explicit interface type to implementing type binding for dependency injection. -message GolangBinding { - // interface_type is the interface type which will be bound to a specific implementation type - string interface_type = 1; - - // implementation is the implementing type which will be supplied when an input of type interface is requested - string implementation = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/module.proto deleted file mode 100644 index e5413786..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/module.proto +++ /dev/null @@ -1,91 +0,0 @@ -syntax = "proto3"; - -package cosmos.app.v1alpha1; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.MessageOptions { - // module indicates that this proto type is a config object for an app module - // and optionally provides other descriptive information about the module. - // It is recommended that a new module config object and go module is versioned - // for every state machine breaking version of a module. The recommended - // pattern for doing this is to put module config objects in a separate proto - // package from the API they expose. Ex: the cosmos.group.v1 API would be - // exposed by module configs cosmos.group.module.v1, cosmos.group.module.v2, etc. - ModuleDescriptor module = 57193479; -} - -// ModuleDescriptor describes an app module. -message ModuleDescriptor { - // go_import names the package that should be imported by an app to load the - // module in the runtime module registry. It is required to make debugging - // of configuration errors easier for users. - string go_import = 1; - - // use_package refers to a protobuf package that this module - // uses and exposes to the world. In an app, only one module should "use" - // or own a single protobuf package. It is assumed that the module uses - // all of the .proto files in a single package. - repeated PackageReference use_package = 2; - - // can_migrate_from defines which module versions this module can migrate - // state from. The framework will check that one module version is able to - // migrate from a previous module version before attempting to update its - // config. It is assumed that modules can transitively migrate from earlier - // versions. For instance if v3 declares it can migrate from v2, and v2 - // declares it can migrate from v1, the framework knows how to migrate - // from v1 to v3, assuming all 3 module versions are registered at runtime. - repeated MigrateFromInfo can_migrate_from = 3; -} - -// PackageReference is a reference to a protobuf package used by a module. -message PackageReference { - // name is the fully-qualified name of the package. - string name = 1; - - // revision is the optional revision of the package that is being used. - // Protobuf packages used in Cosmos should generally have a major version - // as the last part of the package name, ex. foo.bar.baz.v1. - // The revision of a package can be thought of as the minor version of a - // package which has additional backwards compatible definitions that weren't - // present in a previous version. - // - // A package should indicate its revision with a source code comment - // above the package declaration in one of its files containing the - // text "Revision N" where N is an integer revision. All packages start - // at revision 0 the first time they are released in a module. - // - // When a new version of a module is released and items are added to existing - // .proto files, these definitions should contain comments of the form - // "Since: Revision N" where N is an integer revision. - // - // When the module runtime starts up, it will check the pinned proto - // image and panic if there are runtime protobuf definitions that are not - // in the pinned descriptor which do not have - // a "Since Revision N" comment or have a "Since Revision N" comment where - // N is <= to the revision specified here. This indicates that the protobuf - // files have been updated, but the pinned file descriptor hasn't. - // - // If there are items in the pinned file descriptor with a revision - // greater than the value indicated here, this will also cause a panic - // as it may mean that the pinned descriptor for a legacy module has been - // improperly updated or that there is some other versioning discrepancy. - // Runtime protobuf definitions will also be checked for compatibility - // with pinned file descriptors to make sure there are no incompatible changes. - // - // This behavior ensures that: - // * pinned proto images are up-to-date - // * protobuf files are carefully annotated with revision comments which - // are important good client UX - // * protobuf files are changed in backwards and forwards compatible ways - uint32 revision = 2; -} - -// MigrateFromInfo is information on a module version that a newer module -// can migrate from. -message MigrateFromInfo { - - // module is the fully-qualified protobuf name of the module config object - // for the previous module version, ex: "cosmos.group.module.v1.Module". - string module = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/query.proto deleted file mode 100644 index efec9c81..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/app/v1alpha1/query.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -package cosmos.app.v1alpha1; - -import "cosmos/app/v1alpha1/config.proto"; - -// Query is the app module query service. -service Query { - - // Config returns the current app config. - rpc Config(QueryConfigRequest) returns (QueryConfigResponse) {} -} - -// QueryConfigRequest is the Query/Config request type. -message QueryConfigRequest {} - -// QueryConfigRequest is the Query/Config response type. -message QueryConfigResponse { - - // config is the current app config. - Config config = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/auth/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/auth/module/v1/module.proto deleted file mode 100644 index dbe46a15..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/auth/module/v1/module.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package cosmos.auth.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object for the auth module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/auth" - }; - - // bech32_prefix is the bech32 account prefix for the app. - string bech32_prefix = 1; - - // module_account_permissions are module account permissions. - repeated ModuleAccountPermission module_account_permissions = 2; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 3; -} - -// ModuleAccountPermission represents permissions for a module account. -message ModuleAccountPermission { - // account is the name of the module. - string account = 1; - - // permissions are the permissions this module has. Currently recognized - // values are minter, burner and staking. - repeated string permissions = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/auth.proto b/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/auth.proto deleted file mode 100644 index bcac9831..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/auth.proto +++ /dev/null @@ -1,66 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "amino/amino.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// BaseAccount defines a base account type. It contains all the necessary fields -// for basic account functionality. Any custom account type should extend this -// type for additional functionality (e.g. vesting). -message BaseAccount { - option (amino.name) = "cosmos-sdk/BaseAccount"; - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.AccountI"; - - string address = 1 [ - (cosmos_proto.scalar) = "cosmos.AddressString"]; - - google.protobuf.Any pub_key = 2 [ - (gogoproto.jsontag) = "public_key,omitempty", - (amino.field_name) = "public_key"]; - - uint64 account_number = 3; - uint64 sequence = 4; -} - -// ModuleAccount defines an account for modules that holds coins on a pool. -message ModuleAccount { - option (amino.name) = "cosmos-sdk/ModuleAccount"; - option (amino.message_encoding) = "module_account"; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.ModuleAccountI"; - - BaseAccount base_account = 1 [(gogoproto.embed) = true]; - string name = 2; - repeated string permissions = 3; -} - -// ModuleCredential represents a unclaimable pubkey for base accounts controlled by modules. -// -// Since: cosmos-sdk 0.47 -message ModuleCredential { - option (amino.name) = "cosmos-sdk/GroupAccountCredential"; - // module_name is the name of the module used for address derivation (passed into address.Module). - string module_name = 1; - // derivation_keys is for deriving a module account address (passed into address.Module) - // adding more keys creates sub-account addresses (passed into address.Derive) - repeated bytes derivation_keys = 2; -} - -// Params defines the parameters for the auth module. -message Params { - option (amino.name) = "cosmos-sdk/x/auth/Params"; - option (gogoproto.equal) = true; - - uint64 max_memo_characters = 1; - uint64 tx_sig_limit = 2; - uint64 tx_size_cost_per_byte = 3; - uint64 sig_verify_cost_ed25519 = 4 [(gogoproto.customname) = "SigVerifyCostED25519"]; - uint64 sig_verify_cost_secp256k1 = 5 [(gogoproto.customname) = "SigVerifyCostSecp256k1"]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/genesis.proto deleted file mode 100644 index d1aa66e4..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/genesis.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/auth/v1beta1/auth.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// GenesisState defines the auth module's genesis state. -message GenesisState { - // params defines all the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // accounts are the accounts present at genesis. - repeated google.protobuf.Any accounts = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/query.proto deleted file mode 100644 index 804f2ff0..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/query.proto +++ /dev/null @@ -1,236 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "cosmos/auth/v1beta1/auth.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/query/v1/query.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// Query defines the gRPC querier service. -service Query { - // Accounts returns all the existing accounts. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - // - // Since: cosmos-sdk 0.43 - rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/accounts"; - } - - // Account returns account details based on address. - rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; - } - - // AccountAddressByID returns account address based on account number. - // - // Since: cosmos-sdk 0.46.2 - rpc AccountAddressByID(QueryAccountAddressByIDRequest) returns (QueryAccountAddressByIDResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/address_by_id/{id}"; - } - - // Params queries all parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/params"; - } - - // ModuleAccounts returns all the existing module accounts. - // - // Since: cosmos-sdk 0.46 - rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts"; - } - - // ModuleAccountByName returns the module account info by module name - rpc ModuleAccountByName(QueryModuleAccountByNameRequest) returns (QueryModuleAccountByNameResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}"; - } - - // Bech32Prefix queries bech32Prefix - // - // Since: cosmos-sdk 0.46 - rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/bech32"; - } - - // AddressBytesToString converts Account Address bytes to string - // - // Since: cosmos-sdk 0.46 - rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}"; - } - - // AddressStringToBytes converts Address string to bytes - // - // Since: cosmos-sdk 0.46 - rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}"; - } - - // AccountInfo queries account info which is common to all account types. - // - // Since: cosmos-sdk 0.47 - rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/auth/v1beta1/account_info/{address}"; - } -} - -// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryAccountsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryAccountsResponse { - // accounts are the existing accounts - repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "cosmos.auth.v1beta1.AccountI"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAccountRequest is the request type for the Query/Account RPC method. -message QueryAccountRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address defines the address to query for. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryAccountResponse is the response type for the Query/Account RPC method. -message QueryAccountResponse { - // account defines the account of the corresponding address. - google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "cosmos.auth.v1beta1.AccountI"]; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -message QueryModuleAccountsRequest {} - -// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -// -// Since: cosmos-sdk 0.46 -message QueryModuleAccountsResponse { - repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "cosmos.auth.v1beta1.ModuleAccountI"]; -} - -// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. -message QueryModuleAccountByNameRequest { - string name = 1; -} - -// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. -message QueryModuleAccountByNameResponse { - google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "cosmos.auth.v1beta1.ModuleAccountI"]; -} - -// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. -// -// Since: cosmos-sdk 0.46 -message Bech32PrefixRequest {} - -// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. -// -// Since: cosmos-sdk 0.46 -message Bech32PrefixResponse { - string bech32_prefix = 1; -} - -// AddressBytesToStringRequest is the request type for AddressString rpc method. -// -// Since: cosmos-sdk 0.46 -message AddressBytesToStringRequest { - bytes address_bytes = 1; -} - -// AddressBytesToStringResponse is the response type for AddressString rpc method. -// -// Since: cosmos-sdk 0.46 -message AddressBytesToStringResponse { - string address_string = 1; -} - -// AddressStringToBytesRequest is the request type for AccountBytes rpc method. -// -// Since: cosmos-sdk 0.46 -message AddressStringToBytesRequest { - string address_string = 1; -} - -// AddressStringToBytesResponse is the response type for AddressBytes rpc method. -// -// Since: cosmos-sdk 0.46 -message AddressStringToBytesResponse { - bytes address_bytes = 1; -} - -// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method -// -// Since: cosmos-sdk 0.46.2 -message QueryAccountAddressByIDRequest { - // Deprecated, use account_id instead - // - // id is the account number of the address to be queried. This field - // should have been an uint64 (like all account numbers), and will be - // updated to uint64 in a future version of the auth query. - int64 id = 1 [deprecated = true]; - - // account_id is the account number of the address to be queried. - // - // Since: cosmos-sdk 0.47 - uint64 account_id = 2; -} - -// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method -// -// Since: cosmos-sdk 0.46.2 -message QueryAccountAddressByIDResponse { - string account_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryAccountInfoRequest is the Query/AccountInfo request type. -// -// Since: cosmos-sdk 0.47 -message QueryAccountInfoRequest { - - // address is the account address string. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryAccountInfoResponse is the Query/AccountInfo response type. -// -// Since: cosmos-sdk 0.47 -message QueryAccountInfoResponse { - - // info is the account info which is represented by BaseAccount. - BaseAccount info = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/tx.proto deleted file mode 100644 index 1edee037..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/auth/v1beta1/tx.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; -import "cosmos/auth/v1beta1/auth.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// Msg defines the x/auth Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // UpdateParams defines a (governance) operation for updating the x/auth module - // parameters. The authority defaults to the x/gov module account. - // - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/auth/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // params defines the x/auth parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/authz/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/authz/module/v1/module.proto deleted file mode 100644 index 80058668..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/authz/module/v1/module.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package cosmos.authz.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the authz module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/authz" - }; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/authz.proto b/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/authz.proto deleted file mode 100644 index 3fee7364..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/authz.proto +++ /dev/null @@ -1,48 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "amino/amino.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; -option (gogoproto.goproto_getters_all) = false; - -// GenericAuthorization gives the grantee unrestricted permissions to execute -// the provided method on behalf of the granter's account. -message GenericAuthorization { - option (amino.name) = "cosmos-sdk/GenericAuthorization"; - option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization"; - - // Msg, identified by it's type URL, to grant unrestricted permissions to execute - string msg = 1; -} - -// Grant gives permissions to execute -// the provide method with expiration time. -message Grant { - google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "cosmos.authz.v1beta1.Authorization"]; - // time when the grant will expire and will be pruned. If null, then the grant - // doesn't have a time expiration (other conditions in `authorization` - // may apply to invalidate the grant) - google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = true]; -} - -// GrantAuthorization extends a grant with both the addresses of the grantee and granter. -// It is used in genesis.proto and query.proto -message GrantAuthorization { - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "cosmos.authz.v1beta1.Authorization"]; - google.protobuf.Timestamp expiration = 4 [(gogoproto.stdtime) = true]; -} - -// GrantQueueItem contains the list of TypeURL of a sdk.Msg. -message GrantQueueItem { - // msg_type_urls contains the list of TypeURL of a sdk.Msg. - repeated string msg_type_urls = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/event.proto b/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/event.proto deleted file mode 100644 index 0476649a..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/event.proto +++ /dev/null @@ -1,27 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// EventGrant is emitted on Msg/Grant -message EventGrant { - // Msg type URL for which an autorization is granted - string msg_type_url = 2; - // Granter account address - string granter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Grantee account address - string grantee = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// EventRevoke is emitted on Msg/Revoke -message EventRevoke { - // Msg type URL for which an autorization is revoked - string msg_type_url = 2; - // Granter account address - string granter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Grantee account address - string grantee = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/genesis.proto deleted file mode 100644 index 9fefff45..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/genesis.proto +++ /dev/null @@ -1,14 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/authz/v1beta1/authz.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// GenesisState defines the authz module's genesis state. -message GenesisState { - repeated GrantAuthorization authorization = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/query.proto deleted file mode 100644 index fcd56815..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/query.proto +++ /dev/null @@ -1,82 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos/authz/v1beta1/authz.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// Query defines the gRPC querier service. -service Query { - // Returns list of `Authorization`, granted to the grantee by the granter. - rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants"; - } - - // GranterGrants returns list of `GrantAuthorization`, granted by granter. - // - // Since: cosmos-sdk 0.46 - rpc GranterGrants(QueryGranterGrantsRequest) returns (QueryGranterGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants/granter/{granter}"; - } - - // GranteeGrants returns a list of `GrantAuthorization` by grantee. - // - // Since: cosmos-sdk 0.46 - rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants/grantee/{grantee}"; - } -} - -// QueryGrantsRequest is the request type for the Query/Grants RPC method. -message QueryGrantsRequest { - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Optional, msg_type_url, when set, will query only grants matching given msg type. - string msg_type_url = 3; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. -message QueryGrantsResponse { - // authorizations is a list of grants granted for grantee by granter. - repeated Grant grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. -message QueryGranterGrantsRequest { - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. -message QueryGranterGrantsResponse { - // grants is a list of grants granted by the granter. - repeated GrantAuthorization grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method. -message QueryGranteeGrantsRequest { - string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. -message QueryGranteeGrantsResponse { - // grants is a list of grants granted to the grantee. - repeated GrantAuthorization grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/tx.proto deleted file mode 100644 index a1abff0d..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/authz/v1beta1/tx.proto +++ /dev/null @@ -1,81 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos/authz/v1beta1/authz.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; -option (gogoproto.goproto_getters_all) = false; - -// Msg defines the authz Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // Grant grants the provided authorization to the grantee on the granter's - // account with the provided expiration time. If there is already a grant - // for the given (granter, grantee, Authorization) triple, then the grant - // will be overwritten. - rpc Grant(MsgGrant) returns (MsgGrantResponse); - - // Exec attempts to execute the provided messages using - // authorizations granted to the grantee. Each message should have only - // one signer corresponding to the granter of the authorization. - rpc Exec(MsgExec) returns (MsgExecResponse); - - // Revoke revokes any authorization corresponding to the provided method name on the - // granter's account that has been granted to the grantee. - rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); -} - -// MsgGrant is a request type for Grant method. It declares authorization to the grantee -// on behalf of the granter with the provided expiration time. -message MsgGrant { - option (cosmos.msg.v1.signer) = "granter"; - option (amino.name) = "cosmos-sdk/MsgGrant"; - - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgGrantResponse defines the Msg/MsgGrant response type. -message MsgGrantResponse {} - -// MsgExec attempts to execute the provided messages using -// authorizations granted to the grantee. Each message should have only -// one signer corresponding to the granter of the authorization. -message MsgExec { - option (cosmos.msg.v1.signer) = "grantee"; - option (amino.name) = "cosmos-sdk/MsgExec"; - - string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Execute Msg. - // The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) - // triple and validate it. - repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "cosmos.base.v1beta1.Msg"]; -} - -// MsgExecResponse defines the Msg/MsgExecResponse response type. -message MsgExecResponse { - repeated bytes results = 1; -} - -// MsgRevoke revokes any authorization with the provided sdk.Msg type on the -// granter's account with that has been granted to the grantee. -message MsgRevoke { - option (cosmos.msg.v1.signer) = "granter"; - option (amino.name) = "cosmos-sdk/MsgRevoke"; - - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string msg_type_url = 3; -} - -// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. -message MsgRevokeResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/autocli/v1/options.proto b/packages/injective-protobuf/third_party/proto/cosmos/autocli/v1/options.proto deleted file mode 100644 index 5b1fb741..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/autocli/v1/options.proto +++ /dev/null @@ -1,134 +0,0 @@ -syntax = "proto3"; - -package cosmos.autocli.v1; - -option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; - -// ModuleOptions describes the CLI options for a Cosmos SDK module. -message ModuleOptions { - // tx describes the tx commands for the module. - ServiceCommandDescriptor tx = 1; - - // query describes the queries commands for the module. - ServiceCommandDescriptor query = 2; -} - -// ServiceCommandDescriptor describes a CLI command based on a protobuf service. -message ServiceCommandDescriptor { - - // service is the fully qualified name of the protobuf service to build - // the command from. It can be left empty if sub_commands are used instead - // which may be the case if a module provides multiple tx and/or query services. - string service = 1; - - // rpc_command_options are options for commands generated from rpc methods. - // If no options are specified for a given rpc method on the service, a - // command will be generated for that method with the default options. - repeated RpcCommandOptions rpc_command_options = 2; - - // sub_commands is a map of optional sub-commands for this command based on - // different protobuf services. The map key is used as the name of the - // sub-command. - map sub_commands = 3; - - // enhance_custom_commands specifies whether to skip the service when generating commands, if a custom command already exists, - // or enhance the existing command. If set to true, the custom command will be enhanced with the services from gRPC. - // otherwise when a custom command exists, no commands will be generated for the service. - bool enhance_custom_command = 4; -} - -// RpcCommandOptions specifies options for commands generated from protobuf -// rpc methods. -message RpcCommandOptions { - // rpc_method is short name of the protobuf rpc method that this command is - // generated from. - string rpc_method = 1; - - // use is the one-line usage method. It also allows specifying an alternate - // name for the command as the first word of the usage text. - // - // By default the name of an rpc command is the kebab-case short name of the - // rpc method. - string use = 2; - - // long is the long message shown in the 'help ' output. - string long = 3; - - // short is the short description shown in the 'help' output. - string short = 4; - - // example is examples of how to use the command. - string example = 5; - - // alias is an array of aliases that can be used instead of the first word in Use. - repeated string alias = 6; - - // suggest_for is an array of command names for which this command will be suggested - - // similar to aliases but only suggests. - repeated string suggest_for = 7; - - // deprecated defines, if this command is deprecated and should print this string when used. - string deprecated = 8; - - // version defines the version for this command. If this value is non-empty and the command does not - // define a "version" flag, a "version" boolean flag will be added to the command and, if specified, - // will print content of the "Version" variable. A shorthand "v" flag will also be added if the - // command does not define one. - string version = 9; - - // flag_options are options for flags generated from rpc request fields. - // By default all request fields are configured as flags. They can - // also be configured as positional args instead using positional_args. - map flag_options = 10; - - // positional_args specifies positional arguments for the command. - repeated PositionalArgDescriptor positional_args = 11; - - // skip specifies whether to skip this rpc method when generating commands. - bool skip = 12; - -} - -// FlagOptions are options for flags generated from rpc request fields. -// By default, all request fields are configured as flags based on the -// kebab-case name of the field. Fields can be turned into positional arguments -// instead by using RpcCommandOptions.positional_args. -message FlagOptions { - - // name is an alternate name to use for the field flag. - string name = 1; - - // shorthand is a one-letter abbreviated flag. - string shorthand = 2; - - // usage is the help message. - string usage = 3; - - // default_value is the default value as text. - string default_value = 4; - - // deprecated is the usage text to show if this flag is deprecated. - string deprecated = 6; - - // shorthand_deprecated is the usage text to show if the shorthand of this flag is deprecated. - string shorthand_deprecated = 7; - - // hidden hides the flag from help/usage text - bool hidden = 8; -} - -// PositionalArgDescriptor describes a positional argument. -message PositionalArgDescriptor { - // proto_field specifies the proto field to use as the positional arg. Any - // fields used as positional args will not have a flag generated. - string proto_field = 1; - - // varargs makes a positional parameter a varargs parameter. This can only be - // applied to last positional parameter and the proto_field must a repeated - // field. Note: It is mutually exclusive with optional. - bool varargs = 2; - - // optional makes the last positional parameter optional. - // Note: It is mutually exclusive with varargs. - bool optional = 3; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/autocli/v1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/autocli/v1/query.proto deleted file mode 100644 index a998978e..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/autocli/v1/query.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package cosmos.autocli.v1; - -import "cosmos/autocli/v1/options.proto"; -import "cosmos/query/v1/query.proto"; - -option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; - -// RemoteInfoService provides clients with the information they need -// to build dynamically CLI clients for remote chains. -service Query { - // AppOptions returns the autocli options for all of the modules in an app. - rpc AppOptions(AppOptionsRequest) returns (AppOptionsResponse) { - // NOTE: autocli options SHOULD NOT be part of consensus and module_query_safe - // should be kept as false. - option (cosmos.query.v1.module_query_safe) = false; - } -} - -// AppOptionsRequest is the RemoteInfoService/AppOptions request type. -message AppOptionsRequest {} - -// AppOptionsResponse is the RemoteInfoService/AppOptions response type. -message AppOptionsResponse { - // module_options is a map of module name to autocli module options. - map module_options = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/bank/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/bank/module/v1/module.proto deleted file mode 100644 index eb26a80c..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/bank/module/v1/module.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package cosmos.bank.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the bank module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/bank" - }; - - // blocked_module_accounts_override configures exceptional module accounts which should be blocked from receiving funds. - // If left empty it defaults to the list of account names supplied in the auth module configuration as - // module_account_permissions - repeated string blocked_module_accounts_override = 1; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/authz.proto b/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/authz.proto deleted file mode 100644 index d42c619a..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/authz.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "amino/amino.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// SendAuthorization allows the grantee to spend up to spend_limit coins from -// the granter's account. -// -// Since: cosmos-sdk 0.43 -message SendAuthorization { - option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization"; - option (amino.name) = "cosmos-sdk/SendAuthorization"; - - repeated cosmos.base.v1beta1.Coin spend_limit = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // allow_list specifies an optional list of addresses to whom the grantee can send tokens on behalf of the - // granter. If omitted, any recipient is allowed. - // - // Since: cosmos-sdk 0.47 - repeated string allow_list = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/bank.proto b/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/bank.proto deleted file mode 100644 index cbf6a41c..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/bank.proto +++ /dev/null @@ -1,125 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Params defines the parameters for the bank module. -message Params { - option (amino.name) = "cosmos-sdk/x/bank/Params"; - // Deprecated: Use of SendEnabled in params is deprecated. - // For genesis, use the newly added send_enabled field in the genesis object. - // Storage, lookup, and manipulation of this information is now in the keeper. - // - // As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. - repeated SendEnabled send_enabled = 1 [deprecated = true]; - bool default_send_enabled = 2; -} - -// SendEnabled maps coin denom to a send_enabled status (whether a denom is -// sendable). -message SendEnabled { - option (gogoproto.equal) = true; - string denom = 1; - bool enabled = 2; -} - -// Input models transaction input. -message Input { - option (cosmos.msg.v1.signer) = "address"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin coins = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// Output models transaction outputs. -message Output { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin coins = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// Supply represents a struct that passively keeps track of the total supply -// amounts in the network. -// This message is deprecated now that supply is indexed by denom. -message Supply { - option deprecated = true; - - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "cosmos.bank.v1beta1.SupplyI"; - - repeated cosmos.base.v1beta1.Coin total = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// DenomUnit represents a struct that describes a given -// denomination unit of the basic token. -message DenomUnit { - // denom represents the string name of the given denom unit (e.g uatom). - string denom = 1; - // exponent represents power of 10 exponent that one must - // raise the base_denom to in order to equal the given DenomUnit's denom - // 1 denom = 10^exponent base_denom - // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - // exponent = 6, thus: 1 atom = 10^6 uatom). - uint32 exponent = 2; - // aliases is a list of string aliases for the given denom - repeated string aliases = 3; -} - -// Metadata represents a struct that describes -// a basic token. -message Metadata { - string description = 1; - // denom_units represents the list of DenomUnit's for a given coin - repeated DenomUnit denom_units = 2; - // base represents the base denom (should be the DenomUnit with exponent = 0). - string base = 3; - // display indicates the suggested denom that should be - // displayed in clients. - string display = 4; - // name defines the name of the token (eg: Cosmos Atom) - // - // Since: cosmos-sdk 0.43 - string name = 5; - // symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - // be the same as the display. - // - // Since: cosmos-sdk 0.43 - string symbol = 6; - // URI to a document (on or off-chain) that contains additional information. Optional. - // - // Since: cosmos-sdk 0.46 - string uri = 7 [(gogoproto.customname) = "URI"]; - // URIHash is a sha256 hash of a document pointed by URI. It's used to verify that - // the document didn't change. Optional. - // - // Since: cosmos-sdk 0.46 - string uri_hash = 8 [(gogoproto.customname) = "URIHash"]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/genesis.proto deleted file mode 100644 index caf05a95..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/genesis.proto +++ /dev/null @@ -1,54 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// GenesisState defines the bank module's genesis state. -message GenesisState { - // params defines all the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // balances is an array containing the balances of all the accounts. - repeated Balance balances = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - // balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - repeated cosmos.base.v1beta1.Coin supply = 3 [ - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - - // denom_metadata defines the metadata of the different coins. - repeated Metadata denom_metadata = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // send_enabled defines the denoms where send is enabled or disabled. - // - // Since: cosmos-sdk 0.47 - repeated SendEnabled send_enabled = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// Balance defines an account address and balance pair used in the bank module's -// genesis state. -message Balance { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address of the balance holder. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // coins defines the different coins this balance holds. - repeated cosmos.base.v1beta1.Coin coins = 2 [ - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/query.proto deleted file mode 100644 index 1df00bd0..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/query.proto +++ /dev/null @@ -1,376 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/query/v1/query.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Query defines the gRPC querier service. -service Query { - // Balance queries the balance of a single coin for a single account. - rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/by_denom"; - } - - // AllBalances queries the balance of all coins for a single account. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}"; - } - - // SpendableBalances queries the spendable balance of all coins for a single - // account. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - // - // Since: cosmos-sdk 0.46 - rpc SpendableBalances(QuerySpendableBalancesRequest) returns (QuerySpendableBalancesResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}"; - } - - // SpendableBalanceByDenom queries the spendable balance of a single denom for - // a single account. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - // - // Since: cosmos-sdk 0.47 - rpc SpendableBalanceByDenom(QuerySpendableBalanceByDenomRequest) returns (QuerySpendableBalanceByDenomResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}/by_denom"; - } - - // TotalSupply queries the total supply of all coins. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/supply"; - } - - // SupplyOf queries the supply of a single coin. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/supply/by_denom"; - } - - // Params queries the parameters of x/bank module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/params"; - } - - // DenomsMetadata queries the client metadata of a given coin denomination. - rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}"; - } - - // DenomsMetadata queries the client metadata of a given coin denomination. - rpc DenomMetadataByQueryString(QueryDenomMetadataByQueryStringRequest) - returns (QueryDenomMetadataByQueryStringResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata_by_query_string"; - } - // DenomsMetadata queries the client metadata for all registered coin - // denominations. - rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata"; - } - - // DenomOwners queries for all account addresses that own a particular token - // denomination. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - // - // Since: cosmos-sdk 0.46 - rpc DenomOwners(QueryDenomOwnersRequest) returns (QueryDenomOwnersResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/denom_owners/{denom}"; - } - - // SendEnabled queries for SendEnabled entries. - // - // This query only returns denominations that have specific SendEnabled settings. - // Any denomination that does not have a specific setting will use the default - // params.default_send_enabled, and will not be returned by this query. - // - // Since: cosmos-sdk 0.47 - rpc SendEnabled(QuerySendEnabledRequest) returns (QuerySendEnabledResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/bank/v1beta1/send_enabled"; - } -} - -// QueryBalanceRequest is the request type for the Query/Balance RPC method. -message QueryBalanceRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query balances for. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // denom is the coin denom to query balances for. - string denom = 2; -} - -// QueryBalanceResponse is the response type for the Query/Balance RPC method. -message QueryBalanceResponse { - // balance is the balance of the coin. - cosmos.base.v1beta1.Coin balance = 1; -} - -// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. -message QueryAllBalancesRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query balances for. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; - - // resolve_denom is the flag to resolve the denom into a human-readable form from the metadata. - // - // Since: cosmos-sdk 0.50 - bool resolve_denom = 3; -} - -// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -// method. -message QueryAllBalancesResponse { - // balances is the balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySpendableBalancesRequest defines the gRPC request structure for querying -// an account's spendable balances. -// -// Since: cosmos-sdk 0.46 -message QuerySpendableBalancesRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query spendable balances for. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QuerySpendableBalancesResponse defines the gRPC response structure for querying -// an account's spendable balances. -// -// Since: cosmos-sdk 0.46 -message QuerySpendableBalancesResponse { - // balances is the spendable balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySpendableBalanceByDenomRequest defines the gRPC request structure for -// querying an account's spendable balance for a specific denom. -// -// Since: cosmos-sdk 0.47 -message QuerySpendableBalanceByDenomRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query balances for. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // denom is the coin denom to query balances for. - string denom = 2; -} - -// QuerySpendableBalanceByDenomResponse defines the gRPC response structure for -// querying an account's spendable balance for a specific denom. -// -// Since: cosmos-sdk 0.47 -message QuerySpendableBalanceByDenomResponse { - // balance is the balance of the coin. - cosmos.base.v1beta1.Coin balance = 1; -} - -// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -// method. -message QueryTotalSupplyRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // pagination defines an optional pagination for the request. - // - // Since: cosmos-sdk 0.43 - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -// method -message QueryTotalSupplyResponse { - // supply is the supply of the coins - repeated cosmos.base.v1beta1.Coin supply = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // pagination defines the pagination in the response. - // - // Since: cosmos-sdk 0.43 - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. -message QuerySupplyOfRequest { - // denom is the coin denom to query balances for. - string denom = 1; -} - -// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -message QuerySupplyOfResponse { - // amount is the supply of the coin. - cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryParamsRequest defines the request type for querying x/bank parameters. -message QueryParamsRequest {} - -// QueryParamsResponse defines the response type for querying x/bank parameters. -message QueryParamsResponse { - // params provides the parameters of the bank module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. -message QueryDenomsMetadataRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -// method. -message QueryDenomsMetadataResponse { - // metadata provides the client information for all the registered tokens. - repeated Metadata metadatas = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. -message QueryDenomMetadataRequest { - // denom is the coin denom to query the metadata for. - string denom = 1; -} - -// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -// method. -message QueryDenomMetadataResponse { - // metadata describes and provides all the client information for the requested token. - Metadata metadata = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryDenomMetadataByQueryStringRequest is the request type for the Query/DenomMetadata RPC method. -// Identical with QueryDenomMetadataRequest but receives denom as query string. -message QueryDenomMetadataByQueryStringRequest { - // denom is the coin denom to query the metadata for. - string denom = 1; -} - -// QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC -// method. Identical with QueryDenomMetadataResponse but receives denom as query string in request. -message QueryDenomMetadataByQueryStringResponse { - // metadata describes and provides all the client information for the requested token. - Metadata metadata = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, -// which queries for a paginated set of all account holders of a particular -// denomination. -message QueryDenomOwnersRequest { - // denom defines the coin denomination to query all account holders for. - string denom = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// DenomOwner defines structure representing an account that owns or holds a -// particular denominated token. It contains the account address and account -// balance of the denominated token. -// -// Since: cosmos-sdk 0.46 -message DenomOwner { - // address defines the address that owns a particular denomination. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // balance is the balance of the denominated coin for an account. - cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. -// -// Since: cosmos-sdk 0.46 -message QueryDenomOwnersResponse { - repeated DenomOwner denom_owners = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySendEnabledRequest defines the RPC request for looking up SendEnabled entries. -// -// Since: cosmos-sdk 0.47 -message QuerySendEnabledRequest { - // denoms is the specific denoms you want look up. Leave empty to get all entries. - repeated string denoms = 1; - // pagination defines an optional pagination for the request. This field is - // only read if the denoms field is empty. - cosmos.base.query.v1beta1.PageRequest pagination = 99; -} - -// QuerySendEnabledResponse defines the RPC response of a SendEnable query. -// -// Since: cosmos-sdk 0.47 -message QuerySendEnabledResponse { - repeated SendEnabled send_enabled = 1; - // pagination defines the pagination in the response. This field is only - // populated if the denoms field in the request is empty. - cosmos.base.query.v1beta1.PageResponse pagination = 99; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/tx.proto deleted file mode 100644 index a4e8fae4..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/bank/v1beta1/tx.proto +++ /dev/null @@ -1,124 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Msg defines the bank Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // Send defines a method for sending coins from one account to another account. - rpc Send(MsgSend) returns (MsgSendResponse); - - // MultiSend defines a method for sending coins from some accounts to other accounts. - rpc MultiSend(MsgMultiSend) returns (MsgMultiSendResponse); - - // UpdateParams defines a governance operation for updating the x/bank module parameters. - // The authority is defined in the keeper. - // - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - - // SetSendEnabled is a governance operation for setting the SendEnabled flag - // on any number of Denoms. Only the entries to add or update should be - // included. Entries that already exist in the store, but that aren't - // included in this message, will be left unchanged. - // - // Since: cosmos-sdk 0.47 - rpc SetSendEnabled(MsgSetSendEnabled) returns (MsgSetSendEnabledResponse); -} - -// MsgSend represents a message to send coins from one account to another. -message MsgSend { - option (cosmos.msg.v1.signer) = "from_address"; - option (amino.name) = "cosmos-sdk/MsgSend"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgSendResponse defines the Msg/Send response type. -message MsgSendResponse {} - -// MsgMultiSend represents an arbitrary multi-in, multi-out send message. -message MsgMultiSend { - option (cosmos.msg.v1.signer) = "inputs"; - option (amino.name) = "cosmos-sdk/MsgMultiSend"; - - option (gogoproto.equal) = false; - - // Inputs, despite being `repeated`, only allows one sender input. This is - // checked in MsgMultiSend's ValidateBasic. - repeated Input inputs = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - repeated Output outputs = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgMultiSendResponse defines the Msg/MultiSend response type. -message MsgMultiSendResponse {} - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - option (amino.name) = "cosmos-sdk/x/bank/MsgUpdateParams"; - - // params defines the x/bank parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {} - -// MsgSetSendEnabled is the Msg/SetSendEnabled request type. -// -// Only entries to add/update/delete need to be included. -// Existing SendEnabled entries that are not included in this -// message are left unchanged. -// -// Since: cosmos-sdk 0.47 -message MsgSetSendEnabled { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/MsgSetSendEnabled"; - - // authority is the address that controls the module. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // send_enabled is the list of entries to add or update. - repeated SendEnabled send_enabled = 2; - - // use_default_for is a list of denoms that should use the params.default_send_enabled value. - // Denoms listed here will have their SendEnabled entries deleted. - // If a denom is included that doesn't have a SendEnabled entry, - // it will be ignored. - repeated string use_default_for = 3; -} - -// MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. -// -// Since: cosmos-sdk 0.47 -message MsgSetSendEnabledResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/base/abci/v1beta1/abci.proto b/packages/injective-protobuf/third_party/proto/cosmos/base/abci/v1beta1/abci.proto deleted file mode 100644 index fc3c0c6d..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/base/abci/v1beta1/abci.proto +++ /dev/null @@ -1,181 +0,0 @@ -syntax = "proto3"; -package cosmos.base.abci.v1beta1; - -import "gogoproto/gogo.proto"; -import "tendermint/abci/types.proto"; -import "tendermint/types/block.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types"; -option (gogoproto.goproto_stringer_all) = false; - -// TxResponse defines a structure containing relevant tx data and metadata. The -// tags are stringified and the log is JSON decoded. -message TxResponse { - option (gogoproto.goproto_getters) = false; - // The block height - int64 height = 1; - // The transaction hash. - string txhash = 2 [(gogoproto.customname) = "TxHash"]; - // Namespace for the Code - string codespace = 3; - // Response code. - uint32 code = 4; - // Result bytes, if any. - string data = 5; - // The output of the application's logger (raw string). May be - // non-deterministic. - string raw_log = 6; - // The output of the application's logger (typed). May be non-deterministic. - repeated ABCIMessageLog logs = 7 [ - (gogoproto.castrepeated) = "ABCIMessageLogs", - (gogoproto.nullable) = false - ]; - // Additional information. May be non-deterministic. - string info = 8; - // Amount of gas requested for transaction. - int64 gas_wanted = 9; - // Amount of gas consumed by transaction. - int64 gas_used = 10; - // The request transaction bytes. - google.protobuf.Any tx = 11; - // Time of the previous block. For heights > 1, it's the weighted median of - // the timestamps of the valid votes in the block.LastCommit. For height == 1, - // it's genesis time. - string timestamp = 12; - // Events defines all the events emitted by processing a transaction. Note, - // these events include those emitted by processing all the messages and those - // emitted from the ante. Whereas Logs contains the events, with - // additional metadata, emitted only by processing the messages. - // - // Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - repeated tendermint.abci.Event events = 13 [(gogoproto.nullable) = false]; -} - -// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. -message ABCIMessageLog { - option (gogoproto.stringer) = true; - - uint32 msg_index = 1 [(gogoproto.jsontag) = "msg_index"]; - string log = 2; - - // Events contains a slice of Event objects that were emitted during some - // execution. - repeated StringEvent events = 3 - [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false]; -} - -// StringEvent defines en Event object wrapper where all the attributes -// contain key/value pairs that are strings instead of raw bytes. -message StringEvent { - option (gogoproto.stringer) = true; - - string type = 1; - repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; -} - -// Attribute defines an attribute wrapper where the key and value are -// strings instead of raw bytes. -message Attribute { - string key = 1; - string value = 2; -} - -// GasInfo defines tx execution gas context. -message GasInfo { - // GasWanted is the maximum units of work we allow this tx to perform. - uint64 gas_wanted = 1; - - // GasUsed is the amount of gas actually consumed. - uint64 gas_used = 2; -} - -// Result is the union of ResponseFormat and ResponseCheckTx. -message Result { - option (gogoproto.goproto_getters) = false; - - // Data is any data returned from message or handler execution. It MUST be - // length prefixed in order to separate data from multiple message executions. - // Deprecated. This field is still populated, but prefer msg_response instead - // because it also contains the Msg response typeURL. - bytes data = 1 [deprecated = true]; - - // Log contains the log information from message or handler execution. - string log = 2; - - // Events contains a slice of Event objects that were emitted during message - // or handler execution. - repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false]; - - // msg_responses contains the Msg handler responses type packed in Anys. - // - // Since: cosmos-sdk 0.46 - repeated google.protobuf.Any msg_responses = 4; -} - -// SimulationResponse defines the response generated when a transaction is -// successfully simulated. -message SimulationResponse { - GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - Result result = 2; -} - -// MsgData defines the data returned in a Result object during message -// execution. -message MsgData { - option deprecated = true; - option (gogoproto.stringer) = true; - - string msg_type = 1; - bytes data = 2; -} - -// TxMsgData defines a list of MsgData. A transaction will have a MsgData object -// for each message. -message TxMsgData { - option (gogoproto.stringer) = true; - - // data field is deprecated and not populated. - repeated MsgData data = 1 [deprecated = true]; - - // msg_responses contains the Msg handler responses packed into Anys. - // - // Since: cosmos-sdk 0.46 - repeated google.protobuf.Any msg_responses = 2; -} - -// SearchTxsResult defines a structure for querying txs pageable -message SearchTxsResult { - option (gogoproto.stringer) = true; - - // Count of all txs - uint64 total_count = 1; - // Count of txs in current page - uint64 count = 2; - // Index of current page, start from 1 - uint64 page_number = 3; - // Count of total pages - uint64 page_total = 4; - // Max count txs per page - uint64 limit = 5; - // List of txs in current page - repeated TxResponse txs = 6; -} - -// SearchBlocksResult defines a structure for querying blocks pageable -message SearchBlocksResult { - option (gogoproto.stringer) = true; - - // Count of all blocks - int64 total_count = 1; - // Count of blocks in current page - int64 count = 2; - // Index of current page, start from 1 - int64 page_number = 3; - // Count of total pages - int64 page_total = 4; - // Max count blocks per page - int64 limit = 5; - // List of blocks in current page - repeated tendermint.types.Block blocks = 6; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/base/node/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/base/node/v1beta1/query.proto deleted file mode 100644 index 78fd9f67..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/base/node/v1beta1/query.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; -package cosmos.base.node.v1beta1; - -import "google/api/annotations.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/node"; - -// Service defines the gRPC querier service for node related queries. -service Service { - // Config queries for the operator configuration. - rpc Config(ConfigRequest) returns (ConfigResponse) { - option (google.api.http).get = "/cosmos/base/node/v1beta1/config"; - } - // Status queries for the node status. - rpc Status(StatusRequest) returns (StatusResponse) { - option (google.api.http).get = "/cosmos/base/node/v1beta1/status"; - } -} - -// ConfigRequest defines the request structure for the Config gRPC query. -message ConfigRequest {} - -// ConfigResponse defines the response structure for the Config gRPC query. -message ConfigResponse { - string minimum_gas_price = 1; - // pruning settings - string pruning_keep_recent = 2; - string pruning_interval = 3; -} - -// StateRequest defines the request structure for the status of a node. -message StatusRequest {} - -// StateResponse defines the response structure for the status of a node. -message StatusResponse { - uint64 earliest_store_height = 1; // earliest block height available in the store - uint64 height = 2; // current block height - google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true]; // block height timestamp - bytes app_hash = 4; // app hash of the current block - bytes validator_hash = 5; // validator hash provided by the consensus header -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/base/query/v1beta1/pagination.proto b/packages/injective-protobuf/third_party/proto/cosmos/base/query/v1beta1/pagination.proto deleted file mode 100644 index 0a368144..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; -package cosmos.base.query.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/types/query"; - -// PageRequest is to be embedded in gRPC request messages for efficient -// pagination. Ex: -// -// message SomeRequest { -// Foo some_parameter = 1; -// PageRequest pagination = 2; -// } -message PageRequest { - // key is a value returned in PageResponse.next_key to begin - // querying the next page most efficiently. Only one of offset or key - // should be set. - bytes key = 1; - - // offset is a numeric offset that can be used when key is unavailable. - // It is less efficient than using key. Only one of offset or key should - // be set. - uint64 offset = 2; - - // limit is the total number of results to be returned in the result page. - // If left empty it will default to a value to be set by each app. - uint64 limit = 3; - - // count_total is set to true to indicate that the result set should include - // a count of the total number of items available for pagination in UIs. - // count_total is only respected when offset is used. It is ignored when key - // is set. - bool count_total = 4; - - // reverse is set to true if results are to be returned in the descending order. - // - // Since: cosmos-sdk 0.43 - bool reverse = 5; -} - -// PageResponse is to be embedded in gRPC response messages where the -// corresponding request message has used PageRequest. -// -// message SomeResponse { -// repeated Bar results = 1; -// PageResponse page = 2; -// } -message PageResponse { - // next_key is the key to be passed to PageRequest.key to - // query the next page most efficiently. It will be empty if - // there are no more results. - bytes next_key = 1; - - // total is total number of results available if PageRequest.count_total - // was set, its value is undefined otherwise - uint64 total = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/base/reflection/v1beta1/reflection.proto b/packages/injective-protobuf/third_party/proto/cosmos/base/reflection/v1beta1/reflection.proto deleted file mode 100644 index 22670e72..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/base/reflection/v1beta1/reflection.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; -package cosmos.base.reflection.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection"; - -// ReflectionService defines a service for interface reflection. -service ReflectionService { - // ListAllInterfaces lists all the interfaces registered in the interface - // registry. - rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces"; - }; - - // ListImplementations list all the concrete types that implement a given - // interface. - rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/" - "{interface_name}/implementations"; - }; -} - -// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. -message ListAllInterfacesRequest {} - -// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. -message ListAllInterfacesResponse { - // interface_names is an array of all the registered interfaces. - repeated string interface_names = 1; -} - -// ListImplementationsRequest is the request type of the ListImplementations -// RPC. -message ListImplementationsRequest { - // interface_name defines the interface to query the implementations for. - string interface_name = 1; -} - -// ListImplementationsResponse is the response type of the ListImplementations -// RPC. -message ListImplementationsResponse { - repeated string implementation_message_names = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto b/packages/injective-protobuf/third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto deleted file mode 100644 index d5b04855..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/base/reflection/v2alpha1/reflection.proto +++ /dev/null @@ -1,218 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.base.reflection.v2alpha1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1"; - -// AppDescriptor describes a cosmos-sdk based application -message AppDescriptor { - // AuthnDescriptor provides information on how to authenticate transactions on the application - // NOTE: experimental and subject to change in future releases. - AuthnDescriptor authn = 1; - // chain provides the chain descriptor - ChainDescriptor chain = 2; - // codec provides metadata information regarding codec related types - CodecDescriptor codec = 3; - // configuration provides metadata information regarding the sdk.Config type - ConfigurationDescriptor configuration = 4; - // query_services provides metadata information regarding the available queriable endpoints - QueryServicesDescriptor query_services = 5; - // tx provides metadata information regarding how to send transactions to the given application - TxDescriptor tx = 6; -} - -// TxDescriptor describes the accepted transaction type -message TxDescriptor { - // fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) - // it is not meant to support polymorphism of transaction types, it is supposed to be used by - // reflection clients to understand if they can handle a specific transaction type in an application. - string fullname = 1; - // msgs lists the accepted application messages (sdk.Msg) - repeated MsgDescriptor msgs = 2; -} - -// AuthnDescriptor provides information on how to sign transactions without relying -// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures -message AuthnDescriptor { - // sign_modes defines the supported signature algorithm - repeated SigningModeDescriptor sign_modes = 1; -} - -// SigningModeDescriptor provides information on a signing flow of the application -// NOTE(fdymylja): here we could go as far as providing an entire flow on how -// to sign a message given a SigningModeDescriptor, but it's better to think about -// this another time -message SigningModeDescriptor { - // name defines the unique name of the signing mode - string name = 1; - // number is the unique int32 identifier for the sign_mode enum - int32 number = 2; - // authn_info_provider_method_fullname defines the fullname of the method to call to get - // the metadata required to authenticate using the provided sign_modes - string authn_info_provider_method_fullname = 3; -} - -// ChainDescriptor describes chain information of the application -message ChainDescriptor { - // id is the chain id - string id = 1; -} - -// CodecDescriptor describes the registered interfaces and provides metadata information on the types -message CodecDescriptor { - // interfaces is a list of the registerted interfaces descriptors - repeated InterfaceDescriptor interfaces = 1; -} - -// InterfaceDescriptor describes the implementation of an interface -message InterfaceDescriptor { - // fullname is the name of the interface - string fullname = 1; - // interface_accepting_messages contains information regarding the proto messages which contain the interface as - // google.protobuf.Any field - repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2; - // interface_implementers is a list of the descriptors of the interface implementers - repeated InterfaceImplementerDescriptor interface_implementers = 3; -} - -// InterfaceImplementerDescriptor describes an interface implementer -message InterfaceImplementerDescriptor { - // fullname is the protobuf queryable name of the interface implementer - string fullname = 1; - // type_url defines the type URL used when marshalling the type as any - // this is required so we can provide type safe google.protobuf.Any marshalling and - // unmarshalling, making sure that we don't accept just 'any' type - // in our interface fields - string type_url = 2; -} - -// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains -// an interface represented as a google.protobuf.Any -message InterfaceAcceptingMessageDescriptor { - // fullname is the protobuf fullname of the type containing the interface - string fullname = 1; - // field_descriptor_names is a list of the protobuf name (not fullname) of the field - // which contains the interface as google.protobuf.Any (the interface is the same, but - // it can be in multiple fields of the same proto message) - repeated string field_descriptor_names = 2; -} - -// ConfigurationDescriptor contains metadata information on the sdk.Config -message ConfigurationDescriptor { - // bech32_account_address_prefix is the account address prefix - string bech32_account_address_prefix = 1; -} - -// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction -message MsgDescriptor { - // msg_type_url contains the TypeURL of a sdk.Msg. - string msg_type_url = 1; -} - -// ReflectionService defines a service for application reflection. -service ReflectionService { - // GetAuthnDescriptor returns information on how to authenticate transactions in the application - // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in - // future releases of the cosmos-sdk. - rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn"; - } - // GetChainDescriptor returns the description of the chain - rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain"; - }; - // GetCodecDescriptor returns the descriptor of the codec of the application - rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec"; - } - // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application - rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration"; - } - // GetQueryServicesDescriptor returns the available gRPC queryable services of the application - rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services"; - } - // GetTxDescriptor returns information on the used transaction object and available msgs that can be used - rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor"; - } -} - -// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC -message GetAuthnDescriptorRequest {} -// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC -message GetAuthnDescriptorResponse { - // authn describes how to authenticate to the application when sending transactions - AuthnDescriptor authn = 1; -} - -// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC -message GetChainDescriptorRequest {} -// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC -message GetChainDescriptorResponse { - // chain describes application chain information - ChainDescriptor chain = 1; -} - -// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC -message GetCodecDescriptorRequest {} -// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC -message GetCodecDescriptorResponse { - // codec describes the application codec such as registered interfaces and implementations - CodecDescriptor codec = 1; -} - -// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC -message GetConfigurationDescriptorRequest {} -// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC -message GetConfigurationDescriptorResponse { - // config describes the application's sdk.Config - ConfigurationDescriptor config = 1; -} - -// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC -message GetQueryServicesDescriptorRequest {} -// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC -message GetQueryServicesDescriptorResponse { - // queries provides information on the available queryable services - QueryServicesDescriptor queries = 1; -} - -// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC -message GetTxDescriptorRequest {} -// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC -message GetTxDescriptorResponse { - // tx provides information on msgs that can be forwarded to the application - // alongside the accepted transaction protobuf type - TxDescriptor tx = 1; -} - -// QueryServicesDescriptor contains the list of cosmos-sdk queriable services -message QueryServicesDescriptor { - // query_services is a list of cosmos-sdk QueryServiceDescriptor - repeated QueryServiceDescriptor query_services = 1; -} - -// QueryServiceDescriptor describes a cosmos-sdk queryable service -message QueryServiceDescriptor { - // fullname is the protobuf fullname of the service descriptor - string fullname = 1; - // is_module describes if this service is actually exposed by an application's module - bool is_module = 2; - // methods provides a list of query service methods - repeated QueryMethodDescriptor methods = 3; -} - -// QueryMethodDescriptor describes a queryable method of a query service -// no other info is provided beside method name and tendermint queryable path -// because it would be redundant with the grpc reflection service -message QueryMethodDescriptor { - // name is the protobuf name (not fullname) of the method - string name = 1; - // full_query_path is the path that can be used to query - // this method via tendermint abci.Query - string full_query_path = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/base/tendermint/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/base/tendermint/v1beta1/query.proto deleted file mode 100644 index 6de6f2cd..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/base/tendermint/v1beta1/query.proto +++ /dev/null @@ -1,208 +0,0 @@ -syntax = "proto3"; -package cosmos.base.tendermint.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "tendermint/p2p/types.proto"; -import "tendermint/types/types.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos/base/tendermint/v1beta1/types.proto"; -import "cosmos_proto/cosmos.proto"; -import "tendermint/types/block.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice"; - -// Service defines the gRPC querier service for tendermint queries. -service Service { - // GetNodeInfo queries the current node info. - rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/node_info"; - } - - // GetSyncing queries node syncing. - rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/syncing"; - } - - // GetLatestBlock returns the latest block. - rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest"; - } - - // GetBlockByHeight queries block for given height. - rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}"; - } - - // GetLatestValidatorSet queries latest validator-set. - rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/latest"; - } - - // GetValidatorSetByHeight queries validator-set at a given height. - rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/{height}"; - } - - // ABCIQuery defines a query handler that supports ABCI queries directly to the - // application, bypassing Tendermint completely. The ABCI query must contain - // a valid and supported path, including app, custom, p2p, and store. - // - // Since: cosmos-sdk 0.46 - rpc ABCIQuery(ABCIQueryRequest) returns (ABCIQueryResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/abci_query"; - } -} - -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightRequest { - int64 height = 1; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetRequest { - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// Validator is the type for the validator-set. -message Validator { - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - google.protobuf.Any pub_key = 2; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightRequest { - int64 height = 1; -} - -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightResponse { - .tendermint.types.BlockID block_id = 1; - - // Deprecated: please use `sdk_block` instead - .tendermint.types.Block block = 2; - - // Since: cosmos-sdk 0.47 - Block sdk_block = 3; -} - -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -message GetLatestBlockRequest {} - -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -message GetLatestBlockResponse { - .tendermint.types.BlockID block_id = 1; - - // Deprecated: please use `sdk_block` instead - .tendermint.types.Block block = 2; - - // Since: cosmos-sdk 0.47 - Block sdk_block = 3; -} - -// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -message GetSyncingRequest {} - -// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -message GetSyncingResponse { - bool syncing = 1; -} - -// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -message GetNodeInfoRequest {} - -// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. -message GetNodeInfoResponse { - .tendermint.p2p.DefaultNodeInfo default_node_info = 1; - VersionInfo application_version = 2; -} - -// VersionInfo is the type for the GetNodeInfoResponse message. -message VersionInfo { - string name = 1; - string app_name = 2; - string version = 3; - string git_commit = 4; - string build_tags = 5; - string go_version = 6; - repeated Module build_deps = 7; - // Since: cosmos-sdk 0.43 - string cosmos_sdk_version = 8; -} - -// Module is the type for VersionInfo -message Module { - // module path - string path = 1; - // module version - string version = 2; - // checksum - string sum = 3; -} - -// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. -message ABCIQueryRequest { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - -// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. -// -// Note: This type is a duplicate of the ResponseQuery proto type defined in -// Tendermint. -message ABCIQueryResponse { - uint32 code = 1; - // DEPRECATED: use "value" instead - reserved 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - ProofOps proof_ops = 8; - int64 height = 9; - string codespace = 10; -} - -// ProofOp defines an operation used for calculating Merkle root. The data could -// be arbitrary format, providing necessary data for example neighbouring node -// hash. -// -// Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. -message ProofOp { - string type = 1; - bytes key = 2; - bytes data = 3; -} - -// ProofOps is Merkle proof defined by the list of ProofOps. -// -// Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. -message ProofOps { - repeated ProofOp ops = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/base/tendermint/v1beta1/types.proto b/packages/injective-protobuf/third_party/proto/cosmos/base/tendermint/v1beta1/types.proto deleted file mode 100644 index 624ff414..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/base/tendermint/v1beta1/types.proto +++ /dev/null @@ -1,52 +0,0 @@ -syntax = "proto3"; -package cosmos.base.tendermint.v1beta1; - -import "gogoproto/gogo.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/evidence.proto"; -import "tendermint/version/types.proto"; -import "google/protobuf/timestamp.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice"; - -// Block is tendermint type Block, with the Header proposer address -// field converted to bech32 string. -message Block { - Header header = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - .tendermint.types.Data data = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - .tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - .tendermint.types.Commit last_commit = 4; -} - -// Header defines the structure of a Tendermint block header. -message Header { - // basic block info - .tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; - - // prev block info - .tendermint.types.BlockID last_block_id = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block - - // consensus info - bytes evidence_hash = 13; // evidence included in the block - - // proposer_address is the original block proposer address, formatted as a Bech32 string. - // In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string - // for better UX. - string proposer_address = 14; // original proposer of the block -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/base/v1beta1/coin.proto b/packages/injective-protobuf/third_party/proto/cosmos/base/v1beta1/coin.proto deleted file mode 100644 index b4bd2e1e..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/base/v1beta1/coin.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package cosmos.base.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; - -// Coin defines a token with a denomination and an amount. -// -// NOTE: The amount field is an Int which implements the custom method -// signatures required by gogoproto. -message Coin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} - -// DecCoin defines a token with a denomination and a decimal amount. -// -// NOTE: The amount field is an Dec which implements the custom method -// signatures required by gogoproto. -message DecCoin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/circuit/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/circuit/module/v1/module.proto deleted file mode 100644 index 7104bad4..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/circuit/module/v1/module.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package cosmos.circuit.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the circuit module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/x/circuit" - }; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/query.proto deleted file mode 100644 index 0115d335..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/query.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; -package cosmos.circuit.v1; - -option go_package = "cosmossdk.io/x/circuit/types"; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos/circuit/v1/types.proto"; -import "google/api/annotations.proto"; -import "cosmos/query/v1/query.proto"; - -// Query defines the circuit gRPC querier service. -service Query { - // Account returns account permissions. - rpc Account(QueryAccountRequest) returns (AccountResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/circuit/v1/accounts/{address}"; - } - - // Account returns account permissions. - rpc Accounts(QueryAccountsRequest) returns (AccountsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/circuit/v1/accounts"; - } - - // DisabledList returns a list of disabled message urls - rpc DisabledList(QueryDisabledListRequest) returns (DisabledListResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/circuit/v1/disable_list"; - } -} - -// QueryAccountRequest is the request type for the Query/Account RPC method. -message QueryAccountRequest { - string address = 1; -} - -// AccountResponse is the response type for the Query/Account RPC method. -message AccountResponse { - Permissions permission = 1; -} - -// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -message QueryAccountsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// AccountsResponse is the response type for the Query/Accounts RPC method. -message AccountsResponse { - repeated GenesisAccountPermissions accounts = 1; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDisableListRequest is the request type for the Query/DisabledList RPC method. -message QueryDisabledListRequest {} - -// DisabledListResponse is the response type for the Query/DisabledList RPC method. -message DisabledListResponse { - repeated string disabled_list = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/tx.proto deleted file mode 100644 index 71f708bb..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/tx.proto +++ /dev/null @@ -1,83 +0,0 @@ -syntax = "proto3"; -package cosmos.circuit.v1; - -option go_package = "cosmossdk.io/x/circuit/types"; - -import "cosmos/msg/v1/msg.proto"; -import "cosmos/circuit/v1/types.proto"; - -// Msg defines the circuit Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // AuthorizeCircuitBreaker allows a super-admin to grant (or revoke) another - // account's circuit breaker permissions. - rpc AuthorizeCircuitBreaker(MsgAuthorizeCircuitBreaker) returns (MsgAuthorizeCircuitBreakerResponse); - - // TripCircuitBreaker pauses processing of Msg's in the state machine. - rpc TripCircuitBreaker(MsgTripCircuitBreaker) returns (MsgTripCircuitBreakerResponse); - - // ResetCircuitBreaker resumes processing of Msg's in the state machine that - // have been been paused using TripCircuitBreaker. - rpc ResetCircuitBreaker(MsgResetCircuitBreaker) returns (MsgResetCircuitBreakerResponse); -} - -// MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker request type. -message MsgAuthorizeCircuitBreaker { - option (cosmos.msg.v1.signer) = "granter"; - - // granter is the granter of the circuit breaker permissions and must have - // LEVEL_SUPER_ADMIN. - string granter = 1; - - // grantee is the account authorized with the provided permissions. - string grantee = 2; - - // permissions are the circuit breaker permissions that the grantee receives. - // These will overwrite any existing permissions. LEVEL_NONE_UNSPECIFIED can - // be specified to revoke all permissions. - Permissions permissions = 3; -} - -// MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type. -message MsgAuthorizeCircuitBreakerResponse { - bool success = 1; -} - -// MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker request type. -message MsgTripCircuitBreaker { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the account authorized to trip the circuit breaker. - string authority = 1; - - // msg_type_urls specifies a list of type URLs to immediately stop processing. - // IF IT IS LEFT EMPTY, ALL MSG PROCESSING WILL STOP IMMEDIATELY. - // This value is validated against the authority's permissions and if the - // authority does not have permissions to trip the specified msg type URLs - // (or all URLs), the operation will fail. - repeated string msg_type_urls = 2; -} - -// MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type. -message MsgTripCircuitBreakerResponse { - bool success = 1; -} - -// MsgResetCircuitBreaker defines the Msg/ResetCircuitBreaker request type. -message MsgResetCircuitBreaker { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the account authorized to trip or reset the circuit breaker. - string authority = 1; - - // msg_type_urls specifies a list of Msg type URLs to resume processing. If - // it is left empty all Msg processing for type URLs that the account is - // authorized to trip will resume. - repeated string msg_type_urls = 3; -} - -// MsgResetCircuitBreakerResponse defines the Msg/ResetCircuitBreaker response type. -message MsgResetCircuitBreakerResponse { - bool success = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/types.proto b/packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/types.proto deleted file mode 100644 index 1bd8d9d4..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/circuit/v1/types.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; -package cosmos.circuit.v1; - -option go_package = "cosmossdk.io/x/circuit/types"; - -// Permissions are the permissions that an account has to trip -// or reset the circuit breaker. -message Permissions { - // level is the level of permissions granted to this account. - Level level = 1; - - // limit_type_urls is used with LEVEL_SOME_MSGS to limit the lists of Msg type - // URLs that the account can trip. It is an error to use limit_type_urls with - // a level other than LEVEL_SOME_MSGS. - repeated string limit_type_urls = 2; - - // Level is the permission level. - enum Level { - // LEVEL_NONE_UNSPECIFIED indicates that the account will have no circuit - // breaker permissions. - LEVEL_NONE_UNSPECIFIED = 0; - - // LEVEL_SOME_MSGS indicates that the account will have permission to - // trip or reset the circuit breaker for some Msg type URLs. If this level - // is chosen, a non-empty list of Msg type URLs must be provided in - // limit_type_urls. - LEVEL_SOME_MSGS = 1; - - // LEVEL_ALL_MSGS indicates that the account can trip or reset the circuit - // breaker for Msg's of all type URLs. - LEVEL_ALL_MSGS = 2; - - // LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker - // actions and can grant permissions to other accounts. - LEVEL_SUPER_ADMIN = 3; - } -} - -// GenesisAccountPermissions is the account permissions for the circuit breaker in genesis -message GenesisAccountPermissions { - string address = 1; - Permissions permissions = 2; -} - -// GenesisState is the state that must be provided at genesis. -message GenesisState { - repeated GenesisAccountPermissions account_permissions = 1; - repeated string disabled_type_urls = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/consensus/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/consensus/module/v1/module.proto deleted file mode 100644 index 8e188cc7..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/consensus/module/v1/module.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package cosmos.consensus.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the consensus module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/consensus" - }; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/consensus/v1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/consensus/v1/query.proto deleted file mode 100644 index 84648d97..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/consensus/v1/query.proto +++ /dev/null @@ -1,27 +0,0 @@ -// Since: cosmos-sdk 0.47 -syntax = "proto3"; -package cosmos.consensus.v1; - -import "google/api/annotations.proto"; -import "tendermint/types/params.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/consensus/types"; - -// Query defines the gRPC querier service. -service Query { - // Params queries the parameters of x/consensus module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/consensus/v1/params"; - } -} - -// QueryParamsRequest defines the request type for querying x/consensus parameters. -message QueryParamsRequest {} - -// QueryParamsResponse defines the response type for querying x/consensus parameters. -message QueryParamsResponse { - // params are the tendermint consensus params stored in the consensus module. - // Please note that `params.version` is not populated in this response, it is - // tracked separately in the x/upgrade module. - tendermint.types.ConsensusParams params = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/consensus/v1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/consensus/v1/tx.proto deleted file mode 100644 index 86ee7e24..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/consensus/v1/tx.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Since: cosmos-sdk 0.47 -syntax = "proto3"; -package cosmos.consensus.v1; - -import "amino/amino.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "tendermint/types/params.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/consensus/types"; - -// Msg defines the consensus Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // UpdateParams defines a governance operation for updating the x/consensus module parameters. - // The authority is defined in the keeper. - // - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// MsgUpdateParams is the Msg/UpdateParams request type. -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/consensus/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // params defines the x/consensus parameters to update. - // VersionsParams is not included in this Msg because it is tracked - // separarately in x/upgrade. - // - // NOTE: All parameters must be supplied. - tendermint.types.BlockParams block = 2; - tendermint.types.EvidenceParams evidence = 3; - tendermint.types.ValidatorParams validator = 4; - - // Since: cosmos-sdk 0.50 - tendermint.types.ABCIParams abci = 5; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -message MsgUpdateParamsResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crisis/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/crisis/module/v1/module.proto deleted file mode 100644 index fe924962..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crisis/module/v1/module.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package cosmos.crisis.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the crisis module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/crisis" - }; - - // fee_collector_name is the name of the FeeCollector ModuleAccount. - string fee_collector_name = 1; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crisis/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/crisis/v1beta1/genesis.proto deleted file mode 100644 index b0ddb9b6..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crisis/v1beta1/genesis.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "amino/amino.proto"; - -// GenesisState defines the crisis module's genesis state. -message GenesisState { - // constant_fee is the fee used to verify the invariant in the crisis - // module. - cosmos.base.v1beta1.Coin constant_fee = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crisis/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/crisis/v1beta1/tx.proto deleted file mode 100644 index 4fcf5bf6..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crisis/v1beta1/tx.proto +++ /dev/null @@ -1,65 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// Msg defines the bank Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // VerifyInvariant defines a method to verify a particular invariant. - rpc VerifyInvariant(MsgVerifyInvariant) returns (MsgVerifyInvariantResponse); - - // UpdateParams defines a governance operation for updating the x/crisis module - // parameters. The authority is defined in the keeper. - // - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// MsgVerifyInvariant represents a message to verify a particular invariance. -message MsgVerifyInvariant { - option (cosmos.msg.v1.signer) = "sender"; - option (amino.name) = "cosmos-sdk/MsgVerifyInvariant"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // sender is the account address of private key to send coins to fee collector account. - string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // name of the invariant module. - string invariant_module_name = 2; - - // invariant_route is the msg's invariant route. - string invariant_route = 3; -} - -// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -message MsgVerifyInvariantResponse {} - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/crisis/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // constant_fee defines the x/crisis parameter. - cosmos.base.v1beta1.Coin constant_fee = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crypto/ed25519/keys.proto b/packages/injective-protobuf/third_party/proto/cosmos/crypto/ed25519/keys.proto deleted file mode 100644 index 31768075..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crypto/ed25519/keys.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.ed25519; - -import "amino/amino.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; - -// PubKey is an ed25519 public key for handling Tendermint keys in SDK. -// It's needed for Any serialization and SDK compatibility. -// It must not be used in a non Tendermint key context because it doesn't implement -// ADR-28. Nevertheless, you will like to use ed25519 in app user level -// then you must create a new proto message and follow ADR-28 for Address construction. -message PubKey { - option (amino.name) = "tendermint/PubKeyEd25519"; - // The Amino encoding is simply the inner bytes field, and not the Amino - // encoding of the whole PubKey struct. - // - // Example (JSON): - // s := PubKey{Key: []byte{0x01}} - // out := AminoJSONEncoder(s) - // - // Then we have: - // out == `"MQ=="` - // out != `{"key":"MQ=="}` - option (amino.message_encoding) = "key_field"; - option (gogoproto.goproto_stringer) = false; - - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; -} - -// PrivKey defines a ed25519 private key. -// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. -message PrivKey { - option (amino.name) = "tendermint/PrivKeyEd25519"; - option (amino.message_encoding) = "key_field"; - - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crypto/hd/v1/hd.proto b/packages/injective-protobuf/third_party/proto/cosmos/crypto/hd/v1/hd.proto deleted file mode 100644 index e25b70d1..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crypto/hd/v1/hd.proto +++ /dev/null @@ -1,27 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; -package cosmos.crypto.hd.v1; - -import "amino/amino.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/hd"; -option (gogoproto.goproto_getters_all) = false; - -// BIP44Params is used as path field in ledger item in Record. -message BIP44Params { - option (amino.name) = "crypto/keys/hd/BIP44Params"; - - option (gogoproto.goproto_stringer) = false; - // purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation - uint32 purpose = 1; - // coin_type is a constant that improves privacy - uint32 coin_type = 2; - // account splits the key space into independent user identities - uint32 account = 3; - // change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal - // chain. - bool change = 4; - // address_index is used as child index in BIP32 derivation - uint32 address_index = 5; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crypto/keyring/v1/record.proto b/packages/injective-protobuf/third_party/proto/cosmos/crypto/keyring/v1/record.proto deleted file mode 100644 index e79ea7f4..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crypto/keyring/v1/record.proto +++ /dev/null @@ -1,48 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; -package cosmos.crypto.keyring.v1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos/crypto/hd/v1/hd.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keyring"; -option (gogoproto.goproto_getters_all) = false; -option (gogoproto.gogoproto_import) = false; - -// Record is used for representing a key in the keyring. -message Record { - // name represents a name of Record - string name = 1; - // pub_key represents a public key in any format - google.protobuf.Any pub_key = 2; - - // Record contains one of the following items - oneof item { - // local stores the private key locally. - Local local = 3; - // ledger stores the information about a Ledger key. - Ledger ledger = 4; - // Multi does not store any other information. - Multi multi = 5; - // Offline does not store any other information. - Offline offline = 6; - } - - // Item is a keyring item stored in a keyring backend. - // Local item - message Local { - google.protobuf.Any priv_key = 1; - } - - // Ledger item - message Ledger { - hd.v1.BIP44Params path = 1; - } - - // Multi item - message Multi {} - - // Offline item - message Offline {} -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crypto/multisig/keys.proto b/packages/injective-protobuf/third_party/proto/cosmos/crypto/multisig/keys.proto deleted file mode 100644 index fa0dec57..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crypto/multisig/keys.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.multisig; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"; - -// LegacyAminoPubKey specifies a public key type -// which nests multiple public keys and a threshold, -// it uses legacy amino address rules. -message LegacyAminoPubKey { - option (amino.name) = "tendermint/PubKeyMultisigThreshold"; - // The Amino encoding of a LegacyAminoPubkey is the legacy amino - // encoding of the `PubKeyMultisigThreshold` struct defined below: - // https://github.com/tendermint/tendermint/blob/v0.33.9/crypto/multisig/threshold_pubkey.go - // - // There are 2 differences with what a "normal" Amino encoding - // would output: - // 1. The `threshold` field is always a string (whereas Amino would - // by default marshal uint32 as a number). - // 2. The `public_keys` field is renamed to `pubkeys`, which is also - // reflected in the `amino.field_name` annotation. - option (amino.message_encoding) = "threshold_string"; - option (gogoproto.goproto_getters) = false; - - uint32 threshold = 1; - repeated google.protobuf.Any public_keys = 2 [(gogoproto.customname) = "PubKeys", (amino.field_name) = "pubkeys"]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crypto/multisig/v1beta1/multisig.proto b/packages/injective-protobuf/third_party/proto/cosmos/crypto/multisig/v1beta1/multisig.proto deleted file mode 100644 index bf671f17..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crypto/multisig/v1beta1/multisig.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.multisig.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/types"; - -// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. -// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers -// signed and with which modes. -message MultiSignature { - option (gogoproto.goproto_unrecognized) = true; - repeated bytes signatures = 1; -} - -// CompactBitArray is an implementation of a space efficient bit array. -// This is used to ensure that the encoded data takes up a minimal amount of -// space after proto encoding. -// This is not thread safe, and is not intended for concurrent usage. -message CompactBitArray { - option (gogoproto.goproto_stringer) = false; - - uint32 extra_bits_stored = 1; - bytes elems = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crypto/secp256k1/keys.proto b/packages/injective-protobuf/third_party/proto/cosmos/crypto/secp256k1/keys.proto deleted file mode 100644 index e2358d6d..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crypto/secp256k1/keys.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.secp256k1; - -import "amino/amino.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"; - -// PubKey defines a secp256k1 public key -// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte -// if the y-coordinate is the lexicographically largest of the two associated with -// the x-coordinate. Otherwise the first byte is a 0x03. -// This prefix is followed with the x-coordinate. -message PubKey { - option (amino.name) = "tendermint/PubKeySecp256k1"; - // The Amino encoding is simply the inner bytes field, and not the Amino - // encoding of the whole PubKey struct. - // - // Example (JSON): - // s := PubKey{Key: []byte{0x01}} - // out := AminoJSONEncoder(s) - // - // Then we have: - // out == `"MQ=="` - // out != `{"key":"MQ=="}` - option (amino.message_encoding) = "key_field"; - option (gogoproto.goproto_stringer) = false; - - bytes key = 1; -} - -// PrivKey defines a secp256k1 private key. -message PrivKey { - option (amino.name) = "tendermint/PrivKeySecp256k1"; - option (amino.message_encoding) = "key_field"; - - bytes key = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/crypto/secp256r1/keys.proto b/packages/injective-protobuf/third_party/proto/cosmos/crypto/secp256r1/keys.proto deleted file mode 100644 index 2e96c6e3..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/crypto/secp256r1/keys.proto +++ /dev/null @@ -1,23 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.crypto.secp256r1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"; -option (gogoproto.messagename_all) = true; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; - -// PubKey defines a secp256r1 ECDSA public key. -message PubKey { - // Point on secp256r1 curve in a compressed representation as specified in section - // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 - bytes key = 1 [(gogoproto.customtype) = "ecdsaPK"]; -} - -// PrivKey defines a secp256r1 ECDSA private key. -message PrivKey { - // secret number serialized using big-endian encoding - bytes secret = 1 [(gogoproto.customtype) = "ecdsaSK"]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/distribution/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/distribution/module/v1/module.proto deleted file mode 100644 index accf920c..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/distribution/module/v1/module.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package cosmos.distribution.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the distribution module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/distribution" - }; - - string fee_collector_name = 1; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/distribution.proto b/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/distribution.proto deleted file mode 100644 index 0c20286f..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/distribution.proto +++ /dev/null @@ -1,194 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -// Params defines the set of params for the distribution module. -message Params { - option (amino.name) = "cosmos-sdk/x/distribution/Params"; - - string community_tax = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (amino.dont_omitempty) = true, - (gogoproto.nullable) = false - ]; - - // Deprecated: The base_proposer_reward field is deprecated and is no longer used - // in the x/distribution module's reward mechanism. - string base_proposer_reward = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - deprecated = true - ]; - - // Deprecated: The bonus_proposer_reward field is deprecated and is no longer used - // in the x/distribution module's reward mechanism. - string bonus_proposer_reward = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - deprecated = true - ]; - - bool withdraw_addr_enabled = 4; -} - -// ValidatorHistoricalRewards represents historical rewards for a validator. -// Height is implicit within the store key. -// Cumulative reward ratio is the sum from the zeroeth period -// until this period of rewards / tokens, per the spec. -// The reference count indicates the number of objects -// which might need to reference this historical entry at any point. -// ReferenceCount = -// number of outstanding delegations which ended the associated period (and -// might need to read that record) -// + number of slashes which ended the associated period (and might need to -// read that record) -// + one per validator for the zeroeth period, set on initialization -message ValidatorHistoricalRewards { - repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - uint32 reference_count = 2; -} - -// ValidatorCurrentRewards represents current rewards and current -// period for a validator kept as a running counter and incremented -// each block as long as the validator's tokens remain constant. -message ValidatorCurrentRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - uint64 period = 2; -} - -// ValidatorAccumulatedCommission represents accumulated commission -// for a validator kept as a running counter, can be withdrawn at any time. -message ValidatorAccumulatedCommission { - repeated cosmos.base.v1beta1.DecCoin commission = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} - -// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -// for a validator inexpensive to track, allows simple sanity checks. -message ValidatorOutstandingRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} - -// ValidatorSlashEvent represents a validator slash event. -// Height is implicit within the store key. -// This is needed to calculate appropriate amount of staking tokens -// for delegations which are withdrawn after a slash has occurred. -message ValidatorSlashEvent { - uint64 validator_period = 1; - string fraction = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. -message ValidatorSlashEvents { - repeated ValidatorSlashEvent validator_slash_events = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// FeePool is the global fee pool for distribution. -message FeePool { - repeated cosmos.base.v1beta1.DecCoin community_pool = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" - ]; -} - -// CommunityPoolSpendProposal details a proposal for use of community funds, -// together with how many coins are proposed to be spent, and to which -// recipient account. -// -// Deprecated: Do not use. As of the Cosmos SDK release v0.47.x, there is no -// longer a need for an explicit CommunityPoolSpendProposal. To spend community -// pool funds, a simple MsgCommunityPoolSpend can be invoked from the x/gov -// module via a v1 governance proposal. -message CommunityPoolSpendProposal { - option deprecated = true; - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string recipient = 3; - repeated cosmos.base.v1beta1.Coin amount = 4 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// DelegatorStartingInfo represents the starting info for a delegator reward -// period. It tracks the previous validator period, the delegation's amount of -// staking token, and the creation height (to check later on if any slashes have -// occurred). NOTE: Even though validators are slashed to whole staking tokens, -// the delegators within the validator may be left with less than a full token, -// thus sdk.Dec is used. -message DelegatorStartingInfo { - uint64 previous_period = 1; - string stake = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - uint64 height = 3 - [(gogoproto.jsontag) = "creation_height", (amino.field_name) = "creation_height", (amino.dont_omitempty) = true]; -} - -// DelegationDelegatorReward represents the properties -// of a delegator's delegation reward. -message DelegationDelegatorReward { - option (gogoproto.goproto_getters) = false; - - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - - repeated cosmos.base.v1beta1.DecCoin reward = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} - -// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal -// with a deposit -message CommunityPoolSpendProposalWithDeposit { - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - string recipient = 3; - string amount = 4; - string deposit = 5; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/genesis.proto deleted file mode 100644 index 5608bfb9..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/genesis.proto +++ /dev/null @@ -1,155 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -// DelegatorWithdrawInfo is the address for where distributions rewards are -// withdrawn to by default this struct is only used at genesis to feed in -// default withdraw addresses. -message DelegatorWithdrawInfo { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // withdraw_address is the address to withdraw the delegation rewards to. - string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. -message ValidatorOutstandingRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - - // outstanding_rewards represents the outstanding rewards of a validator. - repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} - -// ValidatorAccumulatedCommissionRecord is used for import / export via genesis -// json. -message ValidatorAccumulatedCommissionRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - - // accumulated is the accumulated commission of a validator. - ValidatorAccumulatedCommission accumulated = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// ValidatorHistoricalRewardsRecord is used for import / export via genesis -// json. -message ValidatorHistoricalRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - - // period defines the period the historical rewards apply to. - uint64 period = 2; - - // rewards defines the historical rewards of a validator. - ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// ValidatorCurrentRewardsRecord is used for import / export via genesis json. -message ValidatorCurrentRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - - // rewards defines the current rewards of a validator. - ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// DelegatorStartingInfoRecord used for import / export via genesis json. -message DelegatorStartingInfoRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // validator_address is the address of the validator. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - - // starting_info defines the starting info of a delegator. - DelegatorStartingInfo starting_info = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// ValidatorSlashEventRecord is used for import / export via genesis json. -message ValidatorSlashEventRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // height defines the block height at which the slash event occurred. - uint64 height = 2; - // period is the period of the slash event. - uint64 period = 3; - // validator_slash_event describes the slash event. - ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// GenesisState defines the distribution module's genesis state. -message GenesisState { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // params defines all the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // fee_pool defines the fee pool at genesis. - FeePool fee_pool = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // fee_pool defines the delegator withdraw infos at genesis. - repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // fee_pool defines the previous proposer at genesis. - string previous_proposer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // fee_pool defines the outstanding rewards of all validators at genesis. - repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // fee_pool defines the accumulated commissions of all validators at genesis. - repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // fee_pool defines the historical rewards of all validators at genesis. - repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // fee_pool defines the current rewards of all validators at genesis. - repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // fee_pool defines the delegator starting infos at genesis. - repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // fee_pool defines the validator slash events at genesis. - repeated ValidatorSlashEventRecord validator_slash_events = 10 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/query.proto deleted file mode 100644 index ffb89121..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/query.proto +++ /dev/null @@ -1,255 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; - -// Query defines the gRPC querier service for distribution module. -service Query { - // Params queries params of the distribution module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/params"; - } - - // ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator - rpc ValidatorDistributionInfo(QueryValidatorDistributionInfoRequest) - returns (QueryValidatorDistributionInfoResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}"; - } - - // ValidatorOutstandingRewards queries rewards of a validator address. - rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) - returns (QueryValidatorOutstandingRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" - "{validator_address}/outstanding_rewards"; - } - - // ValidatorCommission queries accumulated commission for a validator. - rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" - "{validator_address}/commission"; - } - - // ValidatorSlashes queries slash events of a validator. - rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes"; - } - - // DelegationRewards queries the total rewards accrued by a delegation. - rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/" - "{validator_address}"; - } - - // DelegationTotalRewards queries the total rewards accrued by each - // validator. - rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; - } - - // DelegatorValidators queries the validators of a delegator. - rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" - "{delegator_address}/validators"; - } - - // DelegatorWithdrawAddress queries withdraw address of a delegator. - rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" - "{delegator_address}/withdraw_address"; - } - - // CommunityPool queries the community pool coins. - rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method. -message QueryValidatorDistributionInfoRequest { - // validator_address defines the validator address to query for. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method. -message QueryValidatorDistributionInfoResponse { - // operator_address defines the validator operator address. - string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // self_bond_rewards defines the self delegations rewards. - repeated cosmos.base.v1beta1.DecCoin self_bond_rewards = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" - ]; - // commission defines the commission the validator received. - repeated cosmos.base.v1beta1.DecCoin commission = 3 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} - -// QueryValidatorOutstandingRewardsRequest is the request type for the -// Query/ValidatorOutstandingRewards RPC method. -message QueryValidatorOutstandingRewardsRequest { - // validator_address defines the validator address to query for. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// QueryValidatorOutstandingRewardsResponse is the response type for the -// Query/ValidatorOutstandingRewards RPC method. -message QueryValidatorOutstandingRewardsResponse { - ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryValidatorCommissionRequest is the request type for the -// Query/ValidatorCommission RPC method -message QueryValidatorCommissionRequest { - // validator_address defines the validator address to query for. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// QueryValidatorCommissionResponse is the response type for the -// Query/ValidatorCommission RPC method -message QueryValidatorCommissionResponse { - // commission defines the commission the validator received. - ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryValidatorSlashesRequest is the request type for the -// Query/ValidatorSlashes RPC method -message QueryValidatorSlashesRequest { - option (gogoproto.goproto_getters) = false; - - // validator_address defines the validator address to query for. - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // starting_height defines the optional starting height to query the slashes. - uint64 starting_height = 2; - // starting_height defines the optional ending height to query the slashes. - uint64 ending_height = 3; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryValidatorSlashesResponse is the response type for the -// Query/ValidatorSlashes RPC method. -message QueryValidatorSlashesResponse { - // slashes defines the slashes the validator received. - repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationRewardsRequest is the request type for the -// Query/DelegationRewards RPC method. -message QueryDelegationRewardsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_address defines the validator address to query for. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// QueryDelegationRewardsResponse is the response type for the -// Query/DelegationRewards RPC method. -message QueryDelegationRewardsResponse { - // rewards defines the rewards accrued by a delegation. - repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" - ]; -} - -// QueryDelegationTotalRewardsRequest is the request type for the -// Query/DelegationTotalRewards RPC method. -message QueryDelegationTotalRewardsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - // delegator_address defines the delegator address to query for. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegationTotalRewardsResponse is the response type for the -// Query/DelegationTotalRewards RPC method. -message QueryDelegationTotalRewardsResponse { - // rewards defines all the rewards accrued by a delegator. - repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // total defines the sum of all the rewards. - repeated cosmos.base.v1beta1.DecCoin total = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins" - ]; -} - -// QueryDelegatorValidatorsRequest is the request type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegatorValidatorsResponse is the response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validators defines the validators a delegator is delegating for. - repeated string validators = 1; -} - -// QueryDelegatorWithdrawAddressRequest is the request type for the -// Query/DelegatorWithdrawAddress RPC method. -message QueryDelegatorWithdrawAddressRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDelegatorWithdrawAddressResponse is the response type for the -// Query/DelegatorWithdrawAddress RPC method. -message QueryDelegatorWithdrawAddressResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // withdraw_address defines the delegator address to query for. - string withdraw_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC -// method. -message QueryCommunityPoolRequest {} - -// QueryCommunityPoolResponse is the response type for the Query/CommunityPool -// RPC method. -message QueryCommunityPoolResponse { - // pool defines community pool's coins. - repeated cosmos.base.v1beta1.DecCoin pool = 1 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/tx.proto deleted file mode 100644 index fc14c5e1..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/distribution/v1beta1/tx.proto +++ /dev/null @@ -1,215 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; - -// Msg defines the distribution Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // SetWithdrawAddress defines a method to change the withdraw address - // for a delegator (or validator self-delegation). - rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); - - // WithdrawDelegatorReward defines a method to withdraw rewards of delegator - // from a single validator. - rpc WithdrawDelegatorReward(MsgWithdrawDelegatorReward) returns (MsgWithdrawDelegatorRewardResponse); - - // WithdrawValidatorCommission defines a method to withdraw the - // full commission to the validator address. - rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse); - - // FundCommunityPool defines a method to allow an account to directly - // fund the community pool. - rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse); - - // UpdateParams defines a governance operation for updating the x/distribution - // module parameters. The authority is defined in the keeper. - // - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - - // CommunityPoolSpend defines a governance operation for sending tokens from - // the community pool in the x/distribution module to another account, which - // could be the governance module itself. The authority is defined in the - // keeper. - // - // Since: cosmos-sdk 0.47 - rpc CommunityPoolSpend(MsgCommunityPoolSpend) returns (MsgCommunityPoolSpendResponse); - - // DepositValidatorRewardsPool defines a method to provide additional rewards - // to delegators to a specific validator. - // - // Since: cosmos-sdk 0.50 - rpc DepositValidatorRewardsPool(MsgDepositValidatorRewardsPool) returns (MsgDepositValidatorRewardsPoolResponse); -} - -// MsgSetWithdrawAddress sets the withdraw address for -// a delegator (or validator self-delegation). -message MsgSetWithdrawAddress { - option (cosmos.msg.v1.signer) = "delegator_address"; - option (amino.name) = "cosmos-sdk/MsgModifyWithdrawAddress"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string withdraw_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response -// type. -message MsgSetWithdrawAddressResponse {} - -// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator -// from a single validator. -message MsgWithdrawDelegatorReward { - option (cosmos.msg.v1.signer) = "delegator_address"; - option (amino.name) = "cosmos-sdk/MsgWithdrawDelegationReward"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward -// response type. -message MsgWithdrawDelegatorRewardResponse { - // Since: cosmos-sdk 0.46 - repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgWithdrawValidatorCommission withdraws the full commission to the validator -// address. -message MsgWithdrawValidatorCommission { - option (cosmos.msg.v1.signer) = "validator_address"; - option (amino.name) = "cosmos-sdk/MsgWithdrawValCommission"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string validator_address = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// MsgWithdrawValidatorCommissionResponse defines the -// Msg/WithdrawValidatorCommission response type. -message MsgWithdrawValidatorCommissionResponse { - // Since: cosmos-sdk 0.46 - repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgFundCommunityPool allows an account to directly -// fund the community pool. -message MsgFundCommunityPool { - option (cosmos.msg.v1.signer) = "depositor"; - option (amino.name) = "cosmos-sdk/MsgFundCommunityPool"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. -message MsgFundCommunityPoolResponse {} - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/distribution/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // params defines the x/distribution parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {} - -// MsgCommunityPoolSpend defines a message for sending tokens from the community -// pool to another account. This message is typically executed via a governance -// proposal with the governance module being the executing authority. -// -// Since: cosmos-sdk 0.47 -message MsgCommunityPoolSpend { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/distr/MsgCommunityPoolSpend"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string recipient = 2; - repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgCommunityPoolSpendResponse defines the response to executing a -// MsgCommunityPoolSpend message. -// -// Since: cosmos-sdk 0.47 -message MsgCommunityPoolSpendResponse {} - -// DepositValidatorRewardsPool defines the request structure to provide -// additional rewards to delegators from a specific validator. -// -// Since: cosmos-sdk 0.50 -message MsgDepositValidatorRewardsPool { - option (amino.name) = "cosmos-sdk/distr/MsgDepositValRewards"; - option (cosmos.msg.v1.signer) = "depositor"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string depositor = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (amino.encoding) = "legacy_coins", - (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgDepositValidatorRewardsPoolResponse defines the response to executing a -// MsgDepositValidatorRewardsPool message. -// -// Since: cosmos-sdk 0.50 -message MsgDepositValidatorRewardsPoolResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/evidence/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/evidence/module/v1/module.proto deleted file mode 100644 index 5b2ede65..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/evidence/module/v1/module.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package cosmos.evidence.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the evidence module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/x/evidence" - }; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/evidence.proto b/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/evidence.proto deleted file mode 100644 index 21b2c5d8..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/evidence.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "cosmossdk.io/x/evidence/types"; -option (gogoproto.equal_all) = true; - -import "amino/amino.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos_proto/cosmos.proto"; - -// Equivocation implements the Evidence interface and defines evidence of double -// signing misbehavior. -message Equivocation { - option (amino.name) = "cosmos-sdk/Equivocation"; - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - // height is the equivocation height. - int64 height = 1; - - // time is the equivocation time. - google.protobuf.Timestamp time = 2 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; - - // power is the equivocation validator power. - int64 power = 3; - - // consensus_address is the equivocation validator consensus address. - string consensus_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/genesis.proto deleted file mode 100644 index 33b354e2..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/genesis.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "cosmossdk.io/x/evidence/types"; - -import "google/protobuf/any.proto"; - -// GenesisState defines the evidence module's genesis state. -message GenesisState { - // evidence defines all the evidence at genesis. - repeated google.protobuf.Any evidence = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/query.proto deleted file mode 100644 index f4af8ab7..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/query.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; - -option go_package = "cosmossdk.io/x/evidence/types"; - -// Query defines the gRPC querier service. -service Query { - // Evidence queries evidence based on evidence hash. - rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) { - option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence/{hash}"; - } - - // AllEvidence queries all evidence. - rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) { - option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence"; - } -} - -// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. -message QueryEvidenceRequest { - // evidence_hash defines the hash of the requested evidence. - // Deprecated: Use hash, a HEX encoded string, instead. - bytes evidence_hash = 1 [deprecated = true]; - - // hash defines the evidence hash of the requested evidence. - // - // Since: cosmos-sdk 0.47 - string hash = 2; -} - -// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. -message QueryEvidenceResponse { - // evidence returns the requested evidence. - google.protobuf.Any evidence = 1; -} - -// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC -// method. -message QueryAllEvidenceRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -// method. -message QueryAllEvidenceResponse { - // evidence returns all evidences. - repeated google.protobuf.Any evidence = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/tx.proto deleted file mode 100644 index 5eeaa6e9..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/evidence/v1beta1/tx.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "cosmossdk.io/x/evidence/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -// Msg defines the evidence Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - // counterfactual signing. - rpc SubmitEvidence(MsgSubmitEvidence) returns (MsgSubmitEvidenceResponse); -} - -// MsgSubmitEvidence represents a message that supports submitting arbitrary -// Evidence of misbehavior such as equivocation or counterfactual signing. -message MsgSubmitEvidence { - option (cosmos.msg.v1.signer) = "submitter"; - option (amino.name) = "cosmos-sdk/MsgSubmitEvidence"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // submitter is the signer account address of evidence. - string submitter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // evidence defines the evidence of misbehavior. - google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "cosmos.evidence.v1beta1.Evidence"]; -} - -// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. -message MsgSubmitEvidenceResponse { - // hash defines the hash of the evidence. - bytes hash = 4; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/feegrant/module/v1/module.proto deleted file mode 100644 index c5d6c24e..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/module/v1/module.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package cosmos.feegrant.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the feegrant module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/x/feegrant" - }; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto b/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto deleted file mode 100644 index a1c67eaf..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/feegrant.proto +++ /dev/null @@ -1,96 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "amino/amino.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "cosmossdk.io/x/feegrant"; - -// BasicAllowance implements Allowance with a one-time grant of coins -// that optionally expires. The grantee can use up to SpendLimit to cover fees. -message BasicAllowance { - option (cosmos_proto.implements_interface) = "cosmos.feegrant.v1beta1.FeeAllowanceI"; - option (amino.name) = "cosmos-sdk/BasicAllowance"; - - // spend_limit specifies the maximum amount of coins that can be spent - // by this allowance and will be updated as coins are spent. If it is - // empty, there is no spend limit and any amount of coins can be spent. - repeated cosmos.base.v1beta1.Coin spend_limit = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // expiration specifies an optional time when this allowance expires - google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true]; -} - -// PeriodicAllowance extends Allowance to allow for both a maximum cap, -// as well as a limit per time period. -message PeriodicAllowance { - option (cosmos_proto.implements_interface) = "cosmos.feegrant.v1beta1.FeeAllowanceI"; - option (amino.name) = "cosmos-sdk/PeriodicAllowance"; - - // basic specifies a struct of `BasicAllowance` - BasicAllowance basic = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // period specifies the time duration in which period_spend_limit coins can - // be spent before that allowance is reset - google.protobuf.Duration period = 2 - [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // period_spend_limit specifies the maximum number of coins that can be spent - // in the period - repeated cosmos.base.v1beta1.Coin period_spend_limit = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // period_can_spend is the number of coins left to be spent before the period_reset time - repeated cosmos.base.v1beta1.Coin period_can_spend = 4 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // period_reset is the time at which this period resets and a new one begins, - // it is calculated from the start time of the first transaction after the - // last period ended - google.protobuf.Timestamp period_reset = 5 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// AllowedMsgAllowance creates allowance only for specified message types. -message AllowedMsgAllowance { - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.feegrant.v1beta1.FeeAllowanceI"; - option (amino.name) = "cosmos-sdk/AllowedMsgAllowance"; - - // allowance can be any of basic and periodic fee allowance. - google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "cosmos.feegrant.v1beta1.FeeAllowanceI"]; - - // allowed_messages are the messages for which the grantee has the access. - repeated string allowed_messages = 2; -} - -// Grant is stored in the KVStore to record a grant with full context -message Grant { - // granter is the address of the user granting an allowance of their funds. - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // allowance can be any of basic, periodic, allowed fee allowance. - google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "cosmos.feegrant.v1beta1.FeeAllowanceI"]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/genesis.proto deleted file mode 100644 index ac7e57e1..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/genesis.proto +++ /dev/null @@ -1,14 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/feegrant/v1beta1/feegrant.proto"; -import "amino/amino.proto"; - -option go_package = "cosmossdk.io/x/feegrant"; - -// GenesisState contains a set of fee allowances, persisted from the store -message GenesisState { - repeated Grant allowances = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/query.proto deleted file mode 100644 index 591537ac..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/query.proto +++ /dev/null @@ -1,84 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "cosmos/feegrant/v1beta1/feegrant.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "cosmossdk.io/x/feegrant"; - -// Query defines the gRPC querier service. -service Query { - - // Allowance returns granted allwance to the grantee by the granter. - rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}"; - } - - // Allowances returns all the grants for the given grantee address. - rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}"; - } - - // AllowancesByGranter returns all the grants given by an address - // - // Since: cosmos-sdk 0.46 - rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}"; - } -} - -// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. -message QueryAllowanceRequest { - // granter is the address of the user granting an allowance of their funds. - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. -message QueryAllowanceResponse { - // allowance is a allowance granted for grantee by granter. - cosmos.feegrant.v1beta1.Grant allowance = 1; -} - -// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. -message QueryAllowancesRequest { - string grantee = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. -message QueryAllowancesResponse { - // allowances are allowance's granted for grantee by granter. - repeated cosmos.feegrant.v1beta1.Grant allowances = 1; - - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. -// -// Since: cosmos-sdk 0.46 -message QueryAllowancesByGranterRequest { - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. -// -// Since: cosmos-sdk 0.46 -message QueryAllowancesByGranterResponse { - // allowances that have been issued by the granter. - repeated cosmos.feegrant.v1beta1.Grant allowances = 1; - - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/tx.proto deleted file mode 100644 index 37e505c4..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/feegrant/v1beta1/tx.proto +++ /dev/null @@ -1,57 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -option go_package = "cosmossdk.io/x/feegrant"; - -// Msg defines the feegrant msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // GrantAllowance grants fee allowance to the grantee on the granter's - // account with the provided expiration time. - rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse); - - // RevokeAllowance revokes any fee allowance of granter's account that - // has been granted to the grantee. - rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); -} - -// MsgGrantAllowance adds permission for Grantee to spend up to Allowance -// of fees from the account of Granter. -message MsgGrantAllowance { - option (cosmos.msg.v1.signer) = "granter"; - option (amino.name) = "cosmos-sdk/MsgGrantAllowance"; - - // granter is the address of the user granting an allowance of their funds. - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // allowance can be any of basic, periodic, allowed fee allowance. - google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "cosmos.feegrant.v1beta1.FeeAllowanceI"]; -} - -// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. -message MsgGrantAllowanceResponse {} - -// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. -message MsgRevokeAllowance { - option (cosmos.msg.v1.signer) = "granter"; - option (amino.name) = "cosmos-sdk/MsgRevokeAllowance"; - - // granter is the address of the user granting an allowance of their funds. - string granter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. -message MsgRevokeAllowanceResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/genutil/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/genutil/module/v1/module.proto deleted file mode 100644 index 86e6f576..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/genutil/module/v1/module.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package cosmos.genutil.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object for the genutil module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/genutil" - }; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/genutil/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/genutil/v1beta1/genesis.proto deleted file mode 100644 index dfd34943..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/genutil/v1beta1/genesis.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package cosmos.genutil.v1beta1; - -import "gogoproto/gogo.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/genutil/types"; - -// GenesisState defines the raw genesis transaction in JSON. -message GenesisState { - // gen_txs defines the genesis transactions. - repeated bytes gen_txs = 1 [ - (gogoproto.casttype) = "encoding/json.RawMessage", - (gogoproto.jsontag) = "gentxs", - (amino.field_name) = "gentxs", - (amino.dont_omitempty) = true - ]; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/gov/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/gov/module/v1/module.proto deleted file mode 100644 index 9cade9af..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/gov/module/v1/module.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package cosmos.gov.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the gov module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/gov" - }; - - // max_metadata_len defines the maximum proposal metadata length. - // Defaults to 255 if not explicitly set. - uint64 max_metadata_len = 1; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/genesis.proto deleted file mode 100644 index 1398b332..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/genesis.proto +++ /dev/null @@ -1,40 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; - -package cosmos.gov.v1; - -import "cosmos/gov/v1/gov.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; - -// GenesisState defines the gov module's genesis state. -message GenesisState { - // starting_proposal_id is the ID of the starting proposal. - uint64 starting_proposal_id = 1; - // deposits defines all the deposits present at genesis. - repeated Deposit deposits = 2; - // votes defines all the votes present at genesis. - repeated Vote votes = 3; - // proposals defines all the proposals present at genesis. - repeated Proposal proposals = 4; - // Deprecated: Prefer to use `params` instead. - // deposit_params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5 [deprecated = true]; - // Deprecated: Prefer to use `params` instead. - // voting_params defines all the paramaters of related to voting. - VotingParams voting_params = 6 [deprecated = true]; - // Deprecated: Prefer to use `params` instead. - // tally_params defines all the paramaters of related to tally. - TallyParams tally_params = 7 [deprecated = true]; - // params defines all the paramaters of x/gov module. - // - // Since: cosmos-sdk 0.47 - Params params = 8; - // The constitution allows builders to lay a foundation and define purpose. - // This is an immutable string set in genesis. - // There are no amendments, to go outside of scope, just fork. - // constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals. - // - // Since: cosmos-sdk 0.50 - string constitution = 9; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/gov.proto b/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/gov.proto deleted file mode 100644 index 8b34e6f6..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/gov.proto +++ /dev/null @@ -1,262 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; -package cosmos.gov.v1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; - -// VoteOption enumerates the valid vote options for a given governance proposal. -enum VoteOption { - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_UNSPECIFIED = 0; - // VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_YES = 1; - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_ABSTAIN = 2; - // VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO = 3; - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VOTE_OPTION_NO_WITH_VETO = 4; -} - -// WeightedVoteOption defines a unit of vote for vote split. -message WeightedVoteOption { - // option defines the valid vote options, it must not contain duplicate vote options. - VoteOption option = 1; - - // weight is the vote weight associated with the vote option. - string weight = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; -} - -// Deposit defines an amount deposited by an account address to an active -// proposal. -message Deposit { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // amount to be deposited by depositor. - repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// Proposal defines the core field members of a governance proposal. -message Proposal { - // id defines the unique id of the proposal. - uint64 id = 1; - - // messages are the arbitrary messages to be executed if the proposal passes. - repeated google.protobuf.Any messages = 2; - - // status defines the proposal status. - ProposalStatus status = 3; - - // final_tally_result is the final tally result of the proposal. When - // querying a proposal via gRPC, this field is not populated until the - // proposal's voting period has ended. - TallyResult final_tally_result = 4; - - // submit_time is the time of proposal submission. - google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true]; - - // deposit_end_time is the end time for deposition. - google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true]; - - // total_deposit is the total deposit on the proposal. - repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // voting_start_time is the starting time to vote on a proposal. - google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true]; - - // voting_end_time is the end time of voting on a proposal. - google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true]; - - // metadata is any arbitrary metadata attached to the proposal. - // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 - string metadata = 10; - - // title is the title of the proposal - // - // Since: cosmos-sdk 0.47 - string title = 11; - - // summary is a short summary of the proposal - // - // Since: cosmos-sdk 0.47 - string summary = 12; - - // proposer is the address of the proposal sumbitter - // - // Since: cosmos-sdk 0.47 - string proposer = 13 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // expedited defines if the proposal is expedited - // - // Since: cosmos-sdk 0.50 - bool expedited = 14; - - // failed_reason defines the reason why the proposal failed - // - // Since: cosmos-sdk 0.50 - string failed_reason = 15; -} - -// ProposalStatus enumerates the valid statuses of a proposal. -enum ProposalStatus { - // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - PROPOSAL_STATUS_UNSPECIFIED = 0; - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - // period. - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1; - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - // period. - PROPOSAL_STATUS_VOTING_PERIOD = 2; - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - // passed. - PROPOSAL_STATUS_PASSED = 3; - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - // been rejected. - PROPOSAL_STATUS_REJECTED = 4; - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - // failed. - PROPOSAL_STATUS_FAILED = 5; -} - -// TallyResult defines a standard tally for a governance proposal. -message TallyResult { - // yes_count is the number of yes votes on a proposal. - string yes_count = 1 [(cosmos_proto.scalar) = "cosmos.Int"]; - // abstain_count is the number of abstain votes on a proposal. - string abstain_count = 2 [(cosmos_proto.scalar) = "cosmos.Int"]; - // no_count is the number of no votes on a proposal. - string no_count = 3 [(cosmos_proto.scalar) = "cosmos.Int"]; - // no_with_veto_count is the number of no with veto votes on a proposal. - string no_with_veto_count = 4 [(cosmos_proto.scalar) = "cosmos.Int"]; -} - -// Vote defines a vote on a governance proposal. -// A Vote consists of a proposal ID, the voter, and the vote option. -message Vote { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // voter is the voter address of the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - reserved 3; - - // options is the weighted vote options. - repeated WeightedVoteOption options = 4; - - // metadata is any arbitrary metadata attached to the vote. - // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 - string metadata = 5; -} - -// DepositParams defines the params for deposits on governance proposals. -message DepositParams { - option deprecated = true; - - // Minimum deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin min_deposit = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "min_deposit,omitempty"]; - - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - // months. - google.protobuf.Duration max_deposit_period = 2 - [(gogoproto.stdduration) = true, (gogoproto.jsontag) = "max_deposit_period,omitempty"]; -} - -// VotingParams defines the params for voting on governance proposals. -message VotingParams { - option deprecated = true; - - // Duration of the voting period. - google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true]; -} - -// TallyParams defines the params for tallying votes on governance proposals. -message TallyParams { - option deprecated = true; - - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. - string quorum = 1 [(cosmos_proto.scalar) = "cosmos.Dec"]; - - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - string threshold = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; - - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. - string veto_threshold = 3 [(cosmos_proto.scalar) = "cosmos.Dec"]; -} - -// Params defines the parameters for the x/gov module. -// -// Since: cosmos-sdk 0.47 -message Params { - // Minimum deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin min_deposit = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - // months. - google.protobuf.Duration max_deposit_period = 2 [(gogoproto.stdduration) = true]; - - // Duration of the voting period. - google.protobuf.Duration voting_period = 3 [(gogoproto.stdduration) = true]; - - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. - string quorum = 4 [(cosmos_proto.scalar) = "cosmos.Dec"]; - - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - string threshold = 5 [(cosmos_proto.scalar) = "cosmos.Dec"]; - - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. - string veto_threshold = 6 [(cosmos_proto.scalar) = "cosmos.Dec"]; - - // The ratio representing the proportion of the deposit value that must be paid at proposal submission. - string min_initial_deposit_ratio = 7 [(cosmos_proto.scalar) = "cosmos.Dec"]; - - // The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. - // - // Since: cosmos-sdk 0.50 - string proposal_cancel_ratio = 8 [(cosmos_proto.scalar) = "cosmos.Dec"]; - - // The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. - // If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. - // - // Since: cosmos-sdk 0.50 - string proposal_cancel_dest = 9 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Duration of the voting period of an expedited proposal. - // - // Since: cosmos-sdk 0.50 - google.protobuf.Duration expedited_voting_period = 10 [(gogoproto.stdduration) = true]; - - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. - // - // Since: cosmos-sdk 0.50 - string expedited_threshold = 11 [(cosmos_proto.scalar) = "cosmos.Dec"]; - - // Minimum expedited deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin expedited_min_deposit = 12 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // burn deposits if a proposal does not meet quorum - bool burn_vote_quorum = 13; - - // burn deposits if the proposal does not enter voting period - bool burn_proposal_deposit_prevote = 14; - - // burn deposits if quorum with vote type no_veto is met - bool burn_vote_veto = 15; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/query.proto deleted file mode 100644 index 006d12fd..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/query.proto +++ /dev/null @@ -1,205 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; -package cosmos.gov.v1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; -import "cosmos/gov/v1/gov.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; - -// Query defines the gRPC querier service for gov module -service Query { - // Constitution queries the chain's constitution. - rpc Constitution(QueryConstitutionRequest) returns (QueryConstitutionResponse) { - option (google.api.http).get = "/cosmos/gov/v1/constitution"; - } - - // Proposal queries proposal details based on ProposalID. - rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}"; - } - - // Proposals queries all proposals based on given status. - rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals"; - } - - // Vote queries voted information based on proposalID, voterAddr. - rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}"; - } - - // Votes queries votes of a given proposal. - rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/votes"; - } - - // Params queries all parameters of the gov module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/gov/v1/params/{params_type}"; - } - - // Deposit queries single deposit information based on proposalID, depositAddr. - rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}"; - } - - // Deposits queries all deposits of a single proposal. - rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/deposits"; - } - - // TallyResult queries the tally of a proposal vote. - rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/cosmos/gov/v1/proposals/{proposal_id}/tally"; - } -} - -// QueryConstitutionRequest is the request type for the Query/Constitution RPC method -message QueryConstitutionRequest {} - -// QueryConstitutionResponse is the response type for the Query/Constitution RPC method -message QueryConstitutionResponse { - string constitution = 1; -} - -// QueryProposalRequest is the request type for the Query/Proposal RPC method. -message QueryProposalRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -message QueryProposalResponse { - // proposal is the requested governance proposal. - Proposal proposal = 1; -} - -// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -message QueryProposalsRequest { - // proposal_status defines the status of the proposals. - ProposalStatus proposal_status = 1; - - // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // depositor defines the deposit addresses from the proposals. - string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -message QueryProposalsResponse { - // proposals defines all the requested governance proposals. - repeated Proposal proposals = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVoteRequest is the request type for the Query/Vote RPC method. -message QueryVoteRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -message QueryVoteResponse { - // vote defines the queried vote. - Vote vote = 1; -} - -// QueryVotesRequest is the request type for the Query/Votes RPC method. -message QueryVotesRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -message QueryVotesResponse { - // votes defines the queried votes. - repeated Vote votes = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest { - // params_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - string params_type = 1; -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // Deprecated: Prefer to use `params` instead. - // voting_params defines the parameters related to voting. - VotingParams voting_params = 1 [deprecated = true]; - // Deprecated: Prefer to use `params` instead. - // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2 [deprecated = true]; - // Deprecated: Prefer to use `params` instead. - // tally_params defines the parameters related to tally. - TallyParams tally_params = 3 [deprecated = true]; - // params defines all the paramaters of x/gov module. - // - // Since: cosmos-sdk 0.47 - Params params = 4; -} - -// QueryDepositRequest is the request type for the Query/Deposit RPC method. -message QueryDepositRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -message QueryDepositResponse { - // deposit defines the requested deposit. - Deposit deposit = 1; -} - -// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -message QueryDepositsRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -message QueryDepositsResponse { - // deposits defines the requested deposits. - repeated Deposit deposits = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -message QueryTallyResultRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -message QueryTallyResultResponse { - // tally defines the requested tally. - TallyResult tally = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/tx.proto deleted file mode 100644 index b8cdc713..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1/tx.proto +++ /dev/null @@ -1,213 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; -package cosmos.gov.v1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/gov/v1/gov.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/any.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1"; - -// Msg defines the gov Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // SubmitProposal defines a method to create new proposal given the messages. - rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - - // ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal - // to execute a legacy content-based proposal. - rpc ExecLegacyContent(MsgExecLegacyContent) returns (MsgExecLegacyContentResponse); - - // Vote defines a method to add a vote on a specific proposal. - rpc Vote(MsgVote) returns (MsgVoteResponse); - - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); - - // Deposit defines a method to add deposit on a specific proposal. - rpc Deposit(MsgDeposit) returns (MsgDepositResponse); - - // UpdateParams defines a governance operation for updating the x/gov module - // parameters. The authority is defined in the keeper. - // - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - - // CancelProposal defines a method to cancel governance proposal - // - // Since: cosmos-sdk 0.50 - rpc CancelProposal(MsgCancelProposal) returns (MsgCancelProposalResponse); -} - -// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -// proposal Content. -message MsgSubmitProposal { - option (cosmos.msg.v1.signer) = "proposer"; - option (amino.name) = "cosmos-sdk/v1/MsgSubmitProposal"; - - // messages are the arbitrary messages to be executed if proposal passes. - repeated google.protobuf.Any messages = 1; - - // initial_deposit is the deposit value that must be paid at proposal submission. - repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins" - ]; - - // proposer is the account address of the proposer. - string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // metadata is any arbitrary metadata attached to the proposal. - string metadata = 4; - - // title is the title of the proposal. - // - // Since: cosmos-sdk 0.47 - string title = 5; - - // summary is the summary of the proposal - // - // Since: cosmos-sdk 0.47 - string summary = 6; - - // expedited defines if the proposal is expedited or not - // - // Since: cosmos-sdk 0.50 - bool expedited = 7; -} - -// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -message MsgSubmitProposalResponse { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// MsgExecLegacyContent is used to wrap the legacy content field into a message. -// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. -message MsgExecLegacyContent { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/v1/MsgExecLegacyContent"; - - // content is the proposal's content. - google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "cosmos.gov.v1beta1.Content"]; - // authority must be the gov module address. - string authority = 2; -} - -// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. -message MsgExecLegacyContentResponse {} - -// MsgVote defines a message to cast a vote. -message MsgVote { - option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "cosmos-sdk/v1/MsgVote"; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - - // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // option defines the vote option. - VoteOption option = 3; - - // metadata is any arbitrary metadata attached to the Vote. - string metadata = 4; -} - -// MsgVoteResponse defines the Msg/Vote response type. -message MsgVoteResponse {} - -// MsgVoteWeighted defines a message to cast a vote. -message MsgVoteWeighted { - option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "cosmos-sdk/v1/MsgVoteWeighted"; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - - // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // options defines the weighted vote options. - repeated WeightedVoteOption options = 3; - - // metadata is any arbitrary metadata attached to the VoteWeighted. - string metadata = 4; -} - -// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -message MsgVoteWeightedResponse {} - -// MsgDeposit defines a message to submit a deposit to an existing proposal. -message MsgDeposit { - option (cosmos.msg.v1.signer) = "depositor"; - option (amino.name) = "cosmos-sdk/v1/MsgDeposit"; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // amount to be deposited by depositor. - repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgDepositResponse defines the Msg/Deposit response type. -message MsgDepositResponse {} - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/gov/v1/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // params defines the x/gov parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {} - -// MsgCancelProposal is the Msg/CancelProposal request type. -// -// Since: cosmos-sdk 0.50 -message MsgCancelProposal { - option (cosmos.msg.v1.signer) = "proposer"; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; - // proposer is the account address of the proposer. - string proposer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgCancelProposalResponse defines the response structure for executing a -// MsgCancelProposal message. -// -// Since: cosmos-sdk 0.50 -message MsgCancelProposalResponse { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id"]; - // canceled_time is the time when proposal is canceled. - google.protobuf.Timestamp canceled_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // canceled_height defines the block height at which the proposal is canceled. - uint64 canceled_height = 3; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/genesis.proto deleted file mode 100644 index f0c679a3..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/genesis.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package cosmos.gov.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/gov/v1beta1/gov.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; - -// GenesisState defines the gov module's genesis state. -message GenesisState { - // starting_proposal_id is the ID of the starting proposal. - uint64 starting_proposal_id = 1; - // deposits defines all the deposits present at genesis. - repeated Deposit deposits = 2 - [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // votes defines all the votes present at genesis. - repeated Vote votes = 3 - [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // proposals defines all the proposals present at genesis. - repeated Proposal proposals = 4 - [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // deposit_params defines all the parameters related to deposit. - DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // voting_params defines all the parameters related to voting. - VotingParams voting_params = 6 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // tally_params defines all the parameters related to tally. - TallyParams tally_params = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/gov.proto b/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/gov.proto deleted file mode 100644 index 99b97191..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/gov.proto +++ /dev/null @@ -1,254 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; - -option (gogoproto.goproto_getters_all) = false; - -// VoteOption enumerates the valid vote options for a given governance proposal. -enum VoteOption { - option (gogoproto.goproto_enum_prefix) = false; - - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; - // VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"]; - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_ABSTAIN = 2 [(gogoproto.enumvalue_customname) = "OptionAbstain"]; - // VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO = 3 [(gogoproto.enumvalue_customname) = "OptionNo"]; - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; -} - -// WeightedVoteOption defines a unit of vote for vote split. -// -// Since: cosmos-sdk 0.43 -message WeightedVoteOption { - // option defines the valid vote options, it must not contain duplicate vote options. - VoteOption option = 1; - - // weight is the vote weight associated with the vote option. - string weight = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (amino.dont_omitempty) = true, - (gogoproto.nullable) = false - ]; -} - -// TextProposal defines a standard text proposal whose changes need to be -// manually updated in case of approval. -message TextProposal { - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - option (amino.name) = "cosmos-sdk/TextProposal"; - - option (gogoproto.equal) = true; - - // title of the proposal. - string title = 1; - - // description associated with the proposal. - string description = 2; -} - -// Deposit defines an amount deposited by an account address to an active -// proposal. -message Deposit { - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // amount to be deposited by depositor. - repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// Proposal defines the core field members of a governance proposal. -message Proposal { - option (gogoproto.equal) = true; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // content is the proposal's content. - google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "cosmos.gov.v1beta1.Content"]; - - // status defines the proposal status. - ProposalStatus status = 3; - - // final_tally_result is the final tally result of the proposal. When - // querying a proposal via gRPC, this field is not populated until the - // proposal's voting period has ended. - TallyResult final_tally_result = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // submit_time is the time of proposal submission. - google.protobuf.Timestamp submit_time = 5 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // deposit_end_time is the end time for deposition. - google.protobuf.Timestamp deposit_end_time = 6 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // total_deposit is the total deposit on the proposal. - repeated cosmos.base.v1beta1.Coin total_deposit = 7 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // voting_start_time is the starting time to vote on a proposal. - google.protobuf.Timestamp voting_start_time = 8 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // voting_end_time is the end time of voting on a proposal. - google.protobuf.Timestamp voting_end_time = 9 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// ProposalStatus enumerates the valid statuses of a proposal. -enum ProposalStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - // period. - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"]; - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - // period. - PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"]; - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - // passed. - PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"]; - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - // been rejected. - PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"]; - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - // failed. - PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"]; -} - -// TallyResult defines a standard tally for a governance proposal. -message TallyResult { - option (gogoproto.equal) = true; - - // yes is the number of yes votes on a proposal. - string yes = 1 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - - // abstain is the number of abstain votes on a proposal. - string abstain = 2 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - - // no is the number of no votes on a proposal. - string no = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - - // no_with_veto is the number of no with veto votes on a proposal. - string no_with_veto = 4 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -// Vote defines a vote on a governance proposal. -// A Vote consists of a proposal ID, the voter, and the vote option. -message Vote { - option (gogoproto.equal) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (amino.field_name) = "id", (amino.dont_omitempty) = true]; - - // voter is the voter address of the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Deprecated: Prefer to use `options` instead. This field is set in queries - // if and only if `len(options) == 1` and that option has weight 1. In all - // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - VoteOption option = 3 [deprecated = true]; - - // options is the weighted vote options. - // - // Since: cosmos-sdk 0.43 - repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// DepositParams defines the params for deposits on governance proposals. -message DepositParams { - // Minimum deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.jsontag) = "min_deposit,omitempty" - ]; - - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - // months. - google.protobuf.Duration max_deposit_period = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "max_deposit_period,omitempty" - ]; -} - -// VotingParams defines the params for voting on governance proposals. -message VotingParams { - // Duration of the voting period. - google.protobuf.Duration voting_period = 1 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.jsontag) = "voting_period,omitempty"]; -} - -// TallyParams defines the params for tallying votes on governance proposals. -message TallyParams { - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. - bytes quorum = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "quorum,omitempty" - ]; - - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - bytes threshold = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "threshold,omitempty" - ]; - - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. - bytes veto_threshold = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "veto_threshold,omitempty" - ]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/query.proto deleted file mode 100644 index 28352ed4..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/query.proto +++ /dev/null @@ -1,194 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/gov/v1beta1/gov.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; - -// Query defines the gRPC querier service for gov module -service Query { - // Proposal queries proposal details based on ProposalID. - rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}"; - } - - // Proposals queries all proposals based on given status. - rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals"; - } - - // Vote queries voted information based on proposalID, voterAddr. - rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"; - } - - // Votes queries votes of a given proposal. - rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes"; - } - - // Params queries all parameters of the gov module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}"; - } - - // Deposit queries single deposit information based on proposalID, depositor address. - rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}"; - } - - // Deposits queries all deposits of a single proposal. - rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits"; - } - - // TallyResult queries the tally of a proposal vote. - rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally"; - } -} - -// QueryProposalRequest is the request type for the Query/Proposal RPC method. -message QueryProposalRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -message QueryProposalResponse { - Proposal proposal = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -message QueryProposalsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_status defines the status of the proposals. - ProposalStatus proposal_status = 1; - - // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // depositor defines the deposit addresses from the proposals. - string depositor = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -message QueryProposalsResponse { - // proposals defines all the requested governance proposals. - repeated Proposal proposals = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVoteRequest is the request type for the Query/Vote RPC method. -message QueryVoteRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // voter defines the voter address for the proposals. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -message QueryVoteResponse { - // vote defines the queried vote. - Vote vote = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryVotesRequest is the request type for the Query/Votes RPC method. -message QueryVotesRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -message QueryVotesResponse { - // votes defines the queried votes. - repeated Vote votes = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest { - // params_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - string params_type = 1; -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // voting_params defines the parameters related to voting. - VotingParams voting_params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // tally_params defines the parameters related to tally. - TallyParams tally_params = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryDepositRequest is the request type for the Query/Deposit RPC method. -message QueryDepositRequest { - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -message QueryDepositResponse { - // deposit defines the requested deposit. - Deposit deposit = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -message QueryDepositsRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -message QueryDepositsResponse { - // deposits defines the requested deposits. - repeated Deposit deposits = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -message QueryTallyResultRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -message QueryTallyResultResponse { - // tally defines the requested tally. - TallyResult tally = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/tx.proto deleted file mode 100644 index 9de763be..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/gov/v1beta1/tx.proto +++ /dev/null @@ -1,134 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/gov/v1beta1/gov.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"; - -// Msg defines the gov Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // SubmitProposal defines a method to create new proposal given a content. - rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - - // Vote defines a method to add a vote on a specific proposal. - rpc Vote(MsgVote) returns (MsgVoteResponse); - - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - // - // Since: cosmos-sdk 0.43 - rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); - - // Deposit defines a method to add deposit on a specific proposal. - rpc Deposit(MsgDeposit) returns (MsgDepositResponse); -} - -// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -// proposal Content. -message MsgSubmitProposal { - option (cosmos.msg.v1.signer) = "proposer"; - option (amino.name) = "cosmos-sdk/MsgSubmitProposal"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // content is the proposal's content. - google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "cosmos.gov.v1beta1.Content"]; - - // initial_deposit is the deposit value that must be paid at proposal submission. - repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // proposer is the account address of the proposer. - string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -message MsgSubmitProposalResponse { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; -} - -// MsgVote defines a message to cast a vote. -message MsgVote { - option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "cosmos-sdk/MsgVote"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // option defines the vote option. - VoteOption option = 3; -} - -// MsgVoteResponse defines the Msg/Vote response type. -message MsgVoteResponse {} - -// MsgVoteWeighted defines a message to cast a vote. -// -// Since: cosmos-sdk 0.43 -message MsgVoteWeighted { - option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "cosmos-sdk/MsgVoteWeighted"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - - // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // options defines the weighted vote options. - repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -// -// Since: cosmos-sdk 0.43 -message MsgVoteWeightedResponse {} - -// MsgDeposit defines a message to submit a deposit to an existing proposal. -message MsgDeposit { - option (cosmos.msg.v1.signer) = "depositor"; - option (amino.name) = "cosmos-sdk/MsgDeposit"; - - option (gogoproto.equal) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // amount to be deposited by depositor. - repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgDepositResponse defines the Msg/Deposit response type. -message MsgDepositResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/group/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/group/module/v1/module.proto deleted file mode 100644 index d1e7ffb2..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/group/module/v1/module.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -package cosmos.group.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "amino/amino.proto"; - -// Module is the config object of the group module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/group" - }; - - // max_execution_period defines the max duration after a proposal's voting period ends that members can send a MsgExec - // to execute the proposal. - google.protobuf.Duration max_execution_period = 1 - [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // max_metadata_len defines the max length of the metadata bytes field for various entities within the group module. - // Defaults to 255 if not explicitly set. - uint64 max_metadata_len = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/events.proto b/packages/injective-protobuf/third_party/proto/cosmos/group/v1/events.proto deleted file mode 100644 index 2b98ec9a..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/events.proto +++ /dev/null @@ -1,94 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; - -package cosmos.group.v1; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/group/v1/types.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -// EventCreateGroup is an event emitted when a group is created. -message EventCreateGroup { - - // group_id is the unique ID of the group. - uint64 group_id = 1; -} - -// EventUpdateGroup is an event emitted when a group is updated. -message EventUpdateGroup { - - // group_id is the unique ID of the group. - uint64 group_id = 1; -} - -// EventCreateGroupPolicy is an event emitted when a group policy is created. -message EventCreateGroupPolicy { - - // address is the account address of the group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// EventUpdateGroupPolicy is an event emitted when a group policy is updated. -message EventUpdateGroupPolicy { - - // address is the account address of the group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// EventSubmitProposal is an event emitted when a proposal is created. -message EventSubmitProposal { - - // proposal_id is the unique ID of the proposal. - uint64 proposal_id = 1; -} - -// EventWithdrawProposal is an event emitted when a proposal is withdrawn. -message EventWithdrawProposal { - - // proposal_id is the unique ID of the proposal. - uint64 proposal_id = 1; -} - -// EventVote is an event emitted when a voter votes on a proposal. -message EventVote { - - // proposal_id is the unique ID of the proposal. - uint64 proposal_id = 1; -} - -// EventExec is an event emitted when a proposal is executed. -message EventExec { - - // proposal_id is the unique ID of the proposal. - uint64 proposal_id = 1; - - // result is the proposal execution result. - ProposalExecutorResult result = 2; - - // logs contains error logs in case the execution result is FAILURE. - string logs = 3; -} - -// EventLeaveGroup is an event emitted when group member leaves the group. -message EventLeaveGroup { - - // group_id is the unique ID of the group. - uint64 group_id = 1; - - // address is the account address of the group member. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// EventProposalPruned is an event emitted when a proposal is pruned. -message EventProposalPruned { - - // proposal_id is the unique ID of the proposal. - uint64 proposal_id = 1; - - // status is the proposal status (UNSPECIFIED, SUBMITTED, ACCEPTED, REJECTED, ABORTED, WITHDRAWN). - ProposalStatus status = 2; - - // tally_result is the proposal tally result (when applicable). - TallyResult tally_result = 3; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/group/v1/genesis.proto deleted file mode 100644 index e4c895e9..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/genesis.proto +++ /dev/null @@ -1,39 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; - -package cosmos.group.v1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -import "cosmos/group/v1/types.proto"; - -// GenesisState defines the group module's genesis state. -message GenesisState { - - // group_seq is the group table orm.Sequence, - // it is used to get the next group ID. - uint64 group_seq = 1; - - // groups is the list of groups info. - repeated GroupInfo groups = 2; - - // group_members is the list of groups members. - repeated GroupMember group_members = 3; - - // group_policy_seq is the group policy table orm.Sequence, - // it is used to generate the next group policy account address. - uint64 group_policy_seq = 4; - - // group_policies is the list of group policies info. - repeated GroupPolicyInfo group_policies = 5; - - // proposal_seq is the proposal table orm.Sequence, - // it is used to get the next proposal ID. - uint64 proposal_seq = 6; - - // proposals is the list of proposals. - repeated Proposal proposals = 7; - - // votes is the list of votes. - repeated Vote votes = 8; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/group/v1/query.proto deleted file mode 100644 index 80b09255..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/query.proto +++ /dev/null @@ -1,320 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; - -package cosmos.group.v1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/group/v1/types.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -// Query is the cosmos.group.v1 Query service. -service Query { - - // GroupInfo queries group info based on group id. - rpc GroupInfo(QueryGroupInfoRequest) returns (QueryGroupInfoResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_info/{group_id}"; - }; - - // GroupPolicyInfo queries group policy info based on account address of group policy. - rpc GroupPolicyInfo(QueryGroupPolicyInfoRequest) returns (QueryGroupPolicyInfoResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_policy_info/{address}"; - }; - - // GroupMembers queries members of a group by group id. - rpc GroupMembers(QueryGroupMembersRequest) returns (QueryGroupMembersResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_members/{group_id}"; - }; - - // GroupsByAdmin queries groups by admin address. - rpc GroupsByAdmin(QueryGroupsByAdminRequest) returns (QueryGroupsByAdminResponse) { - option (google.api.http).get = "/cosmos/group/v1/groups_by_admin/{admin}"; - }; - - // GroupPoliciesByGroup queries group policies by group id. - rpc GroupPoliciesByGroup(QueryGroupPoliciesByGroupRequest) returns (QueryGroupPoliciesByGroupResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_policies_by_group/{group_id}"; - }; - - // GroupPoliciesByAdmin queries group policies by admin address. - rpc GroupPoliciesByAdmin(QueryGroupPoliciesByAdminRequest) returns (QueryGroupPoliciesByAdminResponse) { - option (google.api.http).get = "/cosmos/group/v1/group_policies_by_admin/{admin}"; - }; - - // Proposal queries a proposal based on proposal id. - rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { - option (google.api.http).get = "/cosmos/group/v1/proposal/{proposal_id}"; - }; - - // ProposalsByGroupPolicy queries proposals based on account address of group policy. - rpc ProposalsByGroupPolicy(QueryProposalsByGroupPolicyRequest) returns (QueryProposalsByGroupPolicyResponse) { - option (google.api.http).get = "/cosmos/group/v1/proposals_by_group_policy/{address}"; - }; - - // VoteByProposalVoter queries a vote by proposal id and voter. - rpc VoteByProposalVoter(QueryVoteByProposalVoterRequest) returns (QueryVoteByProposalVoterResponse) { - option (google.api.http).get = "/cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}"; - }; - - // VotesByProposal queries a vote by proposal id. - rpc VotesByProposal(QueryVotesByProposalRequest) returns (QueryVotesByProposalResponse) { - option (google.api.http).get = "/cosmos/group/v1/votes_by_proposal/{proposal_id}"; - }; - - // VotesByVoter queries a vote by voter. - rpc VotesByVoter(QueryVotesByVoterRequest) returns (QueryVotesByVoterResponse) { - option (google.api.http).get = "/cosmos/group/v1/votes_by_voter/{voter}"; - }; - - // GroupsByMember queries groups by member address. - rpc GroupsByMember(QueryGroupsByMemberRequest) returns (QueryGroupsByMemberResponse) { - option (google.api.http).get = "/cosmos/group/v1/groups_by_member/{address}"; - }; - - // TallyResult returns the tally result of a proposal. If the proposal is - // still in voting period, then this query computes the current tally state, - // which might not be final. On the other hand, if the proposal is final, - // then it simply returns the `final_tally_result` state stored in the - // proposal itself. - rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/cosmos/group/v1/proposals/{proposal_id}/tally"; - }; - - // Groups queries all groups in state. - // - // Since: cosmos-sdk 0.47.1 - rpc Groups(QueryGroupsRequest) returns (QueryGroupsResponse) { - option (google.api.http).get = "/cosmos/group/v1/groups"; - }; -} - -// QueryGroupInfoRequest is the Query/GroupInfo request type. -message QueryGroupInfoRequest { - // group_id is the unique ID of the group. - uint64 group_id = 1; -} - -// QueryGroupInfoResponse is the Query/GroupInfo response type. -message QueryGroupInfoResponse { - // info is the GroupInfo of the group. - GroupInfo info = 1; -} - -// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. -message QueryGroupPolicyInfoRequest { - // address is the account address of the group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. -message QueryGroupPolicyInfoResponse { - // info is the GroupPolicyInfo of the group policy. - GroupPolicyInfo info = 1; -} - -// QueryGroupMembersRequest is the Query/GroupMembers request type. -message QueryGroupMembersRequest { - // group_id is the unique ID of the group. - uint64 group_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. -message QueryGroupMembersResponse { - // members are the members of the group with given group_id. - repeated GroupMember members = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. -message QueryGroupsByAdminRequest { - // admin is the account address of a group's admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. -message QueryGroupsByAdminResponse { - // groups are the groups info with the provided admin. - repeated GroupInfo groups = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. -message QueryGroupPoliciesByGroupRequest { - // group_id is the unique ID of the group policy's group. - uint64 group_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. -message QueryGroupPoliciesByGroupResponse { - // group_policies are the group policies info associated with the provided group. - repeated GroupPolicyInfo group_policies = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. -message QueryGroupPoliciesByAdminRequest { - // admin is the admin address of the group policy. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. -message QueryGroupPoliciesByAdminResponse { - // group_policies are the group policies info with provided admin. - repeated GroupPolicyInfo group_policies = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryProposalRequest is the Query/Proposal request type. -message QueryProposalRequest { - // proposal_id is the unique ID of a proposal. - uint64 proposal_id = 1; -} - -// QueryProposalResponse is the Query/Proposal response type. -message QueryProposalResponse { - // proposal is the proposal info. - Proposal proposal = 1; -} - -// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. -message QueryProposalsByGroupPolicyRequest { - // address is the account address of the group policy related to proposals. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. -message QueryProposalsByGroupPolicyResponse { - // proposals are the proposals with given group policy. - repeated Proposal proposals = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. -message QueryVoteByProposalVoterRequest { - // proposal_id is the unique ID of a proposal. - uint64 proposal_id = 1; - - // voter is a proposal voter account address. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. -message QueryVoteByProposalVoterResponse { - // vote is the vote with given proposal_id and voter. - Vote vote = 1; -} - -// QueryVotesByProposalRequest is the Query/VotesByProposal request type. -message QueryVotesByProposalRequest { - // proposal_id is the unique ID of a proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesByProposalResponse is the Query/VotesByProposal response type. -message QueryVotesByProposalResponse { - // votes are the list of votes for given proposal_id. - repeated Vote votes = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVotesByVoterRequest is the Query/VotesByVoter request type. -message QueryVotesByVoterRequest { - // voter is a proposal voter account address. - string voter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesByVoterResponse is the Query/VotesByVoter response type. -message QueryVotesByVoterResponse { - // votes are the list of votes by given voter. - repeated Vote votes = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. -message QueryGroupsByMemberRequest { - // address is the group member address. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. -message QueryGroupsByMemberResponse { - // groups are the groups info with the provided group member. - repeated GroupInfo groups = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTallyResultRequest is the Query/TallyResult request type. -message QueryTallyResultRequest { - // proposal_id is the unique id of a proposal. - uint64 proposal_id = 1; -} - -// QueryTallyResultResponse is the Query/TallyResult response type. -message QueryTallyResultResponse { - // tally defines the requested tally. - TallyResult tally = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryGroupsRequest is the Query/Groups request type. -// -// Since: cosmos-sdk 0.47.1 -message QueryGroupsRequest { - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGroupsResponse is the Query/Groups response type. -// -// Since: cosmos-sdk 0.47.1 -message QueryGroupsResponse { - // `groups` is all the groups present in state. - repeated GroupInfo groups = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/group/v1/tx.proto deleted file mode 100644 index 5a5f028b..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/tx.proto +++ /dev/null @@ -1,394 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; - -package cosmos.group.v1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/any.proto"; -import "cosmos/group/v1/types.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -// Msg is the cosmos.group.v1 Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // CreateGroup creates a new group with an admin account address, a list of members and some optional metadata. - rpc CreateGroup(MsgCreateGroup) returns (MsgCreateGroupResponse); - - // UpdateGroupMembers updates the group members with given group id and admin address. - rpc UpdateGroupMembers(MsgUpdateGroupMembers) returns (MsgUpdateGroupMembersResponse); - - // UpdateGroupAdmin updates the group admin with given group id and previous admin address. - rpc UpdateGroupAdmin(MsgUpdateGroupAdmin) returns (MsgUpdateGroupAdminResponse); - - // UpdateGroupMetadata updates the group metadata with given group id and admin address. - rpc UpdateGroupMetadata(MsgUpdateGroupMetadata) returns (MsgUpdateGroupMetadataResponse); - - // CreateGroupPolicy creates a new group policy using given DecisionPolicy. - rpc CreateGroupPolicy(MsgCreateGroupPolicy) returns (MsgCreateGroupPolicyResponse); - - // CreateGroupWithPolicy creates a new group with policy. - rpc CreateGroupWithPolicy(MsgCreateGroupWithPolicy) returns (MsgCreateGroupWithPolicyResponse); - - // UpdateGroupPolicyAdmin updates a group policy admin. - rpc UpdateGroupPolicyAdmin(MsgUpdateGroupPolicyAdmin) returns (MsgUpdateGroupPolicyAdminResponse); - - // UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated. - rpc UpdateGroupPolicyDecisionPolicy(MsgUpdateGroupPolicyDecisionPolicy) - returns (MsgUpdateGroupPolicyDecisionPolicyResponse); - - // UpdateGroupPolicyMetadata updates a group policy metadata. - rpc UpdateGroupPolicyMetadata(MsgUpdateGroupPolicyMetadata) returns (MsgUpdateGroupPolicyMetadataResponse); - - // SubmitProposal submits a new proposal. - rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - - // WithdrawProposal withdraws a proposal. - rpc WithdrawProposal(MsgWithdrawProposal) returns (MsgWithdrawProposalResponse); - - // Vote allows a voter to vote on a proposal. - rpc Vote(MsgVote) returns (MsgVoteResponse); - - // Exec executes a proposal. - rpc Exec(MsgExec) returns (MsgExecResponse); - - // LeaveGroup allows a group member to leave the group. - rpc LeaveGroup(MsgLeaveGroup) returns (MsgLeaveGroupResponse); -} - -// -// Groups -// - -// MsgCreateGroup is the Msg/CreateGroup request type. -message MsgCreateGroup { - option (cosmos.msg.v1.signer) = "admin"; - option (amino.name) = "cosmos-sdk/MsgCreateGroup"; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // members defines the group members. - repeated MemberRequest members = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // metadata is any arbitrary metadata to attached to the group. - string metadata = 3; -} - -// MsgCreateGroupResponse is the Msg/CreateGroup response type. -message MsgCreateGroupResponse { - // group_id is the unique ID of the newly created group. - uint64 group_id = 1; -} - -// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. -message MsgUpdateGroupMembers { - option (cosmos.msg.v1.signer) = "admin"; - option (amino.name) = "cosmos-sdk/MsgUpdateGroupMembers"; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // member_updates is the list of members to update, - // set weight to 0 to remove a member. - repeated MemberRequest member_updates = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. -message MsgUpdateGroupMembersResponse {} - -// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. -message MsgUpdateGroupAdmin { - option (cosmos.msg.v1.signer) = "admin"; - option (amino.name) = "cosmos-sdk/MsgUpdateGroupAdmin"; - - // admin is the current account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // new_admin is the group new admin account address. - string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. -message MsgUpdateGroupAdminResponse {} - -// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. -message MsgUpdateGroupMetadata { - option (cosmos.msg.v1.signer) = "admin"; - option (amino.name) = "cosmos-sdk/MsgUpdateGroupMetadata"; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // metadata is the updated group's metadata. - string metadata = 3; -} - -// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. -message MsgUpdateGroupMetadataResponse {} - -// -// Group Policies -// - -// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. -message MsgCreateGroupPolicy { - option (cosmos.msg.v1.signer) = "admin"; - option (amino.name) = "cosmos-sdk/MsgCreateGroupPolicy"; - - option (gogoproto.goproto_getters) = false; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // metadata is any arbitrary metadata attached to the group policy. - string metadata = 3; - - // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; -} - -// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. -message MsgCreateGroupPolicyResponse { - // address is the account address of the newly created group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. -message MsgUpdateGroupPolicyAdmin { - option (cosmos.msg.v1.signer) = "admin"; - option (amino.name) = "cosmos-sdk/MsgUpdateGroupPolicyAdmin"; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_policy_address is the account address of the group policy. - string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // new_admin is the new group policy admin. - string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. -message MsgUpdateGroupPolicyAdminResponse {} - -// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. -message MsgCreateGroupWithPolicy { - option (cosmos.msg.v1.signer) = "admin"; - option (amino.name) = "cosmos-sdk/MsgCreateGroupWithPolicy"; - option (gogoproto.goproto_getters) = false; - - // admin is the account address of the group and group policy admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // members defines the group members. - repeated MemberRequest members = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // group_metadata is any arbitrary metadata attached to the group. - string group_metadata = 3; - - // group_policy_metadata is any arbitrary metadata attached to the group policy. - string group_policy_metadata = 4; - - // group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group - // and group policy admin. - bool group_policy_as_admin = 5; - - // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; -} - -// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. -message MsgCreateGroupWithPolicyResponse { - // group_id is the unique ID of the newly created group with policy. - uint64 group_id = 1; - - // group_policy_address is the account address of the newly created group policy. - string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. -message MsgUpdateGroupPolicyDecisionPolicy { - option (cosmos.msg.v1.signer) = "admin"; - option (amino.name) = "cosmos-sdk/MsgUpdateGroupDecisionPolicy"; - - option (gogoproto.goproto_getters) = false; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_policy_address is the account address of group policy. - string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // decision_policy is the updated group policy's decision policy. - google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; -} - -// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. -message MsgUpdateGroupPolicyDecisionPolicyResponse {} - -// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. -message MsgUpdateGroupPolicyMetadata { - option (cosmos.msg.v1.signer) = "admin"; - option (amino.name) = "cosmos-sdk/MsgUpdateGroupPolicyMetadata"; - - // admin is the account address of the group admin. - string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_policy_address is the account address of group policy. - string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // metadata is the group policy metadata to be updated. - string metadata = 3; -} - -// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. -message MsgUpdateGroupPolicyMetadataResponse {} - -// -// Proposals and Voting -// - -// Exec defines modes of execution of a proposal on creation or on new vote. -enum Exec { - // An empty value means that there should be a separate - // MsgExec request for the proposal to execute. - EXEC_UNSPECIFIED = 0; - - // Try to execute the proposal immediately. - // If the proposal is not allowed per the DecisionPolicy, - // the proposal will still be open and could - // be executed at a later point. - EXEC_TRY = 1; -} - -// MsgSubmitProposal is the Msg/SubmitProposal request type. -message MsgSubmitProposal { - option (cosmos.msg.v1.signer) = "proposers"; - option (amino.name) = "cosmos-sdk/group/MsgSubmitProposal"; - - option (gogoproto.goproto_getters) = false; - - // group_policy_address is the account address of group policy. - string group_policy_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // proposers are the account addresses of the proposers. - // Proposers signatures will be counted as yes votes. - repeated string proposers = 2; - - // metadata is any arbitrary metadata attached to the proposal. - string metadata = 3; - - // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. - repeated google.protobuf.Any messages = 4; - - // exec defines the mode of execution of the proposal, - // whether it should be executed immediately on creation or not. - // If so, proposers signatures are considered as Yes votes. - Exec exec = 5; - - // title is the title of the proposal. - // - // Since: cosmos-sdk 0.47 - string title = 6; - - // summary is the summary of the proposal. - // - // Since: cosmos-sdk 0.47 - string summary = 7; -} - -// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. -message MsgSubmitProposalResponse { - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; -} - -// MsgWithdrawProposal is the Msg/WithdrawProposal request type. -message MsgWithdrawProposal { - option (cosmos.msg.v1.signer) = "address"; - option (amino.name) = "cosmos-sdk/group/MsgWithdrawProposal"; - - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // address is the admin of the group policy or one of the proposer of the proposal. - string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. -message MsgWithdrawProposalResponse {} - -// MsgVote is the Msg/Vote request type. -message MsgVote { - option (cosmos.msg.v1.signer) = "voter"; - option (amino.name) = "cosmos-sdk/group/MsgVote"; - - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // voter is the voter account address. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // option is the voter's choice on the proposal. - VoteOption option = 3; - - // metadata is any arbitrary metadata attached to the vote. - string metadata = 4; - - // exec defines whether the proposal should be executed - // immediately after voting or not. - Exec exec = 5; -} - -// MsgVoteResponse is the Msg/Vote response type. -message MsgVoteResponse {} - -// MsgExec is the Msg/Exec request type. -message MsgExec { - option (cosmos.msg.v1.signer) = "executor"; - option (amino.name) = "cosmos-sdk/group/MsgExec"; - - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // executor is the account address used to execute the proposal. - string executor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgExecResponse is the Msg/Exec request type. -message MsgExecResponse { - // result is the final result of the proposal execution. - ProposalExecutorResult result = 2; -} - -// MsgLeaveGroup is the Msg/LeaveGroup request type. -message MsgLeaveGroup { - option (cosmos.msg.v1.signer) = "address"; - option (amino.name) = "cosmos-sdk/group/MsgLeaveGroup"; - - // address is the account address of the group member. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; -} - -// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. -message MsgLeaveGroupResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/types.proto b/packages/injective-protobuf/third_party/proto/cosmos/group/v1/types.proto deleted file mode 100644 index 97af45ff..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/group/v1/types.proto +++ /dev/null @@ -1,339 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; - -package cosmos.group.v1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/group"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/any.proto"; -import "amino/amino.proto"; - -// Member represents a group member with an account address, -// non-zero weight, metadata and added_at timestamp. -message Member { - // address is the member's account address. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // weight is the member's voting weight that should be greater than 0. - string weight = 2; - - // metadata is any arbitrary metadata attached to the member. - string metadata = 3; - - // added_at is a timestamp specifying when a member was added. - google.protobuf.Timestamp added_at = 4 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; -} - -// MemberRequest represents a group member to be used in Msg server requests. -// Contrary to `Member`, it doesn't have any `added_at` field -// since this field cannot be set as part of requests. -message MemberRequest { - // address is the member's account address. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // weight is the member's voting weight that should be greater than 0. - string weight = 2; - - // metadata is any arbitrary metadata attached to the member. - string metadata = 3; -} - -// ThresholdDecisionPolicy is a decision policy where a proposal passes when it -// satisfies the two following conditions: -// 1. The sum of all `YES` voter's weights is greater or equal than the defined -// `threshold`. -// 2. The voting and execution periods of the proposal respect the parameters -// given by `windows`. -message ThresholdDecisionPolicy { - option (cosmos_proto.implements_interface) = "cosmos.group.v1.DecisionPolicy"; - option (amino.name) = "cosmos-sdk/ThresholdDecisionPolicy"; - - // threshold is the minimum weighted sum of `YES` votes that must be met or - // exceeded for a proposal to succeed. - string threshold = 1; - - // windows defines the different windows for voting and execution. - DecisionPolicyWindows windows = 2; -} - -// PercentageDecisionPolicy is a decision policy where a proposal passes when -// it satisfies the two following conditions: -// 1. The percentage of all `YES` voters' weights out of the total group weight -// is greater or equal than the given `percentage`. -// 2. The voting and execution periods of the proposal respect the parameters -// given by `windows`. -message PercentageDecisionPolicy { - option (cosmos_proto.implements_interface) = "cosmos.group.v1.DecisionPolicy"; - option (amino.name) = "cosmos-sdk/PercentageDecisionPolicy"; - - // percentage is the minimum percentage of the weighted sum of `YES` votes must - // meet for a proposal to succeed. - string percentage = 1; - - // windows defines the different windows for voting and execution. - DecisionPolicyWindows windows = 2; -} - -// DecisionPolicyWindows defines the different windows for voting and execution. -message DecisionPolicyWindows { - // voting_period is the duration from submission of a proposal to the end of voting period - // Within this times votes can be submitted with MsgVote. - google.protobuf.Duration voting_period = 1 - [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // min_execution_period is the minimum duration after the proposal submission - // where members can start sending MsgExec. This means that the window for - // sending a MsgExec transaction is: - // `[ submission + min_execution_period ; submission + voting_period + max_execution_period]` - // where max_execution_period is a app-specific config, defined in the keeper. - // If not set, min_execution_period will default to 0. - // - // Please make sure to set a `min_execution_period` that is smaller than - // `voting_period + max_execution_period`, or else the above execution window - // is empty, meaning that all proposals created with this decision policy - // won't be able to be executed. - google.protobuf.Duration min_execution_period = 2 - [(gogoproto.stdduration) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// VoteOption enumerates the valid vote options for a given proposal. -enum VoteOption { - option (gogoproto.goproto_enum_prefix) = false; - - // VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will - // return an error. - VOTE_OPTION_UNSPECIFIED = 0; - // VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_YES = 1; - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_ABSTAIN = 2; - // VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO = 3; - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VOTE_OPTION_NO_WITH_VETO = 4; -} - -// -// State -// - -// GroupInfo represents the high-level on-chain information for a group. -message GroupInfo { - // id is the unique ID of the group. - uint64 id = 1; - - // admin is the account address of the group's admin. - string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // metadata is any arbitrary metadata to attached to the group. - // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#group-1 - string metadata = 3; - - // version is used to track changes to a group's membership structure that - // would break existing proposals. Whenever any members weight is changed, - // or any member is added or removed this version is incremented and will - // cause proposals based on older versions of this group to fail - uint64 version = 4; - - // total_weight is the sum of the group members' weights. - string total_weight = 5; - - // created_at is a timestamp specifying when a group was created. - google.protobuf.Timestamp created_at = 6 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; -} - -// GroupMember represents the relationship between a group and a member. -message GroupMember { - // group_id is the unique ID of the group. - uint64 group_id = 1; - - // member is the member data. - Member member = 2; -} - -// GroupPolicyInfo represents the high-level on-chain information for a group policy. -message GroupPolicyInfo { - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - - // address is the account address of group policy. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // group_id is the unique ID of the group. - uint64 group_id = 2; - - // admin is the account address of the group admin. - string admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // metadata is any arbitrary metadata attached to the group policy. - // the recommended format of the metadata is to be found here: - // https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 - string metadata = 4; - - // version is used to track changes to a group's GroupPolicyInfo structure that - // would create a different result on a running proposal. - uint64 version = 5; - - // decision_policy specifies the group policy's decision policy. - google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"]; - - // created_at is a timestamp specifying when a group policy was created. - google.protobuf.Timestamp created_at = 7 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; -} - -// Proposal defines a group proposal. Any member of a group can submit a proposal -// for a group policy to decide upon. -// A proposal consists of a set of `sdk.Msg`s that will be executed if the proposal -// passes as well as some optional metadata associated with the proposal. -message Proposal { - option (gogoproto.goproto_getters) = false; - - // id is the unique id of the proposal. - uint64 id = 1; - - // group_policy_address is the account address of group policy. - string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // metadata is any arbitrary metadata attached to the proposal. - // the recommended format of the metadata is to be found here: - // https://docs.cosmos.network/v0.47/modules/group#proposal-4 - string metadata = 3; - - // proposers are the account addresses of the proposers. - repeated string proposers = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // submit_time is a timestamp specifying when a proposal was submitted. - google.protobuf.Timestamp submit_time = 5 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; - - // group_version tracks the version of the group at proposal submission. - // This field is here for informational purposes only. - uint64 group_version = 6; - - // group_policy_version tracks the version of the group policy at proposal submission. - // When a decision policy is changed, existing proposals from previous policy - // versions will become invalid with the `ABORTED` status. - // This field is here for informational purposes only. - uint64 group_policy_version = 7; - - // status represents the high level position in the life cycle of the proposal. Initial value is Submitted. - ProposalStatus status = 8; - - // final_tally_result contains the sums of all weighted votes for this - // proposal for each vote option. It is empty at submission, and only - // populated after tallying, at voting period end or at proposal execution, - // whichever happens first. - TallyResult final_tally_result = 9 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // voting_period_end is the timestamp before which voting must be done. - // Unless a successful MsgExec is called before (to execute a proposal whose - // tally is successful before the voting period ends), tallying will be done - // at this point, and the `final_tally_result`and `status` fields will be - // accordingly updated. - google.protobuf.Timestamp voting_period_end = 10 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; - - // executor_result is the final result of the proposal execution. Initial value is NotRun. - ProposalExecutorResult executor_result = 11; - - // messages is a list of `sdk.Msg`s that will be executed if the proposal passes. - repeated google.protobuf.Any messages = 12; - - // title is the title of the proposal - // - // Since: cosmos-sdk 0.47 - string title = 13; - - // summary is a short summary of the proposal - // - // Since: cosmos-sdk 0.47 - string summary = 14; -} - -// ProposalStatus defines proposal statuses. -enum ProposalStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // An empty value is invalid and not allowed. - PROPOSAL_STATUS_UNSPECIFIED = 0; - - // Initial status of a proposal when submitted. - PROPOSAL_STATUS_SUBMITTED = 1; - - // Final status of a proposal when the final tally is done and the outcome - // passes the group policy's decision policy. - PROPOSAL_STATUS_ACCEPTED = 2; - - // Final status of a proposal when the final tally is done and the outcome - // is rejected by the group policy's decision policy. - PROPOSAL_STATUS_REJECTED = 3; - - // Final status of a proposal when the group policy is modified before the - // final tally. - PROPOSAL_STATUS_ABORTED = 4; - - // A proposal can be withdrawn before the voting start time by the owner. - // When this happens the final status is Withdrawn. - PROPOSAL_STATUS_WITHDRAWN = 5; -} - -// ProposalExecutorResult defines types of proposal executor results. -enum ProposalExecutorResult { - option (gogoproto.goproto_enum_prefix) = false; - - // An empty value is not allowed. - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED = 0; - - // We have not yet run the executor. - PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1; - - // The executor was successful and proposed action updated state. - PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2; - - // The executor returned an error and proposed action didn't update state. - PROPOSAL_EXECUTOR_RESULT_FAILURE = 3; -} - -// TallyResult represents the sum of weighted votes for each vote option. -message TallyResult { - option (gogoproto.goproto_getters) = false; - - // yes_count is the weighted sum of yes votes. - string yes_count = 1; - - // abstain_count is the weighted sum of abstainers. - string abstain_count = 2; - - // no_count is the weighted sum of no votes. - string no_count = 3; - - // no_with_veto_count is the weighted sum of veto. - string no_with_veto_count = 4; -} - -// Vote represents a vote for a proposal.string metadata -message Vote { - // proposal is the unique ID of the proposal. - uint64 proposal_id = 1; - - // voter is the account address of the voter. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // option is the voter's choice on the proposal. - VoteOption option = 3; - - // metadata is any arbitrary metadata attached to the vote. - // the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/group#vote-2 - string metadata = 4; - - // submit_time is the timestamp when the vote was submitted. - google.protobuf.Timestamp submit_time = 5 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/mint/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/mint/module/v1/module.proto deleted file mode 100644 index 2ea1ef3d..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/mint/module/v1/module.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package cosmos.mint.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the mint module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/mint" - }; - - string fee_collector_name = 1; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/genesis.proto deleted file mode 100644 index b6cc1504..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/genesis.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/mint/v1beta1/mint.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -// GenesisState defines the mint module's genesis state. -message GenesisState { - // minter is a space for holding current inflation information. - Minter minter = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // params defines all the parameters of the module. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/mint.proto b/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/mint.proto deleted file mode 100644 index 440a392d..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/mint.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -// Minter represents the minting state. -message Minter { - // current annual inflation rate - string inflation = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // current annual expected provisions - string annual_provisions = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// Params defines the parameters for the x/mint module. -message Params { - option (amino.name) = "cosmos-sdk/x/mint/Params"; - - // type of coin to mint - string mint_denom = 1; - // maximum annual change in inflation rate - string inflation_rate_change = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - // maximum inflation rate - string inflation_max = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - // minimum inflation rate - string inflation_min = 4 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - // goal of percent bonded atoms - string goal_bonded = 5 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - // expected blocks per year - uint64 blocks_per_year = 6; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/query.proto deleted file mode 100644 index db5c90fb..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/query.proto +++ /dev/null @@ -1,68 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/mint/v1beta1/mint.proto"; -import "amino/amino.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -// Query provides defines the gRPC querier service. -service Query { - // Params returns the total set of minting parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/params"; - } - - // Inflation returns the current minting inflation value. - rpc Inflation(QueryInflationRequest) returns (QueryInflationResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/inflation"; - } - - // AnnualProvisions current minting annual provisions value. - rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryInflationRequest is the request type for the Query/Inflation RPC method. -message QueryInflationRequest {} - -// QueryInflationResponse is the response type for the Query/Inflation RPC -// method. -message QueryInflationResponse { - // inflation is the current minting inflation value. - bytes inflation = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} - -// QueryAnnualProvisionsRequest is the request type for the -// Query/AnnualProvisions RPC method. -message QueryAnnualProvisionsRequest {} - -// QueryAnnualProvisionsResponse is the response type for the -// Query/AnnualProvisions RPC method. -message QueryAnnualProvisionsResponse { - // annual_provisions is the current minting annual provisions value. - bytes annual_provisions = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/tx.proto deleted file mode 100644 index ec71fb73..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/mint/v1beta1/tx.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; -import "cosmos/mint/v1beta1/mint.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -// Msg defines the x/mint Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // UpdateParams defines a governance operation for updating the x/mint module - // parameters. The authority is defaults to the x/gov module account. - // - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/mint/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // params defines the x/mint parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/msg/textual/v1/textual.proto b/packages/injective-protobuf/third_party/proto/cosmos/msg/textual/v1/textual.proto deleted file mode 100644 index 4f8cd141..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/msg/textual/v1/textual.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package cosmos.msg.textual.v1; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.MessageOptions { - // expert_custom_renderer is an informative identifier to reference the - // algorithm used to generate the custom textual representation of the - // protobuf message where this annotation is applied. We recommend to use a - // short, versioned name as this identifier, e.g. "replace_with_username_v1". - // We also recommand providing a human-readable description as protobuf - // comments on this annotation, for example a short specification or a link - // to the relevant documentation. - // - // Also see the section on Custom Message Renderers in ADR-050. - string expert_custom_renderer = 11110009; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/msg/v1/msg.proto b/packages/injective-protobuf/third_party/proto/cosmos/msg/v1/msg.proto deleted file mode 100644 index 853efa1f..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/msg/v1/msg.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package cosmos.msg.v1; - -import "google/protobuf/descriptor.proto"; - -// TODO(fdymylja): once we fully migrate to protov2 the go_package needs to be updated. -// We need this right now because gogoproto codegen needs to import the extension. -option go_package = "github.com/cosmos/cosmos-sdk/types/msgservice"; - -extend google.protobuf.ServiceOptions { - // service indicates that the service is a Msg service and that requests - // must be transported via blockchain transactions rather than gRPC. - // Tooling can use this annotation to distinguish between Msg services and - // other types of services via reflection. - bool service = 11110000; -} - -extend google.protobuf.MessageOptions { - // signer must be used in cosmos messages in order - // to signal to external clients which fields in a - // given cosmos message must be filled with signer - // information (address). - // The field must be the protobuf name of the message - // field extended with this MessageOption. - // The field must either be of string kind, or of message - // kind in case the signer information is contained within - // a message inside the cosmos message. - repeated string signer = 11110000; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/nft/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/nft/module/v1/module.proto deleted file mode 100644 index a5c2c634..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/nft/module/v1/module.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package cosmos.nft.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the nft module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/x/nft" - }; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/event.proto b/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/event.proto deleted file mode 100644 index d2cb29d2..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/event.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -option go_package = "cosmossdk.io/x/nft"; - -// EventSend is emitted on Msg/Send -message EventSend { - // class_id associated with the nft - string class_id = 1; - - // id is a unique identifier of the nft - string id = 2; - - // sender is the address of the owner of nft - string sender = 3; - - // receiver is the receiver address of nft - string receiver = 4; -} - -// EventMint is emitted on Mint -message EventMint { - // class_id associated with the nft - string class_id = 1; - - // id is a unique identifier of the nft - string id = 2; - - // owner is the owner address of the nft - string owner = 3; -} - -// EventBurn is emitted on Burn -message EventBurn { - // class_id associated with the nft - string class_id = 1; - - // id is a unique identifier of the nft - string id = 2; - - // owner is the owner address of the nft - string owner = 3; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/genesis.proto deleted file mode 100644 index 441b48b1..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/genesis.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -import "cosmos/nft/v1beta1/nft.proto"; - -option go_package = "cosmossdk.io/x/nft"; - -// GenesisState defines the nft module's genesis state. -message GenesisState { - // class defines the class of the nft type. - repeated cosmos.nft.v1beta1.Class classes = 1; - - // entry defines all nft owned by a person. - repeated Entry entries = 2; -} - -// Entry Defines all nft owned by a person -message Entry { - // owner is the owner address of the following nft - string owner = 1; - - // nfts is a group of nfts of the same owner - repeated cosmos.nft.v1beta1.NFT nfts = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/nft.proto b/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/nft.proto deleted file mode 100644 index 4234bd42..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/nft.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -import "google/protobuf/any.proto"; - -option go_package = "cosmossdk.io/x/nft"; - -// Class defines the class of the nft type. -message Class { - // id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 - string id = 1; - - // name defines the human-readable name of the NFT classification. Optional - string name = 2; - - // symbol is an abbreviated name for nft classification. Optional - string symbol = 3; - - // description is a brief description of nft classification. Optional - string description = 4; - - // uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional - string uri = 5; - - // uri_hash is a hash of the document pointed by uri. Optional - string uri_hash = 6; - - // data is the app specific metadata of the NFT class. Optional - google.protobuf.Any data = 7; -} - -// NFT defines the NFT. -message NFT { - // class_id associated with the NFT, similar to the contract address of ERC721 - string class_id = 1; - - // id is a unique identifier of the NFT - string id = 2; - - // uri for the NFT metadata stored off chain - string uri = 3; - - // uri_hash is a hash of the document pointed by uri - string uri_hash = 4; - - // data is an app specific data of the NFT. Optional - google.protobuf.Any data = 10; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/query.proto deleted file mode 100644 index bdc794ff..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/query.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; -import "cosmos/nft/v1beta1/nft.proto"; - -option go_package = "cosmossdk.io/x/nft"; - -// Query defines the gRPC querier service. -service Query { - // Balance queries the number of NFTs of a given class owned by the owner, same as balanceOf in ERC721 - rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/balance/{owner}/{class_id}"; - } - - // Owner queries the owner of the NFT based on its class and id, same as ownerOf in ERC721 - rpc Owner(QueryOwnerRequest) returns (QueryOwnerResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/owner/{class_id}/{id}"; - } - - // Supply queries the number of NFTs from the given class, same as totalSupply of ERC721. - rpc Supply(QuerySupplyRequest) returns (QuerySupplyResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/supply/{class_id}"; - } - - // NFTs queries all NFTs of a given class or owner,choose at least one of the two, similar to tokenByIndex in - // ERC721Enumerable - rpc NFTs(QueryNFTsRequest) returns (QueryNFTsResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/nfts"; - } - - // NFT queries an NFT based on its class and id. - rpc NFT(QueryNFTRequest) returns (QueryNFTResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/nfts/{class_id}/{id}"; - } - - // Class queries an NFT class based on its id - rpc Class(QueryClassRequest) returns (QueryClassResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/classes/{class_id}"; - } - - // Classes queries all NFT classes - rpc Classes(QueryClassesRequest) returns (QueryClassesResponse) { - option (google.api.http).get = "/cosmos/nft/v1beta1/classes"; - } -} - -// QueryBalanceRequest is the request type for the Query/Balance RPC method -message QueryBalanceRequest { - // class_id associated with the nft - string class_id = 1; - - // owner is the owner address of the nft - string owner = 2; -} - -// QueryBalanceResponse is the response type for the Query/Balance RPC method -message QueryBalanceResponse { - // amount is the number of all NFTs of a given class owned by the owner - uint64 amount = 1; -} - -// QueryOwnerRequest is the request type for the Query/Owner RPC method -message QueryOwnerRequest { - // class_id associated with the nft - string class_id = 1; - - // id is a unique identifier of the NFT - string id = 2; -} - -// QueryOwnerResponse is the response type for the Query/Owner RPC method -message QueryOwnerResponse { - // owner is the owner address of the nft - string owner = 1; -} - -// QuerySupplyRequest is the request type for the Query/Supply RPC method -message QuerySupplyRequest { - // class_id associated with the nft - string class_id = 1; -} - -// QuerySupplyResponse is the response type for the Query/Supply RPC method -message QuerySupplyResponse { - // amount is the number of all NFTs from the given class - uint64 amount = 1; -} - -// QueryNFTstRequest is the request type for the Query/NFTs RPC method -message QueryNFTsRequest { - // class_id associated with the nft - string class_id = 1; - - // owner is the owner address of the nft - string owner = 2; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 3; -} - -// QueryNFTsResponse is the response type for the Query/NFTs RPC methods -message QueryNFTsResponse { - // NFT defines the NFT - repeated cosmos.nft.v1beta1.NFT nfts = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryNFTRequest is the request type for the Query/NFT RPC method -message QueryNFTRequest { - // class_id associated with the nft - string class_id = 1; - - // id is a unique identifier of the NFT - string id = 2; -} - -// QueryNFTResponse is the response type for the Query/NFT RPC method -message QueryNFTResponse { - // owner is the owner address of the nft - cosmos.nft.v1beta1.NFT nft = 1; -} - -// QueryClassRequest is the request type for the Query/Class RPC method -message QueryClassRequest { - // class_id associated with the nft - string class_id = 1; -} - -// QueryClassResponse is the response type for the Query/Class RPC method -message QueryClassResponse { - // class defines the class of the nft type. - cosmos.nft.v1beta1.Class class = 1; -} - -// QueryClassesRequest is the request type for the Query/Classes RPC method -message QueryClassesRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryClassesResponse is the response type for the Query/Classes RPC method -message QueryClassesResponse { - // class defines the class of the nft type. - repeated cosmos.nft.v1beta1.Class classes = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/tx.proto deleted file mode 100644 index 9eecfdd2..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/nft/v1beta1/tx.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package cosmos.nft.v1beta1; - -option go_package = "cosmossdk.io/x/nft"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; - -// Msg defines the nft Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // Send defines a method to send a nft from one account to another account. - rpc Send(MsgSend) returns (MsgSendResponse); -} - -// MsgSend represents a message to send a nft from one account to another account. -message MsgSend { - option (cosmos.msg.v1.signer) = "sender"; - - // class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 - string class_id = 1; - - // id defines the unique identification of nft - string id = 2; - - // sender is the address of the owner of nft - string sender = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // receiver is the receiver address of nft - string receiver = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} -// MsgSendResponse defines the Msg/Send response type. -message MsgSendResponse {} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/orm/module/v1alpha1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/orm/module/v1alpha1/module.proto deleted file mode 100644 index 260db369..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/orm/module/v1alpha1/module.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; - -package cosmos.orm.module.v1alpha1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module defines the ORM module which adds providers to the app container for -// ORM ModuleDB's and in the future will automatically register query -// services for modules that use the ORM. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/orm" - }; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/orm/query/v1alpha1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/orm/query/v1alpha1/query.proto deleted file mode 100644 index 4500e99d..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/orm/query/v1alpha1/query.proto +++ /dev/null @@ -1,131 +0,0 @@ -syntax = "proto3"; - -package cosmos.orm.query.v1alpha1; - -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/any.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -// Query is a generic gRPC service for querying ORM data. -service Query { - - // Get queries an ORM table against an unique index. - rpc Get(GetRequest) returns (GetResponse); - - // List queries an ORM table against an index. - rpc List(ListRequest) returns (ListResponse); -} - -// GetRequest is the Query/Get request type. -message GetRequest { - // message_name is the fully-qualified message name of the ORM table being queried. - string message_name = 1; - - // index is the index fields expression used in orm definitions. If it - // is empty, the table's primary key is assumed. If it is non-empty, it must - // refer to an unique index. - string index = 2; - - // values are the values of the fields corresponding to the requested index. - // There must be as many values provided as there are fields in the index and - // these values must correspond to the index field types. - repeated IndexValue values = 3; -} - -// GetResponse is the Query/Get response type. -message GetResponse { - - // result is the result of the get query. If no value is found, the gRPC - // status code NOT_FOUND will be returned. - google.protobuf.Any result = 1; -} - -// ListRequest is the Query/List request type. -message ListRequest { - // message_name is the fully-qualified message name of the ORM table being queried. - string message_name = 1; - - // index is the index fields expression used in orm definitions. If it - // is empty, the table's primary key is assumed. - string index = 2; - - // query is the query expression corresponding to the provided index. If - // neither prefix nor range is specified, the query will list all the fields - // in the index. - oneof query { - - // prefix defines a prefix query. - Prefix prefix = 3; - - // range defines a range query. - Range range = 4; - } - - // pagination is the pagination request. - cosmos.base.query.v1beta1.PageRequest pagination = 5; - - // Prefix specifies the arguments to a prefix query. - message Prefix { - // values specifies the index values for the prefix query. - // It is valid to special a partial prefix with fewer values than - // the number of fields in the index. - repeated IndexValue values = 1; - } - - // Range specifies the arguments to a range query. - message Range { - // start specifies the starting index values for the range query. - // It is valid to provide fewer values than the number of fields in the - // index. - repeated IndexValue start = 1; - - // end specifies the inclusive ending index values for the range query. - // It is valid to provide fewer values than the number of fields in the - // index. - repeated IndexValue end = 2; - } -} - -// ListResponse is the Query/List response type. -message ListResponse { - - // results are the results of the query. - repeated google.protobuf.Any results = 1; - - // pagination is the pagination response. - cosmos.base.query.v1beta1.PageResponse pagination = 5; -} - -// IndexValue represents the value of a field in an ORM index expression. -message IndexValue { - - // value specifies the index value - oneof value { - // uint specifies a value for an uint32, fixed32, uint64, or fixed64 - // index field. - uint64 uint = 1; - - // int64 specifies a value for an int32, sfixed32, int64, or sfixed64 - // index field. - int64 int = 2; - - // str specifies a value for a string index field. - string str = 3; - - // bytes specifies a value for a bytes index field. - bytes bytes = 4; - - // enum specifies a value for an enum index field. - string enum = 5; - - // bool specifies a value for a bool index field. - bool bool = 6; - - // timestamp specifies a value for a timestamp index field. - google.protobuf.Timestamp timestamp = 7; - - // duration specifies a value for a duration index field. - google.protobuf.Duration duration = 8; - } -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/orm/v1/orm.proto b/packages/injective-protobuf/third_party/proto/cosmos/orm/v1/orm.proto deleted file mode 100644 index e8509392..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/orm/v1/orm.proto +++ /dev/null @@ -1,107 +0,0 @@ -syntax = "proto3"; - -package cosmos.orm.v1; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.MessageOptions { - - // table specifies that this message will be used as an ORM table. It cannot - // be used together with the singleton option. - TableDescriptor table = 104503790; - - // singleton specifies that this message will be used as an ORM singleton. It cannot - // be used together with the table option. - SingletonDescriptor singleton = 104503791; -} - -// TableDescriptor describes an ORM table. -message TableDescriptor { - - // primary_key defines the primary key for the table. - PrimaryKeyDescriptor primary_key = 1; - - // index defines one or more secondary indexes. - repeated SecondaryIndexDescriptor index = 2; - - // id is a non-zero integer ID that must be unique within the - // tables and singletons in this file. It may be deprecated in the future when this - // can be auto-generated. - uint32 id = 3; -} - -// PrimaryKeyDescriptor describes a table primary key. -message PrimaryKeyDescriptor { - - // fields is a comma-separated list of fields in the primary key. Spaces are - // not allowed. Supported field types, their encodings, and any applicable constraints - // are described below. - // - uint32 are encoded as 2,3,4 or 5 bytes using a compact encoding that - // is suitable for sorted iteration (not varint encoding). This type is - // well-suited for small integers. - // - uint64 are encoded as 2,4,6 or 9 bytes using a compact encoding that - // is suitable for sorted iteration (not varint encoding). This type is - // well-suited for small integers such as auto-incrementing sequences. - // - fixed32, fixed64 are encoded as big-endian fixed width bytes and support - // sorted iteration. These types are well-suited for encoding fixed with - // decimals as integers. - // - string's are encoded as raw bytes in terminal key segments and null-terminated - // in non-terminal segments. Null characters are thus forbidden in strings. - // string fields support sorted iteration. - // - bytes are encoded as raw bytes in terminal segments and length-prefixed - // with a 32-bit unsigned varint in non-terminal segments. - // - int32, sint32, int64, sint64, sfixed32, sfixed64 are encoded as fixed width bytes with - // an encoding that enables sorted iteration. - // - google.protobuf.Timestamp is encoded such that values with only seconds occupy 6 bytes, - // values including nanos occupy 9 bytes, and nil values occupy 1 byte. When iterating, nil - // values will always be ordered last. Seconds and nanos values must conform to the officially - // specified ranges of 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z and 0 to 999,999,999 respectively. - // - google.protobuf.Duration is encoded as 12 bytes using an encoding that enables sorted iteration. - // - enum fields are encoded using varint encoding and do not support sorted - // iteration. - // - bool fields are encoded as a single byte 0 or 1. - // - // All other fields types are unsupported in keys including repeated and - // oneof fields. - // - // Primary keys are prefixed by the varint encoded table id and the byte 0x0 - // plus any additional prefix specified by the schema. - string fields = 1; - - // auto_increment specifies that the primary key is generated by an - // auto-incrementing integer. If this is set to true fields must only - // contain one field of that is of type uint64. - bool auto_increment = 2; -} - -// PrimaryKeyDescriptor describes a table secondary index. -message SecondaryIndexDescriptor { - - // fields is a comma-separated list of fields in the index. The supported - // field types are the same as those for PrimaryKeyDescriptor.fields. - // Index keys are prefixed by the varint encoded table id and the varint - // encoded index id plus any additional prefix specified by the schema. - // - // In addition the field segments, non-unique index keys are suffixed with - // any additional primary key fields not present in the index fields so that the - // primary key can be reconstructed. Unique indexes instead of being suffixed - // store the remaining primary key fields in the value.. - string fields = 1; - - // id is a non-zero integer ID that must be unique within the indexes for this - // table and less than 32768. It may be deprecated in the future when this can - // be auto-generated. - uint32 id = 2; - - // unique specifies that this an unique index. - bool unique = 3; -} - -// TableDescriptor describes an ORM singleton table which has at most one instance. -message SingletonDescriptor { - - // id is a non-zero integer ID that must be unique within the - // tables and singletons in this file. It may be deprecated in the future when this - // can be auto-generated. - uint32 id = 1; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/orm/v1alpha1/schema.proto b/packages/injective-protobuf/third_party/proto/cosmos/orm/v1alpha1/schema.proto deleted file mode 100644 index cbe90de3..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/orm/v1alpha1/schema.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; - -package cosmos.orm.v1alpha1; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.MessageOptions { - // module_schema is used to define the ORM schema for an app module. - // All module config messages that use module_schema must also declare - // themselves as app module config messages using the cosmos.app.v1.is_module - // option. - ModuleSchemaDescriptor module_schema = 104503792; -} - -// ModuleSchemaDescriptor describe's a module's ORM schema. -message ModuleSchemaDescriptor { - repeated FileEntry schema_file = 1; - - // FileEntry describes an ORM file used in a module. - message FileEntry { - // id is a prefix that will be varint encoded and prepended to all the - // table keys specified in the file's tables. - uint32 id = 1; - - // proto_file_name is the name of a file .proto in that contains - // table definitions. The .proto file must be in a package that the - // module has referenced using cosmos.app.v1.ModuleDescriptor.use_package. - string proto_file_name = 2; - - // storage_type optionally indicates the type of storage this file's - // tables should used. If it is left unspecified, the default KV-storage - // of the app will be used. - StorageType storage_type = 3; - } - - // prefix is an optional prefix that precedes all keys in this module's - // store. - bytes prefix = 2; -} - -// StorageType -enum StorageType { - // STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent storage where all - // data is stored in the regular Merkle-tree backed KV-store. - STORAGE_TYPE_DEFAULT_UNSPECIFIED = 0; - - // STORAGE_TYPE_MEMORY indicates in-memory storage that will be - // reloaded every time an app restarts. Tables with this type of storage - // will by default be ignored when importing and exporting a module's - // state from JSON. - STORAGE_TYPE_MEMORY = 1; - - // STORAGE_TYPE_TRANSIENT indicates transient storage that is reset - // at the end of every block. Tables with this type of storage - // will by default be ignored when importing and exporting a module's - // state from JSON. - STORAGE_TYPE_TRANSIENT = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/params/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/params/module/v1/module.proto deleted file mode 100644 index 75e7f995..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/params/module/v1/module.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package cosmos.params.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the params module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/params" - }; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/params/v1beta1/params.proto b/packages/injective-protobuf/third_party/proto/cosmos/params/v1beta1/params.proto deleted file mode 100644 index c8efa131..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/params/v1beta1/params.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; -package cosmos.params.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -// ParameterChangeProposal defines a proposal to change one or more parameters. -message ParameterChangeProposal { - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - option (amino.name) = "cosmos-sdk/ParameterChangeProposal"; - - string title = 1; - string description = 2; - repeated ParamChange changes = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// ParamChange defines an individual parameter change, for use in -// ParameterChangeProposal. -message ParamChange { - string subspace = 1; - string key = 2; - string value = 3; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/params/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/params/v1beta1/query.proto deleted file mode 100644 index 827422ea..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/params/v1beta1/query.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; -package cosmos.params.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/params/v1beta1/params.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; - -// Query defines the gRPC querier service. -service Query { - // Params queries a specific parameter of a module, given its subspace and - // key. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/params/v1beta1/params"; - } - - // Subspaces queries for all registered subspaces and all keys for a subspace. - // - // Since: cosmos-sdk 0.46 - rpc Subspaces(QuerySubspacesRequest) returns (QuerySubspacesResponse) { - option (google.api.http).get = "/cosmos/params/v1beta1/subspaces"; - } -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest { - // subspace defines the module to query the parameter for. - string subspace = 1; - - // key defines the key of the parameter in the subspace. - string key = 2; -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // param defines the queried parameter. - ParamChange param = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QuerySubspacesRequest defines a request type for querying for all registered -// subspaces and all keys for a subspace. -// -// Since: cosmos-sdk 0.46 -message QuerySubspacesRequest {} - -// QuerySubspacesResponse defines the response types for querying for all -// registered subspaces and all keys for a subspace. -// -// Since: cosmos-sdk 0.46 -message QuerySubspacesResponse { - repeated Subspace subspaces = 1; -} - -// Subspace defines a parameter subspace name and all the keys that exist for -// the subspace. -// -// Since: cosmos-sdk 0.46 -message Subspace { - string subspace = 1; - repeated string keys = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/query/v1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/query/v1/query.proto deleted file mode 100644 index e42e73d7..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/query/v1/query.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package cosmos.query.v1; - -import "google/protobuf/descriptor.proto"; - -// TODO: once we fully migrate to protov2 the go_package needs to be updated. -// We need this right now because gogoproto codegen needs to import the extension. -option go_package = "github.com/cosmos/cosmos-sdk/types/query"; - -extend google.protobuf.MethodOptions { - // module_query_safe is set to true when the query is safe to be called from - // within the state machine, for example from another module's Keeper, via - // ADR-033 calls or from CosmWasm contracts. - // Concretely, it means that the query is: - // 1. deterministic: given a block height, returns the exact same response - // upon multiple calls; and doesn't introduce any state-machine-breaking - // changes across SDK patch version. - // 2. consumes gas correctly. - // - // If you are a module developer and want to add this annotation to one of - // your own queries, please make sure that the corresponding query: - // 1. is deterministic and won't introduce state-machine-breaking changes - // without a coordinated upgrade path, - // 2. has its gas tracked, to avoid the attack vector where no gas is - // accounted for on potentially high-computation queries. - // - // For queries that potentially consume a large amount of gas (for example - // those with pagination, if the pagination field is incorrectly set), we - // also recommend adding Protobuf comments to warn module developers - // consuming these queries. - // - // When set to true, the query can safely be called - bool module_query_safe = 11110001; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/reflection/v1/reflection.proto b/packages/injective-protobuf/third_party/proto/cosmos/reflection/v1/reflection.proto deleted file mode 100644 index 1f575b83..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/reflection/v1/reflection.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package cosmos.reflection.v1; - -import "google/protobuf/descriptor.proto"; -import "cosmos/query/v1/query.proto"; - -// Package cosmos.reflection.v1 provides support for inspecting protobuf -// file descriptors. -service ReflectionService { - // FileDescriptors queries all the file descriptors in the app in order - // to enable easier generation of dynamic clients. - rpc FileDescriptors(FileDescriptorsRequest) returns (FileDescriptorsResponse) { - // NOTE: file descriptors SHOULD NOT be part of consensus because they - // include changes to doc commands and module_query_safe should be kept as false. - option (cosmos.query.v1.module_query_safe) = false; - } -} - -// FileDescriptorsRequest is the Query/FileDescriptors request type. -message FileDescriptorsRequest {} - -// FileDescriptorsResponse is the Query/FileDescriptors response type. -message FileDescriptorsResponse { - // files is the file descriptors. - repeated google.protobuf.FileDescriptorProto files = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/slashing/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/slashing/module/v1/module.proto deleted file mode 100644 index 52433075..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/slashing/module/v1/module.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package cosmos.slashing.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the slashing module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/slashing" - }; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/genesis.proto deleted file mode 100644 index a2f516bb..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/genesis.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -// GenesisState defines the slashing module's genesis state. -message GenesisState { - // params defines all the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // signing_infos represents a map between validator addresses and their - // signing infos. - repeated SigningInfo signing_infos = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // missed_blocks represents a map between validator addresses and their - // missed blocks. - repeated ValidatorMissedBlocks missed_blocks = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// SigningInfo stores validator signing info of corresponding address. -message SigningInfo { - // address is the validator address. - string address = 1 [(cosmos_proto.scalar) = "cosmos.ConsensusAddressString"]; - // validator_signing_info represents the signing info of this validator. - ValidatorSigningInfo validator_signing_info = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// ValidatorMissedBlocks contains array of missed blocks of corresponding -// address. -message ValidatorMissedBlocks { - // address is the validator address. - string address = 1 [(cosmos_proto.scalar) = "cosmos.ConsensusAddressString"]; - // missed_blocks is an array of missed blocks by the validator. - repeated MissedBlock missed_blocks = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MissedBlock contains height and missed status as boolean. -message MissedBlock { - // index is the height at which the block was missed. - int64 index = 1; - // missed is the missed status. - bool missed = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/query.proto deleted file mode 100644 index e7279709..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/query.proto +++ /dev/null @@ -1,66 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; - -// Query provides defines the gRPC querier service -service Query { - // Params queries the parameters of slashing module - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/params"; - } - - // SigningInfo queries the signing info of given cons address - rpc SigningInfo(QuerySigningInfoRequest) returns (QuerySigningInfoResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos/{cons_address}"; - } - - // SigningInfos queries signing info of all validators - rpc SigningInfos(QuerySigningInfosRequest) returns (QuerySigningInfosResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method -message QueryParamsResponse { - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC -// method -message QuerySigningInfoRequest { - // cons_address is the address to query signing info of - string cons_address = 1 [(cosmos_proto.scalar) = "cosmos.ConsensusAddressString"]; -} - -// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -// method -message QuerySigningInfoResponse { - // val_signing_info is the signing info of requested val cons address - ValidatorSigningInfo val_signing_info = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC -// method -message QuerySigningInfosRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -// method -message QuerySigningInfosResponse { - // info is the signing info of all validators - repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/slashing.proto b/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/slashing.proto deleted file mode 100644 index ae2f2135..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/slashing.proto +++ /dev/null @@ -1,68 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -// ValidatorSigningInfo defines a validator's signing info for monitoring their -// liveness activity. -message ValidatorSigningInfo { - option (gogoproto.equal) = true; - - string address = 1 [(cosmos_proto.scalar) = "cosmos.ConsensusAddressString"]; - // Height at which validator was first a candidate OR was un-jailed - int64 start_height = 2; - // Index which is incremented every time a validator is bonded in a block and - // _may_ have signed a pre-commit or not. This in conjunction with the - // signed_blocks_window param determines the index in the missed block bitmap. - int64 index_offset = 3; - // Timestamp until which the validator is jailed due to liveness downtime. - google.protobuf.Timestamp jailed_until = 4 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - // Whether or not a validator has been tombstoned (killed out of validator - // set). It is set once the validator commits an equivocation or for any other - // configured misbehavior. - bool tombstoned = 5; - // A counter of missed (unsigned) blocks. It is used to avoid unnecessary - // reads in the missed block bitmap. - int64 missed_blocks_counter = 6; -} - -// Params represents the parameters used for by the slashing module. -message Params { - option (amino.name) = "cosmos-sdk/x/slashing/Params"; - - int64 signed_blocks_window = 1; - bytes min_signed_per_window = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - google.protobuf.Duration downtime_jail_duration = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.stdduration) = true - ]; - bytes slash_fraction_double_sign = 4 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - bytes slash_fraction_downtime = 5 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/tx.proto deleted file mode 100644 index 2499b4fd..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/slashing/v1beta1/tx.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -// Msg defines the slashing Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // Unjail defines a method for unjailing a jailed validator, thus returning - // them into the bonded validator set, so they can begin receiving provisions - // and rewards again. - rpc Unjail(MsgUnjail) returns (MsgUnjailResponse); - - // UpdateParams defines a governance operation for updating the x/slashing module - // parameters. The authority defaults to the x/gov module account. - // - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// MsgUnjail defines the Msg/Unjail request type -message MsgUnjail { - option (cosmos.msg.v1.signer) = "validator_addr"; - option (amino.name) = "cosmos-sdk/MsgUnjail"; - - option (gogoproto.goproto_getters) = false; - - string validator_addr = 1 [ - (cosmos_proto.scalar) = "cosmos.ValidatorAddressString", - (gogoproto.jsontag) = "address", - (amino.field_name) = "address", - (amino.dont_omitempty) = true - ]; -} - -// MsgUnjailResponse defines the Msg/Unjail response type -message MsgUnjailResponse {} - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/slashing/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // params defines the x/slashing parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/staking/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/staking/module/v1/module.proto deleted file mode 100644 index fd92a548..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/staking/module/v1/module.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package cosmos.staking.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the staking module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/staking" - }; - - // hooks_order specifies the order of staking hooks and should be a list - // of module names which provide a staking hooks instance. If no order is - // provided, then hooks will be applied in alphabetical order of module names. - repeated string hooks_order = 1; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 2; - - // bech32_prefix_validator is the bech32 validator prefix for the app. - string bech32_prefix_validator = 3; - - // bech32_prefix_consensus is the bech32 consensus node prefix for the app. - string bech32_prefix_consensus = 4; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/authz.proto b/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/authz.proto deleted file mode 100644 index 409280c1..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/authz.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -// -// Since: cosmos-sdk 0.43 -message StakeAuthorization { - option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization"; - option (amino.name) = "cosmos-sdk/StakeAuthorization"; - - // max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - // empty, there is no spend limit and any amount of coins can be delegated. - cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; - // validators is the oneof that represents either allow_list or deny_list - oneof validators { - // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - // account. - Validators allow_list = 2 [(amino.oneof_name) = "cosmos-sdk/StakeAuthorization/AllowList"]; - // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - Validators deny_list = 3 [(amino.oneof_name) = "cosmos-sdk/StakeAuthorization/DenyList"]; - } - // Validators defines list of validator addresses. - message Validators { - repeated string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - } - // authorization_type defines one of AuthorizationType. - AuthorizationType authorization_type = 4; -} - -// AuthorizationType defines the type of staking module authorization type -// -// Since: cosmos-sdk 0.43 -enum AuthorizationType { - // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - AUTHORIZATION_TYPE_UNSPECIFIED = 0; - // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - AUTHORIZATION_TYPE_DELEGATE = 1; - // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - AUTHORIZATION_TYPE_UNDELEGATE = 2; - // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - AUTHORIZATION_TYPE_REDELEGATE = 3; - // AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation - AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION = 4; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/genesis.proto b/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/genesis.proto deleted file mode 100644 index c3f1ce5d..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/genesis.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/staking/v1beta1/staking.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -// GenesisState defines the staking module's genesis state. -message GenesisState { - // params defines all the parameters of related to deposit. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // last_total_power tracks the total amounts of bonded tokens recorded during - // the previous end block. - bytes last_total_power = 2 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - - // last_validator_powers is a special index that provides a historical list - // of the last-block's bonded validators. - repeated LastValidatorPower last_validator_powers = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // validators defines the validator set at genesis. - repeated Validator validators = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // delegations defines the delegations active at genesis. - repeated Delegation delegations = 5 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // unbonding_delegations defines the unbonding delegations active at genesis. - repeated UnbondingDelegation unbonding_delegations = 6 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // redelegations defines the redelegations active at genesis. - repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // exported defines a bool to identify whether the chain dealing with exported or initialized genesis. - bool exported = 8; -} - -// LastValidatorPower required for validator set update logic. -message LastValidatorPower { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address of the validator. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // power defines the power of the validator. - int64 power = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/query.proto deleted file mode 100644 index 08eb9f32..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/query.proto +++ /dev/null @@ -1,387 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/staking/v1beta1/staking.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/query/v1/query.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// Query defines the gRPC querier service. -service Query { - // Validators queries all validators that match the given status. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/validators"; - } - - // Validator queries validator info for given validator address. - rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}"; - } - - // ValidatorDelegations queries delegate info for given validator. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"; - } - - // ValidatorUnbondingDelegations queries unbonding delegations of a validator. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest) - returns (QueryValidatorUnbondingDelegationsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/" - "{validator_addr}/unbonding_delegations"; - } - - // Delegation queries delegate info for given validator delegator pair. - rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" - "{delegator_addr}"; - } - - // UnbondingDelegation queries unbonding info for given validator delegator - // pair. - rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" - "{delegator_addr}/unbonding_delegation"; - } - - // DelegatorDelegations queries all delegations of a given delegator address. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; - } - - // DelegatorUnbondingDelegations queries all unbonding delegations of a given - // delegator address. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest) - returns (QueryDelegatorUnbondingDelegationsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/" - "{delegator_addr}/unbonding_delegations"; - } - - // Redelegations queries redelegations of given address. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; - } - - // DelegatorValidators queries all validators info for given delegator - // address. - // - // When called from another module, this query might consume a high amount of - // gas if the pagination field is incorrectly set. - rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; - } - - // DelegatorValidator queries validator info for given delegator validator - // pair. - rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/" - "{validator_addr}"; - } - - // HistoricalInfo queries the historical info for given height. - rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}"; - } - - // Pool queries the pool info. - rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/pool"; - } - - // Parameters queries the staking parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (cosmos.query.v1.module_query_safe) = true; - option (google.api.http).get = "/cosmos/staking/v1beta1/params"; - } -} - -// QueryValidatorsRequest is request type for Query/Validators RPC method. -message QueryValidatorsRequest { - // status enables to query for validators matching a given status. - string status = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorsResponse is response type for the Query/Validators RPC method -message QueryValidatorsResponse { - // validators contains all the queried validators. - repeated Validator validators = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorRequest is response type for the Query/Validator RPC method -message QueryValidatorRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// QueryValidatorResponse is response type for the Query/Validator RPC method -message QueryValidatorResponse { - // validator defines the validator info. - Validator validator = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryValidatorDelegationsRequest is request type for the -// Query/ValidatorDelegations RPC method -message QueryValidatorDelegationsRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorDelegationsResponse is response type for the -// Query/ValidatorDelegations RPC method -message QueryValidatorDelegationsResponse { - repeated DelegationResponse delegation_responses = 1 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.castrepeated) = "DelegationResponses"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorUnbondingDelegationsRequest is required type for the -// Query/ValidatorUnbondingDelegations RPC method -message QueryValidatorUnbondingDelegationsRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorUnbondingDelegationsResponse is response type for the -// Query/ValidatorUnbondingDelegations RPC method. -message QueryValidatorUnbondingDelegationsResponse { - repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationRequest is request type for the Query/Delegation RPC method. -message QueryDelegationRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // validator_addr defines the validator address to query for. - string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// QueryDelegationResponse is response type for the Query/Delegation RPC method. -message QueryDelegationResponse { - // delegation_responses defines the delegation info of a delegation. - DelegationResponse delegation_response = 1; -} - -// QueryUnbondingDelegationRequest is request type for the -// Query/UnbondingDelegation RPC method. -message QueryUnbondingDelegationRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // validator_addr defines the validator address to query for. - string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// QueryDelegationResponse is response type for the Query/UnbondingDelegation -// RPC method. -message QueryUnbondingDelegationResponse { - // unbond defines the unbonding information of a delegation. - UnbondingDelegation unbond = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryDelegatorDelegationsRequest is request type for the -// Query/DelegatorDelegations RPC method. -message QueryDelegatorDelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDelegatorDelegationsResponse is response type for the -// Query/DelegatorDelegations RPC method. -message QueryDelegatorDelegationsResponse { - // delegation_responses defines all the delegations' info of a delegator. - repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorUnbondingDelegationsRequest is request type for the -// Query/DelegatorUnbondingDelegations RPC method. -message QueryDelegatorUnbondingDelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryUnbondingDelegatorDelegationsResponse is response type for the -// Query/UnbondingDelegatorDelegations RPC method. -message QueryDelegatorUnbondingDelegationsResponse { - repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryRedelegationsRequest is request type for the Query/Redelegations RPC -// method. -message QueryRedelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // src_validator_addr defines the validator address to redelegate from. - string src_validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // dst_validator_addr defines the validator address to redelegate to. - string dst_validator_addr = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -// method. -message QueryRedelegationsResponse { - repeated RedelegationResponse redelegation_responses = 1 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorsRequest is request type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDelegatorValidatorsResponse is response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - // validators defines the validators' info of a delegator. - repeated Validator validators = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorRequest is request type for the -// Query/DelegatorValidator RPC method. -message QueryDelegatorValidatorRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // validator_addr defines the validator address to query for. - string validator_addr = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// QueryDelegatorValidatorResponse response type for the -// Query/DelegatorValidator RPC method. -message QueryDelegatorValidatorResponse { - // validator defines the validator info. - Validator validator = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -// method. -message QueryHistoricalInfoRequest { - // height defines at which height to query the historical info. - int64 height = 1; -} - -// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -// method. -message QueryHistoricalInfoResponse { - // hist defines the historical info at the given height. - HistoricalInfo hist = 1; -} - -// QueryPoolRequest is request type for the Query/Pool RPC method. -message QueryPoolRequest {} - -// QueryPoolResponse is response type for the Query/Pool RPC method. -message QueryPoolResponse { - // pool defines the pool info. - Pool pool = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/staking.proto b/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/staking.proto deleted file mode 100644 index 583f453b..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/staking.proto +++ /dev/null @@ -1,394 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "amino/amino.proto"; -import "tendermint/types/types.proto"; -import "tendermint/abci/types.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// HistoricalInfo contains header and validator information for a given block. -// It is stored as part of staking module's state, which persists the `n` most -// recent HistoricalInfo -// (`n` is set by the staking module's `historical_entries` parameter). -message HistoricalInfo { - tendermint.types.Header header = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - repeated Validator valset = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// CommissionRates defines the initial commission rates to be used for creating -// a validator. -message CommissionRates { - option (gogoproto.equal) = true; - - // rate is the commission rate charged to delegators, as a fraction. - string rate = 1 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. - string max_rate = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. - string max_change_rate = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} - -// Commission defines commission parameters for a given validator. -message Commission { - option (gogoproto.equal) = true; - - // commission_rates defines the initial commission rates to be used for creating a validator. - CommissionRates commission_rates = 1 - [(gogoproto.embed) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // update_time is the last time the commission rate was changed. - google.protobuf.Timestamp update_time = 2 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; -} - -// Description defines a validator description. -message Description { - option (gogoproto.equal) = true; - - // moniker defines a human-readable name for the validator. - string moniker = 1; - // identity defines an optional identity signature (ex. UPort or Keybase). - string identity = 2; - // website defines an optional website link. - string website = 3; - // security_contact defines an optional email for security contact. - string security_contact = 4; - // details define other optional details. - string details = 5; -} - -// Validator defines a validator, together with the total amount of the -// Validator's bond shares and their exchange rate to coins. Slashing results in -// a decrease in the exchange rate, allowing correct calculation of future -// undelegations without iterating over delegators. When coins are delegated to -// this validator, the validator is credited with a delegation whose number of -// bond shares is based on the amount of coins delegated divided by the current -// exchange rate. Voting power can be calculated as total bonded shares -// multiplied by exchange rate. -message Validator { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // operator_address defines the address of the validator's operator; bech encoded in JSON. - string operator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. - google.protobuf.Any consensus_pubkey = 2 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; - // jailed defined whether the validator has been jailed from bonded status or not. - bool jailed = 3; - // status is the validator status (bonded/unbonding/unbonded). - BondStatus status = 4; - // tokens define the delegated tokens (incl. self-delegation). - string tokens = 5 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - // delegator_shares defines total shares issued to a validator's delegators. - string delegator_shares = 6 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // description defines the description terms for the validator. - Description description = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - int64 unbonding_height = 8; - // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - google.protobuf.Timestamp unbonding_time = 9 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; - // commission defines the commission parameters. - Commission commission = 10 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // min_self_delegation is the validator's self declared minimum self delegation. - // - // Since: cosmos-sdk 0.46 - string min_self_delegation = 11 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - - // strictly positive if this validator's unbonding has been stopped by external modules - int64 unbonding_on_hold_ref_count = 12; - - // list of unbonding ids, each uniquely identifing an unbonding of this validator - repeated uint64 unbonding_ids = 13; -} - -// BondStatus is the status of a validator. -enum BondStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // UNSPECIFIED defines an invalid validator status. - BOND_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "Unspecified"]; - // UNBONDED defines a validator that is not bonded. - BOND_STATUS_UNBONDED = 1 [(gogoproto.enumvalue_customname) = "Unbonded"]; - // UNBONDING defines a validator that is unbonding. - BOND_STATUS_UNBONDING = 2 [(gogoproto.enumvalue_customname) = "Unbonding"]; - // BONDED defines a validator that is bonded. - BOND_STATUS_BONDED = 3 [(gogoproto.enumvalue_customname) = "Bonded"]; -} - -// ValAddresses defines a repeated set of validator addresses. -message ValAddresses { - repeated string addresses = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// DVPair is struct that just has a delegator-validator pair with no other data. -// It is intended to be used as a marshalable pointer. For example, a DVPair can -// be used to construct the key to getting an UnbondingDelegation from state. -message DVPair { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// DVPairs defines an array of DVPair objects. -message DVPairs { - repeated DVPair pairs = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// DVVTriplet is struct that just has a delegator-validator-validator triplet -// with no other data. It is intended to be used as a marshalable pointer. For -// example, a DVVTriplet can be used to construct the key to getting a -// Redelegation from state. -message DVVTriplet { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; -} - -// DVVTriplets defines an array of DVVTriplet objects. -message DVVTriplets { - repeated DVVTriplet triplets = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// Delegation represents the bond with tokens held by an account. It is -// owned by one delegator, and is associated with the voting power of one -// validator. -message Delegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the encoded address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_address is the encoded address of the validator. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // shares define the delegation shares received. - string shares = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -// UnbondingDelegation stores all of a single delegator's unbonding bonds -// for a single validator in an time-ordered list. -message UnbondingDelegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the encoded address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_address is the encoded address of the validator. - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // entries are the unbonding delegation entries. - repeated UnbondingDelegationEntry entries = 3 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; // unbonding delegation entries -} - -// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -message UnbondingDelegationEntry { - option (gogoproto.equal) = true; - - // creation_height is the height which the unbonding took place. - int64 creation_height = 1; - // completion_time is the unix time for unbonding completion. - google.protobuf.Timestamp completion_time = 2 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; - // initial_balance defines the tokens initially scheduled to receive at completion. - string initial_balance = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - // balance defines the tokens to receive at completion. - string balance = 4 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - // Incrementing id that uniquely identifies this entry - uint64 unbonding_id = 5; - - // Strictly positive if this entry's unbonding has been stopped by external modules - int64 unbonding_on_hold_ref_count = 6; -} - -// RedelegationEntry defines a redelegation object with relevant metadata. -message RedelegationEntry { - option (gogoproto.equal) = true; - - // creation_height defines the height which the redelegation took place. - int64 creation_height = 1; - // completion_time defines the unix time for redelegation completion. - google.protobuf.Timestamp completion_time = 2 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; - // initial_balance defines the initial balance when redelegation started. - string initial_balance = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - // shares_dst is the amount of destination-validator shares created by redelegation. - string shares_dst = 4 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // Incrementing id that uniquely identifies this entry - uint64 unbonding_id = 5; - - // Strictly positive if this entry's unbonding has been stopped by external modules - int64 unbonding_on_hold_ref_count = 6; -} - -// Redelegation contains the list of a particular delegator's redelegating bonds -// from a particular source validator to a particular destination validator. -message Redelegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // validator_src_address is the validator redelegation source operator address. - string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // validator_dst_address is the validator redelegation destination operator address. - string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // entries are the redelegation entries. - repeated RedelegationEntry entries = 4 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; // redelegation entries -} - -// Params defines the parameters for the x/staking module. -message Params { - option (amino.name) = "cosmos-sdk/x/staking/Params"; - option (gogoproto.equal) = true; - - // unbonding_time is the time duration of unbonding. - google.protobuf.Duration unbonding_time = 1 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdduration) = true]; - // max_validators is the maximum number of validators. - uint32 max_validators = 2; - // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - uint32 max_entries = 3; - // historical_entries is the number of historical entries to persist. - uint32 historical_entries = 4; - // bond_denom defines the bondable coin denomination. - string bond_denom = 5; - // min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators - string min_commission_rate = 6 [ - (gogoproto.moretags) = "yaml:\"min_commission_rate\"", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Dec" - ]; -} - -// DelegationResponse is equivalent to Delegation except that it contains a -// balance in addition to shares which is more suitable for client responses. -message DelegationResponse { - option (gogoproto.equal) = false; - - Delegation delegation = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -// contains a balance in addition to shares which is more suitable for client -// responses. -message RedelegationEntryResponse { - option (gogoproto.equal) = true; - - RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - string balance = 4 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -// RedelegationResponse is equivalent to a Redelegation except that its entries -// contain a balance in addition to shares which is more suitable for client -// responses. -message RedelegationResponse { - option (gogoproto.equal) = false; - - Redelegation redelegation = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// Pool is used for tracking bonded and not-bonded token supply of the bond -// denomination. -message Pool { - option (gogoproto.description) = true; - option (gogoproto.equal) = true; - string not_bonded_tokens = 1 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "not_bonded_tokens", - (amino.dont_omitempty) = true - ]; - string bonded_tokens = 2 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "bonded_tokens", - (amino.dont_omitempty) = true - ]; -} - -// Infraction indicates the infraction a validator commited. -enum Infraction { - // UNSPECIFIED defines an empty infraction. - INFRACTION_UNSPECIFIED = 0; - // DOUBLE_SIGN defines a validator that double-signs a block. - INFRACTION_DOUBLE_SIGN = 1; - // DOWNTIME defines a validator that missed signing too many blocks. - INFRACTION_DOWNTIME = 2; -} - -// ValidatorUpdates defines an array of abci.ValidatorUpdate objects. -// TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence -message ValidatorUpdates { - repeated tendermint.abci.ValidatorUpdate updates = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/tx.proto deleted file mode 100644 index d3d0d8ba..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/staking/v1beta1/tx.proto +++ /dev/null @@ -1,206 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/staking/v1beta1/staking.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// Msg defines the staking Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // CreateValidator defines a method for creating a new validator. - rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse); - - // EditValidator defines a method for editing an existing validator. - rpc EditValidator(MsgEditValidator) returns (MsgEditValidatorResponse); - - // Delegate defines a method for performing a delegation of coins - // from a delegator to a validator. - rpc Delegate(MsgDelegate) returns (MsgDelegateResponse); - - // BeginRedelegate defines a method for performing a redelegation - // of coins from a delegator and source validator to a destination validator. - rpc BeginRedelegate(MsgBeginRedelegate) returns (MsgBeginRedelegateResponse); - - // Undelegate defines a method for performing an undelegation from a - // delegate and a validator. - rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse); - - // CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation - // and delegate back to previous validator. - // - // Since: cosmos-sdk 0.46 - rpc CancelUnbondingDelegation(MsgCancelUnbondingDelegation) returns (MsgCancelUnbondingDelegationResponse); - - // UpdateParams defines an operation for updating the x/staking module - // parameters. - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -// MsgCreateValidator defines a SDK message for creating a new validator. -message MsgCreateValidator { - option (cosmos.msg.v1.signer) = "validator_address"; - option (amino.name) = "cosmos-sdk/MsgCreateValidator"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Description description = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - CommissionRates commission = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - string min_self_delegation = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; - // Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. - // The validator address bytes and delegator address bytes refer to the same account while creating validator (defer - // only in bech32 notation). - string delegator_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString", deprecated = true]; - string validator_address = 5 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - google.protobuf.Any pubkey = 6 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; - cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -message MsgCreateValidatorResponse {} - -// MsgEditValidator defines a SDK message for editing an existing validator. -message MsgEditValidator { - option (cosmos.msg.v1.signer) = "validator_address"; - option (amino.name) = "cosmos-sdk/MsgEditValidator"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Description description = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - - // We pass a reference to the new commission rate and min self delegation as - // it's not mandatory to update. If not updated, the deserialized rate will be - // zero with no way to distinguish if an update was intended. - // REF: #2373 - string commission_rate = 3 - [(cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec"]; - string min_self_delegation = 4 - [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "cosmossdk.io/math.Int"]; -} - -// MsgEditValidatorResponse defines the Msg/EditValidator response type. -message MsgEditValidatorResponse {} - -// MsgDelegate defines a SDK message for performing a delegation of coins -// from a delegator to a validator. -message MsgDelegate { - option (cosmos.msg.v1.signer) = "delegator_address"; - option (amino.name) = "cosmos-sdk/MsgDelegate"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgDelegateResponse defines the Msg/Delegate response type. -message MsgDelegateResponse {} - -// MsgBeginRedelegate defines a SDK message for performing a redelegation -// of coins from a delegator and source validator to a destination validator. -message MsgBeginRedelegate { - option (cosmos.msg.v1.signer) = "delegator_address"; - option (amino.name) = "cosmos-sdk/MsgBeginRedelegate"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_src_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - string validator_dst_address = 3 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. -message MsgBeginRedelegateResponse { - google.protobuf.Timestamp completion_time = 1 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; -} - -// MsgUndelegate defines a SDK message for performing an undelegation from a -// delegate and a validator. -message MsgUndelegate { - option (cosmos.msg.v1.signer) = "delegator_address"; - option (amino.name) = "cosmos-sdk/MsgUndelegate"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgUndelegateResponse defines the Msg/Undelegate response type. -message MsgUndelegateResponse { - google.protobuf.Timestamp completion_time = 1 - [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; - - // amount returns the amount of undelegated coins - // - // Since: cosmos-sdk 0.50 - cosmos.base.v1beta1.Coin amount = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator -// -// Since: cosmos-sdk 0.46 -message MsgCancelUnbondingDelegation { - option (cosmos.msg.v1.signer) = "delegator_address"; - option (amino.name) = "cosmos-sdk/MsgCancelUnbondingDelegation"; - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.ValidatorAddressString"]; - // amount is always less than or equal to unbonding delegation entry balance - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - // creation_height is the height which the unbonding took place. - int64 creation_height = 4; -} - -// MsgCancelUnbondingDelegationResponse -// -// Since: cosmos-sdk 0.46 -message MsgCancelUnbondingDelegationResponse {} - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/x/staking/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // params defines the x/staking parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -}; - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -message MsgUpdateParamsResponse {}; diff --git a/packages/injective-protobuf/third_party/proto/cosmos/store/internal/kv/v1beta1/kv.proto b/packages/injective-protobuf/third_party/proto/cosmos/store/internal/kv/v1beta1/kv.proto deleted file mode 100644 index 4243444a..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/store/internal/kv/v1beta1/kv.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package cosmos.store.internal.kv.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "cosmossdk.io/store/internal/kv"; - -// This is duplicated from the base kv directory to avoid a circular dependency with the cosmos-sdk - -// Pairs defines a repeated slice of Pair objects. -message Pairs { - repeated Pair pairs = 1 [(gogoproto.nullable) = false]; -} - -// Pair defines a key/value bytes tuple. -message Pair { - bytes key = 1; - bytes value = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/store/snapshots/v1/snapshot.proto b/packages/injective-protobuf/third_party/proto/cosmos/store/snapshots/v1/snapshot.proto deleted file mode 100644 index af49bdaa..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/store/snapshots/v1/snapshot.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; -package cosmos.store.snapshots.v1; - -import "gogoproto/gogo.proto"; - -option go_package = "cosmossdk.io/store/snapshots/types"; - -// Snapshot contains Tendermint state sync snapshot info. -message Snapshot { - uint64 height = 1; - uint32 format = 2; - uint32 chunks = 3; - bytes hash = 4; - Metadata metadata = 5 [(gogoproto.nullable) = false]; -} - -// Metadata contains SDK-specific snapshot metadata. -message Metadata { - repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes -} - -// SnapshotItem is an item contained in a rootmulti.Store snapshot. -// -// Since: cosmos-sdk 0.46 -message SnapshotItem { - // item is the specific type of snapshot item. - oneof item { - SnapshotStoreItem store = 1; - SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"]; - SnapshotExtensionMeta extension = 3; - SnapshotExtensionPayload extension_payload = 4; - } -} - -// SnapshotStoreItem contains metadata about a snapshotted store. -// -// Since: cosmos-sdk 0.46 -message SnapshotStoreItem { - string name = 1; -} - -// SnapshotIAVLItem is an exported IAVL node. -// -// Since: cosmos-sdk 0.46 -message SnapshotIAVLItem { - bytes key = 1; - bytes value = 2; - // version is block height - int64 version = 3; - // height is depth of the tree. - int32 height = 4; -} - -// SnapshotExtensionMeta contains metadata about an external snapshotter. -// -// Since: cosmos-sdk 0.46 -message SnapshotExtensionMeta { - string name = 1; - uint32 format = 2; -} - -// SnapshotExtensionPayload contains payloads of an external snapshotter. -// -// Since: cosmos-sdk 0.46 -message SnapshotExtensionPayload { - bytes payload = 1; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/store/streaming/abci/grpc.proto b/packages/injective-protobuf/third_party/proto/cosmos/store/streaming/abci/grpc.proto deleted file mode 100644 index 25366cdb..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/store/streaming/abci/grpc.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package cosmos.store.streaming.abci; - -import "tendermint/abci/types.proto"; -import "cosmos/store/v1beta1/listening.proto"; - -option go_package = "cosmossdk.io/store/streaming/abci"; - -// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method -message ListenFinalizeBlockRequest { - tendermint.abci.RequestFinalizeBlock req = 1; - tendermint.abci.ResponseFinalizeBlock res = 2; -} - -// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method -message ListenFinalizeBlockResponse {} - -// ListenCommitRequest is the request type for the ListenCommit RPC method -message ListenCommitRequest { - // explicitly pass in block height as ResponseCommit does not contain this info - int64 block_height = 1; - tendermint.abci.ResponseCommit res = 2; - repeated cosmos.store.v1beta1.StoreKVPair change_set = 3; -} - -// ListenCommitResponse is the response type for the ListenCommit RPC method -message ListenCommitResponse {} - -// ABCIListenerService is the service for the BaseApp ABCIListener interface -service ABCIListenerService { - // ListenFinalizeBlock is the corresponding endpoint for ABCIListener.ListenEndBlock - rpc ListenFinalizeBlock(ListenFinalizeBlockRequest) returns (ListenFinalizeBlockResponse); - // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit - rpc ListenCommit(ListenCommitRequest) returns (ListenCommitResponse); -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/store/v1beta1/commit_info.proto b/packages/injective-protobuf/third_party/proto/cosmos/store/v1beta1/commit_info.proto deleted file mode 100644 index a931e3e7..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/store/v1beta1/commit_info.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package cosmos.store.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cosmossdk.io/store/types"; - -// CommitInfo defines commit information used by the multi-store when committing -// a version/height. -message CommitInfo { - int64 version = 1; - repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// StoreInfo defines store-specific commit information. It contains a reference -// between a store name and the commit ID. -message StoreInfo { - string name = 1; - CommitID commit_id = 2 [(gogoproto.nullable) = false]; -} - -// CommitID defines the commitment information when a specific store is -// committed. -message CommitID { - option (gogoproto.goproto_stringer) = false; - - int64 version = 1; - bytes hash = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/store/v1beta1/listening.proto b/packages/injective-protobuf/third_party/proto/cosmos/store/v1beta1/listening.proto deleted file mode 100644 index 24131a47..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/store/v1beta1/listening.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; -package cosmos.store.v1beta1; - -import "tendermint/abci/types.proto"; - -option go_package = "cosmossdk.io/store/types"; - -// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) -// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and -// Deletes -// -// Since: cosmos-sdk 0.43 -message StoreKVPair { - string store_key = 1; // the store key for the KVStore this pair originates from - bool delete = 2; // true indicates a delete operation, false indicates a set operation - bytes key = 3; - bytes value = 4; -} - -// BlockMetadata contains all the abci event data of a block -// the file streamer dump them into files together with the state changes. -message BlockMetadata { - tendermint.abci.ResponseCommit response_commit = 6; - tendermint.abci.RequestFinalizeBlock request_finalize_block = 7; - tendermint.abci.ResponseFinalizeBlock response_finalize_block = 8; // TODO: should we renumber this? - - reserved 1, 2, 3, 4, 5; // reserved for from previous use in comet <= 0.37 -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/tx/config/v1/config.proto b/packages/injective-protobuf/third_party/proto/cosmos/tx/config/v1/config.proto deleted file mode 100644 index 15553a28..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/tx/config/v1/config.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package cosmos.tx.config.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Config is the config object of the x/auth/tx package. -message Config { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/auth/tx" - }; - - // skip_ante_handler defines whether the ante handler registration should be skipped in case an app wants to override - // this functionality. - bool skip_ante_handler = 1; - - // skip_post_handler defines whether the post handler registration should be skipped in case an app wants to override - // this functionality. - bool skip_post_handler = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/tx/signing/v1beta1/signing.proto b/packages/injective-protobuf/third_party/proto/cosmos/tx/signing/v1beta1/signing.proto deleted file mode 100644 index faad739b..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/tx/signing/v1beta1/signing.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.signing.v1beta1; - -import "cosmos/crypto/multisig/v1beta1/multisig.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing"; - -// SignMode represents a signing mode with its own security guarantees. -// -// This enum should be considered a registry of all known sign modes -// in the Cosmos ecosystem. Apps are not expected to support all known -// sign modes. Apps that would like to support custom sign modes are -// encouraged to open a small PR against this file to add a new case -// to this SignMode enum describing their sign mode so that different -// apps have a consistent version of this enum. -enum SignMode { - // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - // rejected. - SIGN_MODE_UNSPECIFIED = 0; - - // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - // verified with raw bytes from Tx. - SIGN_MODE_DIRECT = 1; - - // SIGN_MODE_TEXTUAL is a future signing mode that will verify some - // human-readable textual representation on top of the binary representation - // from SIGN_MODE_DIRECT. It is currently experimental, and should be used - // for testing purposes only, until Textual is fully released. Please follow - // the tracking issue https://github.com/cosmos/cosmos-sdk/issues/11970. - SIGN_MODE_TEXTUAL = 2; - - // SIGN_MODE_DIRECT_AUX specifies a signing mode which uses - // SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not - // require signers signing over other signers' `signer_info`. It also allows - // for adding Tips in transactions. - // - // Since: cosmos-sdk 0.46 - SIGN_MODE_DIRECT_AUX = 3; - - // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - // Amino JSON and will be removed in the future. - SIGN_MODE_LEGACY_AMINO_JSON = 127; - - // SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - // SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 - // - // Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, - // but is not implemented on the SDK by default. To enable EIP-191, you need - // to pass a custom `TxConfig` that has an implementation of - // `SignModeHandler` for EIP-191. The SDK may decide to fully support - // EIP-191 in the future. - // - // Since: cosmos-sdk 0.45.2 - SIGN_MODE_EIP_191 = 191; -} - -// SignatureDescriptors wraps multiple SignatureDescriptor's. -message SignatureDescriptors { - // signatures are the signature descriptors - repeated SignatureDescriptor signatures = 1; -} - -// SignatureDescriptor is a convenience type which represents the full data for -// a signature including the public key of the signer, signing modes and the -// signature itself. It is primarily used for coordinating signatures between -// clients. -message SignatureDescriptor { - // public_key is the public key of the signer - google.protobuf.Any public_key = 1; - - Data data = 2; - - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to prevent - // replay attacks. - uint64 sequence = 3; - - // Data represents signature data - message Data { - // sum is the oneof that specifies whether this represents single or multi-signature data - oneof sum { - // single represents a single signer - Single single = 1; - - // multi represents a multisig signer - Multi multi = 2; - } - - // Single is the signature data for a single signer - message Single { - // mode is the signing mode of the single signer - SignMode mode = 1; - - // signature is the raw signature bytes - bytes signature = 2; - } - - // Multi is the signature data for a multisig public key - message Multi { - // bitarray specifies which keys within the multisig are signing - cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; - - // signatures is the signatures of the multi-signature - repeated Data signatures = 2; - } - } -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/tx/v1beta1/service.proto b/packages/injective-protobuf/third_party/proto/cosmos/tx/v1beta1/service.proto deleted file mode 100644 index 5cd848e0..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/tx/v1beta1/service.proto +++ /dev/null @@ -1,293 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/base/abci/v1beta1/abci.proto"; -import "cosmos/tx/v1beta1/tx.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "tendermint/types/block.proto"; -import "tendermint/types/types.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; - -// Service defines a gRPC service for interacting with transactions. -service Service { - // Simulate simulates executing a transaction for estimating gas usage. - rpc Simulate(SimulateRequest) returns (SimulateResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/simulate" - body: "*" - }; - } - // GetTx fetches a tx by hash. - rpc GetTx(GetTxRequest) returns (GetTxResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs/{hash}"; - } - // BroadcastTx broadcast transaction. - rpc BroadcastTx(BroadcastTxRequest) returns (BroadcastTxResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/txs" - body: "*" - }; - } - // GetTxsEvent fetches txs by event. - rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs"; - } - // GetBlockWithTxs fetches a block with decoded txs. - // - // Since: cosmos-sdk 0.45.2 - rpc GetBlockWithTxs(GetBlockWithTxsRequest) - returns (GetBlockWithTxsResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs/block/{height}"; - } - // TxDecode decodes the transaction. - // - // Since: cosmos-sdk 0.47 - rpc TxDecode(TxDecodeRequest) returns (TxDecodeResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/decode" - body: "*" - }; - } - // TxEncode encodes the transaction. - // - // Since: cosmos-sdk 0.47 - rpc TxEncode(TxEncodeRequest) returns (TxEncodeResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/encode" - body: "*" - }; - } - // TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. - // - // Since: cosmos-sdk 0.47 - rpc TxEncodeAmino(TxEncodeAminoRequest) returns (TxEncodeAminoResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/encode/amino" - body: "*" - }; - } - // TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. - // - // Since: cosmos-sdk 0.47 - rpc TxDecodeAmino(TxDecodeAminoRequest) returns (TxDecodeAminoResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/decode/amino" - body: "*" - }; - } -} - -// GetTxsEventRequest is the request type for the Service.TxsByEvents -// RPC method. -message GetTxsEventRequest { - // events is the list of transaction event type. - // Deprecated post v0.47.x: use query instead, which should contain a valid - // events query. - repeated string events = 1 [deprecated = true]; - - // pagination defines a pagination for the request. - // Deprecated post v0.46.x: use page and limit instead. - cosmos.base.query.v1beta1.PageRequest pagination = 2 [deprecated = true]; - - OrderBy order_by = 3; - - // page is the page number to query, starts at 1. If not provided, will - // default to first page. - uint64 page = 4; - - // limit is the total number of results to be returned in the result page. - // If left empty it will default to a value to be set by each app. - uint64 limit = 5; - - // query defines the transaction event query that is proxied to Tendermint's - // TxSearch RPC method. The query must be valid. - // - // Since cosmos-sdk 0.50 - string query = 6; -} - -// OrderBy defines the sorting order -enum OrderBy { - // ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults - // to ASC in this case. - ORDER_BY_UNSPECIFIED = 0; - // ORDER_BY_ASC defines ascending order - ORDER_BY_ASC = 1; - // ORDER_BY_DESC defines descending order - ORDER_BY_DESC = 2; -} - -// GetTxsEventResponse is the response type for the Service.TxsByEvents -// RPC method. -message GetTxsEventResponse { - // txs is the list of queried transactions. - repeated cosmos.tx.v1beta1.Tx txs = 1; - // tx_responses is the list of queried TxResponses. - repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; - // pagination defines a pagination for the response. - // Deprecated post v0.46.x: use total instead. - cosmos.base.query.v1beta1.PageResponse pagination = 3 [deprecated = true]; - // total is total number of results available - uint64 total = 4; -} - -// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest -// RPC method. -message BroadcastTxRequest { - // tx_bytes is the raw transaction. - bytes tx_bytes = 1; - BroadcastMode mode = 2; -} - -// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC -// method. -enum BroadcastMode { - // zero-value for mode ordering - BROADCAST_MODE_UNSPECIFIED = 0; - // DEPRECATED: use BROADCAST_MODE_SYNC instead, - // BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. - BROADCAST_MODE_BLOCK = 1 [deprecated = true]; - // BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits - // for a CheckTx execution response only. - BROADCAST_MODE_SYNC = 2; - // BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client - // returns immediately. - BROADCAST_MODE_ASYNC = 3; -} - -// BroadcastTxResponse is the response type for the -// Service.BroadcastTx method. -message BroadcastTxResponse { - // tx_response is the queried TxResponses. - cosmos.base.abci.v1beta1.TxResponse tx_response = 1; -} - -// SimulateRequest is the request type for the Service.Simulate -// RPC method. -message SimulateRequest { - // tx is the transaction to simulate. - // Deprecated. Send raw tx bytes instead. - cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true]; - // tx_bytes is the raw transaction. - // - // Since: cosmos-sdk 0.43 - bytes tx_bytes = 2; -} - -// SimulateResponse is the response type for the -// Service.SimulateRPC method. -message SimulateResponse { - // gas_info is the information about gas used in the simulation. - cosmos.base.abci.v1beta1.GasInfo gas_info = 1; - // result is the result of the simulation. - cosmos.base.abci.v1beta1.Result result = 2; -} - -// GetTxRequest is the request type for the Service.GetTx -// RPC method. -message GetTxRequest { - // hash is the tx hash to query, encoded as a hex string. - string hash = 1; -} - -// GetTxResponse is the response type for the Service.GetTx method. -message GetTxResponse { - // tx is the queried transaction. - cosmos.tx.v1beta1.Tx tx = 1; - // tx_response is the queried TxResponses. - cosmos.base.abci.v1beta1.TxResponse tx_response = 2; -} - -// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -// RPC method. -// -// Since: cosmos-sdk 0.45.2 -message GetBlockWithTxsRequest { - // height is the height of the block to query. - int64 height = 1; - // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs -// method. -// -// Since: cosmos-sdk 0.45.2 -message GetBlockWithTxsResponse { - // txs are the transactions in the block. - repeated cosmos.tx.v1beta1.Tx txs = 1; - .tendermint.types.BlockID block_id = 2; - .tendermint.types.Block block = 3; - // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 4; -} - -// TxDecodeRequest is the request type for the Service.TxDecode -// RPC method. -// -// Since: cosmos-sdk 0.47 -message TxDecodeRequest { - // tx_bytes is the raw transaction. - bytes tx_bytes = 1; -} - -// TxDecodeResponse is the response type for the -// Service.TxDecode method. -// -// Since: cosmos-sdk 0.47 -message TxDecodeResponse { - // tx is the decoded transaction. - cosmos.tx.v1beta1.Tx tx = 1; -} - -// TxEncodeRequest is the request type for the Service.TxEncode -// RPC method. -// -// Since: cosmos-sdk 0.47 -message TxEncodeRequest { - // tx is the transaction to encode. - cosmos.tx.v1beta1.Tx tx = 1; -} - -// TxEncodeResponse is the response type for the -// Service.TxEncode method. -// -// Since: cosmos-sdk 0.47 -message TxEncodeResponse { - // tx_bytes is the encoded transaction bytes. - bytes tx_bytes = 1; -} - -// TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino -// RPC method. -// -// Since: cosmos-sdk 0.47 -message TxEncodeAminoRequest { - string amino_json = 1; -} - -// TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino -// RPC method. -// -// Since: cosmos-sdk 0.47 -message TxEncodeAminoResponse { - bytes amino_binary = 1; -} - -// TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino -// RPC method. -// -// Since: cosmos-sdk 0.47 -message TxDecodeAminoRequest { - bytes amino_binary = 1; -} - -// TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino -// RPC method. -// -// Since: cosmos-sdk 0.47 -message TxDecodeAminoResponse { - string amino_json = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/tx/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/tx/v1beta1/tx.proto deleted file mode 100644 index 04f98cf5..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/tx/v1beta1/tx.proto +++ /dev/null @@ -1,265 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.v1beta1; - -import "amino/amino.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/crypto/multisig/v1beta1/multisig.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/tx/signing/v1beta1/signing.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; - -// Tx is the standard type used for broadcasting transactions. -message Tx { - // body is the processable content of the transaction - TxBody body = 1; - - // auth_info is the authorization related content of the transaction, - // specifically signers, signer modes and fee - AuthInfo auth_info = 2; - - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - repeated bytes signatures = 3; -} - -// TxRaw is a variant of Tx that pins the signer's exact binary representation -// of body and auth_info. This is used for signing, broadcasting and -// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and -// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used -// as the transaction ID. -message TxRaw { - // body_bytes is a protobuf serialization of a TxBody that matches the - // representation in SignDoc. - bytes body_bytes = 1; - - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in SignDoc. - bytes auth_info_bytes = 2; - - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - repeated bytes signatures = 3; -} - -// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. -message SignDoc { - // body_bytes is protobuf serialization of a TxBody that matches the - // representation in TxRaw. - bytes body_bytes = 1; - - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in TxRaw. - bytes auth_info_bytes = 2; - - // chain_id is the unique identifier of the chain this transaction targets. - // It prevents signed transactions from being used on another chain by an - // attacker - string chain_id = 3; - - // account_number is the account number of the account in state - uint64 account_number = 4; -} - -// SignDocDirectAux is the type used for generating sign bytes for -// SIGN_MODE_DIRECT_AUX. -// -// Since: cosmos-sdk 0.46 -message SignDocDirectAux { - // body_bytes is protobuf serialization of a TxBody that matches the - // representation in TxRaw. - bytes body_bytes = 1; - - // public_key is the public key of the signing account. - google.protobuf.Any public_key = 2; - - // chain_id is the identifier of the chain this transaction targets. - // It prevents signed transactions from being used on another chain by an - // attacker. - string chain_id = 3; - - // account_number is the account number of the account in state. - uint64 account_number = 4; - - // sequence is the sequence number of the signing account. - uint64 sequence = 5; - - // Tip is the optional tip used for transactions fees paid in another denom. - // It should be left empty if the signer is not the tipper for this - // transaction. - // - // This field is ignored if the chain didn't enable tips, i.e. didn't add the - // `TipDecorator` in its posthandler. - Tip tip = 6; -} - -// TxBody is the body of a transaction that all signers sign over. -message TxBody { - // messages is a list of messages to be executed. The required signers of - // those messages define the number and order of elements in AuthInfo's - // signer_infos and Tx's signatures. Each required signer address is added to - // the list only the first time it occurs. - // By convention, the first required signer (usually from the first message) - // is referred to as the primary signer and pays the fee for the whole - // transaction. - repeated google.protobuf.Any messages = 1; - - // memo is any arbitrary note/comment to be added to the transaction. - // WARNING: in clients, any publicly exposed text should not be called memo, - // but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). - string memo = 2; - - // timeout is the block height after which this transaction will not - // be processed by the chain - uint64 timeout_height = 3; - - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, the transaction will be rejected - repeated google.protobuf.Any extension_options = 1023; - - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, they will be ignored - repeated google.protobuf.Any non_critical_extension_options = 2047; -} - -// AuthInfo describes the fee and signer modes that are used to sign a -// transaction. -message AuthInfo { - // signer_infos defines the signing modes for the required signers. The number - // and order of elements must match the required signers from TxBody's - // messages. The first element is the primary signer and the one which pays - // the fee. - repeated SignerInfo signer_infos = 1; - - // Fee is the fee and gas limit for the transaction. The first signer is the - // primary signer and the one which pays the fee. The fee can be calculated - // based on the cost of evaluating the body and doing signature verification - // of the signers. This can be estimated via simulation. - Fee fee = 2; - - // Tip is the optional tip used for transactions fees paid in another denom. - // - // This field is ignored if the chain didn't enable tips, i.e. didn't add the - // `TipDecorator` in its posthandler. - // - // Since: cosmos-sdk 0.46 - Tip tip = 3; -} - -// SignerInfo describes the public key and signing mode of a single top-level -// signer. -message SignerInfo { - // public_key is the public key of the signer. It is optional for accounts - // that already exist in state. If unset, the verifier can use the required \ - // signer address for this position and lookup the public key. - google.protobuf.Any public_key = 1; - - // mode_info describes the signing mode of the signer and is a nested - // structure to support nested multisig pubkey's - ModeInfo mode_info = 2; - - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to - // prevent replay attacks. - uint64 sequence = 3; -} - -// ModeInfo describes the signing mode of a single or nested multisig signer. -message ModeInfo { - // sum is the oneof that specifies whether this represents a single or nested - // multisig signer - oneof sum { - // single represents a single signer - Single single = 1; - - // multi represents a nested multisig signer - Multi multi = 2; - } - - // Single is the mode info for a single signer. It is structured as a message - // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the - // future - message Single { - // mode is the signing mode of the single signer - cosmos.tx.signing.v1beta1.SignMode mode = 1; - } - - // Multi is the mode info for a multisig public key - message Multi { - // bitarray specifies which keys within the multisig are signing - cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; - - // mode_infos is the corresponding modes of the signers of the multisig - // which could include nested multisig public keys - repeated ModeInfo mode_infos = 2; - } -} - -// Fee includes the amount of coins paid in fees and the maximum -// gas to be used by the transaction. The ratio yields an effective "gasprice", -// which must be above some miminum to be accepted into the mempool. -message Fee { - // amount is the amount of coins to be paid as a fee - repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins" - ]; - - // gas_limit is the maximum gas that can be used in transaction processing - // before an out of gas error occurs - uint64 gas_limit = 2; - - // if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. - // the payer must be a tx signer (and thus have signed this field in AuthInfo). - // setting this field does *not* change the ordering of required signers for the transaction. - string payer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used - // to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does - // not support fee grants, this will fail - string granter = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// Tip is the tip used for meta-transactions. -// -// Since: cosmos-sdk 0.46 -message Tip { - // amount is the amount of the tip - repeated cosmos.base.v1beta1.Coin amount = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins" - ]; - // tipper is the address of the account paying for the tip - string tipper = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// AuxSignerData is the intermediary format that an auxiliary signer (e.g. a -// tipper) builds and sends to the fee payer (who will build and broadcast the -// actual tx). AuxSignerData is not a valid tx in itself, and will be rejected -// by the node if sent directly as-is. -// -// Since: cosmos-sdk 0.46 -message AuxSignerData { - // address is the bech32-encoded address of the auxiliary signer. If using - // AuxSignerData across different chains, the bech32 prefix of the target - // chain (where the final transaction is broadcasted) should be used. - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // sign_doc is the SIGN_MODE_DIRECT_AUX sign doc that the auxiliary signer - // signs. Note: we use the same sign doc even if we're signing with - // LEGACY_AMINO_JSON. - SignDocDirectAux sign_doc = 2; - // mode is the signing mode of the single signer. - cosmos.tx.signing.v1beta1.SignMode mode = 3; - // sig is the signature of the sign doc. - bytes sig = 4; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/upgrade/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/upgrade/module/v1/module.proto deleted file mode 100644 index 6493f5c7..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/upgrade/module/v1/module.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package cosmos.upgrade.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the upgrade module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "cosmossdk.io/x/upgrade" - }; - - // authority defines the custom module authority. If not set, defaults to the governance module. - string authority = 1; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/query.proto b/packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/query.proto deleted file mode 100644 index 2b90a788..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/query.proto +++ /dev/null @@ -1,122 +0,0 @@ -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/upgrade/v1beta1/upgrade.proto"; - -option go_package = "cosmossdk.io/x/upgrade/types"; - -// Query defines the gRPC upgrade querier service. -service Query { - // CurrentPlan queries the current upgrade plan. - rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/current_plan"; - } - - // AppliedPlan queries a previously applied upgrade plan by its name. - rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/applied_plan/{name}"; - } - - // UpgradedConsensusState queries the consensus state that will serve - // as a trusted kernel for the next version of this chain. It will only be - // stored at the last height of this chain. - // UpgradedConsensusState RPC not supported with legacy querier - // This rpc is deprecated now that IBC has its own replacement - // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { - option deprecated = true; - option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; - } - - // ModuleVersions queries the list of module versions from state. - // - // Since: cosmos-sdk 0.43 - rpc ModuleVersions(QueryModuleVersionsRequest) returns (QueryModuleVersionsResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/module_versions"; - } - - // Returns the account with authority to conduct upgrades - // - // Since: cosmos-sdk 0.46 - rpc Authority(QueryAuthorityRequest) returns (QueryAuthorityResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/authority"; - } -} - -// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -// method. -message QueryCurrentPlanRequest {} - -// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -// method. -message QueryCurrentPlanResponse { - // plan is the current upgrade plan. - Plan plan = 1; -} - -// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -// method. -message QueryAppliedPlanRequest { - // name is the name of the applied plan to query for. - string name = 1; -} - -// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -// method. -message QueryAppliedPlanResponse { - // height is the block height at which the plan was applied. - int64 height = 1; -} - -// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -// RPC method. -message QueryUpgradedConsensusStateRequest { - option deprecated = true; - - // last height of the current chain must be sent in request - // as this is the height under which next consensus state is stored - int64 last_height = 1; -} - -// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -// RPC method. -message QueryUpgradedConsensusStateResponse { - option deprecated = true; - reserved 1; - - // Since: cosmos-sdk 0.43 - bytes upgraded_consensus_state = 2; -} - -// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryModuleVersionsRequest { - // module_name is a field to query a specific module - // consensus version from state. Leaving this empty will - // fetch the full list of module versions from state - string module_name = 1; -} - -// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryModuleVersionsResponse { - // module_versions is a list of module names with their consensus versions. - repeated ModuleVersion module_versions = 1; -} - -// QueryAuthorityRequest is the request type for Query/Authority -// -// Since: cosmos-sdk 0.46 -message QueryAuthorityRequest {} - -// QueryAuthorityResponse is the response type for Query/Authority -// -// Since: cosmos-sdk 0.46 -message QueryAuthorityResponse { - string address = 1; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/tx.proto deleted file mode 100644 index 4a6c9ee1..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/tx.proto +++ /dev/null @@ -1,62 +0,0 @@ -// Since: cosmos-sdk 0.46 -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/upgrade/v1beta1/upgrade.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -option go_package = "cosmossdk.io/x/upgrade/types"; - -// Msg defines the upgrade Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // SoftwareUpgrade is a governance operation for initiating a software upgrade. - // - // Since: cosmos-sdk 0.46 - rpc SoftwareUpgrade(MsgSoftwareUpgrade) returns (MsgSoftwareUpgradeResponse); - - // CancelUpgrade is a governance operation for cancelling a previously - // approved software upgrade. - // - // Since: cosmos-sdk 0.46 - rpc CancelUpgrade(MsgCancelUpgrade) returns (MsgCancelUpgradeResponse); -} - -// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. -// -// Since: cosmos-sdk 0.46 -message MsgSoftwareUpgrade { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/MsgSoftwareUpgrade"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // plan is the upgrade plan. - Plan plan = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. -// -// Since: cosmos-sdk 0.46 -message MsgSoftwareUpgradeResponse {} - -// MsgCancelUpgrade is the Msg/CancelUpgrade request type. -// -// Since: cosmos-sdk 0.46 -message MsgCancelUpgrade { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "cosmos-sdk/MsgCancelUpgrade"; - - // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - -// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. -// -// Since: cosmos-sdk 0.46 -message MsgCancelUpgradeResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto b/packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto deleted file mode 100644 index 5dfb289d..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +++ /dev/null @@ -1,94 +0,0 @@ -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; - -option go_package = "cosmossdk.io/x/upgrade/types"; -option (gogoproto.goproto_getters_all) = false; - -// Plan specifies information about a planned upgrade and when it should occur. -message Plan { - option (amino.name) = "cosmos-sdk/Plan"; - option (gogoproto.equal) = true; - - // Sets the name for the upgrade. This name will be used by the upgraded - // version of the software to apply any special "on-upgrade" commands during - // the first BeginBlock method after the upgrade is applied. It is also used - // to detect whether a software version can handle a given upgrade. If no - // upgrade handler with this name has been set in the software, it will be - // assumed that the software is out-of-date when the upgrade Time or Height is - // reached and the software will exit. - string name = 1; - - // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic - // has been removed from the SDK. - // If this field is not empty, an error will be thrown. - google.protobuf.Timestamp time = 2 - [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - - // The height at which the upgrade must be performed. - int64 height = 3; - - // Any application specific upgrade info to be included on-chain - // such as a git commit that validators could automatically upgrade to - string info = 4; - - // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been - // moved to the IBC module in the sub module 02-client. - // If this field is not empty, an error will be thrown. - google.protobuf.Any upgraded_client_state = 5 [deprecated = true]; -} - -// SoftwareUpgradeProposal is a gov Content type for initiating a software -// upgrade. -// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -// proposals, see MsgSoftwareUpgrade. -message SoftwareUpgradeProposal { - option deprecated = true; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - option (amino.name) = "cosmos-sdk/SoftwareUpgradeProposal"; - option (gogoproto.equal) = true; - - // title of the proposal - string title = 1; - - // description of the proposal - string description = 2; - - // plan of the proposal - Plan plan = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software -// upgrade. -// Deprecated: This legacy proposal is deprecated in favor of Msg-based gov -// proposals, see MsgCancelUpgrade. -message CancelSoftwareUpgradeProposal { - option deprecated = true; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - option (amino.name) = "cosmos-sdk/CancelSoftwareUpgradeProposal"; - option (gogoproto.equal) = true; - - // title of the proposal - string title = 1; - - // description of the proposal - string description = 2; -} - -// ModuleVersion specifies a module and its consensus version. -// -// Since: cosmos-sdk 0.43 -message ModuleVersion { - option (gogoproto.equal) = true; - - // name of the app module - string name = 1; - - // consensus version of the app module - uint64 version = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/vesting/module/v1/module.proto b/packages/injective-protobuf/third_party/proto/cosmos/vesting/module/v1/module.proto deleted file mode 100644 index 88bb89c1..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/vesting/module/v1/module.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package cosmos.vesting.module.v1; - -import "cosmos/app/v1alpha1/module.proto"; - -// Module is the config object of the vesting module. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/cosmos-sdk/x/auth/vesting" - }; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/cosmos/vesting/v1beta1/tx.proto b/packages/injective-protobuf/third_party/proto/cosmos/vesting/v1beta1/tx.proto deleted file mode 100644 index 67008724..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/vesting/v1beta1/tx.proto +++ /dev/null @@ -1,102 +0,0 @@ -syntax = "proto3"; -package cosmos.vesting.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/vesting/v1beta1/vesting.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; - -// Msg defines the bank Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - - // CreateVestingAccount defines a method that enables creating a vesting - // account. - rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); - // CreatePermanentLockedAccount defines a method that enables creating a permanent - // locked account. - // - // Since: cosmos-sdk 0.46 - rpc CreatePermanentLockedAccount(MsgCreatePermanentLockedAccount) returns (MsgCreatePermanentLockedAccountResponse); - // CreatePeriodicVestingAccount defines a method that enables creating a - // periodic vesting account. - // - // Since: cosmos-sdk 0.46 - rpc CreatePeriodicVestingAccount(MsgCreatePeriodicVestingAccount) returns (MsgCreatePeriodicVestingAccountResponse); -} - -// MsgCreateVestingAccount defines a message that enables creating a vesting -// account. -message MsgCreateVestingAccount { - option (cosmos.msg.v1.signer) = "from_address"; - option (amino.name) = "cosmos-sdk/MsgCreateVestingAccount"; - - option (gogoproto.equal) = true; - - string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string to_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - - // end of vesting as unix time (in seconds). - int64 end_time = 4; - bool delayed = 5; -} - -// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. -message MsgCreateVestingAccountResponse {} - -// MsgCreatePermanentLockedAccount defines a message that enables creating a permanent -// locked account. -// -// Since: cosmos-sdk 0.46 -message MsgCreatePermanentLockedAccount { - option (cosmos.msg.v1.signer) = "from_address"; - option (amino.name) = "cosmos-sdk/MsgCreatePermLockedAccount"; - option (gogoproto.equal) = true; - - string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; - string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; - repeated cosmos.base.v1beta1.Coin amount = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. -// -// Since: cosmos-sdk 0.46 -message MsgCreatePermanentLockedAccountResponse {} - -// MsgCreateVestingAccount defines a message that enables creating a vesting -// account. -// -// Since: cosmos-sdk 0.46 -message MsgCreatePeriodicVestingAccount { - option (cosmos.msg.v1.signer) = "from_address"; - option (amino.name) = "cosmos-sdk/MsgCreatePeriodVestAccount"; - - option (gogoproto.equal) = false; - - string from_address = 1; - string to_address = 2; - // start of vesting as unix time (in seconds). - int64 start_time = 3; - repeated Period vesting_periods = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount -// response type. -// -// Since: cosmos-sdk 0.46 -message MsgCreatePeriodicVestingAccountResponse {} diff --git a/packages/injective-protobuf/third_party/proto/cosmos/vesting/v1beta1/vesting.proto b/packages/injective-protobuf/third_party/proto/cosmos/vesting/v1beta1/vesting.proto deleted file mode 100644 index 12e9cdd2..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos/vesting/v1beta1/vesting.proto +++ /dev/null @@ -1,94 +0,0 @@ -syntax = "proto3"; -package cosmos.vesting.v1beta1; - -import "amino/amino.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/auth/v1beta1/auth.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; - -// BaseVestingAccount implements the VestingAccount interface. It contains all -// the necessary fields needed for any vesting account implementation. -message BaseVestingAccount { - option (amino.name) = "cosmos-sdk/BaseVestingAccount"; - option (gogoproto.goproto_getters) = false; - - cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; - repeated cosmos.base.v1beta1.Coin original_vesting = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - repeated cosmos.base.v1beta1.Coin delegated_free = 3 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - repeated cosmos.base.v1beta1.Coin delegated_vesting = 4 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - // Vesting end time, as unix timestamp (in seconds). - int64 end_time = 5; -} - -// ContinuousVestingAccount implements the VestingAccount interface. It -// continuously vests by unlocking coins linearly with respect to time. -message ContinuousVestingAccount { - option (amino.name) = "cosmos-sdk/ContinuousVestingAccount"; - option (gogoproto.goproto_getters) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - // Vesting start time, as unix timestamp (in seconds). - int64 start_time = 2; -} - -// DelayedVestingAccount implements the VestingAccount interface. It vests all -// coins after a specific time, but non prior. In other words, it keeps them -// locked until a specified time. -message DelayedVestingAccount { - option (amino.name) = "cosmos-sdk/DelayedVestingAccount"; - option (gogoproto.goproto_getters) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; -} - -// Period defines a length of time and amount of coins that will vest. -message Period { - // Period duration in seconds. - int64 length = 1; - repeated cosmos.base.v1beta1.Coin amount = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (amino.encoding) = "legacy_coins", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// PeriodicVestingAccount implements the VestingAccount interface. It -// periodically vests by unlocking coins during each specified period. -message PeriodicVestingAccount { - option (amino.name) = "cosmos-sdk/PeriodicVestingAccount"; - option (gogoproto.goproto_getters) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - int64 start_time = 2; - repeated Period vesting_periods = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; -} - -// PermanentLockedAccount implements the VestingAccount interface. It does -// not ever release coins, locking them indefinitely. Coins in this account can -// still be used for delegating and for governance votes even while locked. -// -// Since: cosmos-sdk 0.43 -message PermanentLockedAccount { - option (amino.name) = "cosmos-sdk/PermanentLockedAccount"; - option (gogoproto.goproto_getters) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; -} diff --git a/packages/injective-protobuf/third_party/proto/cosmos_proto/cosmos.proto b/packages/injective-protobuf/third_party/proto/cosmos_proto/cosmos.proto deleted file mode 100644 index 5c63b86f..00000000 --- a/packages/injective-protobuf/third_party/proto/cosmos_proto/cosmos.proto +++ /dev/null @@ -1,97 +0,0 @@ -syntax = "proto3"; -package cosmos_proto; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cosmos/cosmos-proto;cosmos_proto"; - -extend google.protobuf.MessageOptions { - - // implements_interface is used to indicate the type name of the interface - // that a message implements so that it can be used in google.protobuf.Any - // fields that accept that interface. A message can implement multiple - // interfaces. Interfaces should be declared using a declare_interface - // file option. - repeated string implements_interface = 93001; -} - -extend google.protobuf.FieldOptions { - - // accepts_interface is used to annotate that a google.protobuf.Any - // field accepts messages that implement the specified interface. - // Interfaces should be declared using a declare_interface file option. - string accepts_interface = 93001; - - // scalar is used to indicate that this field follows the formatting defined - // by the named scalar which should be declared with declare_scalar. Code - // generators may choose to use this information to map this field to a - // language-specific type representing the scalar. - string scalar = 93002; -} - -extend google.protobuf.FileOptions { - - // declare_interface declares an interface type to be used with - // accepts_interface and implements_interface. Interface names are - // expected to follow the following convention such that their declaration - // can be discovered by tools: for a given interface type a.b.C, it is - // expected that the declaration will be found in a protobuf file named - // a/b/interfaces.proto in the file descriptor set. - repeated InterfaceDescriptor declare_interface = 793021; - - // declare_scalar declares a scalar type to be used with - // the scalar field option. Scalar names are - // expected to follow the following convention such that their declaration - // can be discovered by tools: for a given scalar type a.b.C, it is - // expected that the declaration will be found in a protobuf file named - // a/b/scalars.proto in the file descriptor set. - repeated ScalarDescriptor declare_scalar = 793022; -} - -// InterfaceDescriptor describes an interface type to be used with -// accepts_interface and implements_interface and declared by declare_interface. -message InterfaceDescriptor { - - // name is the name of the interface. It should be a short-name (without - // a period) such that the fully qualified name of the interface will be - // package.name, ex. for the package a.b and interface named C, the - // fully-qualified name will be a.b.C. - string name = 1; - - // description is a human-readable description of the interface and its - // purpose. - string description = 2; -} - -// ScalarDescriptor describes an scalar type to be used with -// the scalar field option and declared by declare_scalar. -// Scalars extend simple protobuf built-in types with additional -// syntax and semantics, for instance to represent big integers. -// Scalars should ideally define an encoding such that there is only one -// valid syntactical representation for a given semantic meaning, -// i.e. the encoding should be deterministic. -message ScalarDescriptor { - - // name is the name of the scalar. It should be a short-name (without - // a period) such that the fully qualified name of the scalar will be - // package.name, ex. for the package a.b and scalar named C, the - // fully-qualified name will be a.b.C. - string name = 1; - - // description is a human-readable description of the scalar and its - // encoding format. For instance a big integer or decimal scalar should - // specify precisely the expected encoding format. - string description = 2; - - // field_type is the type of field with which this scalar can be used. - // Scalars can be used with one and only one type of field so that - // encoding standards and simple and clear. Currently only string and - // bytes fields are supported for scalars. - repeated ScalarType field_type = 3; -} - -enum ScalarType { - SCALAR_TYPE_UNSPECIFIED = 0; - SCALAR_TYPE_STRING = 1; - SCALAR_TYPE_BYTES = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/gogoproto/gogo.proto b/packages/injective-protobuf/third_party/proto/gogoproto/gogo.proto deleted file mode 100644 index 974b36a7..00000000 --- a/packages/injective-protobuf/third_party/proto/gogoproto/gogo.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/cosmos/gogoproto -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package gogoproto; - -import "google/protobuf/descriptor.proto"; - -option java_package = "com.google.protobuf"; -option java_outer_classname = "GoGoProtos"; -option go_package = "github.com/cosmos/gogoproto/gogoproto"; - -extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; -} - -extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; -} - -extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; - - optional bool goproto_sizecache_all = 63034; - optional bool goproto_unkeyed_all = 63035; -} - -extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; - - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; - - optional bool sizer = 64020; - - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; - - optional bool protosizer = 64028; - optional bool compare = 64029; - - optional bool typedecl = 64030; - - optional bool messagename = 64033; - - optional bool goproto_sizecache = 64034; - optional bool goproto_unkeyed = 64035; -} - -extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; - optional bool wktpointer = 65012; - - optional string castrepeated = 65013; -} diff --git a/packages/injective-protobuf/third_party/proto/google/api/annotations.proto b/packages/injective-protobuf/third_party/proto/google/api/annotations.proto deleted file mode 100644 index efdab3db..00000000 --- a/packages/injective-protobuf/third_party/proto/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2015 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// 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. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/packages/injective-protobuf/third_party/proto/google/api/http.proto b/packages/injective-protobuf/third_party/proto/google/api/http.proto deleted file mode 100644 index 31d867a2..00000000 --- a/packages/injective-protobuf/third_party/proto/google/api/http.proto +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// 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. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parameters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// # gRPC Transcoding -// -// gRPC Transcoding is a feature for mapping between a gRPC method and one or -// more HTTP REST endpoints. It allows developers to build a single API service -// that supports both gRPC APIs and REST APIs. Many systems, including [Google -// APIs](https://github.com/googleapis/googleapis), -// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC -// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), -// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature -// and use it for large scale production services. -// -// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies -// how different portions of the gRPC request message are mapped to the URL -// path, URL query parameters, and HTTP request body. It also controls how the -// gRPC response message is mapped to the HTTP response body. `HttpRule` is -// typically specified as an `google.api.http` annotation on the gRPC method. -// -// Each mapping specifies a URL path template and an HTTP method. The path -// template may refer to one or more fields in the gRPC request message, as long -// as each field is a non-repeated field with a primitive (non-message) type. -// The path template controls how fields of the request message are mapped to -// the URL path. -// -// Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/{name=messages/*}" -// }; -// } -// } -// message GetMessageRequest { -// string name = 1; // Mapped to URL path. -// } -// message Message { -// string text = 1; // The resource content. -// } -// -// This enables an HTTP REST to gRPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` -// -// Any fields in the request message which are not bound by the path template -// automatically become HTTP query parameters if there is no HTTP request body. -// For example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get:"/v1/messages/{message_id}" -// }; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // Mapped to URL path. -// int64 revision = 2; // Mapped to URL query parameter `revision`. -// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. -// } -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | -// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: -// "foo"))` -// -// Note that fields which are mapped to URL query parameters must have a -// primitive type or a repeated primitive type or a non-repeated message type. -// In the case of a repeated type, the parameter can be repeated in the URL -// as `...?param=A¶m=B`. In the case of a message type, each field of the -// message is mapped to a separate parameter, such as -// `...?foo.a=A&foo.b=B&foo.c=C`. -// -// For HTTP methods that allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// patch: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | gRPC -// -----|----- -// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: -// "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice when -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// This enables the following two alternative HTTP JSON to RPC mappings: -// -// HTTP | gRPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: -// "123456")` -// -// ## Rules for HTTP mapping -// -// 1. Leaf request fields (recursive expansion nested messages in the request -// message) are classified into three categories: -// - Fields referred by the path template. They are passed via the URL path. -// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They -// are passed via the HTTP -// request body. -// - All other fields are passed via the URL query parameters, and the -// parameter name is the field path in the request message. A repeated -// field can be represented as multiple query parameters under the same -// name. -// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL -// query parameter, all fields -// are passed via URL path and HTTP request body. -// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP -// request body, all -// fields are passed via URL path and URL query parameters. -// -// ### Path template syntax -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single URL path segment. The syntax `**` matches -// zero or more URL path segments, which must be the last part of the URL path -// except the `Verb`. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` -// contains any reserved character, such characters should be percent-encoded -// before the matching. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path on the client -// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The -// server side does the reverse decoding. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{var}`. -// -// If a variable contains multiple path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path on the -// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. -// The server side does the reverse decoding, except "%2F" and "%2f" are left -// unchanged. Such variables show up in the -// [Discovery -// Document](https://developers.google.com/discovery/v1/reference/apis) as -// `{+var}`. -// -// ## Using gRPC API Service Configuration -// -// gRPC API Service Configuration (service config) is a configuration language -// for configuring a gRPC service to become a user-facing product. The -// service config is simply the YAML representation of the `google.api.Service` -// proto message. -// -// As an alternative to annotating your proto file, you can configure gRPC -// transcoding in your service config YAML files. You do this by specifying a -// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same -// effect as the proto annotation. This can be particularly useful if you -// have a proto that is reused in multiple services. Note that any transcoding -// specified in the service config will override any matching transcoding -// configuration in the proto. -// -// Example: -// -// http: -// rules: -// # Selects a gRPC method and applies HttpRule to it. -// - selector: example.v1.Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// ## Special notes -// -// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the -// proto to JSON conversion must follow the [proto3 -// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). -// -// While the single segment variable follows the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String -// Expansion, the multi segment variable **does not** follow RFC 6570 Section -// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding -// for multi segment variables. -// -// The path variables **must not** refer to any repeated or mapped field, -// because client libraries are not capable of handling such variable expansion. -// -// The path variables **must not** capture the leading "/" character. The reason -// is that the most common use case "{var}" does not capture the leading "/" -// character. For consistency, all path variables must share the same behavior. -// -// Repeated message fields must not be mapped to URL query parameters, because -// no client library can support such complicated mapping. -// -// If an API needs to use a JSON array for request or response body, it can map -// the request or response body to a repeated field. However, some gRPC -// Transcoding implementations may not support this feature. -message HttpRule { - // Selects a method to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax - // details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Maps to HTTP GET. Used for listing and getting information about - // resources. - string get = 2; - - // Maps to HTTP PUT. Used for replacing a resource. - string put = 3; - - // Maps to HTTP POST. Used for creating a resource or performing an action. - string post = 4; - - // Maps to HTTP DELETE. Used for deleting a resource. - string delete = 5; - - // Maps to HTTP PATCH. Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP request - // body, or `*` for mapping all request fields not captured by the path - // pattern to the HTTP body, or omitted for not having any HTTP request body. - // - // NOTE: the referred field must be present at the top-level of the request - // message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // response body. When omitted, the entire response message will be used - // as the HTTP response body. - // - // NOTE: The referred field must be present at the top-level of the response - // message type. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/abci/types.proto b/packages/injective-protobuf/third_party/proto/tendermint/abci/types.proto deleted file mode 100644 index 73151984..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/abci/types.proto +++ /dev/null @@ -1,486 +0,0 @@ -syntax = "proto3"; -package tendermint.abci; - -option go_package = "github.com/cometbft/cometbft/abci/types"; - -// For more information on gogo.proto, see: -// https://github.com/cosmos/gogoproto/blob/master/extensions.md -import "tendermint/crypto/proof.proto"; -import "tendermint/crypto/keys.proto"; -import "tendermint/types/params.proto"; -import "tendermint/types/validator.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -// NOTE: When using custom types, mind the warnings. -// https://github.com/cosmos/gogoproto/blob/master/custom_types.md#warnings-and-issues - -service ABCI { - rpc Echo(RequestEcho) returns (ResponseEcho); - rpc Flush(RequestFlush) returns (ResponseFlush); - rpc Info(RequestInfo) returns (ResponseInfo); - rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); - rpc Query(RequestQuery) returns (ResponseQuery); - rpc Commit(RequestCommit) returns (ResponseCommit); - rpc InitChain(RequestInitChain) returns (ResponseInitChain); - rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); - rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); - rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) - returns (ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(RequestApplySnapshotChunk) - returns (ResponseApplySnapshotChunk); - rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal); - rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal); - rpc ExtendVote(RequestExtendVote) returns (ResponseExtendVote); - rpc VerifyVoteExtension(RequestVerifyVoteExtension) returns (ResponseVerifyVoteExtension); - rpc FinalizeBlock(RequestFinalizeBlock) returns (ResponseFinalizeBlock); -} - -//---------------------------------------- -// Request types - -message Request { - oneof value { - RequestEcho echo = 1; - RequestFlush flush = 2; - RequestInfo info = 3; - RequestInitChain init_chain = 5; - RequestQuery query = 6; - RequestCheckTx check_tx = 8; - RequestCommit commit = 11; - RequestListSnapshots list_snapshots = 12; - RequestOfferSnapshot offer_snapshot = 13; - RequestLoadSnapshotChunk load_snapshot_chunk = 14; - RequestApplySnapshotChunk apply_snapshot_chunk = 15; - RequestPrepareProposal prepare_proposal = 16; - RequestProcessProposal process_proposal = 17; - RequestExtendVote extend_vote = 18; - RequestVerifyVoteExtension verify_vote_extension = 19; - RequestFinalizeBlock finalize_block = 20; - } - reserved 4, 7, 9, 10; // SetOption, BeginBlock, DeliverTx, EndBlock -} - -message RequestEcho { - string message = 1; -} - -message RequestFlush {} - -message RequestInfo { - string version = 1; - uint64 block_version = 2; - uint64 p2p_version = 3; - string abci_version = 4; -} - -message RequestInitChain { - google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - tendermint.types.ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; -} - -message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - -enum CheckTxType { - NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; - RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; -} - -message RequestCheckTx { - bytes tx = 1; - CheckTxType type = 2; -} - -message RequestCommit {} - -// lists available snapshots -message RequestListSnapshots {} - -// offers a snapshot to the application -message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height -} - -// loads a snapshot chunk -message RequestLoadSnapshotChunk { - uint64 height = 1; - uint32 format = 2; - uint32 chunk = 3; -} - -// Applies a snapshot chunk -message RequestApplySnapshotChunk { - uint32 index = 1; - bytes chunk = 2; - string sender = 3; -} - -message RequestPrepareProposal { - // the modified transactions cannot exceed this size. - int64 max_tx_bytes = 1; - // txs is an array of transactions that will be included in a block, - // sent to the app for possible modifications. - repeated bytes txs = 2; - ExtendedCommitInfo local_last_commit = 3 [(gogoproto.nullable) = false]; - repeated Misbehavior misbehavior = 4 [(gogoproto.nullable) = false]; - int64 height = 5; - google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes next_validators_hash = 7; - // address of the public key of the validator proposing the block. - bytes proposer_address = 8; -} - -message RequestProcessProposal { - repeated bytes txs = 1; - CommitInfo proposed_last_commit = 2 [(gogoproto.nullable) = false]; - repeated Misbehavior misbehavior = 3 [(gogoproto.nullable) = false]; - // hash is the merkle root hash of the fields of the proposed block. - bytes hash = 4; - int64 height = 5; - google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes next_validators_hash = 7; - // address of the public key of the original proposer of the block. - bytes proposer_address = 8; -} - -// Extends a vote with application-injected data -message RequestExtendVote { - // the hash of the block that this vote may be referring to - bytes hash = 1; - // the height of the extended vote - int64 height = 2; -} - -// Verify the vote extension -message RequestVerifyVoteExtension { - // the hash of the block that this received vote corresponds to - bytes hash = 1; - // the validator that signed the vote extension - bytes validator_address = 2; - int64 height = 3; - bytes vote_extension = 4; -} - -message RequestFinalizeBlock { - repeated bytes txs = 1; - CommitInfo decided_last_commit = 2 [(gogoproto.nullable) = false]; - repeated Misbehavior misbehavior = 3 [(gogoproto.nullable) = false]; - // hash is the merkle root hash of the fields of the decided block. - bytes hash = 4; - int64 height = 5; - google.protobuf.Timestamp time = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes next_validators_hash = 7; - // proposer_address is the address of the public key of the original proposer of the block. - bytes proposer_address = 8; -} - -//---------------------------------------- -// Response types - -message Response { - oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseInitChain init_chain = 6; - ResponseQuery query = 7; - ResponseCheckTx check_tx = 9; - ResponseCommit commit = 12; - ResponseListSnapshots list_snapshots = 13; - ResponseOfferSnapshot offer_snapshot = 14; - ResponseLoadSnapshotChunk load_snapshot_chunk = 15; - ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - ResponsePrepareProposal prepare_proposal = 17; - ResponseProcessProposal process_proposal = 18; - ResponseExtendVote extend_vote = 19; - ResponseVerifyVoteExtension verify_vote_extension = 20; - ResponseFinalizeBlock finalize_block = 21; - } - reserved 5, 8, 10, 11; // SetOption, BeginBlock, DeliverTx, EndBlock -} - -// nondeterministic -message ResponseException { - string error = 1; -} - -message ResponseEcho { - string message = 1; -} - -message ResponseFlush {} - -message ResponseInfo { - string data = 1; - - string version = 2; - uint64 app_version = 3; - - int64 last_block_height = 4; - bytes last_block_app_hash = 5; -} - -message ResponseInitChain { - tendermint.types.ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; - bytes app_hash = 3; -} - -message ResponseQuery { - uint32 code = 1; - // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - tendermint.crypto.ProofOps proof_ops = 8; - int64 height = 9; - string codespace = 10; -} - -message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; - - // These reserved fields were used until v0.37 by the priority mempool (now - // removed). - reserved 9 to 11; - reserved "sender", "priority", "mempool_error"; -} - -message ResponseCommit { - reserved 1, 2; // data was previously returned here - int64 retain_height = 3; -} - -message ResponseListSnapshots { - repeated Snapshot snapshots = 1; -} - -message ResponseOfferSnapshot { - Result result = 1; - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others - } -} - -message ResponseLoadSnapshotChunk { - bytes chunk = 1; -} - -message ResponseApplySnapshotChunk { - Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others - } -} - -message ResponsePrepareProposal { - repeated bytes txs = 1; -} - -message ResponseProcessProposal { - ProposalStatus status = 1; - - enum ProposalStatus { - UNKNOWN = 0; - ACCEPT = 1; - REJECT = 2; - } -} - -message ResponseExtendVote { - bytes vote_extension = 1; -} - -message ResponseVerifyVoteExtension { - VerifyStatus status = 1; - - enum VerifyStatus { - UNKNOWN = 0; - ACCEPT = 1; - // Rejecting the vote extension will reject the entire precommit by the sender. - // Incorrectly implementing this thus has liveness implications as it may affect - // CometBFT's ability to receive 2/3+ valid votes to finalize the block. - // Honest nodes should never be rejected. - REJECT = 2; - } -} - -message ResponseFinalizeBlock { - // set of block events emmitted as part of executing the block - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - // the result of executing each transaction including the events - // the particular transction emitted. This should match the order - // of the transactions delivered in the block itself - repeated ExecTxResult tx_results = 2; - // a list of updates to the validator set. These will reflect the validator set at current height + 2. - repeated ValidatorUpdate validator_updates = 3 [(gogoproto.nullable) = false]; - // updates to the consensus params, if any. - tendermint.types.ConsensusParams consensus_param_updates = 4; - // app_hash is the hash of the applications' state which is used to confirm that execution of the transactions was deterministic. It is up to the application to decide which algorithm to use. - bytes app_hash = 5; -} - -//---------------------------------------- -// Misc. - -message CommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - -// ExtendedCommitInfo is similar to CommitInfo except that it is only used in -// the PrepareProposal request such that CometBFT can provide vote extensions -// to the application. -message ExtendedCommitInfo { - // The round at which the block proposer decided in the previous height. - int32 round = 1; - // List of validators' addresses in the last validator set with their voting - // information, including vote extensions. - repeated ExtendedVoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - -// Event allows application developers to attach additional information to -// ResponseFinalizeBlock and ResponseCheckTx. -// Later, transactions may be queried using these events. -message Event { - string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; -} - -// EventAttribute is a single key-value pair, associated with an event. -message EventAttribute { - string key = 1; - string value = 2; - bool index = 3; // nondeterministic -} - -// ExecTxResult contains results of executing one individual transaction. -// -// * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted -message ExecTxResult { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5; - int64 gas_used = 6; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic - string codespace = 8; -} - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -message TxResult { - int64 height = 1; - uint32 index = 2; - bytes tx = 3; - ExecTxResult result = 4 [(gogoproto.nullable) = false]; -} - -//---------------------------------------- -// Blockchain Types - -message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power -} - -message ValidatorUpdate { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - int64 power = 2; -} - -message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - tendermint.types.BlockIDFlag block_id_flag = 3; - - reserved 2; // signed_last_block -} - -message ExtendedVoteInfo { - // The validator that sent the vote. - Validator validator = 1 [(gogoproto.nullable) = false]; - // Non-deterministic extension provided by the sending validator's application. - bytes vote_extension = 3; - // Vote extension signature created by CometBFT - bytes extension_signature = 4; - // block_id_flag indicates whether the validator voted for a block, nil, or did not vote at all - tendermint.types.BlockIDFlag block_id_flag = 5; - - reserved 2; // signed_last_block -} - -enum MisbehaviorType { - UNKNOWN = 0; - DUPLICATE_VOTE = 1; - LIGHT_CLIENT_ATTACK = 2; -} - -message Misbehavior { - MisbehaviorType type = 1; - // The offending validator - Validator validator = 2 [(gogoproto.nullable) = false]; - // The height when the offense occurred - int64 height = 3; - // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // Total voting power of the validator set in case the ABCI application does - // not store historical validators. - // https://github.com/tendermint/tendermint/issues/4581 - int64 total_voting_power = 5; -} - -//---------------------------------------- -// State Sync Types - -message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/crypto/keys.proto b/packages/injective-protobuf/third_party/proto/tendermint/crypto/keys.proto deleted file mode 100644 index 8fa192fa..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/crypto/keys.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -// PublicKey defines the keys available for use with Validators -message PublicKey { - option (gogoproto.compare) = true; - option (gogoproto.equal) = true; - - oneof sum { - bytes ed25519 = 1; - bytes secp256k1 = 2; - } -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/crypto/proof.proto b/packages/injective-protobuf/third_party/proto/tendermint/crypto/proof.proto deleted file mode 100644 index ae72195e..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/crypto/proof.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -message Proof { - int64 total = 1; - int64 index = 2; - bytes leaf_hash = 3; - repeated bytes aunts = 4; -} - -message ValueOp { - // Encoded in ProofOp.Key. - bytes key = 1; - - // To encode in ProofOp.Data - Proof proof = 2; -} - -message DominoOp { - string key = 1; - string input = 2; - string output = 3; -} - -// ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing nessecary data -// for example neighbouring node hash -message ProofOp { - string type = 1; - bytes key = 2; - bytes data = 3; -} - -// ProofOps is Merkle proof defined by the list of ProofOps -message ProofOps { - repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/libs/bits/types.proto b/packages/injective-protobuf/third_party/proto/tendermint/libs/bits/types.proto deleted file mode 100644 index e6afc5e8..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/libs/bits/types.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package tendermint.libs.bits; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/libs/bits"; - -message BitArray { - int64 bits = 1; - repeated uint64 elems = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/p2p/types.proto b/packages/injective-protobuf/third_party/proto/tendermint/p2p/types.proto deleted file mode 100644 index 157d8ba1..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/p2p/types.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package tendermint.p2p; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/p2p"; - -import "gogoproto/gogo.proto"; - -message NetAddress { - string id = 1 [(gogoproto.customname) = "ID"]; - string ip = 2 [(gogoproto.customname) = "IP"]; - uint32 port = 3; -} - -message ProtocolVersion { - uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; - uint64 block = 2; - uint64 app = 3; -} - -message DefaultNodeInfo { - ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; - string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; - string listen_addr = 3; - string network = 4; - string version = 5; - bytes channels = 6; - string moniker = 7; - DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; -} - -message DefaultNodeInfoOther { - string tx_index = 1; - string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/types/block.proto b/packages/injective-protobuf/third_party/proto/tendermint/types/block.proto deleted file mode 100644 index d531c06a..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/types/block.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/evidence.proto"; - -message Block { - Header header = 1 [(gogoproto.nullable) = false]; - Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - Commit last_commit = 4; -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/types/evidence.proto b/packages/injective-protobuf/third_party/proto/tendermint/types/evidence.proto deleted file mode 100644 index 1f35049b..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/types/evidence.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/validator.proto"; - -message Evidence { - oneof sum { - DuplicateVoteEvidence duplicate_vote_evidence = 1; - LightClientAttackEvidence light_client_attack_evidence = 2; - } -} - -// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. -message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; - repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -message EvidenceList { - repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/types/params.proto b/packages/injective-protobuf/third_party/proto/tendermint/types/params.proto deleted file mode 100644 index f96a2e2f..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/types/params.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option (gogoproto.equal_all) = true; - -// ConsensusParams contains consensus critical parameters that determine the -// validity of blocks. -message ConsensusParams { - BlockParams block = 1; - EvidenceParams evidence = 2; - ValidatorParams validator = 3; - VersionParams version = 4; - ABCIParams abci = 5; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Max block size, in bytes. - // Note: must be greater than 0 - int64 max_bytes = 1; - // Max gas per block. - // Note: must be greater or equal to -1 - int64 max_gas = 2; - - reserved 3; // was TimeIotaMs see https://github.com/tendermint/tendermint/pull/5792 -} - -// EvidenceParams determine how we handle evidence of malfeasance. -message EvidenceParams { - // Max age of evidence, in blocks. - // - // The basic formula for calculating this is: MaxAgeDuration / {average block - // time}. - int64 max_age_num_blocks = 1; - - // Max age of evidence, in time. - // - // It should correspond with an app's "unbonding period" or other similar - // mechanism for handling [Nothing-At-Stake - // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - - // This sets the maximum size of total evidence in bytes that can be committed in a single block. - // and should fall comfortably under the max block bytes. - // Default is 1048576 or 1MB - int64 max_bytes = 3; -} - -// ValidatorParams restrict the public key types validators can use. -// NOTE: uses ABCI pubkey naming, not Amino names. -message ValidatorParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - repeated string pub_key_types = 1; -} - -// VersionParams contains the ABCI application version. -message VersionParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - uint64 app = 1; -} - -// HashedParams is a subset of ConsensusParams. -// -// It is hashed into the Header.ConsensusHash. -message HashedParams { - int64 block_max_bytes = 1; - int64 block_max_gas = 2; -} - -// ABCIParams configure functionality specific to the Application Blockchain Interface. -message ABCIParams { - // vote_extensions_enable_height configures the first height during which - // vote extensions will be enabled. During this specified height, and for all - // subsequent heights, precommit messages that do not contain valid extension data - // will be considered invalid. Prior to this height, vote extensions will not - // be used or accepted by validators on the network. - // - // Once enabled, vote extensions will be created by the application in ExtendVote, - // passed to the application for validation in VerifyVoteExtension and given - // to the application to use when proposing a block during PrepareProposal. - int64 vote_extensions_enable_height = 1; -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/types/types.proto b/packages/injective-protobuf/third_party/proto/tendermint/types/types.proto deleted file mode 100644 index a527e2ff..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/types/types.proto +++ /dev/null @@ -1,178 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/crypto/proof.proto"; -import "tendermint/version/types.proto"; -import "tendermint/types/validator.proto"; - -// SignedMsgType is a type of signed message in the consensus. -enum SignedMsgType { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; - // Votes - SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; - SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; - - // Proposals - SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; -} - -// PartsetHeader -message PartSetHeader { - uint32 total = 1; - bytes hash = 2; -} - -message Part { - uint32 index = 1; - bytes bytes = 2; - tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; -} - -// BlockID -message BlockID { - bytes hash = 1; - PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; -} - -// -------------------------------- - -// Header defines the structure of a block header. -message Header { - // basic block info - tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; - - // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block - - // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block -} - -// Data contains the set of transactions included in the block -message Data { - // Txs that will be applied by state @ block.Height+1. - // NOTE: not all txs here are valid. We're just agreeing on the order first. - // This means that block.AppHash does not include these txs. - repeated bytes txs = 1; -} - -// Vote represents a prevote or precommit vote from validators for -// consensus. -message Vote { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - // Vote signature by the validator if they participated in consensus for the - // associated block. - bytes signature = 8; - // Vote extension provided by the application. Only valid for precommit - // messages. - bytes extension = 9; - // Vote extension signature by the validator if they participated in - // consensus for the associated block. - // Only valid for precommit messages. - bytes extension_signature = 10; -} - -// Commit contains the evidence that a block was committed by a set of validators. -message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; -} - -// CommitSig is a part of the Vote included in a Commit. -message CommitSig { - tendermint.types.BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; -} - -message ExtendedCommit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated ExtendedCommitSig extended_signatures = 4 [(gogoproto.nullable) = false]; -} - -// ExtendedCommitSig retains all the same fields as CommitSig but adds vote -// extension-related fields. We use two signatures to ensure backwards compatibility. -// That is the digest of the original signature is still the same in prior versions -message ExtendedCommitSig { - tendermint.types.BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; - // Vote extension data - bytes extension = 5; - // Vote extension signature - bytes extension_signature = 6; -} - -message Proposal { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - int32 pol_round = 4; - BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; -} - -message SignedHeader { - Header header = 1; - Commit commit = 2; -} - -message LightBlock { - SignedHeader signed_header = 1; - tendermint.types.ValidatorSet validator_set = 2; -} - -message BlockMeta { - BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - int64 block_size = 2; - Header header = 3 [(gogoproto.nullable) = false]; - int64 num_txs = 4; -} - -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -message TxProof { - bytes root_hash = 1; - bytes data = 2; - tendermint.crypto.Proof proof = 3; -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/types/validator.proto b/packages/injective-protobuf/third_party/proto/tendermint/types/validator.proto deleted file mode 100644 index 7b55956f..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/types/validator.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/crypto/keys.proto"; - -// BlockIdFlag indicates which BlockID the signature is for -enum BlockIDFlag { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; // indicates an error condition - BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; // the vote was not received - BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; // voted for the block that received the majority - BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; // voted for nil -} - - -message ValidatorSet { - repeated Validator validators = 1; - Validator proposer = 2; - int64 total_voting_power = 3; -} - -message Validator { - bytes address = 1; - tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -message SimpleValidator { - tendermint.crypto.PublicKey pub_key = 1; - int64 voting_power = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/tendermint/version/types.proto b/packages/injective-protobuf/third_party/proto/tendermint/version/types.proto deleted file mode 100644 index 3b6ef454..00000000 --- a/packages/injective-protobuf/third_party/proto/tendermint/version/types.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package tendermint.version; - -option go_package = "github.com/cometbft/cometbft/proto/tendermint/version"; - -import "gogoproto/gogo.proto"; - -// App includes the protocol and software version for the application. -// This information is included in ResponseInfo. The App.Protocol can be -// updated in ResponseEndBlock. -message App { - uint64 protocol = 1; - string software = 2; -} - -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. -message Consensus { - option (gogoproto.equal) = true; - - uint64 block = 1; - uint64 app = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/testpb/bank.proto b/packages/injective-protobuf/third_party/proto/testpb/bank.proto deleted file mode 100644 index 1778aacd..00000000 --- a/packages/injective-protobuf/third_party/proto/testpb/bank.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -package testpb; - -import "cosmos/orm/v1/orm.proto"; -import "cosmos/orm/v1alpha1/schema.proto"; -import "cosmos/app/v1alpha1/module.proto"; - -// This is a simulated bank schema used for testing. - -// Module is a test module for demonstrating how to use the ORM with appconfig. -message Module { - option (cosmos.app.v1alpha1.module) = { - go_import: "github.com/cosmos/orm/model/ormdb" - }; - option (cosmos.orm.v1alpha1.module_schema) = { - schema_file: {id: 1 proto_file_name: "testpb/bank.proto"} - }; -} - -message Balance { - option (cosmos.orm.v1.table) = { - id: 1; -primary_key: { -fields: - "address,denom" -} -index: { -id: - 1 fields: "denom" -} -}; - -string address = 1; -string denom = 2; -uint64 amount = 3; -} - -message Supply { - option (cosmos.orm.v1.table) = { - id: 2; -primary_key: { -fields: - "denom" -} -}; - -string denom = 1; -uint64 amount = 2; -} diff --git a/packages/injective-protobuf/third_party/proto/testpb/bank_query.proto b/packages/injective-protobuf/third_party/proto/testpb/bank_query.proto deleted file mode 100644 index a204777b..00000000 --- a/packages/injective-protobuf/third_party/proto/testpb/bank_query.proto +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by protoc-gen-go-cosmos-orm-proto. DO NOT EDIT. -syntax = "proto3"; -package testpb; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "testpb/bank.proto"; - -// BankQueryService queries the state of the tables specified by testpb/bank.proto. -service BankQueryService { - // Get queries the Balance table by its primary key. - rpc GetBalance(GetBalanceRequest) returns (GetBalanceResponse) {} - // ListBalance queries the Balance table using prefix and range queries against defined indexes. - rpc ListBalance(ListBalanceRequest) returns (ListBalanceResponse) {} - // Get queries the Supply table by its primary key. - rpc GetSupply(GetSupplyRequest) returns (GetSupplyResponse) {} - // ListSupply queries the Supply table using prefix and range queries against defined indexes. - rpc ListSupply(ListSupplyRequest) returns (ListSupplyResponse) {} -} - -// GetBalanceRequest is the BankQuery/GetBalanceRequest request type. -message GetBalanceRequest { - // address specifies the value of the address field in the primary key. - string address = 1; - // denom specifies the value of the denom field in the primary key. - string denom = 2; -} - -// GetBalanceResponse is the BankQuery/GetBalanceResponse response type. -message GetBalanceResponse { - // value is the response value. - Balance value = 1; -} - -// ListBalanceRequest is the BankQuery/ListBalanceRequest request type. -message ListBalanceRequest { - // IndexKey specifies the value of an index key to use in prefix and range queries. - message IndexKey { - // key specifies the index key value. - oneof key { - // address_denom specifies the value of the AddressDenom index key to use in the query. - AddressDenom address_denom = 1; - // denom specifies the value of the Denom index key to use in the query. - Denom denom = 2; - } - - message AddressDenom { - // address is the value of the address field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string address = 1; - // denom is the value of the denom field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string denom = 2; - } - - message Denom { - // denom is the value of the denom field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string denom = 1; - } - } - - // query specifies the type of query - either a prefix or range query. - oneof query { - // prefix_query specifies the index key value to use for the prefix query. - IndexKey prefix_query = 1; - // range_query specifies the index key from/to values to use for the range query. - RangeQuery range_query = 2; - } - // pagination specifies optional pagination parameters. - cosmos.base.query.v1beta1.PageRequest pagination = 3; - - // RangeQuery specifies the from/to index keys for a range query. - message RangeQuery { - // from is the index key to use for the start of the range query. - // To query from the start of an index, specify an index key for that index with empty values. - IndexKey from = 1; - // to is the index key to use for the end of the range query. - // The index key type MUST be the same as the index key type used for from. - // To query from to the end of an index it can be omitted. - IndexKey to = 2; - } -} - -// ListBalanceResponse is the BankQuery/ListBalanceResponse response type. -message ListBalanceResponse { - // values are the results of the query. - repeated Balance values = 1; - // pagination is the pagination response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// GetSupplyRequest is the BankQuery/GetSupplyRequest request type. -message GetSupplyRequest { - // denom specifies the value of the denom field in the primary key. - string denom = 1; -} - -// GetSupplyResponse is the BankQuery/GetSupplyResponse response type. -message GetSupplyResponse { - // value is the response value. - Supply value = 1; -} - -// ListSupplyRequest is the BankQuery/ListSupplyRequest request type. -message ListSupplyRequest { - // IndexKey specifies the value of an index key to use in prefix and range queries. - message IndexKey { - // key specifies the index key value. - oneof key { - // denom specifies the value of the Denom index key to use in the query. - Denom denom = 1; - } - - message Denom { - // denom is the value of the denom field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string denom = 1; - } - } - - // query specifies the type of query - either a prefix or range query. - oneof query { - // prefix_query specifies the index key value to use for the prefix query. - IndexKey prefix_query = 1; - // range_query specifies the index key from/to values to use for the range query. - RangeQuery range_query = 2; - } - // pagination specifies optional pagination parameters. - cosmos.base.query.v1beta1.PageRequest pagination = 3; - - // RangeQuery specifies the from/to index keys for a range query. - message RangeQuery { - // from is the index key to use for the start of the range query. - // To query from the start of an index, specify an index key for that index with empty values. - IndexKey from = 1; - // to is the index key to use for the end of the range query. - // The index key type MUST be the same as the index key type used for from. - // To query from to the end of an index it can be omitted. - IndexKey to = 2; - } -} - -// ListSupplyResponse is the BankQuery/ListSupplyResponse response type. -message ListSupplyResponse { - // values are the results of the query. - repeated Supply values = 1; - // pagination is the pagination response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - diff --git a/packages/injective-protobuf/third_party/proto/testpb/test_schema.proto b/packages/injective-protobuf/third_party/proto/testpb/test_schema.proto deleted file mode 100644 index 3aed5831..00000000 --- a/packages/injective-protobuf/third_party/proto/testpb/test_schema.proto +++ /dev/null @@ -1,142 +0,0 @@ -syntax = "proto3"; - -package testpb; - -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; -import "cosmos/orm/v1/orm.proto"; - -message ExampleTable { - // clang-format off - option (cosmos.orm.v1.table) = { - id: 1; - primary_key: { - fields: - "u32,i64,str" - } - index: { - id: - 1; - fields: - "u64,str" unique: true - } - index: { - id: - 2; - fields: - "str,u32" - } - index: { - id: - 3; - fields: - "bz,str" - } - }; -// clang-format on - -// Valid key fields: -uint32 u32 = 1; -uint64 u64 = 2; -string str = 3; -bytes bz = 4; -google.protobuf.Timestamp ts = 5; -google.protobuf.Duration dur = 6; -int32 i32 = 7; -sint32 s32 = 8; -sfixed32 sf32 = 9; -int64 i64 = 10; -sint64 s64 = 11; -sfixed64 sf64 = 12; -fixed32 f32 = 13; -fixed64 f64 = 14; -bool b = 15; -Enum e = 16; - -// Invalid key fields: -repeated uint32 repeated = 17; -map map = 18; -ExampleMessage msg = 19; -oneof sum { - uint32 oneof = 20; -} - -message ExampleMessage { - string foo = 1; - int32 bar = 2; -} -} - -enum Enum { - ENUM_UNSPECIFIED = 0; - ENUM_ONE = 1; - ENUM_TWO = 2; - ENUM_FIVE = 5; - ENUM_NEG_THREE = -3; -} - -message ExampleAutoIncrementTable { - option (cosmos.orm.v1.table) = { - id: 3 - primary_key: {fields: "id" auto_increment: true} - index: {id: 1 fields: "x" unique: true} - }; - - uint64 id = 1; - string x = 2; - int32 y = 3; -} - -message ExampleSingleton { - option (cosmos.orm.v1.singleton) = { - id: 2 - }; - string foo = 1; - int32 bar = 2; -} - -message ExampleTimestamp { - option (cosmos.orm.v1.table) = { - id: 4 - primary_key: {fields: "id" auto_increment: true} - index: {id: 1 fields: "ts"} - }; - - uint64 id = 1; - string name = 2; - google.protobuf.Timestamp ts = 3; -} - -message ExampleDuration { - option (cosmos.orm.v1.table) = { - id: 4 - primary_key: {fields: "id" auto_increment: true} - index: {id: 1 fields: "dur"} - }; - - uint64 id = 1; - string name = 2; - google.protobuf.Duration dur = 3; -} - -message SimpleExample { - option (cosmos.orm.v1.table) = { - id: 5 - primary_key: {fields: "name"} - index: {id: 1, fields: "unique", unique: true} - }; - - string name = 1; - string unique = 2; - string not_unique = 3; -} - -// ExampleAutoIncFieldName is a table for testing InsertReturning. -message ExampleAutoIncFieldName { - option (cosmos.orm.v1.table) = { - id: 6 - primary_key: {fields: "foo" auto_increment: true} - }; - uint64 foo = 1; - uint64 bar = 2; -} \ No newline at end of file diff --git a/packages/injective-protobuf/third_party/proto/testpb/test_schema_query.proto b/packages/injective-protobuf/third_party/proto/testpb/test_schema_query.proto deleted file mode 100644 index 8e07ccfc..00000000 --- a/packages/injective-protobuf/third_party/proto/testpb/test_schema_query.proto +++ /dev/null @@ -1,514 +0,0 @@ -// Code generated by protoc-gen-go-cosmos-orm-proto. DO NOT EDIT. -syntax = "proto3"; -package testpb; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "testpb/test_schema.proto"; - -// TestSchemaQueryService queries the state of the tables specified by testpb/test_schema.proto. -service TestSchemaQueryService { - // Get queries the ExampleTable table by its primary key. - rpc GetExampleTable(GetExampleTableRequest) returns (GetExampleTableResponse) {} - // GetExampleTableByU64Str queries the ExampleTable table by its U64Str index - rpc GetExampleTableByU64Str(GetExampleTableByU64StrRequest) returns (GetExampleTableByU64StrResponse) {} - // ListExampleTable queries the ExampleTable table using prefix and range queries against defined indexes. - rpc ListExampleTable(ListExampleTableRequest) returns (ListExampleTableResponse) {} - // Get queries the ExampleAutoIncrementTable table by its primary key. - rpc GetExampleAutoIncrementTable(GetExampleAutoIncrementTableRequest) returns (GetExampleAutoIncrementTableResponse) {} - // GetExampleAutoIncrementTableByX queries the ExampleAutoIncrementTable table by its X index - rpc GetExampleAutoIncrementTableByX(GetExampleAutoIncrementTableByXRequest) returns (GetExampleAutoIncrementTableByXResponse) {} - // ListExampleAutoIncrementTable queries the ExampleAutoIncrementTable table using prefix and range queries against defined indexes. - rpc ListExampleAutoIncrementTable(ListExampleAutoIncrementTableRequest) returns (ListExampleAutoIncrementTableResponse) {} - // GetExampleSingleton queries the ExampleSingleton singleton. - rpc GetExampleSingleton(GetExampleSingletonRequest) returns (GetExampleSingletonResponse) {} - // Get queries the ExampleTimestamp table by its primary key. - rpc GetExampleTimestamp(GetExampleTimestampRequest) returns (GetExampleTimestampResponse) {} - // ListExampleTimestamp queries the ExampleTimestamp table using prefix and range queries against defined indexes. - rpc ListExampleTimestamp(ListExampleTimestampRequest) returns (ListExampleTimestampResponse) {} - // Get queries the ExampleDuration table by its primary key. - rpc GetExampleDuration(GetExampleDurationRequest) returns (GetExampleDurationResponse) {} - // ListExampleDuration queries the ExampleDuration table using prefix and range queries against defined indexes. - rpc ListExampleDuration(ListExampleDurationRequest) returns (ListExampleDurationResponse) {} - // Get queries the SimpleExample table by its primary key. - rpc GetSimpleExample(GetSimpleExampleRequest) returns (GetSimpleExampleResponse) {} - // GetSimpleExampleByUnique queries the SimpleExample table by its Unique index - rpc GetSimpleExampleByUnique(GetSimpleExampleByUniqueRequest) returns (GetSimpleExampleByUniqueResponse) {} - // ListSimpleExample queries the SimpleExample table using prefix and range queries against defined indexes. - rpc ListSimpleExample(ListSimpleExampleRequest) returns (ListSimpleExampleResponse) {} - // Get queries the ExampleAutoIncFieldName table by its primary key. - rpc GetExampleAutoIncFieldName(GetExampleAutoIncFieldNameRequest) returns (GetExampleAutoIncFieldNameResponse) {} - // ListExampleAutoIncFieldName queries the ExampleAutoIncFieldName table using prefix and range queries against defined indexes. - rpc ListExampleAutoIncFieldName(ListExampleAutoIncFieldNameRequest) returns (ListExampleAutoIncFieldNameResponse) {} -} - -// GetExampleTableRequest is the TestSchemaQuery/GetExampleTableRequest request type. -message GetExampleTableRequest { - // u32 specifies the value of the u32 field in the primary key. - uint32 u32 = 1; - // i64 specifies the value of the i64 field in the primary key. - int64 i64 = 2; - // str specifies the value of the str field in the primary key. - string str = 3; -} - -// GetExampleTableResponse is the TestSchemaQuery/GetExampleTableResponse response type. -message GetExampleTableResponse { - // value is the response value. - ExampleTable value = 1; -} - -// GetExampleTableByU64StrRequest is the TestSchemaQuery/GetExampleTableByU64StrRequest request type. -message GetExampleTableByU64StrRequest { - uint64 u64 = 1; - string str = 2; -} - -// GetExampleTableByU64StrResponse is the TestSchemaQuery/GetExampleTableByU64StrResponse response type. -message GetExampleTableByU64StrResponse { - ExampleTable value = 1; -} - -// ListExampleTableRequest is the TestSchemaQuery/ListExampleTableRequest request type. -message ListExampleTableRequest { - // IndexKey specifies the value of an index key to use in prefix and range queries. - message IndexKey { - // key specifies the index key value. - oneof key { - // u_32_i_64_str specifies the value of the U32I64Str index key to use in the query. - U32I64Str u_32_i_64_str = 1; - // u_64_str specifies the value of the U64Str index key to use in the query. - U64Str u_64_str = 2; - // str_u_32 specifies the value of the StrU32 index key to use in the query. - StrU32 str_u_32 = 3; - // bz_str specifies the value of the BzStr index key to use in the query. - BzStr bz_str = 4; - } - - message U32I64Str { - // u32 is the value of the u32 field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional uint32 u32 = 1; - // i64 is the value of the i64 field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional int64 i64 = 2; - // str is the value of the str field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string str = 3; - } - - message U64Str { - // u64 is the value of the u64 field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional uint64 u64 = 1; - // str is the value of the str field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string str = 2; - } - - message StrU32 { - // str is the value of the str field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string str = 1; - // u32 is the value of the u32 field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional uint32 u32 = 2; - } - - message BzStr { - // bz is the value of the bz field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional bytes bz = 1; - // str is the value of the str field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string str = 2; - } - } - - // query specifies the type of query - either a prefix or range query. - oneof query { - // prefix_query specifies the index key value to use for the prefix query. - IndexKey prefix_query = 1; - // range_query specifies the index key from/to values to use for the range query. - RangeQuery range_query = 2; - } - // pagination specifies optional pagination parameters. - cosmos.base.query.v1beta1.PageRequest pagination = 3; - - // RangeQuery specifies the from/to index keys for a range query. - message RangeQuery { - // from is the index key to use for the start of the range query. - // To query from the start of an index, specify an index key for that index with empty values. - IndexKey from = 1; - // to is the index key to use for the end of the range query. - // The index key type MUST be the same as the index key type used for from. - // To query from to the end of an index it can be omitted. - IndexKey to = 2; - } -} - -// ListExampleTableResponse is the TestSchemaQuery/ListExampleTableResponse response type. -message ListExampleTableResponse { - // values are the results of the query. - repeated ExampleTable values = 1; - // pagination is the pagination response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// GetExampleAutoIncrementTableRequest is the TestSchemaQuery/GetExampleAutoIncrementTableRequest request type. -message GetExampleAutoIncrementTableRequest { - // id specifies the value of the id field in the primary key. - uint64 id = 1; -} - -// GetExampleAutoIncrementTableResponse is the TestSchemaQuery/GetExampleAutoIncrementTableResponse response type. -message GetExampleAutoIncrementTableResponse { - // value is the response value. - ExampleAutoIncrementTable value = 1; -} - -// GetExampleAutoIncrementTableByXRequest is the TestSchemaQuery/GetExampleAutoIncrementTableByXRequest request type. -message GetExampleAutoIncrementTableByXRequest { - string x = 1; -} - -// GetExampleAutoIncrementTableByXResponse is the TestSchemaQuery/GetExampleAutoIncrementTableByXResponse response type. -message GetExampleAutoIncrementTableByXResponse { - ExampleAutoIncrementTable value = 1; -} - -// ListExampleAutoIncrementTableRequest is the TestSchemaQuery/ListExampleAutoIncrementTableRequest request type. -message ListExampleAutoIncrementTableRequest { - // IndexKey specifies the value of an index key to use in prefix and range queries. - message IndexKey { - // key specifies the index key value. - oneof key { - // id specifies the value of the Id index key to use in the query. - Id id = 1; - // x specifies the value of the X index key to use in the query. - X x = 2; - } - - message Id { - // id is the value of the id field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional uint64 id = 1; - } - - message X { - // x is the value of the x field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string x = 1; - } - } - - // query specifies the type of query - either a prefix or range query. - oneof query { - // prefix_query specifies the index key value to use for the prefix query. - IndexKey prefix_query = 1; - // range_query specifies the index key from/to values to use for the range query. - RangeQuery range_query = 2; - } - // pagination specifies optional pagination parameters. - cosmos.base.query.v1beta1.PageRequest pagination = 3; - - // RangeQuery specifies the from/to index keys for a range query. - message RangeQuery { - // from is the index key to use for the start of the range query. - // To query from the start of an index, specify an index key for that index with empty values. - IndexKey from = 1; - // to is the index key to use for the end of the range query. - // The index key type MUST be the same as the index key type used for from. - // To query from to the end of an index it can be omitted. - IndexKey to = 2; - } -} - -// ListExampleAutoIncrementTableResponse is the TestSchemaQuery/ListExampleAutoIncrementTableResponse response type. -message ListExampleAutoIncrementTableResponse { - // values are the results of the query. - repeated ExampleAutoIncrementTable values = 1; - // pagination is the pagination response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// GetExampleSingletonRequest is the TestSchemaQuery/GetExampleSingletonRequest request type. -message GetExampleSingletonRequest { -} - -// GetExampleSingletonResponse is the TestSchemaQuery/GetExampleSingletonResponse request type. -message GetExampleSingletonResponse { - ExampleSingleton value = 1; -} - -// GetExampleTimestampRequest is the TestSchemaQuery/GetExampleTimestampRequest request type. -message GetExampleTimestampRequest { - // id specifies the value of the id field in the primary key. - uint64 id = 1; -} - -// GetExampleTimestampResponse is the TestSchemaQuery/GetExampleTimestampResponse response type. -message GetExampleTimestampResponse { - // value is the response value. - ExampleTimestamp value = 1; -} - -// ListExampleTimestampRequest is the TestSchemaQuery/ListExampleTimestampRequest request type. -message ListExampleTimestampRequest { - // IndexKey specifies the value of an index key to use in prefix and range queries. - message IndexKey { - // key specifies the index key value. - oneof key { - // id specifies the value of the Id index key to use in the query. - Id id = 1; - // ts specifies the value of the Ts index key to use in the query. - Ts ts = 2; - } - - message Id { - // id is the value of the id field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional uint64 id = 1; - } - - message Ts { - // ts is the value of the ts field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional google.protobuf.Timestamp ts = 1; - } - } - - // query specifies the type of query - either a prefix or range query. - oneof query { - // prefix_query specifies the index key value to use for the prefix query. - IndexKey prefix_query = 1; - // range_query specifies the index key from/to values to use for the range query. - RangeQuery range_query = 2; - } - // pagination specifies optional pagination parameters. - cosmos.base.query.v1beta1.PageRequest pagination = 3; - - // RangeQuery specifies the from/to index keys for a range query. - message RangeQuery { - // from is the index key to use for the start of the range query. - // To query from the start of an index, specify an index key for that index with empty values. - IndexKey from = 1; - // to is the index key to use for the end of the range query. - // The index key type MUST be the same as the index key type used for from. - // To query from to the end of an index it can be omitted. - IndexKey to = 2; - } -} - -// ListExampleTimestampResponse is the TestSchemaQuery/ListExampleTimestampResponse response type. -message ListExampleTimestampResponse { - // values are the results of the query. - repeated ExampleTimestamp values = 1; - // pagination is the pagination response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// GetExampleDurationRequest is the TestSchemaQuery/GetExampleDurationRequest request type. -message GetExampleDurationRequest { - // id specifies the value of the id field in the primary key. - uint64 id = 1; -} - -// GetExampleDurationResponse is the TestSchemaQuery/GetExampleDurationResponse response type. -message GetExampleDurationResponse { - // value is the response value. - ExampleDuration value = 1; -} - -// ListExampleDurationRequest is the TestSchemaQuery/ListExampleDurationRequest request type. -message ListExampleDurationRequest { - // IndexKey specifies the value of an index key to use in prefix and range queries. - message IndexKey { - // key specifies the index key value. - oneof key { - // id specifies the value of the Id index key to use in the query. - Id id = 1; - // dur specifies the value of the Dur index key to use in the query. - Dur dur = 2; - } - - message Id { - // id is the value of the id field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional uint64 id = 1; - } - - message Dur { - // dur is the value of the dur field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional google.protobuf.Duration dur = 1; - } - } - - // query specifies the type of query - either a prefix or range query. - oneof query { - // prefix_query specifies the index key value to use for the prefix query. - IndexKey prefix_query = 1; - // range_query specifies the index key from/to values to use for the range query. - RangeQuery range_query = 2; - } - // pagination specifies optional pagination parameters. - cosmos.base.query.v1beta1.PageRequest pagination = 3; - - // RangeQuery specifies the from/to index keys for a range query. - message RangeQuery { - // from is the index key to use for the start of the range query. - // To query from the start of an index, specify an index key for that index with empty values. - IndexKey from = 1; - // to is the index key to use for the end of the range query. - // The index key type MUST be the same as the index key type used for from. - // To query from to the end of an index it can be omitted. - IndexKey to = 2; - } -} - -// ListExampleDurationResponse is the TestSchemaQuery/ListExampleDurationResponse response type. -message ListExampleDurationResponse { - // values are the results of the query. - repeated ExampleDuration values = 1; - // pagination is the pagination response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// GetSimpleExampleRequest is the TestSchemaQuery/GetSimpleExampleRequest request type. -message GetSimpleExampleRequest { - // name specifies the value of the name field in the primary key. - string name = 1; -} - -// GetSimpleExampleResponse is the TestSchemaQuery/GetSimpleExampleResponse response type. -message GetSimpleExampleResponse { - // value is the response value. - SimpleExample value = 1; -} - -// GetSimpleExampleByUniqueRequest is the TestSchemaQuery/GetSimpleExampleByUniqueRequest request type. -message GetSimpleExampleByUniqueRequest { - string unique = 1; -} - -// GetSimpleExampleByUniqueResponse is the TestSchemaQuery/GetSimpleExampleByUniqueResponse response type. -message GetSimpleExampleByUniqueResponse { - SimpleExample value = 1; -} - -// ListSimpleExampleRequest is the TestSchemaQuery/ListSimpleExampleRequest request type. -message ListSimpleExampleRequest { - // IndexKey specifies the value of an index key to use in prefix and range queries. - message IndexKey { - // key specifies the index key value. - oneof key { - // name specifies the value of the Name index key to use in the query. - Name name = 1; - // unique specifies the value of the Unique index key to use in the query. - Unique unique = 2; - } - - message Name { - // name is the value of the name field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string name = 1; - } - - message Unique { - // unique is the value of the unique field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional string unique = 1; - } - } - - // query specifies the type of query - either a prefix or range query. - oneof query { - // prefix_query specifies the index key value to use for the prefix query. - IndexKey prefix_query = 1; - // range_query specifies the index key from/to values to use for the range query. - RangeQuery range_query = 2; - } - // pagination specifies optional pagination parameters. - cosmos.base.query.v1beta1.PageRequest pagination = 3; - - // RangeQuery specifies the from/to index keys for a range query. - message RangeQuery { - // from is the index key to use for the start of the range query. - // To query from the start of an index, specify an index key for that index with empty values. - IndexKey from = 1; - // to is the index key to use for the end of the range query. - // The index key type MUST be the same as the index key type used for from. - // To query from to the end of an index it can be omitted. - IndexKey to = 2; - } -} - -// ListSimpleExampleResponse is the TestSchemaQuery/ListSimpleExampleResponse response type. -message ListSimpleExampleResponse { - // values are the results of the query. - repeated SimpleExample values = 1; - // pagination is the pagination response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// GetExampleAutoIncFieldNameRequest is the TestSchemaQuery/GetExampleAutoIncFieldNameRequest request type. -message GetExampleAutoIncFieldNameRequest { - // foo specifies the value of the foo field in the primary key. - uint64 foo = 1; -} - -// GetExampleAutoIncFieldNameResponse is the TestSchemaQuery/GetExampleAutoIncFieldNameResponse response type. -message GetExampleAutoIncFieldNameResponse { - // value is the response value. - ExampleAutoIncFieldName value = 1; -} - -// ListExampleAutoIncFieldNameRequest is the TestSchemaQuery/ListExampleAutoIncFieldNameRequest request type. -message ListExampleAutoIncFieldNameRequest { - // IndexKey specifies the value of an index key to use in prefix and range queries. - message IndexKey { - // key specifies the index key value. - oneof key { - // foo specifies the value of the Foo index key to use in the query. - Foo foo = 1; - } - - message Foo { - // foo is the value of the foo field in the index. - // It can be omitted to query for all valid values of that field in this segment of the index. - optional uint64 foo = 1; - } - } - - // query specifies the type of query - either a prefix or range query. - oneof query { - // prefix_query specifies the index key value to use for the prefix query. - IndexKey prefix_query = 1; - // range_query specifies the index key from/to values to use for the range query. - RangeQuery range_query = 2; - } - // pagination specifies optional pagination parameters. - cosmos.base.query.v1beta1.PageRequest pagination = 3; - - // RangeQuery specifies the from/to index keys for a range query. - message RangeQuery { - // from is the index key to use for the start of the range query. - // To query from the start of an index, specify an index key for that index with empty values. - IndexKey from = 1; - // to is the index key to use for the end of the range query. - // The index key type MUST be the same as the index key type used for from. - // To query from to the end of an index it can be omitted. - IndexKey to = 2; - } -} - -// ListExampleAutoIncFieldNameResponse is the TestSchemaQuery/ListExampleAutoIncFieldNameResponse response type. -message ListExampleAutoIncFieldNameResponse { - // values are the results of the query. - repeated ExampleAutoIncFieldName values = 1; - // pagination is the pagination response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - From 7db16280ad0f204399e84f25b8bb678e79b0e404 Mon Sep 17 00:00:00 2001 From: maxrobot Date: Thu, 8 Aug 2024 10:11:03 +0100 Subject: [PATCH 2/2] fix: CI and removed gitmodules as it is empty --- .github/workflows/Basic.yml | 12 ------------ .gitmodules | 0 2 files changed, 12 deletions(-) delete mode 100644 .gitmodules diff --git a/.github/workflows/Basic.yml b/.github/workflows/Basic.yml index 28d6d42f..ff7b3fb6 100644 --- a/.github/workflows/Basic.yml +++ b/.github/workflows/Basic.yml @@ -13,12 +13,6 @@ jobs: uses: actions/checkout@v2 - name: Fix git safe.directory in container run: mkdir -p /home/runner/work/_temp/_github_home && printf "[safe]\n\tdirectory = /github/workspace" >/home/runner/work/_temp/_github_home/.gitconfig - - name: Checkout submodules - uses: srt32/git-actions@v0.0.3 - with: - args: git submodule update --init --recursive - - name: Fix protobuf output dir error - run: echo >packages/injective-protobuf/src/proto/mod.rs - name: Install stable toolchain uses: actions-rs/toolchain@v1 @@ -54,12 +48,6 @@ jobs: uses: actions/checkout@v2 - name: Fix git safe.directory in container run: mkdir -p /home/runner/work/_temp/_github_home && printf "[safe]\n\tdirectory = /github/workspace" >/home/runner/work/_temp/_github_home/.gitconfig - - name: Checkout submodules - uses: srt32/git-actions@v0.0.3 - with: - args: git submodule update --init --recursive - - name: Fix protobuf output dir error - run: echo >packages/injective-protobuf/src/proto/mod.rs - name: Install stable toolchain uses: actions-rs/toolchain@v1 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29b..00000000