From 4664761525cb6091e610a9b8ee0a7130071c655e Mon Sep 17 00:00:00 2001 From: pr0n00gler Date: Mon, 2 Sep 2024 22:48:26 +0300 Subject: [PATCH] neutron-std --- Cargo.toml | 5 +- contracts/ibc_transfer/Cargo.toml | 9 +- contracts/ibc_transfer/src/contract.rs | 2 +- .../neutron_interchain_queries/Cargo.toml | 7 +- contracts/neutron_interchain_txs/Cargo.toml | 7 +- .../neutron_interchain_txs/src/contract.rs | 2 +- packages/neutron-sdk/Cargo.toml | 1 - packages/neutron-sdk/src/lib.rs | 8 - .../src/proto_types/NEUTRON_COMMIT | 1 - .../src/proto_types/capability/mod.rs | 1 - .../src/proto_types/capability/v1.rs | 112 - .../src/proto_types/cosmos/app/mod.rs | 2 - .../src/proto_types/cosmos/app/runtime/mod.rs | 1 - .../cosmos/app/runtime/v1alpha1.rs | 80 - .../src/proto_types/cosmos/app/v1alpha1.rs | 248 -- .../src/proto_types/cosmos/auth/mod.rs | 2 - .../src/proto_types/cosmos/auth/module/mod.rs | 1 - .../src/proto_types/cosmos/auth/module/v1.rs | 47 - .../src/proto_types/cosmos/auth/v1beta1.rs | 685 ---- .../src/proto_types/cosmos/authz/mod.rs | 2 - .../proto_types/cosmos/authz/module/mod.rs | 1 - .../src/proto_types/cosmos/authz/module/v1.rs | 15 - .../src/proto_types/cosmos/authz/v1beta1.rs | 448 --- .../src/proto_types/cosmos/bank/mod.rs | 2 - .../src/proto_types/cosmos/bank/module/mod.rs | 1 - .../src/proto_types/cosmos/bank/module/v1.rs | 30 - .../src/proto_types/cosmos/bank/v1beta1.rs | 1153 ------- .../src/proto_types/cosmos/base/abci/mod.rs | 1 - .../proto_types/cosmos/base/abci/v1beta1.rs | 390 --- .../src/proto_types/cosmos/base/mod.rs | 6 - .../src/proto_types/cosmos/base/node/mod.rs | 1 - .../proto_types/cosmos/base/node/v1beta1.rs | 102 - .../src/proto_types/cosmos/base/query/mod.rs | 1 - .../proto_types/cosmos/base/query/v1beta1.rs | 97 - .../proto_types/cosmos/base/reflection/mod.rs | 2 - .../cosmos/base/reflection/v1beta1.rs | 70 - .../cosmos/base/reflection/v2alpha1.rs | 514 --- .../proto_types/cosmos/base/tendermint/mod.rs | 1 - .../cosmos/base/tendermint/v1beta1.rs | 599 ---- .../src/proto_types/cosmos/base/v1beta1.rs | 81 - .../src/proto_types/cosmos/circuit/mod.rs | 2 - .../proto_types/cosmos/circuit/module/mod.rs | 1 - .../proto_types/cosmos/circuit/module/v1.rs | 19 - .../src/proto_types/cosmos/circuit/v1.rs | 378 --- .../src/proto_types/cosmos/consensus/mod.rs | 2 - .../cosmos/consensus/module/mod.rs | 1 - .../proto_types/cosmos/consensus/module/v1.rs | 19 - .../src/proto_types/cosmos/consensus/v1.rs | 97 - .../src/proto_types/cosmos/crisis/mod.rs | 2 - .../proto_types/cosmos/crisis/module/mod.rs | 1 - .../proto_types/cosmos/crisis/module/v1.rs | 22 - .../src/proto_types/cosmos/crisis/v1beta1.rs | 98 - .../src/proto_types/cosmos/crypto/ed25519.rs | 48 - .../src/proto_types/cosmos/crypto/hd/mod.rs | 1 - .../src/proto_types/cosmos/crypto/hd/v1.rs | 48 - .../proto_types/cosmos/crypto/keyring/mod.rs | 1 - .../proto_types/cosmos/crypto/keyring/v1.rs | 117 - .../src/proto_types/cosmos/crypto/mod.rs | 6 - .../proto_types/cosmos/crypto/multisig/mod.rs | 27 - .../cosmos/crypto/multisig/v1beta1.rs | 50 - .../proto_types/cosmos/crypto/secp256k1.rs | 47 - .../proto_types/cosmos/crypto/secp256r1.rs | 46 - .../proto_types/cosmos/distribution/mod.rs | 2 - .../cosmos/distribution/module/mod.rs | 1 - .../cosmos/distribution/module/v1.rs | 21 - .../cosmos/distribution/v1beta1.rs | 1303 ------- .../src/proto_types/cosmos/evidence/mod.rs | 2 - .../proto_types/cosmos/evidence/module/mod.rs | 1 - .../proto_types/cosmos/evidence/module/v1.rs | 15 - .../proto_types/cosmos/evidence/v1beta1.rs | 220 -- .../src/proto_types/cosmos/feegrant/mod.rs | 2 - .../proto_types/cosmos/feegrant/module/mod.rs | 1 - .../proto_types/cosmos/feegrant/module/v1.rs | 15 - .../proto_types/cosmos/feegrant/v1beta1.rs | 406 --- .../src/proto_types/cosmos/genutil/mod.rs | 2 - .../proto_types/cosmos/genutil/module/mod.rs | 1 - .../proto_types/cosmos/genutil/module/v1.rs | 15 - .../src/proto_types/cosmos/genutil/v1beta1.rs | 19 - .../src/proto_types/cosmos/gov/mod.rs | 3 - .../src/proto_types/cosmos/gov/module/mod.rs | 1 - .../src/proto_types/cosmos/gov/module/v1.rs | 27 - .../src/proto_types/cosmos/gov/v1.rs | 1363 -------- .../src/proto_types/cosmos/gov/v1beta1.rs | 1071 ------ .../src/proto_types/cosmos/group/mod.rs | 2 - .../proto_types/cosmos/group/module/mod.rs | 1 - .../src/proto_types/cosmos/group/module/v1.rs | 28 - .../src/proto_types/cosmos/group/v1.rs | 2319 ------------- .../src/proto_types/cosmos/ics23/mod.rs | 1 - .../src/proto_types/cosmos/ics23/v1.rs | 618 ---- .../src/proto_types/cosmos/mint/mod.rs | 2 - .../src/proto_types/cosmos/mint/module/mod.rs | 1 - .../src/proto_types/cosmos/mint/module/v1.rs | 21 - .../src/proto_types/cosmos/mint/v1beta1.rs | 260 -- .../neutron-sdk/src/proto_types/cosmos/mod.rs | 26 - .../src/proto_types/cosmos/nft/mod.rs | 2 - .../src/proto_types/cosmos/nft/module/mod.rs | 1 - .../src/proto_types/cosmos/nft/module/v1.rs | 15 - .../src/proto_types/cosmos/nft/v1beta1.rs | 610 ---- .../src/proto_types/cosmos/orm/mod.rs | 4 - .../src/proto_types/cosmos/orm/module/mod.rs | 1 - .../proto_types/cosmos/orm/module/v1alpha1.rs | 17 - .../src/proto_types/cosmos/orm/query/mod.rs | 1 - .../proto_types/cosmos/orm/query/v1alpha1.rs | 273 -- .../src/proto_types/cosmos/orm/v1.rs | 151 - .../src/proto_types/cosmos/orm/v1alpha1.rs | 109 - .../src/proto_types/cosmos/params/mod.rs | 2 - .../proto_types/cosmos/params/module/mod.rs | 1 - .../proto_types/cosmos/params/module/v1.rs | 15 - .../src/proto_types/cosmos/params/v1beta1.rs | 168 - .../src/proto_types/cosmos/slashing/mod.rs | 2 - .../proto_types/cosmos/slashing/module/mod.rs | 1 - .../proto_types/cosmos/slashing/module/v1.rs | 19 - .../proto_types/cosmos/slashing/v1beta1.rs | 402 --- .../src/proto_types/cosmos/staking/mod.rs | 2 - .../proto_types/cosmos/staking/module/mod.rs | 1 - .../proto_types/cosmos/staking/module/v1.rs | 30 - .../src/proto_types/cosmos/staking/v1beta1.rs | 1918 ----------- .../cosmos/store/internal/kv/mod.rs | 1 - .../cosmos/store/internal/kv/v1beta1.rs | 45 - .../proto_types/cosmos/store/internal/mod.rs | 1 - .../src/proto_types/cosmos/store/mod.rs | 4 - .../proto_types/cosmos/store/snapshots/mod.rs | 1 - .../proto_types/cosmos/store/snapshots/v1.rs | 214 -- .../cosmos/store/streaming/abci.rs | 76 - .../proto_types/cosmos/store/streaming/mod.rs | 1 - .../src/proto_types/cosmos/store/v1beta1.rs | 139 - .../src/proto_types/cosmos/tx/config/mod.rs | 1 - .../src/proto_types/cosmos/tx/config/v1.rs | 24 - .../src/proto_types/cosmos/tx/mod.rs | 3 - .../src/proto_types/cosmos/tx/signing/mod.rs | 1 - .../proto_types/cosmos/tx/signing/v1beta1.rs | 221 -- .../src/proto_types/cosmos/tx/v1beta1.rs | 1022 ------ .../src/proto_types/cosmos/upgrade/mod.rs | 2 - .../proto_types/cosmos/upgrade/module/mod.rs | 1 - .../proto_types/cosmos/upgrade/module/v1.rs | 19 - .../src/proto_types/cosmos/upgrade/v1beta1.rs | 460 --- .../src/proto_types/cosmos/vesting/mod.rs | 2 - .../proto_types/cosmos/vesting/module/mod.rs | 1 - .../proto_types/cosmos/vesting/module/v1.rs | 15 - .../src/proto_types/cosmos/vesting/v1beta1.rs | 280 -- .../src/proto_types/cosmwasm/mod.rs | 1 - .../src/proto_types/cosmwasm/wasm/mod.rs | 1 - .../src/proto_types/cosmwasm/wasm/v1.rs | 2988 ----------------- .../proto_types/feemarket/feemarket/mod.rs | 2 - .../feemarket/feemarket/module/mod.rs | 1 - .../feemarket/feemarket/module/v1.rs | 20 - .../src/proto_types/feemarket/feemarket/v1.rs | 347 -- .../src/proto_types/feemarket/mod.rs | 1 - .../src/proto_types/gaia/globalfee/mod.rs | 1 - .../src/proto_types/gaia/globalfee/v1beta1.rs | 145 - .../neutron-sdk/src/proto_types/gaia/mod.rs | 1 - .../proto_types/ibc/applications/fee/mod.rs | 1 - .../proto_types/ibc/applications/fee/v1.rs | 1025 ------ .../interchain_accounts/controller/mod.rs | 1 - .../interchain_accounts/controller/v1.rs | 273 -- .../interchain_accounts/genesis/mod.rs | 1 - .../interchain_accounts/genesis/v1.rs | 120 - .../interchain_accounts/host/mod.rs | 1 - .../interchain_accounts/host/v1.rs | 107 - .../applications/interchain_accounts/mod.rs | 4 - .../applications/interchain_accounts/v1.rs | 135 - .../src/proto_types/ibc/applications/mod.rs | 3 - .../ibc/applications/transfer/mod.rs | 2 - .../ibc/applications/transfer/v1.rs | 535 --- .../ibc/applications/transfer/v2.rs | 33 - .../src/proto_types/ibc/core/channel/mod.rs | 1 - .../src/proto_types/ibc/core/channel/v1.rs | 2849 ---------------- .../src/proto_types/ibc/core/client/mod.rs | 1 - .../src/proto_types/ibc/core/client/v1.rs | 1106 ------ .../proto_types/ibc/core/commitment/mod.rs | 1 - .../src/proto_types/ibc/core/commitment/v1.rs | 87 - .../proto_types/ibc/core/connection/mod.rs | 1 - .../src/proto_types/ibc/core/connection/v1.rs | 930 ----- .../src/proto_types/ibc/core/mod.rs | 5 - .../src/proto_types/ibc/core/types/mod.rs | 1 - .../src/proto_types/ibc/core/types/v1.rs | 25 - .../ibc/lightclients/localhost/mod.rs | 1 - .../ibc/lightclients/localhost/v2.rs | 19 - .../src/proto_types/ibc/lightclients/mod.rs | 4 - .../ibc/lightclients/solomachine/mod.rs | 2 - .../ibc/lightclients/solomachine/v2.rs | 528 --- .../ibc/lightclients/solomachine/v3.rs | 252 -- .../ibc/lightclients/tendermint/mod.rs | 1 - .../ibc/lightclients/tendermint/v1.rs | 177 - .../proto_types/ibc/lightclients/wasm/mod.rs | 1 - .../proto_types/ibc/lightclients/wasm/v1.rs | 385 --- .../neutron-sdk/src/proto_types/ibc/mod.rs | 3 - packages/neutron-sdk/src/proto_types/mod.rs | 10 - .../neutron/contractmanager/mod.rs | 264 -- .../proto_types/neutron/contractmanager/v1.rs | 42 - .../src/proto_types/neutron/cron.rs | 292 -- .../src/proto_types/neutron/dex/mod.rs | 1834 ---------- .../src/proto_types/neutron/dex/v2.rs | 24 - .../proto_types/neutron/dynamicfees/mod.rs | 1 - .../src/proto_types/neutron/dynamicfees/v1.rs | 124 - .../src/proto_types/neutron/feeburner.rs | 194 -- .../src/proto_types/neutron/feerefunder.rs | 257 -- .../proto_types/neutron/interchainqueries.rs | 782 ----- .../proto_types/neutron/interchaintxs/mod.rs | 1 - .../proto_types/neutron/interchaintxs/v1.rs | 308 -- .../src/proto_types/neutron/mod.rs | 9 - .../src/proto_types/neutron/transfer.rs | 120 - .../src/proto_types/osmosis/mod.rs | 1 - .../proto_types/osmosis/tokenfactory/mod.rs | 65 - .../osmosis/tokenfactory/v1beta1.rs | 590 ---- .../src/proto_types/slinky/abci/mod.rs | 1 - .../src/proto_types/slinky/abci/v1.rs | 21 - .../src/proto_types/slinky/alerts/mod.rs | 2 - .../proto_types/slinky/alerts/module/mod.rs | 1 - .../proto_types/slinky/alerts/module/v1.rs | 21 - .../src/proto_types/slinky/alerts/v1.rs | 576 ---- .../src/proto_types/slinky/incentives/mod.rs | 2 - .../slinky/incentives/module/mod.rs | 1 - .../slinky/incentives/module/v1.rs | 15 - .../src/proto_types/slinky/incentives/v1.rs | 192 -- .../src/proto_types/slinky/marketmap/mod.rs | 2 - .../slinky/marketmap/module/mod.rs | 1 - .../proto_types/slinky/marketmap/module/v1.rs | 25 - .../src/proto_types/slinky/marketmap/v1.rs | 522 --- .../neutron-sdk/src/proto_types/slinky/mod.rs | 8 - .../src/proto_types/slinky/oracle/mod.rs | 2 - .../proto_types/slinky/oracle/module/mod.rs | 1 - .../proto_types/slinky/oracle/module/v1.rs | 20 - .../src/proto_types/slinky/oracle/v1.rs | 425 --- .../src/proto_types/slinky/service/mod.rs | 1 - .../src/proto_types/slinky/service/v1.rs | 68 - .../src/proto_types/slinky/sla/mod.rs | 2 - .../src/proto_types/slinky/sla/module/mod.rs | 1 - .../src/proto_types/slinky/sla/module/v1.rs | 20 - .../src/proto_types/slinky/sla/v1.rs | 396 --- .../src/proto_types/slinky/types/mod.rs | 1 - .../src/proto_types/slinky/types/v1.rs | 21 - .../src/proto_types/tendermint/abci.rs | 1677 --------- .../src/proto_types/tendermint/blocksync.rs | 144 - .../src/proto_types/tendermint/consensus.rs | 471 --- .../src/proto_types/tendermint/crypto.rs | 163 - .../src/proto_types/tendermint/libs/bits.rs | 27 - .../src/proto_types/tendermint/libs/mod.rs | 1 - .../src/proto_types/tendermint/mempool.rs | 50 - .../src/proto_types/tendermint/mod.rs | 14 - .../src/proto_types/tendermint/p2p.rs | 289 -- .../src/proto_types/tendermint/privval.rs | 252 -- .../src/proto_types/tendermint/rpc/grpc.rs | 65 - .../src/proto_types/tendermint/rpc/mod.rs | 1 - .../src/proto_types/tendermint/state.rs | 231 -- .../src/proto_types/tendermint/statesync.rs | 169 - .../src/proto_types/tendermint/store.rs | 27 - .../src/proto_types/tendermint/types.rs | 1268 ------- .../src/proto_types/tendermint/version.rs | 55 - packages/neutron-sdk/src/serde/mod.rs | 104 - packages/neutron-sdk/src/shim.rs | 375 --- packages/neutron-std-derive/Cargo.toml | 24 - packages/neutron-std-derive/src/lib.rs | 227 -- packages/neutron-std-derive/tests/main.rs | 6 - packages/neutron-std-derive/tests/query.rs | 37 - packages/neutron-std-derive/tests/struct.rs | 32 - proto-build/Cargo.toml | 24 - proto-build/buf.gen.yaml | 9 - proto-build/buf.lock | 19 - proto-build/buf.yaml | 23 - proto-build/src/code_generator.rs | 256 -- proto-build/src/git.rs | 32 - proto-build/src/lib.rs | 5 - proto-build/src/main.rs | 168 - proto-build/src/mod_gen.rs | 115 - proto-build/src/transform.rs | 204 -- proto-build/src/transformers.rs | 873 ----- 267 files changed, 18 insertions(+), 46634 deletions(-) delete mode 100644 packages/neutron-sdk/src/proto_types/NEUTRON_COMMIT delete mode 100644 packages/neutron-sdk/src/proto_types/capability/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/capability/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/app/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/app/runtime/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/app/runtime/v1alpha1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/app/v1alpha1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/auth/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/auth/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/auth/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/auth/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/authz/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/authz/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/authz/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/authz/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/bank/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/bank/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/bank/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/bank/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/abci/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/abci/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/node/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/node/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/query/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/query/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/reflection/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/reflection/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/reflection/v2alpha1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/tendermint/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/tendermint/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/base/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/circuit/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/circuit/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/circuit/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/circuit/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/consensus/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/consensus/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/consensus/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/consensus/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crisis/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crisis/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crisis/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crisis/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/ed25519.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/hd/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/hd/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/keyring/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/keyring/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/multisig/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/multisig/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/secp256k1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/crypto/secp256r1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/distribution/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/distribution/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/distribution/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/distribution/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/evidence/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/evidence/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/evidence/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/evidence/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/feegrant/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/feegrant/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/feegrant/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/feegrant/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/genutil/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/genutil/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/genutil/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/genutil/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/gov/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/gov/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/gov/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/gov/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/gov/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/group/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/group/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/group/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/group/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/ics23/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/ics23/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/mint/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/mint/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/mint/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/mint/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/nft/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/nft/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/nft/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/nft/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/orm/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/orm/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/orm/module/v1alpha1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/orm/query/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/orm/query/v1alpha1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/orm/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/orm/v1alpha1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/params/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/params/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/params/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/params/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/slashing/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/slashing/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/slashing/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/slashing/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/staking/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/staking/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/staking/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/staking/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/store/internal/kv/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/store/internal/kv/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/store/internal/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/store/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/store/snapshots/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/store/snapshots/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/store/streaming/abci.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/store/streaming/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/store/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/tx/config/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/tx/config/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/tx/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/tx/signing/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/tx/signing/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/tx/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/upgrade/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/upgrade/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/upgrade/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/upgrade/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/vesting/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/vesting/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/vesting/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmos/vesting/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmwasm/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmwasm/wasm/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/cosmwasm/wasm/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/feemarket/feemarket/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/feemarket/feemarket/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/feemarket/feemarket/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/feemarket/feemarket/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/feemarket/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/gaia/globalfee/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/gaia/globalfee/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/gaia/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/fee/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/fee/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/controller/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/controller/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/genesis/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/genesis/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/host/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/host/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/transfer/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/transfer/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/applications/transfer/v2.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/channel/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/channel/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/client/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/client/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/commitment/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/commitment/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/connection/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/connection/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/types/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/core/types/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/localhost/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/localhost/v2.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/v2.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/v3.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/tendermint/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/tendermint/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/wasm/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/lightclients/wasm/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/ibc/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/contractmanager/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/contractmanager/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/cron.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/dex/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/dex/v2.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/dynamicfees/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/dynamicfees/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/feeburner.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/feerefunder.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/interchainqueries.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/interchaintxs/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/interchaintxs/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/neutron/transfer.rs delete mode 100644 packages/neutron-sdk/src/proto_types/osmosis/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/osmosis/tokenfactory/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/osmosis/tokenfactory/v1beta1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/abci/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/abci/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/alerts/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/alerts/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/alerts/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/alerts/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/incentives/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/incentives/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/incentives/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/incentives/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/marketmap/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/marketmap/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/marketmap/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/marketmap/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/oracle/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/oracle/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/oracle/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/oracle/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/service/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/service/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/sla/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/sla/module/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/sla/module/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/sla/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/types/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/slinky/types/v1.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/abci.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/blocksync.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/consensus.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/crypto.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/libs/bits.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/libs/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/mempool.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/p2p.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/privval.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/rpc/grpc.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/rpc/mod.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/state.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/statesync.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/store.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/types.rs delete mode 100644 packages/neutron-sdk/src/proto_types/tendermint/version.rs delete mode 100644 packages/neutron-sdk/src/serde/mod.rs delete mode 100644 packages/neutron-sdk/src/shim.rs delete mode 100644 packages/neutron-std-derive/Cargo.toml delete mode 100644 packages/neutron-std-derive/src/lib.rs delete mode 100644 packages/neutron-std-derive/tests/main.rs delete mode 100644 packages/neutron-std-derive/tests/query.rs delete mode 100644 packages/neutron-std-derive/tests/struct.rs delete mode 100644 proto-build/Cargo.toml delete mode 100644 proto-build/buf.gen.yaml delete mode 100644 proto-build/buf.lock delete mode 100644 proto-build/buf.yaml delete mode 100644 proto-build/src/code_generator.rs delete mode 100644 proto-build/src/git.rs delete mode 100644 proto-build/src/lib.rs delete mode 100644 proto-build/src/main.rs delete mode 100644 proto-build/src/mod_gen.rs delete mode 100644 proto-build/src/transform.rs delete mode 100644 proto-build/src/transformers.rs diff --git a/Cargo.toml b/Cargo.toml index 9503197d..be0c1173 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -members = ["contracts/*", "packages/*", "proto-build"] +members = ["contracts/*", "packages/*"] [profile.release] opt-level = 3 @@ -31,4 +31,5 @@ protobuf = "~3.3.0" hex = "0.4.3" serde_json = { version = "1.0.87" } tendermint-proto = "0.34.1" -speedate = "0.13.0" \ No newline at end of file +speedate = "0.13.0" +neutron-std = { package = "neutron-std", git = "https://github.com/neutron-org/neutron-std", branch = "main" } diff --git a/contracts/ibc_transfer/Cargo.toml b/contracts/ibc_transfer/Cargo.toml index e53f6dae..97b28ea0 100644 --- a/contracts/ibc_transfer/Cargo.toml +++ b/contracts/ibc_transfer/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] [lib] @@ -23,9 +23,10 @@ cw2 = { workspace = true } schemars = { workspace = true } serde = { workspace = true } serde-json-wasm = { workspace = true } -cw-storage-plus = { workspace = true, features = ["iterator"]} +cw-storage-plus = { workspace = true, features = ["iterator"] } cosmwasm-schema = { workspace = true } neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false } +neutron-std = { workspace = true } [dev-dependencies] cosmwasm-schema = { workspace = true } diff --git a/contracts/ibc_transfer/src/contract.rs b/contracts/ibc_transfer/src/contract.rs index 46ddeb0c..1ee450af 100644 --- a/contracts/ibc_transfer/src/contract.rs +++ b/contracts/ibc_transfer/src/contract.rs @@ -4,7 +4,7 @@ use cosmwasm_std::{ }; use cw2::set_contract_version; use neutron_sdk::interchain_txs::helpers::decode_message_response; -use neutron_sdk::proto_types::neutron::transfer::MsgTransferResponse; +use neutron_std::types::neutron::transfer::MsgTransferResponse; use neutron_sdk::{ bindings::{ msg::{IbcFee, NeutronMsg}, diff --git a/contracts/neutron_interchain_queries/Cargo.toml b/contracts/neutron_interchain_queries/Cargo.toml index 5682a1a8..63c755b6 100644 --- a/contracts/neutron_interchain_queries/Cargo.toml +++ b/contracts/neutron_interchain_queries/Cargo.toml @@ -5,9 +5,9 @@ authors = ["pr0n00gler "] edition = "2021" exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] [lib] @@ -22,6 +22,7 @@ cw2 = { workspace = true } schemars = { workspace = true } serde = { workspace = true } neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false } +neutron-std = { workspace = true } cosmos-sdk-proto = { workspace = true } cw-storage-plus = { workspace = true } serde-json-wasm = { workspace = true } diff --git a/contracts/neutron_interchain_txs/Cargo.toml b/contracts/neutron_interchain_txs/Cargo.toml index 9c320018..737bfee6 100644 --- a/contracts/neutron_interchain_txs/Cargo.toml +++ b/contracts/neutron_interchain_txs/Cargo.toml @@ -5,9 +5,9 @@ authors = ["ratik "] edition = "2021" exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] [lib] @@ -25,5 +25,6 @@ serde-json-wasm = { workspace = true } cw-storage-plus = { workspace = true } cosmos-sdk-proto = { workspace = true } neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false } +neutron-std = { workspace = true } prost-types = { workspace = true } cosmwasm-schema = { workspace = true } diff --git a/contracts/neutron_interchain_txs/src/contract.rs b/contracts/neutron_interchain_txs/src/contract.rs index 14ac5056..8e9d7953 100644 --- a/contracts/neutron_interchain_txs/src/contract.rs +++ b/contracts/neutron_interchain_txs/src/contract.rs @@ -13,7 +13,7 @@ use serde::{Deserialize, Serialize}; use crate::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; use neutron_sdk::bindings::msg::IbcFee; -use neutron_sdk::proto_types::neutron::interchaintxs::v1::MsgSubmitTxResponse; +use neutron_std::types::neutron::interchaintxs::v1::MsgSubmitTxResponse; use neutron_sdk::{ bindings::{ msg::NeutronMsg, diff --git a/packages/neutron-sdk/Cargo.toml b/packages/neutron-sdk/Cargo.toml index ad1fcfc0..4b57b106 100644 --- a/packages/neutron-sdk/Cargo.toml +++ b/packages/neutron-sdk/Cargo.toml @@ -25,7 +25,6 @@ prost-types = { workspace = true } tendermint-proto = { workspace = true } speedate = { workspace = true } chrono = { version = "0.4.22", default-features = false } -neutron-std-derive = { version = "0.20.1", path = "../neutron-std-derive" } [dev-dependencies] base64 = { workspace = true } diff --git a/packages/neutron-sdk/src/lib.rs b/packages/neutron-sdk/src/lib.rs index ac788cfc..72e498b2 100644 --- a/packages/neutron-sdk/src/lib.rs +++ b/packages/neutron-sdk/src/lib.rs @@ -3,22 +3,14 @@ // #![forbid(unsafe_code)] #![warn(trivial_casts, trivial_numeric_casts, unused_import_braces)] -/// The version (commit hash) of the Cosmos SDK used when generating this library. -pub const NEUTROND_VERSION: &str = include_str!("proto_types/NEUTRON_COMMIT"); - pub mod bindings; mod errors; pub mod interchain_queries; pub mod interchain_txs; -#[allow(deprecated, clippy::module_inception)] -pub mod proto_types; pub mod query; -mod serde; -pub mod shim; pub mod sudo; pub use errors::error::{NeutronError, NeutronResult}; -pub use shim::{cosmwasm_to_proto_coins, try_proto_to_cosmwasm_coins}; // This is a signal, such that any contract that imports these helpers will only run on the // neutron blockchain diff --git a/packages/neutron-sdk/src/proto_types/NEUTRON_COMMIT b/packages/neutron-sdk/src/proto_types/NEUTRON_COMMIT deleted file mode 100644 index 5469c48c..00000000 --- a/packages/neutron-sdk/src/proto_types/NEUTRON_COMMIT +++ /dev/null @@ -1 +0,0 @@ -v4.1.0 \ No newline at end of file diff --git a/packages/neutron-sdk/src/proto_types/capability/mod.rs b/packages/neutron-sdk/src/proto_types/capability/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/capability/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/capability/v1.rs b/packages/neutron-sdk/src/proto_types/capability/v1.rs deleted file mode 100644 index d98674e4..00000000 --- a/packages/neutron-sdk/src/proto_types/capability/v1.rs +++ /dev/null @@ -1,112 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Capability defines an implementation of an object capability. The index -/// provided to a Capability must be globally unique. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/capability.v1.Capability")] -pub struct Capability { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u64, -} -/// Owner defines a single capability owner. An owner is defined by the name of -/// capability and the module name. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/capability.v1.Owner")] -pub struct Owner { - #[prost(string, tag = "1")] - pub module: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub name: ::prost::alloc::string::String, -} -/// CapabilityOwners defines a set of owners of a single Capability. The set of -/// owners must be unique. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/capability.v1.CapabilityOwners")] -pub struct CapabilityOwners { - #[prost(message, repeated, tag = "1")] - pub owners: ::prost::alloc::vec::Vec, -} -/// GenesisOwners defines the capability owners with their corresponding index. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/capability.v1.GenesisOwners")] -pub struct GenesisOwners { - /// index is the index of the capability owner. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u64, - /// index_owners are the owners at the given index. - #[prost(message, optional, tag = "2")] - pub index_owners: ::core::option::Option, -} -/// GenesisState defines the capability module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/capability.v1.GenesisState")] -pub struct GenesisState { - /// index is the capability global index. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u64, - /// owners represents a map from index to owners of the capability index - /// index key is string to allow amino marshalling. - #[prost(message, repeated, tag = "2")] - pub owners: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/app/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/app/mod.rs deleted file mode 100644 index 6e347e34..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/app/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod runtime; -pub mod v1alpha1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/app/runtime/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/app/runtime/mod.rs deleted file mode 100644 index 32a5a9d4..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/app/runtime/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1alpha1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/app/runtime/v1alpha1.rs b/packages/neutron-sdk/src/proto_types/cosmos/app/runtime/v1alpha1.rs deleted file mode 100644 index a6278f7e..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/app/runtime/v1alpha1.rs +++ /dev/null @@ -1,80 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object for the runtime module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.runtime.v1alpha1.Module")] -pub struct Module { - /// app_name is the name of the app. - #[prost(string, tag = "1")] - pub app_name: ::prost::alloc::string::String, - /// 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. - #[prost(string, repeated, tag = "2")] - pub begin_blockers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// 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. - #[prost(string, repeated, tag = "3")] - pub end_blockers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// 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. - #[prost(string, repeated, tag = "4")] - pub init_genesis: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// 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. - #[prost(string, repeated, tag = "5")] - pub export_genesis: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// override_store_keys is an optional list of overrides for the module store keys - /// to be used in keeper construction. - #[prost(message, repeated, tag = "6")] - pub override_store_keys: ::prost::alloc::vec::Vec, - /// order_migrations defines the order in which module migrations are performed. - /// If this is left empty, it uses the default migration order. - /// - #[prost(string, repeated, tag = "7")] - pub order_migrations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// 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. - #[prost(string, repeated, tag = "8")] - pub precommiters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// 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. - #[prost(string, repeated, tag = "9")] - pub prepare_check_staters: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// StoreKeyConfig may be supplied to override the default module store key, which -/// is the module name. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.runtime.v1alpha1.StoreKeyConfig")] -pub struct StoreKeyConfig { - /// name of the module to override the store key of - #[prost(string, tag = "1")] - pub module_name: ::prost::alloc::string::String, - /// the kv store key to use instead of the module name. - #[prost(string, tag = "2")] - pub kv_store_key: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/app/v1alpha1.rs b/packages/neutron-sdk/src/proto_types/cosmos/app/v1alpha1.rs deleted file mode 100644 index 247a5512..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/app/v1alpha1.rs +++ /dev/null @@ -1,248 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ModuleDescriptor describes an app module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.v1alpha1.ModuleDescriptor")] -pub struct 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. - #[prost(string, tag = "1")] - pub go_import: ::prost::alloc::string::String, - /// 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. - #[prost(message, repeated, tag = "2")] - pub use_package: ::prost::alloc::vec::Vec, - /// 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. - #[prost(message, repeated, tag = "3")] - pub can_migrate_from: ::prost::alloc::vec::Vec, -} -/// PackageReference is a reference to a protobuf package used by a module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.v1alpha1.PackageReference")] -pub struct PackageReference { - /// name is the fully-qualified name of the package. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// 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 - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision: u32, -} -/// MigrateFromInfo is information on a module version that a newer module -/// can migrate from. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.v1alpha1.MigrateFromInfo")] -pub struct MigrateFromInfo { - /// module is the fully-qualified protobuf name of the module config object - /// for the previous module version, ex: "cosmos.group.module.v1.Module". - #[prost(string, tag = "1")] - pub module: ::prost::alloc::string::String, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.v1alpha1.Config")] -pub struct Config { - /// modules are the module configurations for the app. - #[prost(message, repeated, tag = "1")] - pub modules: ::prost::alloc::vec::Vec, - /// 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). - #[prost(message, repeated, tag = "2")] - pub golang_bindings: ::prost::alloc::vec::Vec, -} -/// ModuleConfig is a module configuration for an app. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.v1alpha1.ModuleConfig")] -pub struct 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. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// config is the config object for the module. Module config messages should - /// define a ModuleDescriptor using the cosmos.app.v1alpha1.is_module extension. - #[prost(message, optional, tag = "2")] - pub config: ::core::option::Option, - /// 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. - #[prost(message, repeated, tag = "3")] - pub golang_bindings: ::prost::alloc::vec::Vec, -} -/// GolangBinding is an explicit interface type to implementing type binding for dependency injection. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.v1alpha1.GolangBinding")] -pub struct GolangBinding { - /// interface_type is the interface type which will be bound to a specific implementation type - #[prost(string, tag = "1")] - pub interface_type: ::prost::alloc::string::String, - /// implementation is the implementing type which will be supplied when an input of type interface is requested - #[prost(string, tag = "2")] - pub implementation: ::prost::alloc::string::String, -} -/// QueryConfigRequest is the Query/Config request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.v1alpha1.QueryConfigRequest")] -#[proto_query( - path = "/cosmos.app.v1alpha1.Query/Config", - response_type = QueryConfigResponse -)] -pub struct QueryConfigRequest {} -/// QueryConfigRequest is the Query/Config response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.app.v1alpha1.QueryConfigResponse")] -pub struct QueryConfigResponse { - /// config is the current app config. - #[prost(message, optional, tag = "1")] - pub config: ::core::option::Option, -} -pub struct V1alpha1Querier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> V1alpha1Querier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn config(&self) -> Result { - QueryConfigRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/auth/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/auth/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/auth/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/auth/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/auth/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/auth/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/auth/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/auth/module/v1.rs deleted file mode 100644 index 6371bf7b..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/auth/module/v1.rs +++ /dev/null @@ -1,47 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object for the auth module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.module.v1.Module")] -pub struct Module { - /// bech32_prefix is the bech32 account prefix for the app. - #[prost(string, tag = "1")] - pub bech32_prefix: ::prost::alloc::string::String, - /// module_account_permissions are module account permissions. - #[prost(message, repeated, tag = "2")] - pub module_account_permissions: ::prost::alloc::vec::Vec, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "3")] - pub authority: ::prost::alloc::string::String, -} -/// ModuleAccountPermission represents permissions for a module account. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.module.v1.ModuleAccountPermission")] -pub struct ModuleAccountPermission { - /// account is the name of the module. - #[prost(string, tag = "1")] - pub account: ::prost::alloc::string::String, - /// permissions are the permissions this module has. Currently recognized - /// values are minter, burner and staking. - #[prost(string, repeated, tag = "2")] - pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/auth/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/auth/v1beta1.rs deleted file mode 100644 index 534009ca..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/auth/v1beta1.rs +++ /dev/null @@ -1,685 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// 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). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.BaseAccount")] -pub struct BaseAccount { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub account_number: u64, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// ModuleAccount defines an account for modules that holds coins on a pool. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.ModuleAccount")] -pub struct ModuleAccount { - #[prost(message, optional, tag = "1")] - pub base_account: ::core::option::Option, - #[prost(string, tag = "2")] - pub name: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "3")] - pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// ModuleCredential represents a unclaimable pubkey for base accounts controlled by modules. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.ModuleCredential")] -pub struct ModuleCredential { - /// module_name is the name of the module used for address derivation (passed into address.Module). - #[prost(string, tag = "1")] - pub module_name: ::prost::alloc::string::String, - /// derivation_keys is for deriving a module account address (passed into address.Module) - /// adding more keys creates sub-account addresses (passed into address.Derive) - #[prost(bytes = "vec", repeated, tag = "2")] - pub derivation_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// Params defines the parameters for the auth module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.Params")] -pub struct Params { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_memo_characters: u64, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tx_sig_limit: u64, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tx_size_cost_per_byte: u64, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sig_verify_cost_ed25519: u64, - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sig_verify_cost_secp256k1: u64, -} -/// GenesisState defines the auth module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.GenesisState")] -pub struct GenesisState { - /// params defines all the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// accounts are the accounts present at genesis. - #[prost(message, repeated, tag = "2")] - pub accounts: ::prost::alloc::vec::Vec, -} -/// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryAccountsRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/Accounts", - response_type = QueryAccountsResponse -)] -pub struct QueryAccountsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryAccountsResponse")] -pub struct QueryAccountsResponse { - /// accounts are the existing accounts - #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryAccountRequest is the request type for the Query/Account RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryAccountRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/Account", - response_type = QueryAccountResponse -)] -pub struct QueryAccountRequest { - /// address defines the address to query for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// QueryAccountResponse is the response type for the Query/Account RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryAccountResponse")] -pub struct QueryAccountResponse { - /// account defines the account of the corresponding address. - #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryModuleAccountsRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/ModuleAccounts", - response_type = QueryModuleAccountsResponse -)] -pub struct QueryModuleAccountsRequest {} -/// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryModuleAccountsResponse")] -pub struct QueryModuleAccountsResponse { - #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec, -} -/// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryModuleAccountByNameRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/ModuleAccountByName", - response_type = QueryModuleAccountByNameResponse -)] -pub struct QueryModuleAccountByNameRequest { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -/// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryModuleAccountByNameResponse")] -pub struct QueryModuleAccountByNameResponse { - #[prost(message, optional, tag = "1")] - pub account: ::core::option::Option, -} -/// Bech32PrefixRequest is the request type for Bech32Prefix rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.Bech32PrefixRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/Bech32Prefix", - response_type = Bech32PrefixResponse -)] -pub struct Bech32PrefixRequest {} -/// Bech32PrefixResponse is the response type for Bech32Prefix rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.Bech32PrefixResponse")] -pub struct Bech32PrefixResponse { - #[prost(string, tag = "1")] - pub bech32_prefix: ::prost::alloc::string::String, -} -/// AddressBytesToStringRequest is the request type for AddressString rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.AddressBytesToStringRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/AddressBytesToString", - response_type = AddressBytesToStringResponse -)] -pub struct AddressBytesToStringRequest { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub address_bytes: ::prost::alloc::vec::Vec, -} -/// AddressBytesToStringResponse is the response type for AddressString rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.AddressBytesToStringResponse")] -pub struct AddressBytesToStringResponse { - #[prost(string, tag = "1")] - pub address_string: ::prost::alloc::string::String, -} -/// AddressStringToBytesRequest is the request type for AccountBytes rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.AddressStringToBytesRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/AddressStringToBytes", - response_type = AddressStringToBytesResponse -)] -pub struct AddressStringToBytesRequest { - #[prost(string, tag = "1")] - pub address_string: ::prost::alloc::string::String, -} -/// AddressStringToBytesResponse is the response type for AddressBytes rpc method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.AddressStringToBytesResponse")] -pub struct AddressStringToBytesResponse { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub address_bytes: ::prost::alloc::vec::Vec, -} -/// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method -/// -/// Since: cosmos-sdk 0.46.2 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryAccountAddressByIDRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/AccountAddressByID", - response_type = QueryAccountAddressByIdResponse -)] -pub struct 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. - #[deprecated] - #[prost(int64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: i64, - /// account_id is the account number of the address to be queried. - /// - /// Since: cosmos-sdk 0.47 - #[prost(uint64, tag = "2")] - #[serde(alias = "accountID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub account_id: u64, -} -/// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method -/// -/// Since: cosmos-sdk 0.46.2 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryAccountAddressByIDResponse")] -pub struct QueryAccountAddressByIdResponse { - #[prost(string, tag = "1")] - pub account_address: ::prost::alloc::string::String, -} -/// QueryAccountInfoRequest is the Query/AccountInfo request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryAccountInfoRequest")] -#[proto_query( - path = "/cosmos.auth.v1beta1.Query/AccountInfo", - response_type = QueryAccountInfoResponse -)] -pub struct QueryAccountInfoRequest { - /// address is the account address string. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// QueryAccountInfoResponse is the Query/AccountInfo response type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.QueryAccountInfoResponse")] -pub struct QueryAccountInfoResponse { - /// info is the account info which is represented by BaseAccount. - #[prost(message, optional, tag = "1")] - pub info: ::core::option::Option, -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/auth parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.auth.v1beta1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct AuthQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> AuthQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn accounts( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryAccountsRequest { pagination }.query(self.querier) - } - pub fn account( - &self, - address: ::prost::alloc::string::String, - ) -> Result { - QueryAccountRequest { address }.query(self.querier) - } - pub fn account_address_by_id( - &self, - id: i64, - account_id: u64, - ) -> Result { - QueryAccountAddressByIdRequest { id, account_id }.query(self.querier) - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn module_accounts(&self) -> Result { - QueryModuleAccountsRequest {}.query(self.querier) - } - pub fn module_account_by_name( - &self, - name: ::prost::alloc::string::String, - ) -> Result { - QueryModuleAccountByNameRequest { name }.query(self.querier) - } - pub fn bech32_prefix(&self) -> Result { - Bech32PrefixRequest {}.query(self.querier) - } - pub fn address_bytes_to_string( - &self, - address_bytes: ::prost::alloc::vec::Vec, - ) -> Result { - AddressBytesToStringRequest { address_bytes }.query(self.querier) - } - pub fn address_string_to_bytes( - &self, - address_string: ::prost::alloc::string::String, - ) -> Result { - AddressStringToBytesRequest { address_string }.query(self.querier) - } - pub fn account_info( - &self, - address: ::prost::alloc::string::String, - ) -> Result { - QueryAccountInfoRequest { address }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/authz/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/authz/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/authz/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/authz/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/authz/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/authz/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/authz/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/authz/module/v1.rs deleted file mode 100644 index 8d20d5f8..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/authz/module/v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the authz module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.module.v1.Module")] -pub struct Module {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/authz/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/authz/v1beta1.rs deleted file mode 100644 index 9e2ff238..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/authz/v1beta1.rs +++ /dev/null @@ -1,448 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// GenericAuthorization gives the grantee unrestricted permissions to execute -/// the provided method on behalf of the granter's account. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.GenericAuthorization")] -pub struct GenericAuthorization { - /// Msg, identified by it's type URL, to grant unrestricted permissions to execute - #[prost(string, tag = "1")] - pub msg: ::prost::alloc::string::String, -} -/// Grant gives permissions to execute -/// the provide method with expiration time. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.Grant")] -pub struct Grant { - #[prost(message, optional, tag = "1")] - pub authorization: ::core::option::Option, - /// 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) - #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option, -} -/// GrantAuthorization extends a grant with both the addresses of the grantee and granter. -/// It is used in genesis.proto and query.proto -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.GrantAuthorization")] -pub struct GrantAuthorization { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub authorization: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub expiration: ::core::option::Option, -} -/// GrantQueueItem contains the list of TypeURL of a sdk.Msg. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.GrantQueueItem")] -pub struct GrantQueueItem { - /// msg_type_urls contains the list of TypeURL of a sdk.Msg. - #[prost(string, repeated, tag = "1")] - pub msg_type_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// EventGrant is emitted on Msg/Grant -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.EventGrant")] -pub struct EventGrant { - /// Msg type URL for which an autorization is granted - #[prost(string, tag = "2")] - pub msg_type_url: ::prost::alloc::string::String, - /// Granter account address - #[prost(string, tag = "3")] - pub granter: ::prost::alloc::string::String, - /// Grantee account address - #[prost(string, tag = "4")] - pub grantee: ::prost::alloc::string::String, -} -/// EventRevoke is emitted on Msg/Revoke -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.EventRevoke")] -pub struct EventRevoke { - /// Msg type URL for which an autorization is revoked - #[prost(string, tag = "2")] - pub msg_type_url: ::prost::alloc::string::String, - /// Granter account address - #[prost(string, tag = "3")] - pub granter: ::prost::alloc::string::String, - /// Grantee account address - #[prost(string, tag = "4")] - pub grantee: ::prost::alloc::string::String, -} -/// GenesisState defines the authz module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.GenesisState")] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub authorization: ::prost::alloc::vec::Vec, -} -/// QueryGrantsRequest is the request type for the Query/Grants RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGrantsRequest")] -#[proto_query( - path = "/cosmos.authz.v1beta1.Query/Grants", - response_type = QueryGrantsResponse -)] -pub struct QueryGrantsRequest { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - /// Optional, msg_type_url, when set, will query only grants matching given msg type. - #[prost(string, tag = "3")] - pub msg_type_url: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option, -} -/// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGrantsResponse")] -pub struct QueryGrantsResponse { - /// authorizations is a list of grants granted for grantee by granter. - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGranterGrantsRequest")] -#[proto_query( - path = "/cosmos.authz.v1beta1.Query/GranterGrants", - response_type = QueryGranterGrantsResponse -)] -pub struct QueryGranterGrantsRequest { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGranterGrantsResponse")] -pub struct QueryGranterGrantsResponse { - /// grants is a list of grants granted by the granter. - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGranteeGrantsRequest")] -#[proto_query( - path = "/cosmos.authz.v1beta1.Query/GranteeGrants", - response_type = QueryGranteeGrantsResponse -)] -pub struct QueryGranteeGrantsRequest { - #[prost(string, tag = "1")] - pub grantee: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.QueryGranteeGrantsResponse")] -pub struct QueryGranteeGrantsResponse { - /// grants is a list of grants granted to the grantee. - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgGrant is a request type for Grant method. It declares authorization to the grantee -/// on behalf of the granter with the provided expiration time. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgGrant")] -pub struct MsgGrant { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub grant: ::core::option::Option, -} -/// MsgGrantResponse defines the Msg/MsgGrant response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgGrantResponse")] -pub struct 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgExec")] -pub struct MsgExec { - #[prost(string, tag = "1")] - pub grantee: ::prost::alloc::string::String, - /// Execute Msg. - /// The x/authz will try to find a grant matching (msg.signers\[0\], grantee, MsgTypeURL(msg)) - /// triple and validate it. - #[prost(message, repeated, tag = "2")] - pub msgs: ::prost::alloc::vec::Vec, -} -/// MsgExecResponse defines the Msg/MsgExecResponse response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgExecResponse")] -pub struct MsgExecResponse { - #[prost(bytes = "vec", repeated, tag = "1")] - pub results: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// MsgRevoke revokes any authorization with the provided sdk.Msg type on the -/// granter's account with that has been granted to the grantee. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgRevoke")] -pub struct MsgRevoke { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub msg_type_url: ::prost::alloc::string::String, -} -/// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.authz.v1beta1.MsgRevokeResponse")] -pub struct MsgRevokeResponse {} -pub struct AuthzQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> AuthzQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn grants( - &self, - granter: ::prost::alloc::string::String, - grantee: ::prost::alloc::string::String, - msg_type_url: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryGrantsRequest { - granter, - grantee, - msg_type_url, - pagination, - } - .query(self.querier) - } - pub fn granter_grants( - &self, - granter: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryGranterGrantsRequest { - granter, - pagination, - } - .query(self.querier) - } - pub fn grantee_grants( - &self, - grantee: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryGranteeGrantsRequest { - grantee, - pagination, - } - .query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/bank/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/bank/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/bank/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/bank/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/bank/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/bank/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/bank/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/bank/module/v1.rs deleted file mode 100644 index 785adefe..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/bank/module/v1.rs +++ /dev/null @@ -1,30 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the bank module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.module.v1.Module")] -pub struct Module { - /// 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 - #[prost(string, repeated, tag = "1")] - pub blocked_module_accounts_override: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, - /// restrictions_order specifies the order of send restrictions and should be - /// a list of module names which provide a send restriction instance. If no - /// order is provided, then restrictions will be applied in alphabetical order - /// of module names. - #[prost(string, repeated, tag = "3")] - pub restrictions_order: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/bank/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/bank/v1beta1.rs deleted file mode 100644 index 22239309..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/bank/v1beta1.rs +++ /dev/null @@ -1,1153 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// SendAuthorization allows the grantee to spend up to spend_limit coins from -/// the granter's account. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.SendAuthorization")] -pub struct SendAuthorization { - #[prost(message, repeated, tag = "1")] - pub spend_limit: ::prost::alloc::vec::Vec, - /// 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 - #[prost(string, repeated, tag = "2")] - pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Params defines the parameters for the bank module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.Params")] -pub struct 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. - #[deprecated] - #[prost(message, repeated, tag = "1")] - pub send_enabled: ::prost::alloc::vec::Vec, - #[prost(bool, tag = "2")] - pub default_send_enabled: bool, -} -/// SendEnabled maps coin denom to a send_enabled status (whether a denom is -/// sendable). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.SendEnabled")] -pub struct SendEnabled { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(bool, tag = "2")] - pub enabled: bool, -} -/// Input models transaction input. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.Input")] -pub struct Input { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub coins: ::prost::alloc::vec::Vec, -} -/// Output models transaction outputs. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.Output")] -pub struct Output { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub coins: ::prost::alloc::vec::Vec, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.Supply")] -#[deprecated] -pub struct Supply { - #[prost(message, repeated, tag = "1")] - pub total: ::prost::alloc::vec::Vec, -} -/// DenomUnit represents a struct that describes a given -/// denomination unit of the basic token. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.DenomUnit")] -pub struct DenomUnit { - /// denom represents the string name of the given denom unit (e.g uatom). - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - /// 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). - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub exponent: u32, - /// aliases is a list of string aliases for the given denom - #[prost(string, repeated, tag = "3")] - pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Metadata represents a struct that describes -/// a basic token. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.Metadata")] -pub struct Metadata { - #[prost(string, tag = "1")] - pub description: ::prost::alloc::string::String, - /// denom_units represents the list of DenomUnit's for a given coin - #[prost(message, repeated, tag = "2")] - pub denom_units: ::prost::alloc::vec::Vec, - /// base represents the base denom (should be the DenomUnit with exponent = 0). - #[prost(string, tag = "3")] - pub base: ::prost::alloc::string::String, - /// display indicates the suggested denom that should be - /// displayed in clients. - #[prost(string, tag = "4")] - pub display: ::prost::alloc::string::String, - /// name defines the name of the token (eg: Cosmos Atom) - /// - /// Since: cosmos-sdk 0.43 - #[prost(string, tag = "5")] - pub name: ::prost::alloc::string::String, - /// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - /// be the same as the display. - /// - /// Since: cosmos-sdk 0.43 - #[prost(string, tag = "6")] - pub symbol: ::prost::alloc::string::String, - /// URI to a document (on or off-chain) that contains additional information. Optional. - /// - /// Since: cosmos-sdk 0.46 - #[prost(string, tag = "7")] - pub uri: ::prost::alloc::string::String, - /// 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 - #[prost(string, tag = "8")] - pub uri_hash: ::prost::alloc::string::String, -} -/// GenesisState defines the bank module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.GenesisState")] -pub struct GenesisState { - /// params defines all the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// balances is an array containing the balances of all the accounts. - #[prost(message, repeated, tag = "2")] - pub balances: ::prost::alloc::vec::Vec, - /// 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. - #[prost(message, repeated, tag = "3")] - pub supply: ::prost::alloc::vec::Vec, - /// denom_metadata defines the metadata of the different coins. - #[prost(message, repeated, tag = "4")] - pub denom_metadata: ::prost::alloc::vec::Vec, - /// send_enabled defines the denoms where send is enabled or disabled. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, repeated, tag = "5")] - pub send_enabled: ::prost::alloc::vec::Vec, -} -/// Balance defines an account address and balance pair used in the bank module's -/// genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.Balance")] -pub struct Balance { - /// address is the address of the balance holder. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// coins defines the different coins this balance holds. - #[prost(message, repeated, tag = "2")] - pub coins: ::prost::alloc::vec::Vec, -} -/// QueryBalanceRequest is the request type for the Query/Balance RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryBalanceRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/Balance", - response_type = QueryBalanceResponse -)] -pub struct QueryBalanceRequest { - /// address is the address to query balances for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// denom is the coin denom to query balances for. - #[prost(string, tag = "2")] - pub denom: ::prost::alloc::string::String, -} -/// QueryBalanceResponse is the response type for the Query/Balance RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryBalanceResponse")] -pub struct QueryBalanceResponse { - /// balance is the balance of the coin. - #[prost(message, optional, tag = "1")] - pub balance: ::core::option::Option, -} -/// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryAllBalancesRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/AllBalances", - response_type = QueryAllBalancesResponse -)] -pub struct QueryAllBalancesRequest { - /// address is the address to query balances for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, - /// resolve_denom is the flag to resolve the denom into a human-readable form from the metadata. - /// - /// Since: cosmos-sdk 0.50 - #[prost(bool, tag = "3")] - pub resolve_denom: bool, -} -/// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryAllBalancesResponse")] -pub struct QueryAllBalancesResponse { - /// balances is the balances of all the coins. - #[prost(message, repeated, tag = "1")] - pub balances: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QuerySpendableBalancesRequest defines the gRPC request structure for querying -/// an account's spendable balances. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QuerySpendableBalancesRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/SpendableBalances", - response_type = QuerySpendableBalancesResponse -)] -pub struct QuerySpendableBalancesRequest { - /// address is the address to query spendable balances for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QuerySpendableBalancesResponse defines the gRPC response structure for querying -/// an account's spendable balances. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QuerySpendableBalancesResponse")] -pub struct QuerySpendableBalancesResponse { - /// balances is the spendable balances of all the coins. - #[prost(message, repeated, tag = "1")] - pub balances: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QuerySpendableBalanceByDenomRequest defines the gRPC request structure for -/// querying an account's spendable balance for a specific denom. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/SpendableBalanceByDenom", - response_type = QuerySpendableBalanceByDenomResponse -)] -pub struct QuerySpendableBalanceByDenomRequest { - /// address is the address to query balances for. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// denom is the coin denom to query balances for. - #[prost(string, tag = "2")] - pub denom: ::prost::alloc::string::String, -} -/// QuerySpendableBalanceByDenomResponse defines the gRPC response structure for -/// querying an account's spendable balance for a specific denom. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse")] -pub struct QuerySpendableBalanceByDenomResponse { - /// balance is the balance of the coin. - #[prost(message, optional, tag = "1")] - pub balance: ::core::option::Option, -} -/// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryTotalSupplyRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/TotalSupply", - response_type = QueryTotalSupplyResponse -)] -pub struct QueryTotalSupplyRequest { - /// pagination defines an optional pagination for the request. - /// - /// Since: cosmos-sdk 0.43 - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryTotalSupplyResponse")] -pub struct QueryTotalSupplyResponse { - /// supply is the supply of the coins - #[prost(message, repeated, tag = "1")] - pub supply: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - /// - /// Since: cosmos-sdk 0.43 - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QuerySupplyOfRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/SupplyOf", - response_type = QuerySupplyOfResponse -)] -pub struct QuerySupplyOfRequest { - /// denom is the coin denom to query balances for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -/// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QuerySupplyOfResponse")] -pub struct QuerySupplyOfResponse { - /// amount is the supply of the coin. - #[prost(message, optional, tag = "1")] - pub amount: ::core::option::Option, -} -/// QueryParamsRequest defines the request type for querying x/bank parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse defines the response type for querying x/bank parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params provides the parameters of the bank module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomsMetadataRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/DenomsMetadata", - response_type = QueryDenomsMetadataResponse -)] -pub struct QueryDenomsMetadataRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomsMetadataResponse")] -pub struct QueryDenomsMetadataResponse { - /// metadata provides the client information for all the registered tokens. - #[prost(message, repeated, tag = "1")] - pub metadatas: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomMetadataRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/DenomMetadata", - response_type = QueryDenomMetadataResponse -)] -pub struct QueryDenomMetadataRequest { - /// denom is the coin denom to query the metadata for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -/// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomMetadataResponse")] -pub struct QueryDenomMetadataResponse { - /// metadata describes and provides all the client information for the requested token. - #[prost(message, optional, tag = "1")] - pub metadata: ::core::option::Option, -} -/// QueryDenomMetadataByQueryStringRequest is the request type for the Query/DenomMetadata RPC method. -/// Identical with QueryDenomMetadataRequest but receives denom as query string. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/DenomMetadataByQueryString", - response_type = QueryDenomMetadataByQueryStringResponse -)] -pub struct QueryDenomMetadataByQueryStringRequest { - /// denom is the coin denom to query the metadata for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -/// QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC -/// method. Identical with QueryDenomMetadataResponse but receives denom as query string in request. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse")] -pub struct QueryDenomMetadataByQueryStringResponse { - /// metadata describes and provides all the client information for the requested token. - #[prost(message, optional, tag = "1")] - pub metadata: ::core::option::Option, -} -/// QueryDenomOwnersRequest defines the request type for the DenomOwners RPC query, -/// which queries for a paginated set of all account holders of a particular -/// denomination. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomOwnersRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/DenomOwners", - response_type = QueryDenomOwnersResponse -)] -pub struct QueryDenomOwnersRequest { - /// denom defines the coin denomination to query all account holders for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.DenomOwner")] -pub struct DenomOwner { - /// address defines the address that owns a particular denomination. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// balance is the balance of the denominated coin for an account. - #[prost(message, optional, tag = "2")] - pub balance: ::core::option::Option, -} -/// QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomOwnersResponse")] -pub struct QueryDenomOwnersResponse { - #[prost(message, repeated, tag = "1")] - pub denom_owners: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDenomOwnersByQueryRequest defines the request type for the DenomOwnersByQuery RPC query, -/// which queries for a paginated set of all account holders of a particular -/// denomination. -/// -/// Since: cosmos-sdk 0.50.3 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/DenomOwnersByQuery", - response_type = QueryDenomOwnersByQueryResponse -)] -pub struct QueryDenomOwnersByQueryRequest { - /// denom defines the coin denomination to query all account holders for. - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query. -/// -/// Since: cosmos-sdk 0.50.3 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse")] -pub struct QueryDenomOwnersByQueryResponse { - #[prost(message, repeated, tag = "1")] - pub denom_owners: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QuerySendEnabledRequest defines the RPC request for looking up SendEnabled entries. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QuerySendEnabledRequest")] -#[proto_query( - path = "/cosmos.bank.v1beta1.Query/SendEnabled", - response_type = QuerySendEnabledResponse -)] -pub struct QuerySendEnabledRequest { - /// denoms is the specific denoms you want look up. Leave empty to get all entries. - #[prost(string, repeated, tag = "1")] - pub denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// pagination defines an optional pagination for the request. This field is - /// only read if the denoms field is empty. - #[prost(message, optional, tag = "99")] - pub pagination: ::core::option::Option, -} -/// QuerySendEnabledResponse defines the RPC response of a SendEnable query. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.QuerySendEnabledResponse")] -pub struct QuerySendEnabledResponse { - #[prost(message, repeated, tag = "1")] - pub send_enabled: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. This field is only - /// populated if the denoms field in the request is empty. - #[prost(message, optional, tag = "99")] - pub pagination: ::core::option::Option, -} -/// MsgSend represents a message to send coins from one account to another. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.MsgSend")] -pub struct MsgSend { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub to_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgSendResponse defines the Msg/Send response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.MsgSendResponse")] -pub struct MsgSendResponse {} -/// MsgMultiSend represents an arbitrary multi-in, multi-out send message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.MsgMultiSend")] -pub struct MsgMultiSend { - /// Inputs, despite being `repeated`, only allows one sender input. This is - /// checked in MsgMultiSend's ValidateBasic. - #[prost(message, repeated, tag = "1")] - pub inputs: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub outputs: ::prost::alloc::vec::Vec, -} -/// MsgMultiSendResponse defines the Msg/MultiSend response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.MsgMultiSendResponse")] -pub struct MsgMultiSendResponse {} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/bank parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.MsgUpdateParamsResponse")] -pub struct 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.MsgSetSendEnabled")] -pub struct MsgSetSendEnabled { - /// authority is the address that controls the module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// send_enabled is the list of entries to add or update. - #[prost(message, repeated, tag = "2")] - pub send_enabled: ::prost::alloc::vec::Vec, - /// 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. - #[prost(string, repeated, tag = "3")] - pub use_default_for: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.bank.v1beta1.MsgSetSendEnabledResponse")] -pub struct MsgSetSendEnabledResponse {} -pub struct BankQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> BankQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn balance( - &self, - address: ::prost::alloc::string::String, - denom: ::prost::alloc::string::String, - ) -> Result { - QueryBalanceRequest { address, denom }.query(self.querier) - } - pub fn all_balances( - &self, - address: ::prost::alloc::string::String, - pagination: ::core::option::Option, - resolve_denom: bool, - ) -> Result { - QueryAllBalancesRequest { - address, - pagination, - resolve_denom, - } - .query(self.querier) - } - pub fn spendable_balances( - &self, - address: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QuerySpendableBalancesRequest { - address, - pagination, - } - .query(self.querier) - } - pub fn spendable_balance_by_denom( - &self, - address: ::prost::alloc::string::String, - denom: ::prost::alloc::string::String, - ) -> Result { - QuerySpendableBalanceByDenomRequest { address, denom }.query(self.querier) - } - pub fn total_supply( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryTotalSupplyRequest { pagination }.query(self.querier) - } - pub fn supply_of( - &self, - denom: ::prost::alloc::string::String, - ) -> Result { - QuerySupplyOfRequest { denom }.query(self.querier) - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn denom_metadata( - &self, - denom: ::prost::alloc::string::String, - ) -> Result { - QueryDenomMetadataRequest { denom }.query(self.querier) - } - pub fn denom_metadata_by_query_string( - &self, - denom: ::prost::alloc::string::String, - ) -> Result { - QueryDenomMetadataByQueryStringRequest { denom }.query(self.querier) - } - pub fn denoms_metadata( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryDenomsMetadataRequest { pagination }.query(self.querier) - } - pub fn denom_owners( - &self, - denom: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryDenomOwnersRequest { denom, pagination }.query(self.querier) - } - pub fn denom_owners_by_query( - &self, - denom: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryDenomOwnersByQueryRequest { denom, pagination }.query(self.querier) - } - pub fn send_enabled( - &self, - denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - pagination: ::core::option::Option, - ) -> Result { - QuerySendEnabledRequest { denoms, pagination }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/abci/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/abci/mod.rs deleted file mode 100644 index 9f64fc82..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/abci/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/abci/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/abci/v1beta1.rs deleted file mode 100644 index 50c1bf1b..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/abci/v1beta1.rs +++ /dev/null @@ -1,390 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// TxResponse defines a structure containing relevant tx data and metadata. The -/// tags are stringified and the log is JSON decoded. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.TxResponse")] -pub struct TxResponse { - /// The block height - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - /// The transaction hash. - #[prost(string, tag = "2")] - pub txhash: ::prost::alloc::string::String, - /// Namespace for the Code - #[prost(string, tag = "3")] - pub codespace: ::prost::alloc::string::String, - /// Response code. - #[prost(uint32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code: u32, - /// Result bytes, if any. - #[prost(string, tag = "5")] - pub data: ::prost::alloc::string::String, - /// The output of the application's logger (raw string). May be - /// non-deterministic. - #[prost(string, tag = "6")] - pub raw_log: ::prost::alloc::string::String, - /// The output of the application's logger (typed). May be non-deterministic. - #[prost(message, repeated, tag = "7")] - pub logs: ::prost::alloc::vec::Vec, - /// Additional information. May be non-deterministic. - #[prost(string, tag = "8")] - pub info: ::prost::alloc::string::String, - /// Amount of gas requested for transaction. - #[prost(int64, tag = "9")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub gas_wanted: i64, - /// Amount of gas consumed by transaction. - #[prost(int64, tag = "10")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub gas_used: i64, - /// The request transaction bytes. - #[prost(message, optional, tag = "11")] - pub tx: ::core::option::Option, - /// 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. - #[prost(string, tag = "12")] - pub timestamp: ::prost::alloc::string::String, - /// 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 - #[prost(message, repeated, tag = "13")] - pub events: ::prost::alloc::vec::Vec, -} -/// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.ABCIMessageLog")] -pub struct AbciMessageLog { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub msg_index: u32, - #[prost(string, tag = "2")] - pub log: ::prost::alloc::string::String, - /// Events contains a slice of Event objects that were emitted during some - /// execution. - #[prost(message, repeated, tag = "3")] - pub events: ::prost::alloc::vec::Vec, -} -/// StringEvent defines en Event object wrapper where all the attributes -/// contain key/value pairs that are strings instead of raw bytes. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.StringEvent")] -pub struct StringEvent { - #[prost(string, tag = "1")] - pub r#type: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub attributes: ::prost::alloc::vec::Vec, -} -/// Attribute defines an attribute wrapper where the key and value are -/// strings instead of raw bytes. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.Attribute")] -pub struct Attribute { - #[prost(string, tag = "1")] - pub key: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub value: ::prost::alloc::string::String, -} -/// GasInfo defines tx execution gas context. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.GasInfo")] -pub struct GasInfo { - /// GasWanted is the maximum units of work we allow this tx to perform. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub gas_wanted: u64, - /// GasUsed is the amount of gas actually consumed. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub gas_used: u64, -} -/// Result is the union of ResponseFormat and ResponseCheckTx. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.Result")] -pub struct Result { - /// 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. - #[deprecated] - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - /// Log contains the log information from message or handler execution. - #[prost(string, tag = "2")] - pub log: ::prost::alloc::string::String, - /// Events contains a slice of Event objects that were emitted during message - /// or handler execution. - #[prost(message, repeated, tag = "3")] - pub events: ::prost::alloc::vec::Vec, - /// msg_responses contains the Msg handler responses type packed in Anys. - /// - /// Since: cosmos-sdk 0.46 - #[prost(message, repeated, tag = "4")] - pub msg_responses: ::prost::alloc::vec::Vec, -} -/// SimulationResponse defines the response generated when a transaction is -/// successfully simulated. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.SimulationResponse")] -pub struct SimulationResponse { - #[prost(message, optional, tag = "1")] - pub gas_info: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// MsgData defines the data returned in a Result object during message -/// execution. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.MsgData")] -#[deprecated] -pub struct MsgData { - #[prost(string, tag = "1")] - pub msg_type: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// TxMsgData defines a list of MsgData. A transaction will have a MsgData object -/// for each message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.TxMsgData")] -pub struct TxMsgData { - /// data field is deprecated and not populated. - #[deprecated] - #[prost(message, repeated, tag = "1")] - pub data: ::prost::alloc::vec::Vec, - /// msg_responses contains the Msg handler responses packed into Anys. - /// - /// Since: cosmos-sdk 0.46 - #[prost(message, repeated, tag = "2")] - pub msg_responses: ::prost::alloc::vec::Vec, -} -/// SearchTxsResult defines a structure for querying txs pageable -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.SearchTxsResult")] -pub struct SearchTxsResult { - /// Count of all txs - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total_count: u64, - /// Count of txs in current page - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub count: u64, - /// Index of current page, start from 1 - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub page_number: u64, - /// Count of total pages - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub page_total: u64, - /// Max count txs per page - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub limit: u64, - /// List of txs in current page - #[prost(message, repeated, tag = "6")] - pub txs: ::prost::alloc::vec::Vec, -} -/// SearchBlocksResult defines a structure for querying blocks pageable -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.abci.v1beta1.SearchBlocksResult")] -pub struct SearchBlocksResult { - /// Count of all blocks - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total_count: i64, - /// Count of blocks in current page - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub count: i64, - /// Index of current page, start from 1 - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub page_number: i64, - /// Count of total pages - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub page_total: i64, - /// Max count blocks per page - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub limit: i64, - /// List of blocks in current page - #[prost(message, repeated, tag = "6")] - pub blocks: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/mod.rs deleted file mode 100644 index f0b72c9c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub mod abci; -pub mod node; -pub mod query; -pub mod reflection; -pub mod tendermint; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/node/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/node/mod.rs deleted file mode 100644 index 9f64fc82..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/node/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/node/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/node/v1beta1.rs deleted file mode 100644 index 78a768bd..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/node/v1beta1.rs +++ /dev/null @@ -1,102 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ConfigRequest defines the request structure for the Config gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.node.v1beta1.ConfigRequest")] -pub struct ConfigRequest {} -/// ConfigResponse defines the response structure for the Config gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.node.v1beta1.ConfigResponse")] -pub struct ConfigResponse { - #[prost(string, tag = "1")] - pub minimum_gas_price: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub pruning_keep_recent: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub pruning_interval: ::prost::alloc::string::String, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub halt_height: u64, -} -/// StateRequest defines the request structure for the status of a node. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.node.v1beta1.StatusRequest")] -pub struct StatusRequest {} -/// StateResponse defines the response structure for the status of a node. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.node.v1beta1.StatusResponse")] -pub struct StatusResponse { - /// earliest block height available in the store - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub earliest_store_height: u64, - /// current block height - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - /// block height timestamp - #[prost(message, optional, tag = "3")] - pub timestamp: ::core::option::Option, - /// app hash of the current block - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub app_hash: ::prost::alloc::vec::Vec, - /// validator hash provided by the consensus header - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub validator_hash: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/query/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/query/mod.rs deleted file mode 100644 index 9f64fc82..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/query/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/query/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/query/v1beta1.rs deleted file mode 100644 index b74b138e..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/query/v1beta1.rs +++ /dev/null @@ -1,97 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// PageRequest is to be embedded in gRPC request messages for efficient -/// pagination. Ex: -/// -/// message SomeRequest { -/// Foo some_parameter = 1; -/// PageRequest pagination = 2; -/// } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.query.v1beta1.PageRequest")] -pub struct 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. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - /// 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. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub offset: u64, - /// 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. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub limit: u64, - /// 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. - #[prost(bool, tag = "4")] - pub count_total: bool, - /// reverse is set to true if results are to be returned in the descending order. - /// - /// Since: cosmos-sdk 0.43 - #[prost(bool, tag = "5")] - pub reverse: bool, -} -/// 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; -/// } -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.query.v1beta1.PageResponse")] -pub struct 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. - #[prost(bytes = "vec", optional, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_option_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_option_base64_encoded_string::deserialize" - )] - pub next_key: ::core::option::Option<::prost::alloc::vec::Vec>, - /// total is total number of results available if PageRequest.count_total - /// was set, its value is undefined otherwise - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total: u64, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/reflection/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/reflection/mod.rs deleted file mode 100644 index 4ef95ad1..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/reflection/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod v1beta1; -pub mod v2alpha1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/reflection/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/reflection/v1beta1.rs deleted file mode 100644 index 57638977..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/reflection/v1beta1.rs +++ /dev/null @@ -1,70 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v1beta1.ListAllInterfacesRequest")] -pub struct ListAllInterfacesRequest {} -/// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v1beta1.ListAllInterfacesResponse")] -pub struct ListAllInterfacesResponse { - /// interface_names is an array of all the registered interfaces. - #[prost(string, repeated, tag = "1")] - pub interface_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// ListImplementationsRequest is the request type of the ListImplementations -/// RPC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v1beta1.ListImplementationsRequest")] -pub struct ListImplementationsRequest { - /// interface_name defines the interface to query the implementations for. - #[prost(string, tag = "1")] - pub interface_name: ::prost::alloc::string::String, -} -/// ListImplementationsResponse is the response type of the ListImplementations -/// RPC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v1beta1.ListImplementationsResponse")] -pub struct ListImplementationsResponse { - #[prost(string, repeated, tag = "1")] - pub implementation_message_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/reflection/v2alpha1.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/reflection/v2alpha1.rs deleted file mode 100644 index 23b6094c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/reflection/v2alpha1.rs +++ /dev/null @@ -1,514 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// AppDescriptor describes a cosmos-sdk based application -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.AppDescriptor")] -pub struct AppDescriptor { - /// AuthnDescriptor provides information on how to authenticate transactions on the application - /// NOTE: experimental and subject to change in future releases. - #[prost(message, optional, tag = "1")] - pub authn: ::core::option::Option, - /// chain provides the chain descriptor - #[prost(message, optional, tag = "2")] - pub chain: ::core::option::Option, - /// codec provides metadata information regarding codec related types - #[prost(message, optional, tag = "3")] - pub codec: ::core::option::Option, - /// configuration provides metadata information regarding the sdk.Config type - #[prost(message, optional, tag = "4")] - pub configuration: ::core::option::Option, - /// query_services provides metadata information regarding the available queriable endpoints - #[prost(message, optional, tag = "5")] - pub query_services: ::core::option::Option, - /// tx provides metadata information regarding how to send transactions to the given application - #[prost(message, optional, tag = "6")] - pub tx: ::core::option::Option, -} -/// TxDescriptor describes the accepted transaction type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.TxDescriptor")] -pub struct 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. - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// msgs lists the accepted application messages (sdk.Msg) - #[prost(message, repeated, tag = "2")] - pub msgs: ::prost::alloc::vec::Vec, -} -/// AuthnDescriptor provides information on how to sign transactions without relying -/// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.AuthnDescriptor")] -pub struct AuthnDescriptor { - /// sign_modes defines the supported signature algorithm - #[prost(message, repeated, tag = "1")] - pub sign_modes: ::prost::alloc::vec::Vec, -} -/// 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.SigningModeDescriptor")] -pub struct SigningModeDescriptor { - /// name defines the unique name of the signing mode - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// number is the unique int32 identifier for the sign_mode enum - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub number: i32, - /// 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 - #[prost(string, tag = "3")] - pub authn_info_provider_method_fullname: ::prost::alloc::string::String, -} -/// ChainDescriptor describes chain information of the application -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.ChainDescriptor")] -pub struct ChainDescriptor { - /// id is the chain id - #[prost(string, tag = "1")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, -} -/// CodecDescriptor describes the registered interfaces and provides metadata information on the types -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.CodecDescriptor")] -pub struct CodecDescriptor { - /// interfaces is a list of the registerted interfaces descriptors - #[prost(message, repeated, tag = "1")] - pub interfaces: ::prost::alloc::vec::Vec, -} -/// InterfaceDescriptor describes the implementation of an interface -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.InterfaceDescriptor")] -pub struct InterfaceDescriptor { - /// fullname is the name of the interface - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// interface_accepting_messages contains information regarding the proto messages which contain the interface as - /// google.protobuf.Any field - #[prost(message, repeated, tag = "2")] - pub interface_accepting_messages: ::prost::alloc::vec::Vec, - /// interface_implementers is a list of the descriptors of the interface implementers - #[prost(message, repeated, tag = "3")] - pub interface_implementers: ::prost::alloc::vec::Vec, -} -/// InterfaceImplementerDescriptor describes an interface implementer -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor")] -pub struct InterfaceImplementerDescriptor { - /// fullname is the protobuf queryable name of the interface implementer - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// 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 - #[prost(string, tag = "2")] - pub type_url: ::prost::alloc::string::String, -} -/// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains -/// an interface represented as a google.protobuf.Any -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor")] -pub struct InterfaceAcceptingMessageDescriptor { - /// fullname is the protobuf fullname of the type containing the interface - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// 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) - #[prost(string, repeated, tag = "2")] - pub field_descriptor_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// ConfigurationDescriptor contains metadata information on the sdk.Config -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.ConfigurationDescriptor")] -pub struct ConfigurationDescriptor { - /// bech32_account_address_prefix is the account address prefix - #[prost(string, tag = "1")] - pub bech32_account_address_prefix: ::prost::alloc::string::String, -} -/// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.MsgDescriptor")] -pub struct MsgDescriptor { - /// msg_type_url contains the TypeURL of a sdk.Msg. - #[prost(string, tag = "1")] - pub msg_type_url: ::prost::alloc::string::String, -} -/// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorRequest")] -pub struct GetAuthnDescriptorRequest {} -/// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetAuthnDescriptorResponse")] -pub struct GetAuthnDescriptorResponse { - /// authn describes how to authenticate to the application when sending transactions - #[prost(message, optional, tag = "1")] - pub authn: ::core::option::Option, -} -/// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetChainDescriptorRequest")] -pub struct GetChainDescriptorRequest {} -/// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetChainDescriptorResponse")] -pub struct GetChainDescriptorResponse { - /// chain describes application chain information - #[prost(message, optional, tag = "1")] - pub chain: ::core::option::Option, -} -/// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetCodecDescriptorRequest")] -pub struct GetCodecDescriptorRequest {} -/// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetCodecDescriptorResponse")] -pub struct GetCodecDescriptorResponse { - /// codec describes the application codec such as registered interfaces and implementations - #[prost(message, optional, tag = "1")] - pub codec: ::core::option::Option, -} -/// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorRequest")] -pub struct GetConfigurationDescriptorRequest {} -/// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetConfigurationDescriptorResponse")] -pub struct GetConfigurationDescriptorResponse { - /// config describes the application's sdk.Config - #[prost(message, optional, tag = "1")] - pub config: ::core::option::Option, -} -/// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorRequest")] -pub struct GetQueryServicesDescriptorRequest {} -/// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetQueryServicesDescriptorResponse")] -pub struct GetQueryServicesDescriptorResponse { - /// queries provides information on the available queryable services - #[prost(message, optional, tag = "1")] - pub queries: ::core::option::Option, -} -/// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetTxDescriptorRequest")] -pub struct GetTxDescriptorRequest {} -/// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.GetTxDescriptorResponse")] -pub struct GetTxDescriptorResponse { - /// tx provides information on msgs that can be forwarded to the application - /// alongside the accepted transaction protobuf type - #[prost(message, optional, tag = "1")] - pub tx: ::core::option::Option, -} -/// QueryServicesDescriptor contains the list of cosmos-sdk queriable services -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.QueryServicesDescriptor")] -pub struct QueryServicesDescriptor { - /// query_services is a list of cosmos-sdk QueryServiceDescriptor - #[prost(message, repeated, tag = "1")] - pub query_services: ::prost::alloc::vec::Vec, -} -/// QueryServiceDescriptor describes a cosmos-sdk queryable service -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.QueryServiceDescriptor")] -pub struct QueryServiceDescriptor { - /// fullname is the protobuf fullname of the service descriptor - #[prost(string, tag = "1")] - pub fullname: ::prost::alloc::string::String, - /// is_module describes if this service is actually exposed by an application's module - #[prost(bool, tag = "2")] - pub is_module: bool, - /// methods provides a list of query service methods - #[prost(message, repeated, tag = "3")] - pub methods: ::prost::alloc::vec::Vec, -} -/// 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.reflection.v2alpha1.QueryMethodDescriptor")] -pub struct QueryMethodDescriptor { - /// name is the protobuf name (not fullname) of the method - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// full_query_path is the path that can be used to query - /// this method via tendermint abci.Query - #[prost(string, tag = "2")] - pub full_query_path: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/tendermint/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/tendermint/mod.rs deleted file mode 100644 index 9f64fc82..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/tendermint/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/tendermint/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/tendermint/v1beta1.rs deleted file mode 100644 index 3ae29e92..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/tendermint/v1beta1.rs +++ /dev/null @@ -1,599 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Block is tendermint type Block, with the Header proposer address -/// field converted to bech32 string. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.Block")] -pub struct Block { - #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option
, - #[prost(message, optional, tag = "2")] - pub data: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub evidence: - ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub last_commit: ::core::option::Option, -} -/// Header defines the structure of a Tendermint block header. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.Header")] -pub struct Header { - /// basic block info - #[prost(message, optional, tag = "1")] - pub version: ::core::option::Option, - #[prost(string, tag = "2")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(message, optional, tag = "4")] - pub time: ::core::option::Option, - /// prev block info - #[prost(message, optional, tag = "5")] - #[serde(alias = "last_blockID")] - pub last_block_id: - ::core::option::Option, - /// hashes of block data - /// - /// commit from validators from the last block - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub last_commit_hash: ::prost::alloc::vec::Vec, - /// transactions - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data_hash: ::prost::alloc::vec::Vec, - /// hashes from the app output from the prev block - /// - /// validators for the current block - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub validators_hash: ::prost::alloc::vec::Vec, - /// validators for the next block - #[prost(bytes = "vec", tag = "9")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub next_validators_hash: ::prost::alloc::vec::Vec, - /// consensus params for current block - #[prost(bytes = "vec", tag = "10")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub consensus_hash: ::prost::alloc::vec::Vec, - /// state after txs from the previous block - #[prost(bytes = "vec", tag = "11")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub app_hash: ::prost::alloc::vec::Vec, - /// root hash of all results from the txs from the previous block - #[prost(bytes = "vec", tag = "12")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub last_results_hash: ::prost::alloc::vec::Vec, - /// consensus info - /// - /// evidence included in the block - #[prost(bytes = "vec", tag = "13")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub evidence_hash: ::prost::alloc::vec::Vec, - /// 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. - /// - /// original proposer of the block - #[prost(string, tag = "14")] - pub proposer_address: ::prost::alloc::string::String, -} -/// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightRequest")] -pub struct GetValidatorSetByHeightRequest { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse")] -pub struct GetValidatorSetByHeightResponse { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_height: i64, - #[prost(message, repeated, tag = "2")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -/// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetRequest")] -pub struct GetLatestValidatorSetRequest { - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse")] -pub struct GetLatestValidatorSetResponse { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_height: i64, - #[prost(message, repeated, tag = "2")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -/// Validator is the type for the validator-set. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.Validator")] -pub struct Validator { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub voting_power: i64, - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposer_priority: i64, -} -/// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetBlockByHeightRequest")] -pub struct GetBlockByHeightRequest { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, -} -/// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse")] -pub struct GetBlockByHeightResponse { - #[prost(message, optional, tag = "1")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - /// Deprecated: please use `sdk_block` instead - #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option, - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "3")] - pub sdk_block: ::core::option::Option, -} -/// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetLatestBlockRequest")] -pub struct GetLatestBlockRequest {} -/// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetLatestBlockResponse")] -pub struct GetLatestBlockResponse { - #[prost(message, optional, tag = "1")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - /// Deprecated: please use `sdk_block` instead - #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option, - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "3")] - pub sdk_block: ::core::option::Option, -} -/// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetSyncingRequest")] -pub struct GetSyncingRequest {} -/// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetSyncingResponse")] -pub struct GetSyncingResponse { - #[prost(bool, tag = "1")] - pub syncing: bool, -} -/// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetNodeInfoRequest")] -pub struct GetNodeInfoRequest {} -/// GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.GetNodeInfoResponse")] -pub struct GetNodeInfoResponse { - #[prost(message, optional, tag = "1")] - pub default_node_info: - ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub application_version: ::core::option::Option, -} -/// VersionInfo is the type for the GetNodeInfoResponse message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.VersionInfo")] -pub struct VersionInfo { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub app_name: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub version: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub git_commit: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub build_tags: ::prost::alloc::string::String, - #[prost(string, tag = "6")] - pub go_version: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "7")] - pub build_deps: ::prost::alloc::vec::Vec, - /// Since: cosmos-sdk 0.43 - #[prost(string, tag = "8")] - pub cosmos_sdk_version: ::prost::alloc::string::String, -} -/// Module is the type for VersionInfo -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.Module")] -pub struct Module { - /// module path - #[prost(string, tag = "1")] - pub path: ::prost::alloc::string::String, - /// module version - #[prost(string, tag = "2")] - pub version: ::prost::alloc::string::String, - /// checksum - #[prost(string, tag = "3")] - pub sum: ::prost::alloc::string::String, -} -/// ABCIQueryRequest defines the request structure for the ABCIQuery gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.ABCIQueryRequest")] -pub struct AbciQueryRequest { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - #[prost(string, tag = "2")] - pub path: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(bool, tag = "4")] - pub prove: bool, -} -/// ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. -/// -/// Note: This type is a duplicate of the ResponseQuery proto type defined in -/// Tendermint. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.ABCIQueryResponse")] -pub struct AbciQueryResponse { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code: u32, - /// nondeterministic - #[prost(string, tag = "3")] - pub log: ::prost::alloc::string::String, - /// nondeterministic - #[prost(string, tag = "4")] - pub info: ::prost::alloc::string::String, - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: i64, - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "8")] - pub proof_ops: ::core::option::Option, - #[prost(int64, tag = "9")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(string, tag = "10")] - pub codespace: ::prost::alloc::string::String, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.ProofOp")] -pub struct ProofOp { - #[prost(string, tag = "1")] - pub r#type: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// ProofOps is Merkle proof defined by the list of ProofOps. -/// -/// Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.tendermint.v1beta1.ProofOps")] -pub struct ProofOps { - #[prost(message, repeated, tag = "1")] - pub ops: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/base/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/base/v1beta1.rs deleted file mode 100644 index c434c32a..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/base/v1beta1.rs +++ /dev/null @@ -1,81 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.v1beta1.Coin")] -pub struct Coin { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.v1beta1.DecCoin")] -pub struct DecCoin { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -/// IntProto defines a Protobuf wrapper around an Int object. -/// Deprecated: Prefer to use math.Int directly. It supports binary Marshal and Unmarshal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.v1beta1.IntProto")] -pub struct IntProto { - #[prost(string, tag = "1")] - pub int: ::prost::alloc::string::String, -} -/// DecProto defines a Protobuf wrapper around a Dec object. -/// Deprecated: Prefer to use math.LegacyDec directly. It supports binary Marshal and Unmarshal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.base.v1beta1.DecProto")] -pub struct DecProto { - #[prost(string, tag = "1")] - pub dec: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/circuit/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/circuit/mod.rs deleted file mode 100644 index a8429e39..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/circuit/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/circuit/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/circuit/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/circuit/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/circuit/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/circuit/module/v1.rs deleted file mode 100644 index b5952ab6..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/circuit/module/v1.rs +++ /dev/null @@ -1,19 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the circuit module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.module.v1.Module")] -pub struct Module { - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/circuit/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/circuit/v1.rs deleted file mode 100644 index 4390a4a5..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/circuit/v1.rs +++ /dev/null @@ -1,378 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Permissions are the permissions that an account has to trip -/// or reset the circuit breaker. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.Permissions")] -pub struct Permissions { - /// level is the level of permissions granted to this account. - #[prost(enumeration = "permissions::Level", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub level: i32, - /// 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. - #[prost(string, repeated, tag = "2")] - pub limit_type_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Nested message and enum types in `Permissions`. -pub mod permissions { - /// Level is the permission level. - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - #[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] - pub enum Level { - /// LEVEL_NONE_UNSPECIFIED indicates that the account will have no circuit - /// breaker permissions. - NoneUnspecified = 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. - SomeMsgs = 1, - /// LEVEL_ALL_MSGS indicates that the account can trip or reset the circuit - /// breaker for Msg's of all type URLs. - AllMsgs = 2, - /// LEVEL_SUPER_ADMIN indicates that the account can take all circuit breaker - /// actions and can grant permissions to other accounts. - SuperAdmin = 3, - } - impl Level { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Level::NoneUnspecified => "LEVEL_NONE_UNSPECIFIED", - Level::SomeMsgs => "LEVEL_SOME_MSGS", - Level::AllMsgs => "LEVEL_ALL_MSGS", - Level::SuperAdmin => "LEVEL_SUPER_ADMIN", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "LEVEL_NONE_UNSPECIFIED" => Some(Self::NoneUnspecified), - "LEVEL_SOME_MSGS" => Some(Self::SomeMsgs), - "LEVEL_ALL_MSGS" => Some(Self::AllMsgs), - "LEVEL_SUPER_ADMIN" => Some(Self::SuperAdmin), - _ => None, - } - } - } -} -/// GenesisAccountPermissions is the account permissions for the circuit breaker in genesis -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.GenesisAccountPermissions")] -pub struct GenesisAccountPermissions { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub permissions: ::core::option::Option, -} -/// GenesisState is the state that must be provided at genesis. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.GenesisState")] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub account_permissions: ::prost::alloc::vec::Vec, - #[prost(string, repeated, tag = "2")] - pub disabled_type_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// QueryAccountRequest is the request type for the Query/Account RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.QueryAccountRequest")] -#[proto_query( - path = "/cosmos.circuit.v1.Query/Account", - response_type = AccountResponse -)] -pub struct QueryAccountRequest { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// AccountResponse is the response type for the Query/Account RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.AccountResponse")] -pub struct AccountResponse { - #[prost(message, optional, tag = "1")] - pub permission: ::core::option::Option, -} -/// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.QueryAccountsRequest")] -#[proto_query( - path = "/cosmos.circuit.v1.Query/Accounts", - response_type = AccountsResponse -)] -pub struct QueryAccountsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// AccountsResponse is the response type for the Query/Accounts RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.AccountsResponse")] -pub struct AccountsResponse { - #[prost(message, repeated, tag = "1")] - pub accounts: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDisableListRequest is the request type for the Query/DisabledList RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.QueryDisabledListRequest")] -#[proto_query( - path = "/cosmos.circuit.v1.Query/DisabledList", - response_type = DisabledListResponse -)] -pub struct QueryDisabledListRequest {} -/// DisabledListResponse is the response type for the Query/DisabledList RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.DisabledListResponse")] -pub struct DisabledListResponse { - #[prost(string, repeated, tag = "1")] - pub disabled_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgAuthorizeCircuitBreaker defines the Msg/AuthorizeCircuitBreaker request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.MsgAuthorizeCircuitBreaker")] -pub struct MsgAuthorizeCircuitBreaker { - /// granter is the granter of the circuit breaker permissions and must have - /// LEVEL_SUPER_ADMIN. - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the account authorized with the provided permissions. - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - /// 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. - #[prost(message, optional, tag = "3")] - pub permissions: ::core::option::Option, -} -/// MsgAuthorizeCircuitBreakerResponse defines the Msg/AuthorizeCircuitBreaker response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.MsgAuthorizeCircuitBreakerResponse")] -pub struct MsgAuthorizeCircuitBreakerResponse { - #[prost(bool, tag = "1")] - pub success: bool, -} -/// MsgTripCircuitBreaker defines the Msg/TripCircuitBreaker request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.MsgTripCircuitBreaker")] -pub struct MsgTripCircuitBreaker { - /// authority is the account authorized to trip the circuit breaker. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// 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. - #[prost(string, repeated, tag = "2")] - pub msg_type_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgTripCircuitBreakerResponse defines the Msg/TripCircuitBreaker response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.MsgTripCircuitBreakerResponse")] -pub struct MsgTripCircuitBreakerResponse { - #[prost(bool, tag = "1")] - pub success: bool, -} -/// MsgResetCircuitBreaker defines the Msg/ResetCircuitBreaker request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.MsgResetCircuitBreaker")] -pub struct MsgResetCircuitBreaker { - /// authority is the account authorized to trip or reset the circuit breaker. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// 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. - #[prost(string, repeated, tag = "3")] - pub msg_type_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgResetCircuitBreakerResponse defines the Msg/ResetCircuitBreaker response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.circuit.v1.MsgResetCircuitBreakerResponse")] -pub struct MsgResetCircuitBreakerResponse { - #[prost(bool, tag = "1")] - pub success: bool, -} -pub struct CircuitQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> CircuitQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn account( - &self, - address: ::prost::alloc::string::String, - ) -> Result { - QueryAccountRequest { address }.query(self.querier) - } - pub fn accounts( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryAccountsRequest { pagination }.query(self.querier) - } - pub fn disabled_list(&self) -> Result { - QueryDisabledListRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/consensus/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/consensus/mod.rs deleted file mode 100644 index a8429e39..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/consensus/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/consensus/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/consensus/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/consensus/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/consensus/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/consensus/module/v1.rs deleted file mode 100644 index 77b30480..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/consensus/module/v1.rs +++ /dev/null @@ -1,19 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the consensus module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.consensus.module.v1.Module")] -pub struct Module { - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/consensus/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/consensus/v1.rs deleted file mode 100644 index 3e23d1ae..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/consensus/v1.rs +++ /dev/null @@ -1,97 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// QueryParamsRequest defines the request type for querying x/consensus parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.consensus.v1.QueryParamsRequest")] -#[proto_query( - path = "/cosmos.consensus.v1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse defines the response type for querying x/consensus parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.consensus.v1.QueryParamsResponse")] -pub struct 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. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.consensus.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// 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. - #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub evidence: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub validator: ::core::option::Option, - /// Since: cosmos-sdk 0.50 - #[prost(message, optional, tag = "5")] - pub abci: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.consensus.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct ConsensusQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> ConsensusQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crisis/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/crisis/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crisis/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crisis/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/crisis/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crisis/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crisis/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/crisis/module/v1.rs deleted file mode 100644 index 51938d70..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crisis/module/v1.rs +++ /dev/null @@ -1,22 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the crisis module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crisis.module.v1.Module")] -pub struct Module { - /// fee_collector_name is the name of the FeeCollector ModuleAccount. - #[prost(string, tag = "1")] - pub fee_collector_name: ::prost::alloc::string::String, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crisis/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/crisis/v1beta1.rs deleted file mode 100644 index 11b65bec..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crisis/v1beta1.rs +++ /dev/null @@ -1,98 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// GenesisState defines the crisis module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crisis.v1beta1.GenesisState")] -pub struct GenesisState { - /// constant_fee is the fee used to verify the invariant in the crisis - /// module. - #[prost(message, optional, tag = "3")] - pub constant_fee: ::core::option::Option, -} -/// MsgVerifyInvariant represents a message to verify a particular invariance. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crisis.v1beta1.MsgVerifyInvariant")] -pub struct MsgVerifyInvariant { - /// sender is the account address of private key to send coins to fee collector account. - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// name of the invariant module. - #[prost(string, tag = "2")] - pub invariant_module_name: ::prost::alloc::string::String, - /// invariant_route is the msg's invariant route. - #[prost(string, tag = "3")] - pub invariant_route: ::prost::alloc::string::String, -} -/// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crisis.v1beta1.MsgVerifyInvariantResponse")] -pub struct MsgVerifyInvariantResponse {} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crisis.v1beta1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// constant_fee defines the x/crisis parameter. - #[prost(message, optional, tag = "2")] - pub constant_fee: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crisis.v1beta1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/ed25519.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/ed25519.rs deleted file mode 100644 index 907faca5..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/ed25519.rs +++ /dev/null @@ -1,48 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.ed25519.PubKey")] -pub struct PubKey { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, -} -/// PrivKey defines a ed25519 private key. -/// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.ed25519.PrivKey")] -pub struct PrivKey { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/hd/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/hd/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/hd/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/hd/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/hd/v1.rs deleted file mode 100644 index 08099f93..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/hd/v1.rs +++ /dev/null @@ -1,48 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// BIP44Params is used as path field in ledger item in Record. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.hd.v1.BIP44Params")] -pub struct Bip44Params { - /// purpose is a constant set to 44' (or 0x8000002C) following the BIP43 recommendation - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub purpose: u32, - /// coin_type is a constant that improves privacy - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub coin_type: u32, - /// account splits the key space into independent user identities - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub account: u32, - /// change is a constant used for public derivation. Constant 0 is used for external chain and constant 1 for internal - /// chain. - #[prost(bool, tag = "4")] - pub change: bool, - /// address_index is used as child index in BIP32 derivation - #[prost(uint32, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub address_index: u32, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/keyring/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/keyring/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/keyring/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/keyring/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/keyring/v1.rs deleted file mode 100644 index e0c395aa..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/keyring/v1.rs +++ /dev/null @@ -1,117 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Record is used for representing a key in the keyring. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.keyring.v1.Record")] -pub struct Record { - /// name represents a name of Record - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// pub_key represents a public key in any format - #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option, - /// Record contains one of the following items - #[prost(oneof = "record::Item", tags = "3, 4, 5, 6")] - pub item: ::core::option::Option, -} -/// Nested message and enum types in `Record`. -pub mod record { - use neutron_std_derive::CosmwasmExt; - /// Item is a keyring item stored in a keyring backend. - /// Local item - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.crypto.keyring.v1.Record.Local")] - pub struct Local { - #[prost(message, optional, tag = "1")] - pub priv_key: ::core::option::Option, - } - /// Ledger item - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.crypto.keyring.v1.Record.Ledger")] - pub struct Ledger { - #[prost(message, optional, tag = "1")] - pub path: ::core::option::Option, - } - /// Multi item - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.crypto.keyring.v1.Record.Multi")] - pub struct Multi {} - /// Offline item - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.crypto.keyring.v1.Record.Offline")] - pub struct Offline {} - /// Record contains one of the following items - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Item { - /// local stores the private key locally. - #[prost(message, tag = "3")] - Local(Local), - /// ledger stores the information about a Ledger key. - #[prost(message, tag = "4")] - Ledger(Ledger), - /// Multi does not store any other information. - #[prost(message, tag = "5")] - Multi(Multi), - /// Offline does not store any other information. - #[prost(message, tag = "6")] - Offline(Offline), - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/mod.rs deleted file mode 100644 index a243ceb7..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub mod ed25519; -pub mod hd; -pub mod keyring; -pub mod multisig; -pub mod secp256k1; -pub mod secp256r1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/multisig/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/multisig/mod.rs deleted file mode 100644 index d87ab585..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/multisig/mod.rs +++ /dev/null @@ -1,27 +0,0 @@ -pub mod v1beta1; -use neutron_std_derive::CosmwasmExt; -/// LegacyAminoPubKey specifies a public key type -/// which nests multiple public keys and a threshold, -/// it uses legacy amino address rules. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.multisig.LegacyAminoPubKey")] -pub struct LegacyAminoPubKey { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub threshold: u32, - #[prost(message, repeated, tag = "2")] - pub public_keys: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/multisig/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/multisig/v1beta1.rs deleted file mode 100644 index aa5b8afb..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/multisig/v1beta1.rs +++ /dev/null @@ -1,50 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.multisig.v1beta1.MultiSignature")] -pub struct MultiSignature { - #[prost(bytes = "vec", repeated, tag = "1")] - pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.multisig.v1beta1.CompactBitArray")] -pub struct CompactBitArray { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub extra_bits_stored: u32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub elems: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/secp256k1.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/secp256k1.rs deleted file mode 100644 index a57237a3..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/secp256k1.rs +++ /dev/null @@ -1,47 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.secp256k1.PubKey")] -pub struct PubKey { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, -} -/// PrivKey defines a secp256k1 private key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.secp256k1.PrivKey")] -pub struct PrivKey { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/crypto/secp256r1.rs b/packages/neutron-sdk/src/proto_types/cosmos/crypto/secp256r1.rs deleted file mode 100644 index 511a5543..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/crypto/secp256r1.rs +++ /dev/null @@ -1,46 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// PubKey defines a secp256r1 ECDSA public key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.secp256r1.PubKey")] -pub struct PubKey { - /// Point on secp256r1 curve in a compressed representation as specified in section - /// 4.3.6 of ANSI X9.62: - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, -} -/// PrivKey defines a secp256r1 ECDSA private key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.crypto.secp256r1.PrivKey")] -pub struct PrivKey { - /// secret number serialized using big-endian encoding - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub secret: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/distribution/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/distribution/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/distribution/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/distribution/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/distribution/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/distribution/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/distribution/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/distribution/module/v1.rs deleted file mode 100644 index 4da86720..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/distribution/module/v1.rs +++ /dev/null @@ -1,21 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the distribution module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.module.v1.Module")] -pub struct Module { - #[prost(string, tag = "1")] - pub fee_collector_name: ::prost::alloc::string::String, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/distribution/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/distribution/v1beta1.rs deleted file mode 100644 index 96fa4bcd..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/distribution/v1beta1.rs +++ /dev/null @@ -1,1303 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the set of params for the distribution module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.Params")] -pub struct Params { - #[prost(string, tag = "1")] - pub community_tax: ::prost::alloc::string::String, - /// Deprecated: The base_proposer_reward field is deprecated and is no longer used - /// in the x/distribution module's reward mechanism. - #[deprecated] - #[prost(string, tag = "2")] - pub base_proposer_reward: ::prost::alloc::string::String, - /// Deprecated: The bonus_proposer_reward field is deprecated and is no longer used - /// in the x/distribution module's reward mechanism. - #[deprecated] - #[prost(string, tag = "3")] - pub bonus_proposer_reward: ::prost::alloc::string::String, - #[prost(bool, tag = "4")] - pub withdraw_addr_enabled: bool, -} -/// 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorHistoricalRewards")] -pub struct ValidatorHistoricalRewards { - #[prost(message, repeated, tag = "1")] - pub cumulative_reward_ratio: ::prost::alloc::vec::Vec, - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub reference_count: u32, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorCurrentRewards")] -pub struct ValidatorCurrentRewards { - #[prost(message, repeated, tag = "1")] - pub rewards: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub period: u64, -} -/// ValidatorAccumulatedCommission represents accumulated commission -/// for a validator kept as a running counter, can be withdrawn at any time. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommission")] -pub struct ValidatorAccumulatedCommission { - #[prost(message, repeated, tag = "1")] - pub commission: ::prost::alloc::vec::Vec, -} -/// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -/// for a validator inexpensive to track, allows simple sanity checks. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorOutstandingRewards")] -pub struct ValidatorOutstandingRewards { - #[prost(message, repeated, tag = "1")] - pub rewards: ::prost::alloc::vec::Vec, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorSlashEvent")] -pub struct ValidatorSlashEvent { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub validator_period: u64, - #[prost(string, tag = "2")] - pub fraction: ::prost::alloc::string::String, -} -/// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorSlashEvents")] -pub struct ValidatorSlashEvents { - #[prost(message, repeated, tag = "1")] - pub validator_slash_events: ::prost::alloc::vec::Vec, -} -/// FeePool is the global fee pool for distribution. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.FeePool")] -pub struct FeePool { - #[prost(message, repeated, tag = "1")] - pub community_pool: ::prost::alloc::vec::Vec, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.CommunityPoolSpendProposal")] -#[deprecated] -pub struct CommunityPoolSpendProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub recipient: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "4")] - pub amount: ::prost::alloc::vec::Vec, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegatorStartingInfo")] -pub struct DelegatorStartingInfo { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub previous_period: u64, - #[prost(string, tag = "2")] - pub stake: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, -} -/// DelegationDelegatorReward represents the properties -/// of a delegator's delegation reward. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegationDelegatorReward")] -pub struct DelegationDelegatorReward { - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub reward: ::prost::alloc::vec::Vec, -} -/// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal -/// with a deposit -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit")] -pub struct CommunityPoolSpendProposalWithDeposit { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub recipient: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub amount: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub deposit: ::prost::alloc::string::String, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegatorWithdrawInfo")] -pub struct DelegatorWithdrawInfo { - /// delegator_address is the address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// withdraw_address is the address to withdraw the delegation rewards to. - #[prost(string, tag = "2")] - pub withdraw_address: ::prost::alloc::string::String, -} -/// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord")] -pub struct ValidatorOutstandingRewardsRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// outstanding_rewards represents the outstanding rewards of a validator. - #[prost(message, repeated, tag = "2")] - pub outstanding_rewards: ::prost::alloc::vec::Vec, -} -/// ValidatorAccumulatedCommissionRecord is used for import / export via genesis -/// json. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord")] -pub struct ValidatorAccumulatedCommissionRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// accumulated is the accumulated commission of a validator. - #[prost(message, optional, tag = "2")] - pub accumulated: ::core::option::Option, -} -/// ValidatorHistoricalRewardsRecord is used for import / export via genesis -/// json. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord")] -pub struct ValidatorHistoricalRewardsRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// period defines the period the historical rewards apply to. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub period: u64, - /// rewards defines the historical rewards of a validator. - #[prost(message, optional, tag = "3")] - pub rewards: ::core::option::Option, -} -/// ValidatorCurrentRewardsRecord is used for import / export via genesis json. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord")] -pub struct ValidatorCurrentRewardsRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// rewards defines the current rewards of a validator. - #[prost(message, optional, tag = "2")] - pub rewards: ::core::option::Option, -} -/// DelegatorStartingInfoRecord used for import / export via genesis json. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.DelegatorStartingInfoRecord")] -pub struct DelegatorStartingInfoRecord { - /// delegator_address is the address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the address of the validator. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// starting_info defines the starting info of a delegator. - #[prost(message, optional, tag = "3")] - pub starting_info: ::core::option::Option, -} -/// ValidatorSlashEventRecord is used for import / export via genesis json. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.ValidatorSlashEventRecord")] -pub struct ValidatorSlashEventRecord { - /// validator_address is the address of the validator. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// height defines the block height at which the slash event occurred. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - /// period is the period of the slash event. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub period: u64, - /// validator_slash_event describes the slash event. - #[prost(message, optional, tag = "4")] - pub validator_slash_event: ::core::option::Option, -} -/// GenesisState defines the distribution module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.GenesisState")] -pub struct GenesisState { - /// params defines all the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// fee_pool defines the fee pool at genesis. - #[prost(message, optional, tag = "2")] - pub fee_pool: ::core::option::Option, - /// fee_pool defines the delegator withdraw infos at genesis. - #[prost(message, repeated, tag = "3")] - pub delegator_withdraw_infos: ::prost::alloc::vec::Vec, - /// fee_pool defines the previous proposer at genesis. - #[prost(string, tag = "4")] - pub previous_proposer: ::prost::alloc::string::String, - /// fee_pool defines the outstanding rewards of all validators at genesis. - #[prost(message, repeated, tag = "5")] - pub outstanding_rewards: ::prost::alloc::vec::Vec, - /// fee_pool defines the accumulated commissions of all validators at genesis. - #[prost(message, repeated, tag = "6")] - pub validator_accumulated_commissions: - ::prost::alloc::vec::Vec, - /// fee_pool defines the historical rewards of all validators at genesis. - #[prost(message, repeated, tag = "7")] - pub validator_historical_rewards: ::prost::alloc::vec::Vec, - /// fee_pool defines the current rewards of all validators at genesis. - #[prost(message, repeated, tag = "8")] - pub validator_current_rewards: ::prost::alloc::vec::Vec, - /// fee_pool defines the delegator starting infos at genesis. - #[prost(message, repeated, tag = "9")] - pub delegator_starting_infos: ::prost::alloc::vec::Vec, - /// fee_pool defines the validator slash events at genesis. - #[prost(message, repeated, tag = "10")] - pub validator_slash_events: ::prost::alloc::vec::Vec, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", - response_type = QueryValidatorDistributionInfoResponse -)] -pub struct QueryValidatorDistributionInfoRequest { - /// validator_address defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, -} -/// QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse")] -pub struct QueryValidatorDistributionInfoResponse { - /// operator_address defines the validator operator address. - #[prost(string, tag = "1")] - pub operator_address: ::prost::alloc::string::String, - /// self_bond_rewards defines the self delegations rewards. - #[prost(message, repeated, tag = "2")] - pub self_bond_rewards: ::prost::alloc::vec::Vec, - /// commission defines the commission the validator received. - #[prost(message, repeated, tag = "3")] - pub commission: ::prost::alloc::vec::Vec, -} -/// QueryValidatorOutstandingRewardsRequest is the request type for the -/// Query/ValidatorOutstandingRewards RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", - response_type = QueryValidatorOutstandingRewardsResponse -)] -pub struct QueryValidatorOutstandingRewardsRequest { - /// validator_address defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, -} -/// QueryValidatorOutstandingRewardsResponse is the response type for the -/// Query/ValidatorOutstandingRewards RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse")] -pub struct QueryValidatorOutstandingRewardsResponse { - #[prost(message, optional, tag = "1")] - pub rewards: ::core::option::Option, -} -/// QueryValidatorCommissionRequest is the request type for the -/// Query/ValidatorCommission RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorCommissionRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/ValidatorCommission", - response_type = QueryValidatorCommissionResponse -)] -pub struct QueryValidatorCommissionRequest { - /// validator_address defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, -} -/// QueryValidatorCommissionResponse is the response type for the -/// Query/ValidatorCommission RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorCommissionResponse")] -pub struct QueryValidatorCommissionResponse { - /// commission defines the commission the validator received. - #[prost(message, optional, tag = "1")] - pub commission: ::core::option::Option, -} -/// QueryValidatorSlashesRequest is the request type for the -/// Query/ValidatorSlashes RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorSlashesRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/ValidatorSlashes", - response_type = QueryValidatorSlashesResponse -)] -pub struct QueryValidatorSlashesRequest { - /// validator_address defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, - /// starting_height defines the optional starting height to query the slashes. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub starting_height: u64, - /// starting_height defines the optional ending height to query the slashes. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub ending_height: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option, -} -/// QueryValidatorSlashesResponse is the response type for the -/// Query/ValidatorSlashes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryValidatorSlashesResponse")] -pub struct QueryValidatorSlashesResponse { - /// slashes defines the slashes the validator received. - #[prost(message, repeated, tag = "1")] - pub slashes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDelegationRewardsRequest is the request type for the -/// Query/DelegationRewards RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegationRewardsRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/DelegationRewards", - response_type = QueryDelegationRewardsResponse -)] -pub struct QueryDelegationRewardsRequest { - /// delegator_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, -} -/// QueryDelegationRewardsResponse is the response type for the -/// Query/DelegationRewards RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegationRewardsResponse")] -pub struct QueryDelegationRewardsResponse { - /// rewards defines the rewards accrued by a delegation. - #[prost(message, repeated, tag = "1")] - pub rewards: ::prost::alloc::vec::Vec, -} -/// QueryDelegationTotalRewardsRequest is the request type for the -/// Query/DelegationTotalRewards RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/DelegationTotalRewards", - response_type = QueryDelegationTotalRewardsResponse -)] -pub struct QueryDelegationTotalRewardsRequest { - /// delegator_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, -} -/// QueryDelegationTotalRewardsResponse is the response type for the -/// Query/DelegationTotalRewards RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse")] -pub struct QueryDelegationTotalRewardsResponse { - /// rewards defines all the rewards accrued by a delegator. - #[prost(message, repeated, tag = "1")] - pub rewards: ::prost::alloc::vec::Vec, - /// total defines the sum of all the rewards. - #[prost(message, repeated, tag = "2")] - pub total: ::prost::alloc::vec::Vec, -} -/// QueryDelegatorValidatorsRequest is the request type for the -/// Query/DelegatorValidators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/DelegatorValidators", - response_type = QueryDelegatorValidatorsResponse -)] -pub struct QueryDelegatorValidatorsRequest { - /// delegator_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, -} -/// QueryDelegatorValidatorsResponse is the response type for the -/// Query/DelegatorValidators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse")] -pub struct QueryDelegatorValidatorsResponse { - /// validators defines the validators a delegator is delegating for. - #[prost(string, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// QueryDelegatorWithdrawAddressRequest is the request type for the -/// Query/DelegatorWithdrawAddress RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", - response_type = QueryDelegatorWithdrawAddressResponse -)] -pub struct QueryDelegatorWithdrawAddressRequest { - /// delegator_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, -} -/// QueryDelegatorWithdrawAddressResponse is the response type for the -/// Query/DelegatorWithdrawAddress RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse")] -pub struct QueryDelegatorWithdrawAddressResponse { - /// withdraw_address defines the delegator address to query for. - #[prost(string, tag = "1")] - pub withdraw_address: ::prost::alloc::string::String, -} -/// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryCommunityPoolRequest")] -#[proto_query( - path = "/cosmos.distribution.v1beta1.Query/CommunityPool", - response_type = QueryCommunityPoolResponse -)] -pub struct QueryCommunityPoolRequest {} -/// QueryCommunityPoolResponse is the response type for the Query/CommunityPool -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.QueryCommunityPoolResponse")] -pub struct QueryCommunityPoolResponse { - /// pool defines community pool's coins. - #[prost(message, repeated, tag = "1")] - pub pool: ::prost::alloc::vec::Vec, -} -/// MsgSetWithdrawAddress sets the withdraw address for -/// a delegator (or validator self-delegation). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress")] -pub struct MsgSetWithdrawAddress { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub withdraw_address: ::prost::alloc::string::String, -} -/// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse")] -pub struct MsgSetWithdrawAddressResponse {} -/// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator -/// from a single validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward")] -pub struct MsgWithdrawDelegatorReward { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, -} -/// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward -/// response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse")] -pub struct MsgWithdrawDelegatorRewardResponse { - /// Since: cosmos-sdk 0.46 - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgWithdrawValidatorCommission withdraws the full commission to the validator -/// address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission")] -pub struct MsgWithdrawValidatorCommission { - #[prost(string, tag = "1")] - pub validator_address: ::prost::alloc::string::String, -} -/// MsgWithdrawValidatorCommissionResponse defines the -/// Msg/WithdrawValidatorCommission response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse")] -pub struct MsgWithdrawValidatorCommissionResponse { - /// Since: cosmos-sdk 0.46 - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgFundCommunityPool allows an account to directly -/// fund the community pool. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgFundCommunityPool")] -pub struct MsgFundCommunityPool { - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, -} -/// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse")] -pub struct MsgFundCommunityPoolResponse {} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/distribution parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgUpdateParamsResponse")] -pub struct 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend")] -pub struct MsgCommunityPoolSpend { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub recipient: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgCommunityPoolSpendResponse defines the response to executing a -/// MsgCommunityPoolSpend message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse")] -pub struct MsgCommunityPoolSpendResponse {} -/// DepositValidatorRewardsPool defines the request structure to provide -/// additional rewards to delegators from a specific validator. -/// -/// Since: cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool")] -pub struct MsgDepositValidatorRewardsPool { - #[prost(string, tag = "1")] - pub depositor: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgDepositValidatorRewardsPoolResponse defines the response to executing a -/// MsgDepositValidatorRewardsPool message. -/// -/// Since: cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPoolResponse")] -pub struct MsgDepositValidatorRewardsPoolResponse {} -pub struct DistributionQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> DistributionQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn validator_distribution_info( - &self, - validator_address: ::prost::alloc::string::String, - ) -> Result { - QueryValidatorDistributionInfoRequest { validator_address }.query(self.querier) - } - pub fn validator_outstanding_rewards( - &self, - validator_address: ::prost::alloc::string::String, - ) -> Result { - QueryValidatorOutstandingRewardsRequest { validator_address }.query(self.querier) - } - pub fn validator_commission( - &self, - validator_address: ::prost::alloc::string::String, - ) -> Result { - QueryValidatorCommissionRequest { validator_address }.query(self.querier) - } - pub fn validator_slashes( - &self, - validator_address: ::prost::alloc::string::String, - starting_height: u64, - ending_height: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryValidatorSlashesRequest { - validator_address, - starting_height, - ending_height, - pagination, - } - .query(self.querier) - } - pub fn delegation_rewards( - &self, - delegator_address: ::prost::alloc::string::String, - validator_address: ::prost::alloc::string::String, - ) -> Result { - QueryDelegationRewardsRequest { - delegator_address, - validator_address, - } - .query(self.querier) - } - pub fn delegation_total_rewards( - &self, - delegator_address: ::prost::alloc::string::String, - ) -> Result { - QueryDelegationTotalRewardsRequest { delegator_address }.query(self.querier) - } - pub fn delegator_validators( - &self, - delegator_address: ::prost::alloc::string::String, - ) -> Result { - QueryDelegatorValidatorsRequest { delegator_address }.query(self.querier) - } - pub fn delegator_withdraw_address( - &self, - delegator_address: ::prost::alloc::string::String, - ) -> Result { - QueryDelegatorWithdrawAddressRequest { delegator_address }.query(self.querier) - } - pub fn community_pool(&self) -> Result { - QueryCommunityPoolRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/evidence/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/evidence/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/evidence/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/evidence/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/evidence/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/evidence/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/evidence/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/evidence/module/v1.rs deleted file mode 100644 index 07e2afe1..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/evidence/module/v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the evidence module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.evidence.module.v1.Module")] -pub struct Module {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/evidence/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/evidence/v1beta1.rs deleted file mode 100644 index 27184a18..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/evidence/v1beta1.rs +++ /dev/null @@ -1,220 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Equivocation implements the Evidence interface and defines evidence of double -/// signing misbehavior. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.evidence.v1beta1.Equivocation")] -pub struct Equivocation { - /// height is the equivocation height. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - /// time is the equivocation time. - #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option, - /// power is the equivocation validator power. - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub power: i64, - /// consensus_address is the equivocation validator consensus address. - #[prost(string, tag = "4")] - pub consensus_address: ::prost::alloc::string::String, -} -/// GenesisState defines the evidence module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.evidence.v1beta1.GenesisState")] -pub struct GenesisState { - /// evidence defines all the evidence at genesis. - #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec, -} -/// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.evidence.v1beta1.QueryEvidenceRequest")] -#[proto_query( - path = "/cosmos.evidence.v1beta1.Query/Evidence", - response_type = QueryEvidenceResponse -)] -pub struct QueryEvidenceRequest { - /// evidence_hash defines the hash of the requested evidence. - /// Deprecated: Use hash, a HEX encoded string, instead. - #[deprecated] - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub evidence_hash: ::prost::alloc::vec::Vec, - /// hash defines the evidence hash of the requested evidence. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "2")] - pub hash: ::prost::alloc::string::String, -} -/// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.evidence.v1beta1.QueryEvidenceResponse")] -pub struct QueryEvidenceResponse { - /// evidence returns the requested evidence. - #[prost(message, optional, tag = "1")] - pub evidence: ::core::option::Option, -} -/// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.evidence.v1beta1.QueryAllEvidenceRequest")] -#[proto_query( - path = "/cosmos.evidence.v1beta1.Query/AllEvidence", - response_type = QueryAllEvidenceResponse -)] -pub struct QueryAllEvidenceRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.evidence.v1beta1.QueryAllEvidenceResponse")] -pub struct QueryAllEvidenceResponse { - /// evidence returns all evidences. - #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgSubmitEvidence represents a message that supports submitting arbitrary -/// Evidence of misbehavior such as equivocation or counterfactual signing. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.evidence.v1beta1.MsgSubmitEvidence")] -pub struct MsgSubmitEvidence { - /// submitter is the signer account address of evidence. - #[prost(string, tag = "1")] - pub submitter: ::prost::alloc::string::String, - /// evidence defines the evidence of misbehavior. - #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option, -} -/// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse")] -pub struct MsgSubmitEvidenceResponse { - /// hash defines the hash of the evidence. - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, -} -pub struct EvidenceQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> EvidenceQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn evidence( - &self, - evidence_hash: ::prost::alloc::vec::Vec, - hash: ::prost::alloc::string::String, - ) -> Result { - QueryEvidenceRequest { - evidence_hash, - hash, - } - .query(self.querier) - } - pub fn all_evidence( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryAllEvidenceRequest { pagination }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/feegrant/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/feegrant/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/feegrant/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/feegrant/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/feegrant/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/feegrant/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/feegrant/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/feegrant/module/v1.rs deleted file mode 100644 index f3afe85e..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/feegrant/module/v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the feegrant module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.module.v1.Module")] -pub struct Module {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/feegrant/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/feegrant/v1beta1.rs deleted file mode 100644 index 1c93f57e..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/feegrant/v1beta1.rs +++ /dev/null @@ -1,406 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// BasicAllowance implements Allowance with a one-time grant of coins -/// that optionally expires. The grantee can use up to SpendLimit to cover fees. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.BasicAllowance")] -pub struct 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. - #[prost(message, repeated, tag = "1")] - pub spend_limit: ::prost::alloc::vec::Vec, - /// expiration specifies an optional time when this allowance expires - #[prost(message, optional, tag = "2")] - pub expiration: ::core::option::Option, -} -/// PeriodicAllowance extends Allowance to allow for both a maximum cap, -/// as well as a limit per time period. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.PeriodicAllowance")] -pub struct PeriodicAllowance { - /// basic specifies a struct of `BasicAllowance` - #[prost(message, optional, tag = "1")] - pub basic: ::core::option::Option, - /// period specifies the time duration in which period_spend_limit coins can - /// be spent before that allowance is reset - #[prost(message, optional, tag = "2")] - pub period: ::core::option::Option, - /// period_spend_limit specifies the maximum number of coins that can be spent - /// in the period - #[prost(message, repeated, tag = "3")] - pub period_spend_limit: ::prost::alloc::vec::Vec, - /// period_can_spend is the number of coins left to be spent before the period_reset time - #[prost(message, repeated, tag = "4")] - pub period_can_spend: ::prost::alloc::vec::Vec, - /// 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 - #[prost(message, optional, tag = "5")] - pub period_reset: ::core::option::Option, -} -/// AllowedMsgAllowance creates allowance only for specified message types. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.AllowedMsgAllowance")] -pub struct AllowedMsgAllowance { - /// allowance can be any of basic and periodic fee allowance. - #[prost(message, optional, tag = "1")] - pub allowance: ::core::option::Option, - /// allowed_messages are the messages for which the grantee has the access. - #[prost(string, repeated, tag = "2")] - pub allowed_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Grant is stored in the KVStore to record a grant with full context -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.Grant")] -pub struct Grant { - /// granter is the address of the user granting an allowance of their funds. - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the address of the user being granted an allowance of another user's funds. - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - /// allowance can be any of basic, periodic, allowed fee allowance. - #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option, -} -/// GenesisState contains a set of fee allowances, persisted from the store -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.GenesisState")] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub allowances: ::prost::alloc::vec::Vec, -} -/// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.QueryAllowanceRequest")] -#[proto_query( - path = "/cosmos.feegrant.v1beta1.Query/Allowance", - response_type = QueryAllowanceResponse -)] -pub struct QueryAllowanceRequest { - /// granter is the address of the user granting an allowance of their funds. - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the address of the user being granted an allowance of another user's funds. - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, -} -/// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.QueryAllowanceResponse")] -pub struct QueryAllowanceResponse { - /// allowance is a allowance granted for grantee by granter. - #[prost(message, optional, tag = "1")] - pub allowance: ::core::option::Option, -} -/// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.QueryAllowancesRequest")] -#[proto_query( - path = "/cosmos.feegrant.v1beta1.Query/Allowances", - response_type = QueryAllowancesResponse -)] -pub struct QueryAllowancesRequest { - #[prost(string, tag = "1")] - pub grantee: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.QueryAllowancesResponse")] -pub struct QueryAllowancesResponse { - /// allowances are allowance's granted for grantee by granter. - #[prost(message, repeated, tag = "1")] - pub allowances: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.QueryAllowancesByGranterRequest")] -#[proto_query( - path = "/cosmos.feegrant.v1beta1.Query/AllowancesByGranter", - response_type = QueryAllowancesByGranterResponse -)] -pub struct QueryAllowancesByGranterRequest { - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// pagination defines an pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse")] -pub struct QueryAllowancesByGranterResponse { - /// allowances that have been issued by the granter. - #[prost(message, repeated, tag = "1")] - pub allowances: ::prost::alloc::vec::Vec, - /// pagination defines an pagination for the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgGrantAllowance adds permission for Grantee to spend up to Allowance -/// of fees from the account of Granter. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.MsgGrantAllowance")] -pub struct MsgGrantAllowance { - /// granter is the address of the user granting an allowance of their funds. - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the address of the user being granted an allowance of another user's funds. - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, - /// allowance can be any of basic, periodic, allowed fee allowance. - #[prost(message, optional, tag = "3")] - pub allowance: ::core::option::Option, -} -/// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse")] -pub struct MsgGrantAllowanceResponse {} -/// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.MsgRevokeAllowance")] -pub struct MsgRevokeAllowance { - /// granter is the address of the user granting an allowance of their funds. - #[prost(string, tag = "1")] - pub granter: ::prost::alloc::string::String, - /// grantee is the address of the user being granted an allowance of another user's funds. - #[prost(string, tag = "2")] - pub grantee: ::prost::alloc::string::String, -} -/// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse")] -pub struct MsgRevokeAllowanceResponse {} -/// MsgPruneAllowances prunes expired fee allowances. -/// -/// Since cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.MsgPruneAllowances")] -pub struct MsgPruneAllowances { - /// pruner is the address of the user pruning expired allowances. - #[prost(string, tag = "1")] - pub pruner: ::prost::alloc::string::String, -} -/// MsgPruneAllowancesResponse defines the Msg/PruneAllowancesResponse response type. -/// -/// Since cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.feegrant.v1beta1.MsgPruneAllowancesResponse")] -pub struct MsgPruneAllowancesResponse {} -pub struct FeegrantQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> FeegrantQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn allowance( - &self, - granter: ::prost::alloc::string::String, - grantee: ::prost::alloc::string::String, - ) -> Result { - QueryAllowanceRequest { granter, grantee }.query(self.querier) - } - pub fn allowances( - &self, - grantee: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryAllowancesRequest { - grantee, - pagination, - } - .query(self.querier) - } - pub fn allowances_by_granter( - &self, - granter: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryAllowancesByGranterRequest { - granter, - pagination, - } - .query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/genutil/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/genutil/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/genutil/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/genutil/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/genutil/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/genutil/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/genutil/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/genutil/module/v1.rs deleted file mode 100644 index f5306efb..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/genutil/module/v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object for the genutil module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.genutil.module.v1.Module")] -pub struct Module {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/genutil/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/genutil/v1beta1.rs deleted file mode 100644 index ad6c93eb..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/genutil/v1beta1.rs +++ /dev/null @@ -1,19 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// GenesisState defines the raw genesis transaction in JSON. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.genutil.v1beta1.GenesisState")] -pub struct GenesisState { - /// gen_txs defines the genesis transactions. - #[prost(bytes = "vec", repeated, tag = "1")] - pub gen_txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/gov/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/gov/mod.rs deleted file mode 100644 index 316ad46f..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/gov/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod module; -pub mod v1; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/gov/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/gov/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/gov/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/gov/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/gov/module/v1.rs deleted file mode 100644 index 7773f35d..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/gov/module/v1.rs +++ /dev/null @@ -1,27 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the gov module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.module.v1.Module")] -pub struct Module { - /// max_metadata_len defines the maximum proposal metadata length. - /// Defaults to 255 if not explicitly set. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_metadata_len: u64, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/gov/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/gov/v1.rs deleted file mode 100644 index cb1c0d4b..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/gov/v1.rs +++ /dev/null @@ -1,1363 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// WeightedVoteOption defines a unit of vote for vote split. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.WeightedVoteOption")] -pub struct WeightedVoteOption { - /// option defines the valid vote options, it must not contain duplicate vote options. - #[prost(enumeration = "VoteOption", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub option: i32, - /// weight is the vote weight associated with the vote option. - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, -} -/// Deposit defines an amount deposited by an account address to an active -/// proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.Deposit")] -pub struct Deposit { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// Proposal defines the core field members of a governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.Proposal")] -pub struct Proposal { - /// id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, - /// messages are the arbitrary messages to be executed if the proposal passes. - #[prost(message, repeated, tag = "2")] - pub messages: ::prost::alloc::vec::Vec, - /// status defines the proposal status. - #[prost(enumeration = "ProposalStatus", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, - /// 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. - #[prost(message, optional, tag = "4")] - pub final_tally_result: ::core::option::Option, - /// submit_time is the time of proposal submission. - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option, - /// deposit_end_time is the end time for deposition. - #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option, - /// total_deposit is the total deposit on the proposal. - #[prost(message, repeated, tag = "7")] - pub total_deposit: ::prost::alloc::vec::Vec, - /// voting_start_time is the starting time to vote on a proposal. - #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option, - /// voting_end_time is the end time of voting on a proposal. - #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option, - /// metadata is any arbitrary metadata attached to the proposal. - /// the recommended format of the metadata is to be found here: - /// - #[prost(string, tag = "10")] - pub metadata: ::prost::alloc::string::String, - /// title is the title of the proposal - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "11")] - pub title: ::prost::alloc::string::String, - /// summary is a short summary of the proposal - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "12")] - pub summary: ::prost::alloc::string::String, - /// proposer is the address of the proposal sumbitter - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "13")] - pub proposer: ::prost::alloc::string::String, - /// expedited defines if the proposal is expedited - /// - /// Since: cosmos-sdk 0.50 - #[prost(bool, tag = "14")] - pub expedited: bool, - /// failed_reason defines the reason why the proposal failed - /// - /// Since: cosmos-sdk 0.50 - #[prost(string, tag = "15")] - pub failed_reason: ::prost::alloc::string::String, -} -/// TallyResult defines a standard tally for a governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.TallyResult")] -pub struct TallyResult { - /// yes_count is the number of yes votes on a proposal. - #[prost(string, tag = "1")] - pub yes_count: ::prost::alloc::string::String, - /// abstain_count is the number of abstain votes on a proposal. - #[prost(string, tag = "2")] - pub abstain_count: ::prost::alloc::string::String, - /// no_count is the number of no votes on a proposal. - #[prost(string, tag = "3")] - pub no_count: ::prost::alloc::string::String, - /// no_with_veto_count is the number of no with veto votes on a proposal. - #[prost(string, tag = "4")] - pub no_with_veto_count: ::prost::alloc::string::String, -} -/// Vote defines a vote on a governance proposal. -/// A Vote consists of a proposal ID, the voter, and the vote option. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.Vote")] -pub struct Vote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter is the voter address of the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// options is the weighted vote options. - #[prost(message, repeated, tag = "4")] - pub options: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata attached to the vote. - /// the recommended format of the metadata is to be found here: - #[prost(string, tag = "5")] - pub metadata: ::prost::alloc::string::String, -} -/// DepositParams defines the params for deposits on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.DepositParams")] -#[deprecated] -pub struct DepositParams { - /// Minimum deposit for a proposal to enter voting period. - #[prost(message, repeated, tag = "1")] - pub min_deposit: ::prost::alloc::vec::Vec, - /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - /// months. - #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option, -} -/// VotingParams defines the params for voting on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.VotingParams")] -#[deprecated] -pub struct VotingParams { - /// Duration of the voting period. - #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option, -} -/// TallyParams defines the params for tallying votes on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.TallyParams")] -#[deprecated] -pub struct TallyParams { - /// Minimum percentage of total stake needed to vote for a result to be - /// considered valid. - #[prost(string, tag = "1")] - pub quorum: ::prost::alloc::string::String, - /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - #[prost(string, tag = "2")] - pub threshold: ::prost::alloc::string::String, - /// Minimum value of Veto votes to Total votes ratio for proposal to be - /// vetoed. Default value: 1/3. - #[prost(string, tag = "3")] - pub veto_threshold: ::prost::alloc::string::String, -} -/// Params defines the parameters for the x/gov module. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.Params")] -pub struct Params { - /// Minimum deposit for a proposal to enter voting period. - #[prost(message, repeated, tag = "1")] - pub min_deposit: ::prost::alloc::vec::Vec, - /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - /// months. - #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option, - /// Duration of the voting period. - #[prost(message, optional, tag = "3")] - pub voting_period: ::core::option::Option, - /// Minimum percentage of total stake needed to vote for a result to be - /// considered valid. - #[prost(string, tag = "4")] - pub quorum: ::prost::alloc::string::String, - /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - #[prost(string, tag = "5")] - pub threshold: ::prost::alloc::string::String, - /// Minimum value of Veto votes to Total votes ratio for proposal to be - /// vetoed. Default value: 1/3. - #[prost(string, tag = "6")] - pub veto_threshold: ::prost::alloc::string::String, - /// The ratio representing the proportion of the deposit value that must be paid at proposal submission. - #[prost(string, tag = "7")] - pub min_initial_deposit_ratio: ::prost::alloc::string::String, - /// The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. - /// - /// Since: cosmos-sdk 0.50 - #[prost(string, tag = "8")] - pub proposal_cancel_ratio: ::prost::alloc::string::String, - /// 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 - #[prost(string, tag = "9")] - pub proposal_cancel_dest: ::prost::alloc::string::String, - /// Duration of the voting period of an expedited proposal. - /// - /// Since: cosmos-sdk 0.50 - #[prost(message, optional, tag = "10")] - pub expedited_voting_period: ::core::option::Option, - /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. - /// - /// Since: cosmos-sdk 0.50 - #[prost(string, tag = "11")] - pub expedited_threshold: ::prost::alloc::string::String, - /// Minimum expedited deposit for a proposal to enter voting period. - #[prost(message, repeated, tag = "12")] - pub expedited_min_deposit: ::prost::alloc::vec::Vec, - /// burn deposits if a proposal does not meet quorum - #[prost(bool, tag = "13")] - pub burn_vote_quorum: bool, - /// burn deposits if the proposal does not enter voting period - #[prost(bool, tag = "14")] - pub burn_proposal_deposit_prevote: bool, - /// burn deposits if quorum with vote type no_veto is met - #[prost(bool, tag = "15")] - pub burn_vote_veto: bool, - /// The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. - /// Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be - /// required. - /// - /// Since: cosmos-sdk 0.50 - #[prost(string, tag = "16")] - pub min_deposit_ratio: ::prost::alloc::string::String, -} -/// VoteOption enumerates the valid vote options for a given governance proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum VoteOption { - /// VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - Unspecified = 0, - /// VOTE_OPTION_YES defines a yes vote option. - Yes = 1, - /// VOTE_OPTION_ABSTAIN defines an abstain vote option. - Abstain = 2, - /// VOTE_OPTION_NO defines a no vote option. - No = 3, - /// VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - NoWithVeto = 4, -} -impl VoteOption { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - VoteOption::Unspecified => "VOTE_OPTION_UNSPECIFIED", - VoteOption::Yes => "VOTE_OPTION_YES", - VoteOption::Abstain => "VOTE_OPTION_ABSTAIN", - VoteOption::No => "VOTE_OPTION_NO", - VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), - "VOTE_OPTION_YES" => Some(Self::Yes), - "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), - "VOTE_OPTION_NO" => Some(Self::No), - "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), - _ => None, - } - } -} -/// ProposalStatus enumerates the valid statuses of a proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum ProposalStatus { - /// PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - Unspecified = 0, - /// PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - /// period. - DepositPeriod = 1, - /// PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - /// period. - VotingPeriod = 2, - /// PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - /// passed. - Passed = 3, - /// PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - /// been rejected. - Rejected = 4, - /// PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - /// failed. - Failed = 5, -} -impl ProposalStatus { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ProposalStatus::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", - ProposalStatus::DepositPeriod => "PROPOSAL_STATUS_DEPOSIT_PERIOD", - ProposalStatus::VotingPeriod => "PROPOSAL_STATUS_VOTING_PERIOD", - ProposalStatus::Passed => "PROPOSAL_STATUS_PASSED", - ProposalStatus::Rejected => "PROPOSAL_STATUS_REJECTED", - ProposalStatus::Failed => "PROPOSAL_STATUS_FAILED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Some(Self::DepositPeriod), - "PROPOSAL_STATUS_VOTING_PERIOD" => Some(Self::VotingPeriod), - "PROPOSAL_STATUS_PASSED" => Some(Self::Passed), - "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), - "PROPOSAL_STATUS_FAILED" => Some(Self::Failed), - _ => None, - } - } -} -/// GenesisState defines the gov module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.GenesisState")] -pub struct GenesisState { - /// starting_proposal_id is the ID of the starting proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "starting_proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub starting_proposal_id: u64, - /// deposits defines all the deposits present at genesis. - #[prost(message, repeated, tag = "2")] - pub deposits: ::prost::alloc::vec::Vec, - /// votes defines all the votes present at genesis. - #[prost(message, repeated, tag = "3")] - pub votes: ::prost::alloc::vec::Vec, - /// proposals defines all the proposals present at genesis. - #[prost(message, repeated, tag = "4")] - pub proposals: ::prost::alloc::vec::Vec, - /// Deprecated: Prefer to use `params` instead. - /// deposit_params defines all the paramaters of related to deposit. - #[deprecated] - #[prost(message, optional, tag = "5")] - pub deposit_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// voting_params defines all the paramaters of related to voting. - #[deprecated] - #[prost(message, optional, tag = "6")] - pub voting_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// tally_params defines all the paramaters of related to tally. - #[deprecated] - #[prost(message, optional, tag = "7")] - pub tally_params: ::core::option::Option, - /// params defines all the paramaters of x/gov module. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "8")] - pub params: ::core::option::Option, - /// 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 - #[prost(string, tag = "9")] - pub constitution: ::prost::alloc::string::String, -} -/// QueryConstitutionRequest is the request type for the Query/Constitution RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryConstitutionRequest")] -#[proto_query( - path = "/cosmos.gov.v1.Query/Constitution", - response_type = QueryConstitutionResponse -)] -pub struct QueryConstitutionRequest {} -/// QueryConstitutionResponse is the response type for the Query/Constitution RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryConstitutionResponse")] -pub struct QueryConstitutionResponse { - #[prost(string, tag = "1")] - pub constitution: ::prost::alloc::string::String, -} -/// QueryProposalRequest is the request type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryProposalRequest")] -#[proto_query( - path = "/cosmos.gov.v1.Query/Proposal", - response_type = QueryProposalResponse -)] -pub struct QueryProposalRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// QueryProposalResponse is the response type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryProposalResponse")] -pub struct QueryProposalResponse { - /// proposal is the requested governance proposal. - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryProposalsRequest")] -#[proto_query( - path = "/cosmos.gov.v1.Query/Proposals", - response_type = QueryProposalsResponse -)] -pub struct QueryProposalsRequest { - /// proposal_status defines the status of the proposals. - #[prost(enumeration = "ProposalStatus", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_status: i32, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "3")] - pub depositor: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option, -} -/// QueryProposalsResponse is the response type for the Query/Proposals RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryProposalsResponse")] -pub struct QueryProposalsResponse { - /// proposals defines all the requested governance proposals. - #[prost(message, repeated, tag = "1")] - pub proposals: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryVoteRequest is the request type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryVoteRequest")] -#[proto_query(path = "/cosmos.gov.v1.Query/Vote", response_type = QueryVoteResponse)] -pub struct QueryVoteRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, -} -/// QueryVoteResponse is the response type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryVoteResponse")] -pub struct QueryVoteResponse { - /// vote defines the queried vote. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -/// QueryVotesRequest is the request type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryVotesRequest")] -#[proto_query(path = "/cosmos.gov.v1.Query/Votes", response_type = QueryVotesResponse)] -pub struct QueryVotesRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryVotesResponse is the response type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryVotesResponse")] -pub struct QueryVotesResponse { - /// votes defines the queried votes. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryParamsRequest")] -#[proto_query(path = "/cosmos.gov.v1.Query/Params", response_type = QueryParamsResponse)] -pub struct QueryParamsRequest { - /// params_type defines which parameters to query for, can be one of "voting", - /// "tallying" or "deposit". - #[prost(string, tag = "1")] - pub params_type: ::prost::alloc::string::String, -} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// Deprecated: Prefer to use `params` instead. - /// voting_params defines the parameters related to voting. - #[deprecated] - #[prost(message, optional, tag = "1")] - pub voting_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// deposit_params defines the parameters related to deposit. - #[deprecated] - #[prost(message, optional, tag = "2")] - pub deposit_params: ::core::option::Option, - /// Deprecated: Prefer to use `params` instead. - /// tally_params defines the parameters related to tally. - #[deprecated] - #[prost(message, optional, tag = "3")] - pub tally_params: ::core::option::Option, - /// params defines all the paramaters of x/gov module. - /// - /// Since: cosmos-sdk 0.47 - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, -} -/// QueryDepositRequest is the request type for the Query/Deposit RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryDepositRequest")] -#[proto_query( - path = "/cosmos.gov.v1.Query/Deposit", - response_type = QueryDepositResponse -)] -pub struct QueryDepositRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, -} -/// QueryDepositResponse is the response type for the Query/Deposit RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryDepositResponse")] -pub struct QueryDepositResponse { - /// deposit defines the requested deposit. - #[prost(message, optional, tag = "1")] - pub deposit: ::core::option::Option, -} -/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryDepositsRequest")] -#[proto_query( - path = "/cosmos.gov.v1.Query/Deposits", - response_type = QueryDepositsResponse -)] -pub struct QueryDepositsRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryDepositsResponse")] -pub struct QueryDepositsResponse { - /// deposits defines the requested deposits. - #[prost(message, repeated, tag = "1")] - pub deposits: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryTallyResultRequest")] -#[proto_query( - path = "/cosmos.gov.v1.Query/TallyResult", - response_type = QueryTallyResultResponse -)] -pub struct QueryTallyResultRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.QueryTallyResultResponse")] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, -} -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgSubmitProposal")] -pub struct MsgSubmitProposal { - /// messages are the arbitrary messages to be executed if proposal passes. - #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec, - /// initial_deposit is the deposit value that must be paid at proposal submission. - #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - /// proposer is the account address of the proposer. - #[prost(string, tag = "3")] - pub proposer: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the proposal. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// title is the title of the proposal. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "5")] - pub title: ::prost::alloc::string::String, - /// summary is the summary of the proposal - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "6")] - pub summary: ::prost::alloc::string::String, - /// expedited defines if the proposal is expedited or not - /// - /// Since: cosmos-sdk 0.50 - #[prost(bool, tag = "7")] - pub expedited: bool, -} -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgSubmitProposalResponse")] -pub struct MsgSubmitProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// MsgExecLegacyContent is used to wrap the legacy content field into a message. -/// This ensures backwards compatibility with v1beta1.MsgSubmitProposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgExecLegacyContent")] -pub struct MsgExecLegacyContent { - /// content is the proposal's content. - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option, - /// authority must be the gov module address. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgExecLegacyContentResponse")] -pub struct MsgExecLegacyContentResponse {} -/// MsgVote defines a message to cast a vote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgVote")] -pub struct MsgVote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option defines the vote option. - #[prost(enumeration = "VoteOption", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub option: i32, - /// metadata is any arbitrary metadata attached to the Vote. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgVoteResponse defines the Msg/Vote response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgVoteResponse")] -pub struct MsgVoteResponse {} -/// MsgVoteWeighted defines a message to cast a vote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgVoteWeighted")] -pub struct MsgVoteWeighted { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// options defines the weighted vote options. - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata attached to the VoteWeighted. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgVoteWeightedResponse")] -pub struct MsgVoteWeightedResponse {} -/// MsgDeposit defines a message to submit a deposit to an existing proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgDeposit")] -pub struct MsgDeposit { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgDepositResponse defines the Msg/Deposit response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgDepositResponse")] -pub struct MsgDepositResponse {} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/gov parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -/// MsgCancelProposal is the Msg/CancelProposal request type. -/// -/// Since: cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgCancelProposal")] -pub struct MsgCancelProposal { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// proposer is the account address of the proposer. - #[prost(string, tag = "2")] - pub proposer: ::prost::alloc::string::String, -} -/// MsgCancelProposalResponse defines the response structure for executing a -/// MsgCancelProposal message. -/// -/// Since: cosmos-sdk 0.50 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1.MsgCancelProposalResponse")] -pub struct MsgCancelProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// canceled_time is the time when proposal is canceled. - #[prost(message, optional, tag = "2")] - pub canceled_time: ::core::option::Option, - /// canceled_height defines the block height at which the proposal is canceled. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub canceled_height: u64, -} -pub struct GovQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> GovQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn constitution(&self) -> Result { - QueryConstitutionRequest {}.query(self.querier) - } - pub fn proposal( - &self, - proposal_id: u64, - ) -> Result { - QueryProposalRequest { proposal_id }.query(self.querier) - } - pub fn proposals( - &self, - proposal_status: i32, - voter: ::prost::alloc::string::String, - depositor: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryProposalsRequest { - proposal_status, - voter, - depositor, - pagination, - } - .query(self.querier) - } - pub fn vote( - &self, - proposal_id: u64, - voter: ::prost::alloc::string::String, - ) -> Result { - QueryVoteRequest { proposal_id, voter }.query(self.querier) - } - pub fn votes( - &self, - proposal_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryVotesRequest { - proposal_id, - pagination, - } - .query(self.querier) - } - pub fn params( - &self, - params_type: ::prost::alloc::string::String, - ) -> Result { - QueryParamsRequest { params_type }.query(self.querier) - } - pub fn deposit( - &self, - proposal_id: u64, - depositor: ::prost::alloc::string::String, - ) -> Result { - QueryDepositRequest { - proposal_id, - depositor, - } - .query(self.querier) - } - pub fn deposits( - &self, - proposal_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryDepositsRequest { - proposal_id, - pagination, - } - .query(self.querier) - } - pub fn tally_result( - &self, - proposal_id: u64, - ) -> Result { - QueryTallyResultRequest { proposal_id }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/gov/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/gov/v1beta1.rs deleted file mode 100644 index 76f0ccaa..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/gov/v1beta1.rs +++ /dev/null @@ -1,1071 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// WeightedVoteOption defines a unit of vote for vote split. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.WeightedVoteOption")] -pub struct WeightedVoteOption { - /// option defines the valid vote options, it must not contain duplicate vote options. - #[prost(enumeration = "VoteOption", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub option: i32, - /// weight is the vote weight associated with the vote option. - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, -} -/// TextProposal defines a standard text proposal whose changes need to be -/// manually updated in case of approval. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.TextProposal")] -pub struct TextProposal { - /// title of the proposal. - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// description associated with the proposal. - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} -/// Deposit defines an amount deposited by an account address to an active -/// proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.Deposit")] -pub struct Deposit { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// Proposal defines the core field members of a governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.Proposal")] -pub struct Proposal { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// content is the proposal's content. - #[prost(message, optional, tag = "2")] - pub content: ::core::option::Option, - /// status defines the proposal status. - #[prost(enumeration = "ProposalStatus", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, - /// 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. - #[prost(message, optional, tag = "4")] - pub final_tally_result: ::core::option::Option, - /// submit_time is the time of proposal submission. - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option, - /// deposit_end_time is the end time for deposition. - #[prost(message, optional, tag = "6")] - pub deposit_end_time: ::core::option::Option, - /// total_deposit is the total deposit on the proposal. - #[prost(message, repeated, tag = "7")] - pub total_deposit: ::prost::alloc::vec::Vec, - /// voting_start_time is the starting time to vote on a proposal. - #[prost(message, optional, tag = "8")] - pub voting_start_time: ::core::option::Option, - /// voting_end_time is the end time of voting on a proposal. - #[prost(message, optional, tag = "9")] - pub voting_end_time: ::core::option::Option, -} -/// TallyResult defines a standard tally for a governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.TallyResult")] -pub struct TallyResult { - /// yes is the number of yes votes on a proposal. - #[prost(string, tag = "1")] - pub yes: ::prost::alloc::string::String, - /// abstain is the number of abstain votes on a proposal. - #[prost(string, tag = "2")] - pub abstain: ::prost::alloc::string::String, - /// no is the number of no votes on a proposal. - #[prost(string, tag = "3")] - pub no: ::prost::alloc::string::String, - /// no_with_veto is the number of no with veto votes on a proposal. - #[prost(string, tag = "4")] - pub no_with_veto: ::prost::alloc::string::String, -} -/// Vote defines a vote on a governance proposal. -/// A Vote consists of a proposal ID, the voter, and the vote option. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.Vote")] -pub struct Vote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter is the voter address of the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// 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. - #[deprecated] - #[prost(enumeration = "VoteOption", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub option: i32, - /// options is the weighted vote options. - /// - /// Since: cosmos-sdk 0.43 - #[prost(message, repeated, tag = "4")] - pub options: ::prost::alloc::vec::Vec, -} -/// DepositParams defines the params for deposits on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.DepositParams")] -pub struct DepositParams { - /// Minimum deposit for a proposal to enter voting period. - #[prost(message, repeated, tag = "1")] - pub min_deposit: ::prost::alloc::vec::Vec, - /// Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - /// months. - #[prost(message, optional, tag = "2")] - pub max_deposit_period: ::core::option::Option, -} -/// VotingParams defines the params for voting on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.VotingParams")] -pub struct VotingParams { - /// Duration of the voting period. - #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option, -} -/// TallyParams defines the params for tallying votes on governance proposals. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.TallyParams")] -pub struct TallyParams { - /// Minimum percentage of total stake needed to vote for a result to be - /// considered valid. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub quorum: ::prost::alloc::vec::Vec, - /// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub threshold: ::prost::alloc::vec::Vec, - /// Minimum value of Veto votes to Total votes ratio for proposal to be - /// vetoed. Default value: 1/3. - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub veto_threshold: ::prost::alloc::vec::Vec, -} -/// VoteOption enumerates the valid vote options for a given governance proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum VoteOption { - /// VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - Unspecified = 0, - /// VOTE_OPTION_YES defines a yes vote option. - Yes = 1, - /// VOTE_OPTION_ABSTAIN defines an abstain vote option. - Abstain = 2, - /// VOTE_OPTION_NO defines a no vote option. - No = 3, - /// VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - NoWithVeto = 4, -} -impl VoteOption { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - VoteOption::Unspecified => "VOTE_OPTION_UNSPECIFIED", - VoteOption::Yes => "VOTE_OPTION_YES", - VoteOption::Abstain => "VOTE_OPTION_ABSTAIN", - VoteOption::No => "VOTE_OPTION_NO", - VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), - "VOTE_OPTION_YES" => Some(Self::Yes), - "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), - "VOTE_OPTION_NO" => Some(Self::No), - "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), - _ => None, - } - } -} -/// ProposalStatus enumerates the valid statuses of a proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum ProposalStatus { - /// PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. - Unspecified = 0, - /// PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - /// period. - DepositPeriod = 1, - /// PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - /// period. - VotingPeriod = 2, - /// PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - /// passed. - Passed = 3, - /// PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - /// been rejected. - Rejected = 4, - /// PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - /// failed. - Failed = 5, -} -impl ProposalStatus { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ProposalStatus::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", - ProposalStatus::DepositPeriod => "PROPOSAL_STATUS_DEPOSIT_PERIOD", - ProposalStatus::VotingPeriod => "PROPOSAL_STATUS_VOTING_PERIOD", - ProposalStatus::Passed => "PROPOSAL_STATUS_PASSED", - ProposalStatus::Rejected => "PROPOSAL_STATUS_REJECTED", - ProposalStatus::Failed => "PROPOSAL_STATUS_FAILED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "PROPOSAL_STATUS_DEPOSIT_PERIOD" => Some(Self::DepositPeriod), - "PROPOSAL_STATUS_VOTING_PERIOD" => Some(Self::VotingPeriod), - "PROPOSAL_STATUS_PASSED" => Some(Self::Passed), - "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), - "PROPOSAL_STATUS_FAILED" => Some(Self::Failed), - _ => None, - } - } -} -/// GenesisState defines the gov module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.GenesisState")] -pub struct GenesisState { - /// starting_proposal_id is the ID of the starting proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "starting_proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub starting_proposal_id: u64, - /// deposits defines all the deposits present at genesis. - #[prost(message, repeated, tag = "2")] - pub deposits: ::prost::alloc::vec::Vec, - /// votes defines all the votes present at genesis. - #[prost(message, repeated, tag = "3")] - pub votes: ::prost::alloc::vec::Vec, - /// proposals defines all the proposals present at genesis. - #[prost(message, repeated, tag = "4")] - pub proposals: ::prost::alloc::vec::Vec, - /// deposit_params defines all the parameters related to deposit. - #[prost(message, optional, tag = "5")] - pub deposit_params: ::core::option::Option, - /// voting_params defines all the parameters related to voting. - #[prost(message, optional, tag = "6")] - pub voting_params: ::core::option::Option, - /// tally_params defines all the parameters related to tally. - #[prost(message, optional, tag = "7")] - pub tally_params: ::core::option::Option, -} -/// QueryProposalRequest is the request type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryProposalRequest")] -#[proto_query( - path = "/cosmos.gov.v1beta1.Query/Proposal", - response_type = QueryProposalResponse -)] -pub struct QueryProposalRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// QueryProposalResponse is the response type for the Query/Proposal RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryProposalResponse")] -pub struct QueryProposalResponse { - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -/// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryProposalsRequest")] -#[proto_query( - path = "/cosmos.gov.v1beta1.Query/Proposals", - response_type = QueryProposalsResponse -)] -pub struct QueryProposalsRequest { - /// proposal_status defines the status of the proposals. - #[prost(enumeration = "ProposalStatus", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_status: i32, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "3")] - pub depositor: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option, -} -/// QueryProposalsResponse is the response type for the Query/Proposals RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryProposalsResponse")] -pub struct QueryProposalsResponse { - /// proposals defines all the requested governance proposals. - #[prost(message, repeated, tag = "1")] - pub proposals: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryVoteRequest is the request type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryVoteRequest")] -#[proto_query( - path = "/cosmos.gov.v1beta1.Query/Vote", - response_type = QueryVoteResponse -)] -pub struct QueryVoteRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter defines the voter address for the proposals. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, -} -/// QueryVoteResponse is the response type for the Query/Vote RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryVoteResponse")] -pub struct QueryVoteResponse { - /// vote defines the queried vote. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -/// QueryVotesRequest is the request type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryVotesRequest")] -#[proto_query( - path = "/cosmos.gov.v1beta1.Query/Votes", - response_type = QueryVotesResponse -)] -pub struct QueryVotesRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryVotesResponse is the response type for the Query/Votes RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryVotesResponse")] -pub struct QueryVotesResponse { - /// votes defines the queried votes. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/cosmos.gov.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest { - /// params_type defines which parameters to query for, can be one of "voting", - /// "tallying" or "deposit". - #[prost(string, tag = "1")] - pub params_type: ::prost::alloc::string::String, -} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// voting_params defines the parameters related to voting. - #[prost(message, optional, tag = "1")] - pub voting_params: ::core::option::Option, - /// deposit_params defines the parameters related to deposit. - #[prost(message, optional, tag = "2")] - pub deposit_params: ::core::option::Option, - /// tally_params defines the parameters related to tally. - #[prost(message, optional, tag = "3")] - pub tally_params: ::core::option::Option, -} -/// QueryDepositRequest is the request type for the Query/Deposit RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryDepositRequest")] -#[proto_query( - path = "/cosmos.gov.v1beta1.Query/Deposit", - response_type = QueryDepositResponse -)] -pub struct QueryDepositRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, -} -/// QueryDepositResponse is the response type for the Query/Deposit RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryDepositResponse")] -pub struct QueryDepositResponse { - /// deposit defines the requested deposit. - #[prost(message, optional, tag = "1")] - pub deposit: ::core::option::Option, -} -/// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryDepositsRequest")] -#[proto_query( - path = "/cosmos.gov.v1beta1.Query/Deposits", - response_type = QueryDepositsResponse -)] -pub struct QueryDepositsRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryDepositsResponse")] -pub struct QueryDepositsResponse { - /// deposits defines the requested deposits. - #[prost(message, repeated, tag = "1")] - pub deposits: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryTallyResultRequest")] -#[proto_query( - path = "/cosmos.gov.v1beta1.Query/TallyResult", - response_type = QueryTallyResultResponse -)] -pub struct QueryTallyResultRequest { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.QueryTallyResultResponse")] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, -} -/// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -/// proposal Content. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.MsgSubmitProposal")] -pub struct MsgSubmitProposal { - /// content is the proposal's content. - #[prost(message, optional, tag = "1")] - pub content: ::core::option::Option, - /// initial_deposit is the deposit value that must be paid at proposal submission. - #[prost(message, repeated, tag = "2")] - pub initial_deposit: ::prost::alloc::vec::Vec, - /// proposer is the account address of the proposer. - #[prost(string, tag = "3")] - pub proposer: ::prost::alloc::string::String, -} -/// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.MsgSubmitProposalResponse")] -pub struct MsgSubmitProposalResponse { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// MsgVote defines a message to cast a vote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.MsgVote")] -pub struct MsgVote { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option defines the vote option. - #[prost(enumeration = "VoteOption", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub option: i32, -} -/// MsgVoteResponse defines the Msg/Vote response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.MsgVoteResponse")] -pub struct MsgVoteResponse {} -/// MsgVoteWeighted defines a message to cast a vote. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.MsgVoteWeighted")] -pub struct MsgVoteWeighted { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter is the voter address for the proposal. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// options defines the weighted vote options. - #[prost(message, repeated, tag = "3")] - pub options: ::prost::alloc::vec::Vec, -} -/// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.MsgVoteWeightedResponse")] -pub struct MsgVoteWeightedResponse {} -/// MsgDeposit defines a message to submit a deposit to an existing proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.MsgDeposit")] -pub struct MsgDeposit { - /// proposal_id defines the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// depositor defines the deposit addresses from the proposals. - #[prost(string, tag = "2")] - pub depositor: ::prost::alloc::string::String, - /// amount to be deposited by depositor. - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgDepositResponse defines the Msg/Deposit response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.gov.v1beta1.MsgDepositResponse")] -pub struct MsgDepositResponse {} -pub struct GovQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> GovQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn proposal( - &self, - proposal_id: u64, - ) -> Result { - QueryProposalRequest { proposal_id }.query(self.querier) - } - pub fn proposals( - &self, - proposal_status: i32, - voter: ::prost::alloc::string::String, - depositor: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryProposalsRequest { - proposal_status, - voter, - depositor, - pagination, - } - .query(self.querier) - } - pub fn vote( - &self, - proposal_id: u64, - voter: ::prost::alloc::string::String, - ) -> Result { - QueryVoteRequest { proposal_id, voter }.query(self.querier) - } - pub fn votes( - &self, - proposal_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryVotesRequest { - proposal_id, - pagination, - } - .query(self.querier) - } - pub fn params( - &self, - params_type: ::prost::alloc::string::String, - ) -> Result { - QueryParamsRequest { params_type }.query(self.querier) - } - pub fn deposit( - &self, - proposal_id: u64, - depositor: ::prost::alloc::string::String, - ) -> Result { - QueryDepositRequest { - proposal_id, - depositor, - } - .query(self.querier) - } - pub fn deposits( - &self, - proposal_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryDepositsRequest { - proposal_id, - pagination, - } - .query(self.querier) - } - pub fn tally_result( - &self, - proposal_id: u64, - ) -> Result { - QueryTallyResultRequest { proposal_id }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/group/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/group/mod.rs deleted file mode 100644 index a8429e39..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/group/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/group/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/group/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/group/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/group/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/group/module/v1.rs deleted file mode 100644 index 951c2e33..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/group/module/v1.rs +++ /dev/null @@ -1,28 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the group module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.module.v1.Module")] -pub struct Module { - /// max_execution_period defines the max duration after a proposal's voting period ends that members can send a MsgExec - /// to execute the proposal. - #[prost(message, optional, tag = "1")] - pub max_execution_period: ::core::option::Option, - /// 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. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_metadata_len: u64, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/group/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/group/v1.rs deleted file mode 100644 index d09d2a7a..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/group/v1.rs +++ /dev/null @@ -1,2319 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Member represents a group member with an account address, -/// non-zero weight, metadata and added_at timestamp. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.Member")] -pub struct Member { - /// address is the member's account address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// weight is the member's voting weight that should be greater than 0. - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the member. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// added_at is a timestamp specifying when a member was added. - #[prost(message, optional, tag = "4")] - pub added_at: ::core::option::Option, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MemberRequest")] -pub struct MemberRequest { - /// address is the member's account address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// weight is the member's voting weight that should be greater than 0. - #[prost(string, tag = "2")] - pub weight: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the member. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, -} -/// 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`. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.ThresholdDecisionPolicy")] -pub struct ThresholdDecisionPolicy { - /// threshold is the minimum weighted sum of `YES` votes that must be met or - /// exceeded for a proposal to succeed. - #[prost(string, tag = "1")] - pub threshold: ::prost::alloc::string::String, - /// windows defines the different windows for voting and execution. - #[prost(message, optional, tag = "2")] - pub windows: ::core::option::Option, -} -/// 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`. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.PercentageDecisionPolicy")] -pub struct PercentageDecisionPolicy { - /// percentage is the minimum percentage of the weighted sum of `YES` votes must - /// meet for a proposal to succeed. - #[prost(string, tag = "1")] - pub percentage: ::prost::alloc::string::String, - /// windows defines the different windows for voting and execution. - #[prost(message, optional, tag = "2")] - pub windows: ::core::option::Option, -} -/// DecisionPolicyWindows defines the different windows for voting and execution. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.DecisionPolicyWindows")] -pub struct 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. - #[prost(message, optional, tag = "1")] - pub voting_period: ::core::option::Option, - /// 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. - #[prost(message, optional, tag = "2")] - pub min_execution_period: ::core::option::Option, -} -/// GroupInfo represents the high-level on-chain information for a group. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.GroupInfo")] -pub struct GroupInfo { - /// id is the unique ID of the group. - #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, - /// admin is the account address of the group's admin. - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata to attached to the group. - /// the recommended format of the metadata is to be found here: - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// 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 - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub version: u64, - /// total_weight is the sum of the group members' weights. - #[prost(string, tag = "5")] - pub total_weight: ::prost::alloc::string::String, - /// created_at is a timestamp specifying when a group was created. - #[prost(message, optional, tag = "6")] - pub created_at: ::core::option::Option, -} -/// GroupMember represents the relationship between a group and a member. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.GroupMember")] -pub struct GroupMember { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// member is the member data. - #[prost(message, optional, tag = "2")] - pub member: ::core::option::Option, -} -/// GroupPolicyInfo represents the high-level on-chain information for a group policy. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.GroupPolicyInfo")] -pub struct GroupPolicyInfo { - /// address is the account address of group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// admin is the account address of the group admin. - #[prost(string, tag = "3")] - pub admin: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the group policy. - /// the recommended format of the metadata is to be found here: - /// - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// version is used to track changes to a group's GroupPolicyInfo structure that - /// would create a different result on a running proposal. - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub version: u64, - /// decision_policy specifies the group policy's decision policy. - #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option, - /// created_at is a timestamp specifying when a group policy was created. - #[prost(message, optional, tag = "7")] - pub created_at: ::core::option::Option, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.Proposal")] -pub struct Proposal { - /// id is the unique id of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// metadata is any arbitrary metadata attached to the proposal. - /// the recommended format of the metadata is to be found here: - /// - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// proposers are the account addresses of the proposers. - #[prost(string, repeated, tag = "4")] - pub proposers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// submit_time is a timestamp specifying when a proposal was submitted. - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option, - /// group_version tracks the version of the group at proposal submission. - /// This field is here for informational purposes only. - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_version: u64, - /// 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. - #[prost(uint64, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_policy_version: u64, - /// status represents the high level position in the life cycle of the proposal. Initial value is Submitted. - #[prost(enumeration = "ProposalStatus", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, - /// 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. - #[prost(message, optional, tag = "9")] - pub final_tally_result: ::core::option::Option, - /// 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. - #[prost(message, optional, tag = "10")] - pub voting_period_end: ::core::option::Option, - /// executor_result is the final result of the proposal execution. Initial value is NotRun. - #[prost(enumeration = "ProposalExecutorResult", tag = "11")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub executor_result: i32, - /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. - #[prost(message, repeated, tag = "12")] - pub messages: ::prost::alloc::vec::Vec, - /// title is the title of the proposal - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "13")] - pub title: ::prost::alloc::string::String, - /// summary is a short summary of the proposal - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "14")] - pub summary: ::prost::alloc::string::String, -} -/// TallyResult represents the sum of weighted votes for each vote option. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.TallyResult")] -pub struct TallyResult { - /// yes_count is the weighted sum of yes votes. - #[prost(string, tag = "1")] - pub yes_count: ::prost::alloc::string::String, - /// abstain_count is the weighted sum of abstainers. - #[prost(string, tag = "2")] - pub abstain_count: ::prost::alloc::string::String, - /// no_count is the weighted sum of no votes. - #[prost(string, tag = "3")] - pub no_count: ::prost::alloc::string::String, - /// no_with_veto_count is the weighted sum of veto. - #[prost(string, tag = "4")] - pub no_with_veto_count: ::prost::alloc::string::String, -} -/// Vote represents a vote for a proposal.string metadata -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.Vote")] -pub struct Vote { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter is the account address of the voter. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option is the voter's choice on the proposal. - #[prost(enumeration = "VoteOption", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub option: i32, - /// metadata is any arbitrary metadata attached to the vote. - /// the recommended format of the metadata is to be found here: - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// submit_time is the timestamp when the vote was submitted. - #[prost(message, optional, tag = "5")] - pub submit_time: ::core::option::Option, -} -/// VoteOption enumerates the valid vote options for a given proposal. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum VoteOption { - /// VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will - /// return an error. - Unspecified = 0, - /// VOTE_OPTION_YES defines a yes vote option. - Yes = 1, - /// VOTE_OPTION_ABSTAIN defines an abstain vote option. - Abstain = 2, - /// VOTE_OPTION_NO defines a no vote option. - No = 3, - /// VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - NoWithVeto = 4, -} -impl VoteOption { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - VoteOption::Unspecified => "VOTE_OPTION_UNSPECIFIED", - VoteOption::Yes => "VOTE_OPTION_YES", - VoteOption::Abstain => "VOTE_OPTION_ABSTAIN", - VoteOption::No => "VOTE_OPTION_NO", - VoteOption::NoWithVeto => "VOTE_OPTION_NO_WITH_VETO", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "VOTE_OPTION_UNSPECIFIED" => Some(Self::Unspecified), - "VOTE_OPTION_YES" => Some(Self::Yes), - "VOTE_OPTION_ABSTAIN" => Some(Self::Abstain), - "VOTE_OPTION_NO" => Some(Self::No), - "VOTE_OPTION_NO_WITH_VETO" => Some(Self::NoWithVeto), - _ => None, - } - } -} -/// ProposalStatus defines proposal statuses. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum ProposalStatus { - /// An empty value is invalid and not allowed. - Unspecified = 0, - /// Initial status of a proposal when submitted. - Submitted = 1, - /// Final status of a proposal when the final tally is done and the outcome - /// passes the group policy's decision policy. - 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. - Rejected = 3, - /// Final status of a proposal when the group policy is modified before the - /// final tally. - Aborted = 4, - /// A proposal can be withdrawn before the voting start time by the owner. - /// When this happens the final status is Withdrawn. - Withdrawn = 5, -} -impl ProposalStatus { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ProposalStatus::Unspecified => "PROPOSAL_STATUS_UNSPECIFIED", - ProposalStatus::Submitted => "PROPOSAL_STATUS_SUBMITTED", - ProposalStatus::Accepted => "PROPOSAL_STATUS_ACCEPTED", - ProposalStatus::Rejected => "PROPOSAL_STATUS_REJECTED", - ProposalStatus::Aborted => "PROPOSAL_STATUS_ABORTED", - ProposalStatus::Withdrawn => "PROPOSAL_STATUS_WITHDRAWN", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "PROPOSAL_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "PROPOSAL_STATUS_SUBMITTED" => Some(Self::Submitted), - "PROPOSAL_STATUS_ACCEPTED" => Some(Self::Accepted), - "PROPOSAL_STATUS_REJECTED" => Some(Self::Rejected), - "PROPOSAL_STATUS_ABORTED" => Some(Self::Aborted), - "PROPOSAL_STATUS_WITHDRAWN" => Some(Self::Withdrawn), - _ => None, - } - } -} -/// ProposalExecutorResult defines types of proposal executor results. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum ProposalExecutorResult { - /// An empty value is not allowed. - Unspecified = 0, - /// We have not yet run the executor. - NotRun = 1, - /// The executor was successful and proposed action updated state. - Success = 2, - /// The executor returned an error and proposed action didn't update state. - Failure = 3, -} -impl ProposalExecutorResult { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ProposalExecutorResult::Unspecified => "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED", - ProposalExecutorResult::NotRun => "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", - ProposalExecutorResult::Success => "PROPOSAL_EXECUTOR_RESULT_SUCCESS", - ProposalExecutorResult::Failure => "PROPOSAL_EXECUTOR_RESULT_FAILURE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED" => Some(Self::Unspecified), - "PROPOSAL_EXECUTOR_RESULT_NOT_RUN" => Some(Self::NotRun), - "PROPOSAL_EXECUTOR_RESULT_SUCCESS" => Some(Self::Success), - "PROPOSAL_EXECUTOR_RESULT_FAILURE" => Some(Self::Failure), - _ => None, - } - } -} -/// EventCreateGroup is an event emitted when a group is created. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventCreateGroup")] -pub struct EventCreateGroup { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, -} -/// EventUpdateGroup is an event emitted when a group is updated. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventUpdateGroup")] -pub struct EventUpdateGroup { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, -} -/// EventCreateGroupPolicy is an event emitted when a group policy is created. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventCreateGroupPolicy")] -pub struct EventCreateGroupPolicy { - /// address is the account address of the group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// EventUpdateGroupPolicy is an event emitted when a group policy is updated. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventUpdateGroupPolicy")] -pub struct EventUpdateGroupPolicy { - /// address is the account address of the group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// EventSubmitProposal is an event emitted when a proposal is created. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventSubmitProposal")] -pub struct EventSubmitProposal { - /// proposal_id is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// EventWithdrawProposal is an event emitted when a proposal is withdrawn. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventWithdrawProposal")] -pub struct EventWithdrawProposal { - /// proposal_id is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// EventVote is an event emitted when a voter votes on a proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventVote")] -pub struct EventVote { - /// proposal_id is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// EventExec is an event emitted when a proposal is executed. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventExec")] -pub struct EventExec { - /// proposal_id is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// result is the proposal execution result. - #[prost(enumeration = "ProposalExecutorResult", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, - /// logs contains error logs in case the execution result is FAILURE. - #[prost(string, tag = "3")] - pub logs: ::prost::alloc::string::String, -} -/// EventLeaveGroup is an event emitted when group member leaves the group. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventLeaveGroup")] -pub struct EventLeaveGroup { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// address is the account address of the group member. - #[prost(string, tag = "2")] - pub address: ::prost::alloc::string::String, -} -/// EventProposalPruned is an event emitted when a proposal is pruned. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.EventProposalPruned")] -pub struct EventProposalPruned { - /// proposal_id is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// status is the proposal status (UNSPECIFIED, SUBMITTED, ACCEPTED, REJECTED, ABORTED, WITHDRAWN). - #[prost(enumeration = "ProposalStatus", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, - /// tally_result is the proposal tally result (when applicable). - #[prost(message, optional, tag = "3")] - pub tally_result: ::core::option::Option, -} -/// GenesisState defines the group module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.GenesisState")] -pub struct GenesisState { - /// group_seq is the group table orm.Sequence, - /// it is used to get the next group ID. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_seq: u64, - /// groups is the list of groups info. - #[prost(message, repeated, tag = "2")] - pub groups: ::prost::alloc::vec::Vec, - /// group_members is the list of groups members. - #[prost(message, repeated, tag = "3")] - pub group_members: ::prost::alloc::vec::Vec, - /// group_policy_seq is the group policy table orm.Sequence, - /// it is used to generate the next group policy account address. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_policy_seq: u64, - /// group_policies is the list of group policies info. - #[prost(message, repeated, tag = "5")] - pub group_policies: ::prost::alloc::vec::Vec, - /// proposal_seq is the proposal table orm.Sequence, - /// it is used to get the next proposal ID. - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_seq: u64, - /// proposals is the list of proposals. - #[prost(message, repeated, tag = "7")] - pub proposals: ::prost::alloc::vec::Vec, - /// votes is the list of votes. - #[prost(message, repeated, tag = "8")] - pub votes: ::prost::alloc::vec::Vec, -} -/// QueryGroupInfoRequest is the Query/GroupInfo request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupInfoRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/GroupInfo", - response_type = QueryGroupInfoResponse -)] -pub struct QueryGroupInfoRequest { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, -} -/// QueryGroupInfoResponse is the Query/GroupInfo response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupInfoResponse")] -pub struct QueryGroupInfoResponse { - /// info is the GroupInfo of the group. - #[prost(message, optional, tag = "1")] - pub info: ::core::option::Option, -} -/// QueryGroupPolicyInfoRequest is the Query/GroupPolicyInfo request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupPolicyInfoRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/GroupPolicyInfo", - response_type = QueryGroupPolicyInfoResponse -)] -pub struct QueryGroupPolicyInfoRequest { - /// address is the account address of the group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupPolicyInfoResponse")] -pub struct QueryGroupPolicyInfoResponse { - /// info is the GroupPolicyInfo of the group policy. - #[prost(message, optional, tag = "1")] - pub info: ::core::option::Option, -} -/// QueryGroupMembersRequest is the Query/GroupMembers request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupMembersRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/GroupMembers", - response_type = QueryGroupMembersResponse -)] -pub struct QueryGroupMembersRequest { - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupMembersResponse is the Query/GroupMembersResponse response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupMembersResponse")] -pub struct QueryGroupMembersResponse { - /// members are the members of the group with given group_id. - #[prost(message, repeated, tag = "1")] - pub members: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupsByAdminRequest is the Query/GroupsByAdmin request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupsByAdminRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/GroupsByAdmin", - response_type = QueryGroupsByAdminResponse -)] -pub struct QueryGroupsByAdminRequest { - /// admin is the account address of a group's admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupsByAdminResponse")] -pub struct QueryGroupsByAdminResponse { - /// groups are the groups info with the provided admin. - #[prost(message, repeated, tag = "1")] - pub groups: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupPoliciesByGroupRequest is the Query/GroupPoliciesByGroup request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupPoliciesByGroupRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/GroupPoliciesByGroup", - response_type = QueryGroupPoliciesByGroupResponse -)] -pub struct QueryGroupPoliciesByGroupRequest { - /// group_id is the unique ID of the group policy's group. - #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupPoliciesByGroupResponse")] -pub struct QueryGroupPoliciesByGroupResponse { - /// group_policies are the group policies info associated with the provided group. - #[prost(message, repeated, tag = "1")] - pub group_policies: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupPoliciesByAdminRequest is the Query/GroupPoliciesByAdmin request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupPoliciesByAdminRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/GroupPoliciesByAdmin", - response_type = QueryGroupPoliciesByAdminResponse -)] -pub struct QueryGroupPoliciesByAdminRequest { - /// admin is the admin address of the group policy. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupPoliciesByAdminResponse")] -pub struct QueryGroupPoliciesByAdminResponse { - /// group_policies are the group policies info with provided admin. - #[prost(message, repeated, tag = "1")] - pub group_policies: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryProposalRequest is the Query/Proposal request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryProposalRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/Proposal", - response_type = QueryProposalResponse -)] -pub struct QueryProposalRequest { - /// proposal_id is the unique ID of a proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// QueryProposalResponse is the Query/Proposal response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryProposalResponse")] -pub struct QueryProposalResponse { - /// proposal is the proposal info. - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -/// QueryProposalsByGroupPolicyRequest is the Query/ProposalByGroupPolicy request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryProposalsByGroupPolicyRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/ProposalsByGroupPolicy", - response_type = QueryProposalsByGroupPolicyResponse -)] -pub struct QueryProposalsByGroupPolicyRequest { - /// address is the account address of the group policy related to proposals. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryProposalsByGroupPolicyResponse")] -pub struct QueryProposalsByGroupPolicyResponse { - /// proposals are the proposals with given group policy. - #[prost(message, repeated, tag = "1")] - pub proposals: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryVoteByProposalVoterRequest is the Query/VoteByProposalVoter request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryVoteByProposalVoterRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/VoteByProposalVoter", - response_type = QueryVoteByProposalVoterResponse -)] -pub struct QueryVoteByProposalVoterRequest { - /// proposal_id is the unique ID of a proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter is a proposal voter account address. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, -} -/// QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryVoteByProposalVoterResponse")] -pub struct QueryVoteByProposalVoterResponse { - /// vote is the vote with given proposal_id and voter. - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -/// QueryVotesByProposalRequest is the Query/VotesByProposal request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryVotesByProposalRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/VotesByProposal", - response_type = QueryVotesByProposalResponse -)] -pub struct QueryVotesByProposalRequest { - /// proposal_id is the unique ID of a proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryVotesByProposalResponse is the Query/VotesByProposal response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryVotesByProposalResponse")] -pub struct QueryVotesByProposalResponse { - /// votes are the list of votes for given proposal_id. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryVotesByVoterRequest is the Query/VotesByVoter request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryVotesByVoterRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/VotesByVoter", - response_type = QueryVotesByVoterResponse -)] -pub struct QueryVotesByVoterRequest { - /// voter is a proposal voter account address. - #[prost(string, tag = "1")] - pub voter: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryVotesByVoterResponse is the Query/VotesByVoter response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryVotesByVoterResponse")] -pub struct QueryVotesByVoterResponse { - /// votes are the list of votes by given voter. - #[prost(message, repeated, tag = "1")] - pub votes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupsByMemberRequest is the Query/GroupsByMember request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupsByMemberRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/GroupsByMember", - response_type = QueryGroupsByMemberResponse -)] -pub struct QueryGroupsByMemberRequest { - /// address is the group member address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupsByMemberResponse is the Query/GroupsByMember response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupsByMemberResponse")] -pub struct QueryGroupsByMemberResponse { - /// groups are the groups info with the provided group member. - #[prost(message, repeated, tag = "1")] - pub groups: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryTallyResultRequest is the Query/TallyResult request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryTallyResultRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/TallyResult", - response_type = QueryTallyResultResponse -)] -pub struct QueryTallyResultRequest { - /// proposal_id is the unique id of a proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// QueryTallyResultResponse is the Query/TallyResult response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryTallyResultResponse")] -pub struct QueryTallyResultResponse { - /// tally defines the requested tally. - #[prost(message, optional, tag = "1")] - pub tally: ::core::option::Option, -} -/// QueryGroupsRequest is the Query/Groups request type. -/// -/// Since: cosmos-sdk 0.47.1 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupsRequest")] -#[proto_query( - path = "/cosmos.group.v1.Query/Groups", - response_type = QueryGroupsResponse -)] -pub struct QueryGroupsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryGroupsResponse is the Query/Groups response type. -/// -/// Since: cosmos-sdk 0.47.1 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.QueryGroupsResponse")] -pub struct QueryGroupsResponse { - /// `groups` is all the groups present in state. - #[prost(message, repeated, tag = "1")] - pub groups: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgCreateGroup is the Msg/CreateGroup request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgCreateGroup")] -pub struct MsgCreateGroup { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// members defines the group members. - #[prost(message, repeated, tag = "2")] - pub members: ::prost::alloc::vec::Vec, - /// metadata is any arbitrary metadata to attached to the group. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgCreateGroupResponse is the Msg/CreateGroup response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgCreateGroupResponse")] -pub struct MsgCreateGroupResponse { - /// group_id is the unique ID of the newly created group. - #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, -} -/// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupMembers")] -pub struct MsgUpdateGroupMembers { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// member_updates is the list of members to update, - /// set weight to 0 to remove a member. - #[prost(message, repeated, tag = "3")] - pub member_updates: ::prost::alloc::vec::Vec, -} -/// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupMembersResponse")] -pub struct MsgUpdateGroupMembersResponse {} -/// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupAdmin")] -pub struct MsgUpdateGroupAdmin { - /// admin is the current account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// new_admin is the group new admin account address. - #[prost(string, tag = "3")] - pub new_admin: ::prost::alloc::string::String, -} -/// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupAdminResponse")] -pub struct MsgUpdateGroupAdminResponse {} -/// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupMetadata")] -pub struct MsgUpdateGroupMetadata { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// metadata is the updated group's metadata. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupMetadataResponse")] -pub struct MsgUpdateGroupMetadataResponse {} -/// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgCreateGroupPolicy")] -pub struct MsgCreateGroupPolicy { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// metadata is any arbitrary metadata attached to the group policy. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// decision_policy specifies the group policy's decision policy. - #[prost(message, optional, tag = "4")] - pub decision_policy: ::core::option::Option, -} -/// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgCreateGroupPolicyResponse")] -pub struct MsgCreateGroupPolicyResponse { - /// address is the account address of the newly created group policy. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupPolicyAdmin")] -pub struct MsgUpdateGroupPolicyAdmin { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_policy_address is the account address of the group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// new_admin is the new group policy admin. - #[prost(string, tag = "3")] - pub new_admin: ::prost::alloc::string::String, -} -/// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse")] -pub struct MsgUpdateGroupPolicyAdminResponse {} -/// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgCreateGroupWithPolicy")] -pub struct MsgCreateGroupWithPolicy { - /// admin is the account address of the group and group policy admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// members defines the group members. - #[prost(message, repeated, tag = "2")] - pub members: ::prost::alloc::vec::Vec, - /// group_metadata is any arbitrary metadata attached to the group. - #[prost(string, tag = "3")] - pub group_metadata: ::prost::alloc::string::String, - /// group_policy_metadata is any arbitrary metadata attached to the group policy. - #[prost(string, tag = "4")] - pub group_policy_metadata: ::prost::alloc::string::String, - /// 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. - #[prost(bool, tag = "5")] - pub group_policy_as_admin: bool, - /// decision_policy specifies the group policy's decision policy. - #[prost(message, optional, tag = "6")] - pub decision_policy: ::core::option::Option, -} -/// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgCreateGroupWithPolicyResponse")] -pub struct MsgCreateGroupWithPolicyResponse { - /// group_id is the unique ID of the newly created group with policy. - #[prost(uint64, tag = "1")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, - /// group_policy_address is the account address of the newly created group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, -} -/// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicy")] -pub struct MsgUpdateGroupPolicyDecisionPolicy { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// decision_policy is the updated group policy's decision policy. - #[prost(message, optional, tag = "3")] - pub decision_policy: ::core::option::Option, -} -/// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse")] -pub struct MsgUpdateGroupPolicyDecisionPolicyResponse {} -/// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupPolicyMetadata")] -pub struct MsgUpdateGroupPolicyMetadata { - /// admin is the account address of the group admin. - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "2")] - pub group_policy_address: ::prost::alloc::string::String, - /// metadata is the group policy metadata to be updated. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, -} -/// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse")] -pub struct MsgUpdateGroupPolicyMetadataResponse {} -/// MsgSubmitProposal is the Msg/SubmitProposal request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgSubmitProposal")] -pub struct MsgSubmitProposal { - /// group_policy_address is the account address of group policy. - #[prost(string, tag = "1")] - pub group_policy_address: ::prost::alloc::string::String, - /// proposers are the account addresses of the proposers. - /// Proposers signatures will be counted as yes votes. - #[prost(string, repeated, tag = "2")] - pub proposers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// metadata is any arbitrary metadata attached to the proposal. - #[prost(string, tag = "3")] - pub metadata: ::prost::alloc::string::String, - /// messages is a list of `sdk.Msg`s that will be executed if the proposal passes. - #[prost(message, repeated, tag = "4")] - pub messages: ::prost::alloc::vec::Vec, - /// 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. - #[prost(enumeration = "Exec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub exec: i32, - /// title is the title of the proposal. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "6")] - pub title: ::prost::alloc::string::String, - /// summary is the summary of the proposal. - /// - /// Since: cosmos-sdk 0.47 - #[prost(string, tag = "7")] - pub summary: ::prost::alloc::string::String, -} -/// MsgSubmitProposalResponse is the Msg/SubmitProposal response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgSubmitProposalResponse")] -pub struct MsgSubmitProposalResponse { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, -} -/// MsgWithdrawProposal is the Msg/WithdrawProposal request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgWithdrawProposal")] -pub struct MsgWithdrawProposal { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// address is the admin of the group policy or one of the proposer of the proposal. - #[prost(string, tag = "2")] - pub address: ::prost::alloc::string::String, -} -/// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgWithdrawProposalResponse")] -pub struct MsgWithdrawProposalResponse {} -/// MsgVote is the Msg/Vote request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgVote")] -pub struct MsgVote { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// voter is the voter account address. - #[prost(string, tag = "2")] - pub voter: ::prost::alloc::string::String, - /// option is the voter's choice on the proposal. - #[prost(enumeration = "VoteOption", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub option: i32, - /// metadata is any arbitrary metadata attached to the vote. - #[prost(string, tag = "4")] - pub metadata: ::prost::alloc::string::String, - /// exec defines whether the proposal should be executed - /// immediately after voting or not. - #[prost(enumeration = "Exec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub exec: i32, -} -/// MsgVoteResponse is the Msg/Vote response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgVoteResponse")] -pub struct MsgVoteResponse {} -/// MsgExec is the Msg/Exec request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgExec")] -pub struct MsgExec { - /// proposal is the unique ID of the proposal. - #[prost(uint64, tag = "1")] - #[serde(alias = "proposalID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_id: u64, - /// executor is the account address used to execute the proposal. - #[prost(string, tag = "2")] - pub executor: ::prost::alloc::string::String, -} -/// MsgExecResponse is the Msg/Exec request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgExecResponse")] -pub struct MsgExecResponse { - /// result is the final result of the proposal execution. - #[prost(enumeration = "ProposalExecutorResult", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, -} -/// MsgLeaveGroup is the Msg/LeaveGroup request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgLeaveGroup")] -pub struct MsgLeaveGroup { - /// address is the account address of the group member. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// group_id is the unique ID of the group. - #[prost(uint64, tag = "2")] - #[serde(alias = "groupID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub group_id: u64, -} -/// MsgLeaveGroupResponse is the Msg/LeaveGroup response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.group.v1.MsgLeaveGroupResponse")] -pub struct MsgLeaveGroupResponse {} -/// Exec defines modes of execution of a proposal on creation or on new vote. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum Exec { - /// An empty value means that there should be a separate - /// MsgExec request for the proposal to execute. - 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. - Try = 1, -} -impl Exec { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Exec::Unspecified => "EXEC_UNSPECIFIED", - Exec::Try => "EXEC_TRY", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "EXEC_UNSPECIFIED" => Some(Self::Unspecified), - "EXEC_TRY" => Some(Self::Try), - _ => None, - } - } -} -pub struct GroupQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> GroupQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn group_info( - &self, - group_id: u64, - ) -> Result { - QueryGroupInfoRequest { group_id }.query(self.querier) - } - pub fn group_policy_info( - &self, - address: ::prost::alloc::string::String, - ) -> Result { - QueryGroupPolicyInfoRequest { address }.query(self.querier) - } - pub fn group_members( - &self, - group_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryGroupMembersRequest { - group_id, - pagination, - } - .query(self.querier) - } - pub fn groups_by_admin( - &self, - admin: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryGroupsByAdminRequest { admin, pagination }.query(self.querier) - } - pub fn group_policies_by_group( - &self, - group_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryGroupPoliciesByGroupRequest { - group_id, - pagination, - } - .query(self.querier) - } - pub fn group_policies_by_admin( - &self, - admin: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryGroupPoliciesByAdminRequest { admin, pagination }.query(self.querier) - } - pub fn proposal( - &self, - proposal_id: u64, - ) -> Result { - QueryProposalRequest { proposal_id }.query(self.querier) - } - pub fn proposals_by_group_policy( - &self, - address: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryProposalsByGroupPolicyRequest { - address, - pagination, - } - .query(self.querier) - } - pub fn vote_by_proposal_voter( - &self, - proposal_id: u64, - voter: ::prost::alloc::string::String, - ) -> Result { - QueryVoteByProposalVoterRequest { proposal_id, voter }.query(self.querier) - } - pub fn votes_by_proposal( - &self, - proposal_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryVotesByProposalRequest { - proposal_id, - pagination, - } - .query(self.querier) - } - pub fn votes_by_voter( - &self, - voter: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryVotesByVoterRequest { voter, pagination }.query(self.querier) - } - pub fn groups_by_member( - &self, - address: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryGroupsByMemberRequest { - address, - pagination, - } - .query(self.querier) - } - pub fn tally_result( - &self, - proposal_id: u64, - ) -> Result { - QueryTallyResultRequest { proposal_id }.query(self.querier) - } - pub fn groups( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryGroupsRequest { pagination }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/ics23/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/ics23/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/ics23/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/ics23/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/ics23/v1.rs deleted file mode 100644 index a6c6dcd6..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/ics23/v1.rs +++ /dev/null @@ -1,618 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// * -/// ExistenceProof takes a key and a value and a set of steps to perform on it. -/// The result of peforming all these steps will provide a "root hash", which can -/// be compared to the value in a header. -/// -/// Since it is computationally infeasible to produce a hash collission for any of the used -/// cryptographic hash functions, if someone can provide a series of operations to transform -/// a given key and value into a root hash that matches some trusted root, these key and values -/// must be in the referenced merkle tree. -/// -/// The only possible issue is maliablity in LeafOp, such as providing extra prefix data, -/// which should be controlled by a spec. Eg. with lengthOp as NONE, -/// prefix = FOO, key = BAR, value = CHOICE -/// and -/// prefix = F, key = OOBAR, value = CHOICE -/// would produce the same value. -/// -/// With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field -/// in the ProofSpec is valuable to prevent this mutability. And why all trees should -/// length-prefix the data before hashing it. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.ExistenceProof")] -pub struct ExistenceProof { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub leaf: ::core::option::Option, - #[prost(message, repeated, tag = "4")] - pub path: ::prost::alloc::vec::Vec, -} -/// -/// NonExistenceProof takes a proof of two neighbors, one left of the desired key, -/// one right of the desired key. If both proofs are valid AND they are neighbors, -/// then there is no valid proof for the given key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.NonExistenceProof")] -pub struct NonExistenceProof { - /// TODO: remove this as unnecessary??? we prove a range - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub left: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub right: ::core::option::Option, -} -/// -/// CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.CommitmentProof")] -pub struct CommitmentProof { - #[prost(oneof = "commitment_proof::Proof", tags = "1, 2, 3, 4")] - pub proof: ::core::option::Option, -} -/// Nested message and enum types in `CommitmentProof`. -pub mod commitment_proof { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Proof { - #[prost(message, tag = "1")] - Exist(super::ExistenceProof), - #[prost(message, tag = "2")] - Nonexist(super::NonExistenceProof), - #[prost(message, tag = "3")] - Batch(super::BatchProof), - #[prost(message, tag = "4")] - Compressed(super::CompressedBatchProof), - } -} -/// * -/// LeafOp represents the raw key-value data we wish to prove, and -/// must be flexible to represent the internal transformation from -/// the original key-value pairs into the basis hash, for many existing -/// merkle trees. -/// -/// key and value are passed in. So that the signature of this operation is: -/// leafOp(key, value) -> output -/// -/// To process this, first prehash the keys and values if needed (ANY means no hash in this case): -/// hkey = prehashKey(key) -/// hvalue = prehashValue(value) -/// -/// Then combine the bytes, and hash it -/// output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.LeafOp")] -pub struct LeafOp { - #[prost(enumeration = "HashOp", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub hash: i32, - #[prost(enumeration = "HashOp", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub prehash_key: i32, - #[prost(enumeration = "HashOp", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub prehash_value: i32, - #[prost(enumeration = "LengthOp", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub length: i32, - /// prefix is a fixed bytes that may optionally be included at the beginning to differentiate - /// a leaf node from an inner node. - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub prefix: ::prost::alloc::vec::Vec, -} -/// * -/// InnerOp represents a merkle-proof step that is not a leaf. -/// It represents concatenating two children and hashing them to provide the next result. -/// -/// The result of the previous step is passed in, so the signature of this op is: -/// innerOp(child) -> output -/// -/// The result of applying InnerOp should be: -/// output = op.hash(op.prefix || child || op.suffix) -/// -/// where the || operator is concatenation of binary data, -/// and child is the result of hashing all the tree below this step. -/// -/// Any special data, like prepending child with the length, or prepending the entire operation with -/// some value to differentiate from leaf nodes, should be included in prefix and suffix. -/// If either of prefix or suffix is empty, we just treat it as an empty string -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.InnerOp")] -pub struct InnerOp { - #[prost(enumeration = "HashOp", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub hash: i32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub prefix: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub suffix: ::prost::alloc::vec::Vec, -} -/// * -/// ProofSpec defines what the expected parameters are for a given proof type. -/// This can be stored in the client and used to validate any incoming proofs. -/// -/// verify(ProofSpec, Proof) -> Proof | Error -/// -/// As demonstrated in tests, if we don't fix the algorithm used to calculate the -/// LeafHash for a given tree, there are many possible key-value pairs that can -/// generate a given hash (by interpretting the preimage differently). -/// We need this for proper security, requires client knows a priori what -/// tree format server uses. But not in code, rather a configuration object. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.ProofSpec")] -pub struct ProofSpec { - /// any field in the ExistenceProof must be the same as in this spec. - /// except Prefix, which is just the first bytes of prefix (spec can be longer) - #[prost(message, optional, tag = "1")] - pub leaf_spec: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub inner_spec: ::core::option::Option, - /// max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) - #[prost(int32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_depth: i32, - /// min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) - #[prost(int32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub min_depth: i32, - /// prehash_key_before_comparison is a flag that indicates whether to use the - /// prehash_key specified by LeafOp to compare lexical ordering of keys for - /// non-existence proofs. - #[prost(bool, tag = "5")] - pub prehash_key_before_comparison: bool, -} -/// -/// InnerSpec contains all store-specific structure info to determine if two proofs from a -/// given store are neighbors. -/// -/// This enables: -/// -/// isLeftMost(spec: InnerSpec, op: InnerOp) -/// isRightMost(spec: InnerSpec, op: InnerOp) -/// isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.InnerSpec")] -pub struct InnerSpec { - /// Child order is the ordering of the children node, must count from 0 - /// iavl tree is [0, 1] (left then right) - /// merk is [0, 2, 1] (left, right, here) - #[prost(int32, repeated, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub child_order: ::prost::alloc::vec::Vec, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub child_size: i32, - #[prost(int32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub min_prefix_length: i32, - #[prost(int32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_prefix_length: i32, - /// empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub empty_child: ::prost::alloc::vec::Vec, - /// hash is the algorithm that must be used for each InnerOp - #[prost(enumeration = "HashOp", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub hash: i32, -} -/// -/// BatchProof is a group of multiple proof types than can be compressed -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.BatchProof")] -pub struct BatchProof { - #[prost(message, repeated, tag = "1")] - pub entries: ::prost::alloc::vec::Vec, -} -/// Use BatchEntry not CommitmentProof, to avoid recursion -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.BatchEntry")] -pub struct BatchEntry { - #[prost(oneof = "batch_entry::Proof", tags = "1, 2")] - pub proof: ::core::option::Option, -} -/// Nested message and enum types in `BatchEntry`. -pub mod batch_entry { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Proof { - #[prost(message, tag = "1")] - Exist(super::ExistenceProof), - #[prost(message, tag = "2")] - Nonexist(super::NonExistenceProof), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.CompressedBatchProof")] -pub struct CompressedBatchProof { - #[prost(message, repeated, tag = "1")] - pub entries: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub lookup_inners: ::prost::alloc::vec::Vec, -} -/// Use BatchEntry not CommitmentProof, to avoid recursion -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.CompressedBatchEntry")] -pub struct CompressedBatchEntry { - #[prost(oneof = "compressed_batch_entry::Proof", tags = "1, 2")] - pub proof: ::core::option::Option, -} -/// Nested message and enum types in `CompressedBatchEntry`. -pub mod compressed_batch_entry { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Proof { - #[prost(message, tag = "1")] - Exist(super::CompressedExistenceProof), - #[prost(message, tag = "2")] - Nonexist(super::CompressedNonExistenceProof), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.CompressedExistenceProof")] -pub struct CompressedExistenceProof { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub leaf: ::core::option::Option, - /// these are indexes into the lookup_inners table in CompressedBatchProof - #[prost(int32, repeated, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.ics23.v1.CompressedNonExistenceProof")] -pub struct CompressedNonExistenceProof { - /// TODO: remove this as unnecessary??? we prove a range - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub left: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub right: ::core::option::Option, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum HashOp { - /// NO_HASH is the default if no data passed. Note this is an illegal argument some places. - NoHash = 0, - Sha256 = 1, - Sha512 = 2, - Keccak = 3, - Ripemd160 = 4, - /// ripemd160(sha256(x)) - Bitcoin = 5, - Sha512256 = 6, -} -impl HashOp { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - HashOp::NoHash => "NO_HASH", - HashOp::Sha256 => "SHA256", - HashOp::Sha512 => "SHA512", - HashOp::Keccak => "KECCAK", - HashOp::Ripemd160 => "RIPEMD160", - HashOp::Bitcoin => "BITCOIN", - HashOp::Sha512256 => "SHA512_256", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "NO_HASH" => Some(Self::NoHash), - "SHA256" => Some(Self::Sha256), - "SHA512" => Some(Self::Sha512), - "KECCAK" => Some(Self::Keccak), - "RIPEMD160" => Some(Self::Ripemd160), - "BITCOIN" => Some(Self::Bitcoin), - "SHA512_256" => Some(Self::Sha512256), - _ => None, - } - } -} -/// * -/// LengthOp defines how to process the key and value of the LeafOp -/// to include length information. After encoding the length with the given -/// algorithm, the length will be prepended to the key and value bytes. -/// (Each one with it's own encoded length) -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum LengthOp { - /// NO_PREFIX don't include any length info - NoPrefix = 0, - /// VAR_PROTO uses protobuf (and go-amino) varint encoding of the length - VarProto = 1, - /// VAR_RLP uses rlp int encoding of the length - VarRlp = 2, - /// FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer - Fixed32Big = 3, - /// FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer - Fixed32Little = 4, - /// FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer - Fixed64Big = 5, - /// FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer - Fixed64Little = 6, - /// REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) - Require32Bytes = 7, - /// REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) - Require64Bytes = 8, -} -impl LengthOp { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - LengthOp::NoPrefix => "NO_PREFIX", - LengthOp::VarProto => "VAR_PROTO", - LengthOp::VarRlp => "VAR_RLP", - LengthOp::Fixed32Big => "FIXED32_BIG", - LengthOp::Fixed32Little => "FIXED32_LITTLE", - LengthOp::Fixed64Big => "FIXED64_BIG", - LengthOp::Fixed64Little => "FIXED64_LITTLE", - LengthOp::Require32Bytes => "REQUIRE_32_BYTES", - LengthOp::Require64Bytes => "REQUIRE_64_BYTES", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "NO_PREFIX" => Some(Self::NoPrefix), - "VAR_PROTO" => Some(Self::VarProto), - "VAR_RLP" => Some(Self::VarRlp), - "FIXED32_BIG" => Some(Self::Fixed32Big), - "FIXED32_LITTLE" => Some(Self::Fixed32Little), - "FIXED64_BIG" => Some(Self::Fixed64Big), - "FIXED64_LITTLE" => Some(Self::Fixed64Little), - "REQUIRE_32_BYTES" => Some(Self::Require32Bytes), - "REQUIRE_64_BYTES" => Some(Self::Require64Bytes), - _ => None, - } - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/mint/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/mint/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/mint/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/mint/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/mint/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/mint/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/mint/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/mint/module/v1.rs deleted file mode 100644 index b076395a..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/mint/module/v1.rs +++ /dev/null @@ -1,21 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the mint module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.module.v1.Module")] -pub struct Module { - #[prost(string, tag = "1")] - pub fee_collector_name: ::prost::alloc::string::String, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/mint/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/mint/v1beta1.rs deleted file mode 100644 index b0d6b68d..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/mint/v1beta1.rs +++ /dev/null @@ -1,260 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Minter represents the minting state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.Minter")] -pub struct Minter { - /// current annual inflation rate - #[prost(string, tag = "1")] - pub inflation: ::prost::alloc::string::String, - /// current annual expected provisions - #[prost(string, tag = "2")] - pub annual_provisions: ::prost::alloc::string::String, -} -/// Params defines the parameters for the x/mint module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.Params")] -pub struct Params { - /// type of coin to mint - #[prost(string, tag = "1")] - pub mint_denom: ::prost::alloc::string::String, - /// maximum annual change in inflation rate - #[prost(string, tag = "2")] - pub inflation_rate_change: ::prost::alloc::string::String, - /// maximum inflation rate - #[prost(string, tag = "3")] - pub inflation_max: ::prost::alloc::string::String, - /// minimum inflation rate - #[prost(string, tag = "4")] - pub inflation_min: ::prost::alloc::string::String, - /// goal of percent bonded atoms - #[prost(string, tag = "5")] - pub goal_bonded: ::prost::alloc::string::String, - /// expected blocks per year - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub blocks_per_year: u64, -} -/// GenesisState defines the mint module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.GenesisState")] -pub struct GenesisState { - /// minter is a space for holding current inflation information. - #[prost(message, optional, tag = "1")] - pub minter: ::core::option::Option, - /// params defines all the parameters of the module. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/cosmos.mint.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryInflationRequest is the request type for the Query/Inflation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.QueryInflationRequest")] -#[proto_query( - path = "/cosmos.mint.v1beta1.Query/Inflation", - response_type = QueryInflationResponse -)] -pub struct QueryInflationRequest {} -/// QueryInflationResponse is the response type for the Query/Inflation RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.QueryInflationResponse")] -pub struct QueryInflationResponse { - /// inflation is the current minting inflation value. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub inflation: ::prost::alloc::vec::Vec, -} -/// QueryAnnualProvisionsRequest is the request type for the -/// Query/AnnualProvisions RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.QueryAnnualProvisionsRequest")] -#[proto_query( - path = "/cosmos.mint.v1beta1.Query/AnnualProvisions", - response_type = QueryAnnualProvisionsResponse -)] -pub struct QueryAnnualProvisionsRequest {} -/// QueryAnnualProvisionsResponse is the response type for the -/// Query/AnnualProvisions RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.QueryAnnualProvisionsResponse")] -pub struct QueryAnnualProvisionsResponse { - /// annual_provisions is the current minting annual provisions value. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub annual_provisions: ::prost::alloc::vec::Vec, -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/mint parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.mint.v1beta1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct MintQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> MintQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn inflation(&self) -> Result { - QueryInflationRequest {}.query(self.querier) - } - pub fn annual_provisions( - &self, - ) -> Result { - QueryAnnualProvisionsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/mod.rs deleted file mode 100644 index 13633234..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/mod.rs +++ /dev/null @@ -1,26 +0,0 @@ -pub mod app; -pub mod auth; -pub mod authz; -pub mod bank; -pub mod base; -pub mod circuit; -pub mod consensus; -pub mod crisis; -pub mod crypto; -pub mod distribution; -pub mod evidence; -pub mod feegrant; -pub mod genutil; -pub mod gov; -pub mod group; -pub mod ics23; -pub mod mint; -pub mod nft; -pub mod orm; -pub mod params; -pub mod slashing; -pub mod staking; -pub mod store; -pub mod tx; -pub mod upgrade; -pub mod vesting; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/nft/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/nft/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/nft/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/nft/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/nft/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/nft/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/nft/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/nft/module/v1.rs deleted file mode 100644 index 5869f740..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/nft/module/v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the nft module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.module.v1.Module")] -pub struct Module {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/nft/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/nft/v1beta1.rs deleted file mode 100644 index 8be1e5b2..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/nft/v1beta1.rs +++ /dev/null @@ -1,610 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// EventSend is emitted on Msg/Send -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.EventSend")] -pub struct EventSend { - /// class_id associated with the nft - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the nft - #[prost(string, tag = "2")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, - /// sender is the address of the owner of nft - #[prost(string, tag = "3")] - pub sender: ::prost::alloc::string::String, - /// receiver is the receiver address of nft - #[prost(string, tag = "4")] - pub receiver: ::prost::alloc::string::String, -} -/// EventMint is emitted on Mint -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.EventMint")] -pub struct EventMint { - /// class_id associated with the nft - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the nft - #[prost(string, tag = "2")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, - /// owner is the owner address of the nft - #[prost(string, tag = "3")] - pub owner: ::prost::alloc::string::String, -} -/// EventBurn is emitted on Burn -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.EventBurn")] -pub struct EventBurn { - /// class_id associated with the nft - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the nft - #[prost(string, tag = "2")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, - /// owner is the owner address of the nft - #[prost(string, tag = "3")] - pub owner: ::prost::alloc::string::String, -} -/// Class defines the class of the nft type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.Class")] -pub struct Class { - /// id defines the unique identifier of the NFT classification, similar to the contract address of ERC721 - #[prost(string, tag = "1")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, - /// name defines the human-readable name of the NFT classification. Optional - #[prost(string, tag = "2")] - pub name: ::prost::alloc::string::String, - /// symbol is an abbreviated name for nft classification. Optional - #[prost(string, tag = "3")] - pub symbol: ::prost::alloc::string::String, - /// description is a brief description of nft classification. Optional - #[prost(string, tag = "4")] - pub description: ::prost::alloc::string::String, - /// uri for the class metadata stored off chain. It can define schema for Class and NFT `Data` attributes. Optional - #[prost(string, tag = "5")] - pub uri: ::prost::alloc::string::String, - /// uri_hash is a hash of the document pointed by uri. Optional - #[prost(string, tag = "6")] - pub uri_hash: ::prost::alloc::string::String, - /// data is the app specific metadata of the NFT class. Optional - #[prost(message, optional, tag = "7")] - pub data: ::core::option::Option, -} -/// NFT defines the NFT. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.NFT")] -pub struct Nft { - /// class_id associated with the NFT, similar to the contract address of ERC721 - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the NFT - #[prost(string, tag = "2")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, - /// uri for the NFT metadata stored off chain - #[prost(string, tag = "3")] - pub uri: ::prost::alloc::string::String, - /// uri_hash is a hash of the document pointed by uri - #[prost(string, tag = "4")] - pub uri_hash: ::prost::alloc::string::String, - /// data is an app specific data of the NFT. Optional - #[prost(message, optional, tag = "10")] - pub data: ::core::option::Option, -} -/// GenesisState defines the nft module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.GenesisState")] -pub struct GenesisState { - /// class defines the class of the nft type. - #[prost(message, repeated, tag = "1")] - pub classes: ::prost::alloc::vec::Vec, - /// entry defines all nft owned by a person. - #[prost(message, repeated, tag = "2")] - pub entries: ::prost::alloc::vec::Vec, -} -/// Entry Defines all nft owned by a person -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.Entry")] -pub struct Entry { - /// owner is the owner address of the following nft - #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, - /// nfts is a group of nfts of the same owner - #[prost(message, repeated, tag = "2")] - pub nfts: ::prost::alloc::vec::Vec, -} -/// QueryBalanceRequest is the request type for the Query/Balance RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryBalanceRequest")] -#[proto_query( - path = "/cosmos.nft.v1beta1.Query/Balance", - response_type = QueryBalanceResponse -)] -pub struct QueryBalanceRequest { - /// class_id associated with the nft - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, - /// owner is the owner address of the nft - #[prost(string, tag = "2")] - pub owner: ::prost::alloc::string::String, -} -/// QueryBalanceResponse is the response type for the Query/Balance RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryBalanceResponse")] -pub struct QueryBalanceResponse { - /// amount is the number of all NFTs of a given class owned by the owner - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub amount: u64, -} -/// QueryOwnerRequest is the request type for the Query/Owner RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryOwnerRequest")] -#[proto_query( - path = "/cosmos.nft.v1beta1.Query/Owner", - response_type = QueryOwnerResponse -)] -pub struct QueryOwnerRequest { - /// class_id associated with the nft - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the NFT - #[prost(string, tag = "2")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, -} -/// QueryOwnerResponse is the response type for the Query/Owner RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryOwnerResponse")] -pub struct QueryOwnerResponse { - /// owner is the owner address of the nft - #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, -} -/// QuerySupplyRequest is the request type for the Query/Supply RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QuerySupplyRequest")] -#[proto_query( - path = "/cosmos.nft.v1beta1.Query/Supply", - response_type = QuerySupplyResponse -)] -pub struct QuerySupplyRequest { - /// class_id associated with the nft - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, -} -/// QuerySupplyResponse is the response type for the Query/Supply RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QuerySupplyResponse")] -pub struct QuerySupplyResponse { - /// amount is the number of all NFTs from the given class - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub amount: u64, -} -/// QueryNFTstRequest is the request type for the Query/NFTs RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryNFTsRequest")] -#[proto_query( - path = "/cosmos.nft.v1beta1.Query/NFTs", - response_type = QueryNfTsResponse -)] -pub struct QueryNfTsRequest { - /// class_id associated with the nft - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, - /// owner is the owner address of the nft - #[prost(string, tag = "2")] - pub owner: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -/// QueryNFTsResponse is the response type for the Query/NFTs RPC methods -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryNFTsResponse")] -pub struct QueryNfTsResponse { - /// NFT defines the NFT - #[prost(message, repeated, tag = "1")] - pub nfts: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryNFTRequest is the request type for the Query/NFT RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryNFTRequest")] -#[proto_query(path = "/cosmos.nft.v1beta1.Query/NFT", response_type = QueryNftResponse)] -pub struct QueryNftRequest { - /// class_id associated with the nft - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, - /// id is a unique identifier of the NFT - #[prost(string, tag = "2")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, -} -/// QueryNFTResponse is the response type for the Query/NFT RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryNFTResponse")] -pub struct QueryNftResponse { - /// owner is the owner address of the nft - #[prost(message, optional, tag = "1")] - pub nft: ::core::option::Option, -} -/// QueryClassRequest is the request type for the Query/Class RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryClassRequest")] -#[proto_query( - path = "/cosmos.nft.v1beta1.Query/Class", - response_type = QueryClassResponse -)] -pub struct QueryClassRequest { - /// class_id associated with the nft - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, -} -/// QueryClassResponse is the response type for the Query/Class RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryClassResponse")] -pub struct QueryClassResponse { - /// class defines the class of the nft type. - #[prost(message, optional, tag = "1")] - pub class: ::core::option::Option, -} -/// QueryClassesRequest is the request type for the Query/Classes RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryClassesRequest")] -#[proto_query( - path = "/cosmos.nft.v1beta1.Query/Classes", - response_type = QueryClassesResponse -)] -pub struct QueryClassesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// QueryClassesResponse is the response type for the Query/Classes RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.QueryClassesResponse")] -pub struct QueryClassesResponse { - /// class defines the class of the nft type. - #[prost(message, repeated, tag = "1")] - pub classes: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgSend represents a message to send a nft from one account to another account. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.MsgSend")] -pub struct MsgSend { - /// class_id defines the unique identifier of the nft classification, similar to the contract address of ERC721 - #[prost(string, tag = "1")] - #[serde(alias = "classID")] - pub class_id: ::prost::alloc::string::String, - /// id defines the unique identification of nft - #[prost(string, tag = "2")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, - /// sender is the address of the owner of nft - #[prost(string, tag = "3")] - pub sender: ::prost::alloc::string::String, - /// receiver is the receiver address of nft - #[prost(string, tag = "4")] - pub receiver: ::prost::alloc::string::String, -} -/// MsgSendResponse defines the Msg/Send response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.nft.v1beta1.MsgSendResponse")] -pub struct MsgSendResponse {} -pub struct NftQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> NftQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn balance( - &self, - class_id: ::prost::alloc::string::String, - owner: ::prost::alloc::string::String, - ) -> Result { - QueryBalanceRequest { class_id, owner }.query(self.querier) - } - pub fn owner( - &self, - class_id: ::prost::alloc::string::String, - id: ::prost::alloc::string::String, - ) -> Result { - QueryOwnerRequest { class_id, id }.query(self.querier) - } - pub fn supply( - &self, - class_id: ::prost::alloc::string::String, - ) -> Result { - QuerySupplyRequest { class_id }.query(self.querier) - } - pub fn nf_ts( - &self, - class_id: ::prost::alloc::string::String, - owner: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryNfTsRequest { - class_id, - owner, - pagination, - } - .query(self.querier) - } - pub fn nft( - &self, - class_id: ::prost::alloc::string::String, - id: ::prost::alloc::string::String, - ) -> Result { - QueryNftRequest { class_id, id }.query(self.querier) - } - pub fn class( - &self, - class_id: ::prost::alloc::string::String, - ) -> Result { - QueryClassRequest { class_id }.query(self.querier) - } - pub fn classes( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryClassesRequest { pagination }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/orm/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/orm/mod.rs deleted file mode 100644 index 381cd4d2..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/orm/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod module; -pub mod query; -pub mod v1; -pub mod v1alpha1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/orm/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/orm/module/mod.rs deleted file mode 100644 index 32a5a9d4..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/orm/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1alpha1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/orm/module/v1alpha1.rs b/packages/neutron-sdk/src/proto_types/cosmos/orm/module/v1alpha1.rs deleted file mode 100644 index 8feeb6e9..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/orm/module/v1alpha1.rs +++ /dev/null @@ -1,17 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.module.v1alpha1.Module")] -pub struct Module {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/orm/query/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/orm/query/mod.rs deleted file mode 100644 index 32a5a9d4..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/orm/query/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1alpha1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/orm/query/v1alpha1.rs b/packages/neutron-sdk/src/proto_types/cosmos/orm/query/v1alpha1.rs deleted file mode 100644 index 6701d16c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/orm/query/v1alpha1.rs +++ /dev/null @@ -1,273 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// GetRequest is the Query/Get request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.query.v1alpha1.GetRequest")] -#[proto_query( - path = "/cosmos.orm.query.v1alpha1.Query/Get", - response_type = GetResponse -)] -pub struct GetRequest { - /// message_name is the fully-qualified message name of the ORM table being queried. - #[prost(string, tag = "1")] - pub message_name: ::prost::alloc::string::String, - /// 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. - #[prost(string, tag = "2")] - pub index: ::prost::alloc::string::String, - /// 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. - #[prost(message, repeated, tag = "3")] - pub values: ::prost::alloc::vec::Vec, -} -/// GetResponse is the Query/Get response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.query.v1alpha1.GetResponse")] -pub struct GetResponse { - /// result is the result of the get query. If no value is found, the gRPC - /// status code NOT_FOUND will be returned. - #[prost(message, optional, tag = "1")] - pub result: ::core::option::Option, -} -/// ListRequest is the Query/List request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.query.v1alpha1.ListRequest")] -#[proto_query( - path = "/cosmos.orm.query.v1alpha1.Query/List", - response_type = ListResponse -)] -pub struct ListRequest { - /// message_name is the fully-qualified message name of the ORM table being queried. - #[prost(string, tag = "1")] - pub message_name: ::prost::alloc::string::String, - /// index is the index fields expression used in orm definitions. If it - /// is empty, the table's primary key is assumed. - #[prost(string, tag = "2")] - pub index: ::prost::alloc::string::String, - /// pagination is the pagination request. - #[prost(message, optional, tag = "5")] - pub pagination: ::core::option::Option, - /// 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. - #[prost(oneof = "list_request::Query", tags = "3, 4")] - pub query: ::core::option::Option, -} -/// Nested message and enum types in `ListRequest`. -pub mod list_request { - use neutron_std_derive::CosmwasmExt; - /// Prefix specifies the arguments to a prefix query. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.orm.query.v1alpha1.ListRequest.Prefix")] - pub struct 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. - #[prost(message, repeated, tag = "1")] - pub values: ::prost::alloc::vec::Vec, - } - /// Range specifies the arguments to a range query. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.orm.query.v1alpha1.ListRequest.Range")] - pub struct 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. - #[prost(message, repeated, tag = "1")] - pub start: ::prost::alloc::vec::Vec, - /// 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. - #[prost(message, repeated, tag = "2")] - pub end: ::prost::alloc::vec::Vec, - } - /// 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. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Query { - /// prefix defines a prefix query. - #[prost(message, tag = "3")] - Prefix(Prefix), - /// range defines a range query. - #[prost(message, tag = "4")] - Range(Range), - } -} -/// ListResponse is the Query/List response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.query.v1alpha1.ListResponse")] -pub struct ListResponse { - /// results are the results of the query. - #[prost(message, repeated, tag = "1")] - pub results: ::prost::alloc::vec::Vec, - /// pagination is the pagination response. - #[prost(message, optional, tag = "5")] - pub pagination: ::core::option::Option, -} -/// IndexValue represents the value of a field in an ORM index expression. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.query.v1alpha1.IndexValue")] -pub struct IndexValue { - /// value specifies the index value - #[prost(oneof = "index_value::Value", tags = "1, 2, 3, 4, 5, 6, 7, 8")] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `IndexValue`. -pub mod index_value { - /// value specifies the index value - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Value { - /// uint specifies a value for an uint32, fixed32, uint64, or fixed64 - /// index field. - #[prost(uint64, tag = "1")] - Uint(u64), - /// int64 specifies a value for an int32, sfixed32, int64, or sfixed64 - /// index field. - #[prost(int64, tag = "2")] - Int(i64), - /// str specifies a value for a string index field. - #[prost(string, tag = "3")] - Str(::prost::alloc::string::String), - /// bytes specifies a value for a bytes index field. - #[prost(bytes, tag = "4")] - Bytes(::prost::alloc::vec::Vec), - /// enum specifies a value for an enum index field. - #[prost(string, tag = "5")] - Enum(::prost::alloc::string::String), - /// bool specifies a value for a bool index field. - #[prost(bool, tag = "6")] - Bool(bool), - /// timestamp specifies a value for a timestamp index field. - #[prost(message, tag = "7")] - Timestamp(crate::shim::Timestamp), - /// duration specifies a value for a duration index field. - #[prost(message, tag = "8")] - Duration(crate::shim::Duration), - } -} -pub struct V1alpha1Querier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> V1alpha1Querier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn get( - &self, - message_name: ::prost::alloc::string::String, - index: ::prost::alloc::string::String, - values: ::prost::alloc::vec::Vec, - ) -> Result { - GetRequest { - message_name, - index, - values, - } - .query(self.querier) - } - pub fn list( - &self, - message_name: ::prost::alloc::string::String, - index: ::prost::alloc::string::String, - pagination: ::core::option::Option, - query: ::core::option::Option, - ) -> Result { - ListRequest { - message_name, - index, - pagination, - query, - } - .query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/orm/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/orm/v1.rs deleted file mode 100644 index 0c20c1f8..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/orm/v1.rs +++ /dev/null @@ -1,151 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// TableDescriptor describes an ORM table. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.v1.TableDescriptor")] -pub struct TableDescriptor { - /// primary_key defines the primary key for the table. - #[prost(message, optional, tag = "1")] - pub primary_key: ::core::option::Option, - /// index defines one or more secondary indexes. - #[prost(message, repeated, tag = "2")] - pub index: ::prost::alloc::vec::Vec, - /// 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. - #[prost(uint32, tag = "3")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u32, -} -/// PrimaryKeyDescriptor describes a table primary key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.v1.PrimaryKeyDescriptor")] -pub struct 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. - #[prost(string, tag = "1")] - pub fields: ::prost::alloc::string::String, - /// 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. - #[prost(bool, tag = "2")] - pub auto_increment: bool, -} -/// PrimaryKeyDescriptor describes a table secondary index. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.v1.SecondaryIndexDescriptor")] -pub struct 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.. - #[prost(string, tag = "1")] - pub fields: ::prost::alloc::string::String, - /// 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. - #[prost(uint32, tag = "2")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u32, - /// unique specifies that this an unique index. - #[prost(bool, tag = "3")] - pub unique: bool, -} -/// TableDescriptor describes an ORM singleton table which has at most one instance. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.v1.SingletonDescriptor")] -pub struct 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. - #[prost(uint32, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u32, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/orm/v1alpha1.rs b/packages/neutron-sdk/src/proto_types/cosmos/orm/v1alpha1.rs deleted file mode 100644 index 0cea52a6..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/orm/v1alpha1.rs +++ /dev/null @@ -1,109 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ModuleSchemaDescriptor describe's a module's ORM schema. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.orm.v1alpha1.ModuleSchemaDescriptor")] -pub struct ModuleSchemaDescriptor { - #[prost(message, repeated, tag = "1")] - pub schema_file: ::prost::alloc::vec::Vec, - /// prefix is an optional prefix that precedes all keys in this module's - /// store. - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub prefix: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `ModuleSchemaDescriptor`. -pub mod module_schema_descriptor { - use neutron_std_derive::CosmwasmExt; - /// FileEntry describes an ORM file used in a module. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.orm.v1alpha1.ModuleSchemaDescriptor.FileEntry")] - pub struct FileEntry { - /// id is a prefix that will be varint encoded and prepended to all the - /// table keys specified in the file's tables. - #[prost(uint32, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u32, - /// 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. - #[prost(string, tag = "2")] - pub proto_file_name: ::prost::alloc::string::String, - /// 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. - #[prost(enumeration = "super::StorageType", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub storage_type: i32, - } -} -/// StorageType -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum StorageType { - /// STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent storage where all - /// data is stored in the regular Merkle-tree backed KV-store. - DefaultUnspecified = 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. - 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. - Transient = 2, -} -impl StorageType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - StorageType::DefaultUnspecified => "STORAGE_TYPE_DEFAULT_UNSPECIFIED", - StorageType::Memory => "STORAGE_TYPE_MEMORY", - StorageType::Transient => "STORAGE_TYPE_TRANSIENT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "STORAGE_TYPE_DEFAULT_UNSPECIFIED" => Some(Self::DefaultUnspecified), - "STORAGE_TYPE_MEMORY" => Some(Self::Memory), - "STORAGE_TYPE_TRANSIENT" => Some(Self::Transient), - _ => None, - } - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/params/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/params/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/params/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/params/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/params/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/params/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/params/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/params/module/v1.rs deleted file mode 100644 index 067e8090..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/params/module/v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the params module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.params.module.v1.Module")] -pub struct Module {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/params/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/params/v1beta1.rs deleted file mode 100644 index c6366e90..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/params/v1beta1.rs +++ /dev/null @@ -1,168 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ParameterChangeProposal defines a proposal to change one or more parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.params.v1beta1.ParameterChangeProposal")] -pub struct ParameterChangeProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub changes: ::prost::alloc::vec::Vec, -} -/// ParamChange defines an individual parameter change, for use in -/// ParameterChangeProposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.params.v1beta1.ParamChange")] -pub struct ParamChange { - #[prost(string, tag = "1")] - pub subspace: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub key: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub value: ::prost::alloc::string::String, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.params.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/cosmos.params.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest { - /// subspace defines the module to query the parameter for. - #[prost(string, tag = "1")] - pub subspace: ::prost::alloc::string::String, - /// key defines the key of the parameter in the subspace. - #[prost(string, tag = "2")] - pub key: ::prost::alloc::string::String, -} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.params.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// param defines the queried parameter. - #[prost(message, optional, tag = "1")] - pub param: ::core::option::Option, -} -/// QuerySubspacesRequest defines a request type for querying for all registered -/// subspaces and all keys for a subspace. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.params.v1beta1.QuerySubspacesRequest")] -#[proto_query( - path = "/cosmos.params.v1beta1.Query/Subspaces", - response_type = QuerySubspacesResponse -)] -pub struct QuerySubspacesRequest {} -/// QuerySubspacesResponse defines the response types for querying for all -/// registered subspaces and all keys for a subspace. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.params.v1beta1.QuerySubspacesResponse")] -pub struct QuerySubspacesResponse { - #[prost(message, repeated, tag = "1")] - pub subspaces: ::prost::alloc::vec::Vec, -} -/// Subspace defines a parameter subspace name and all the keys that exist for -/// the subspace. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.params.v1beta1.Subspace")] -pub struct Subspace { - #[prost(string, tag = "1")] - pub subspace: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "2")] - pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -pub struct ParamsQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> ParamsQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params( - &self, - subspace: ::prost::alloc::string::String, - key: ::prost::alloc::string::String, - ) -> Result { - QueryParamsRequest { subspace, key }.query(self.querier) - } - pub fn subspaces(&self) -> Result { - QuerySubspacesRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/slashing/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/slashing/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/slashing/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/slashing/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/slashing/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/slashing/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/slashing/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/slashing/module/v1.rs deleted file mode 100644 index 9803b313..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/slashing/module/v1.rs +++ /dev/null @@ -1,19 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the slashing module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.module.v1.Module")] -pub struct Module { - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/slashing/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/slashing/v1beta1.rs deleted file mode 100644 index 59aa7be6..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/slashing/v1beta1.rs +++ /dev/null @@ -1,402 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ValidatorSigningInfo defines a validator's signing info for monitoring their -/// liveness activity. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.ValidatorSigningInfo")] -pub struct ValidatorSigningInfo { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Height at which validator was first a candidate OR was un-jailed - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub start_height: i64, - /// 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. - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index_offset: i64, - /// Timestamp until which the validator is jailed due to liveness downtime. - #[prost(message, optional, tag = "4")] - pub jailed_until: ::core::option::Option, - /// 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. - #[prost(bool, tag = "5")] - pub tombstoned: bool, - /// A counter of missed (unsigned) blocks. It is used to avoid unnecessary - /// reads in the missed block bitmap. - #[prost(int64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub missed_blocks_counter: i64, -} -/// Params represents the parameters used for by the slashing module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.Params")] -pub struct Params { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub signed_blocks_window: i64, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub min_signed_per_window: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub downtime_jail_duration: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub slash_fraction_double_sign: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub slash_fraction_downtime: ::prost::alloc::vec::Vec, -} -/// GenesisState defines the slashing module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.GenesisState")] -pub struct GenesisState { - /// params defines all the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// signing_infos represents a map between validator addresses and their - /// signing infos. - #[prost(message, repeated, tag = "2")] - pub signing_infos: ::prost::alloc::vec::Vec, - /// missed_blocks represents a map between validator addresses and their - /// missed blocks. - #[prost(message, repeated, tag = "3")] - pub missed_blocks: ::prost::alloc::vec::Vec, -} -/// SigningInfo stores validator signing info of corresponding address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.SigningInfo")] -pub struct SigningInfo { - /// address is the validator address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// validator_signing_info represents the signing info of this validator. - #[prost(message, optional, tag = "2")] - pub validator_signing_info: ::core::option::Option, -} -/// ValidatorMissedBlocks contains array of missed blocks of corresponding -/// address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.ValidatorMissedBlocks")] -pub struct ValidatorMissedBlocks { - /// address is the validator address. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// missed_blocks is an array of missed blocks by the validator. - #[prost(message, repeated, tag = "2")] - pub missed_blocks: ::prost::alloc::vec::Vec, -} -/// MissedBlock contains height and missed status as boolean. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.MissedBlock")] -pub struct MissedBlock { - /// index is the height at which the block was missed. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: i64, - /// missed is the missed status. - #[prost(bool, tag = "2")] - pub missed: bool, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/cosmos.slashing.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.QuerySigningInfoRequest")] -#[proto_query( - path = "/cosmos.slashing.v1beta1.Query/SigningInfo", - response_type = QuerySigningInfoResponse -)] -pub struct QuerySigningInfoRequest { - /// cons_address is the address to query signing info of - #[prost(string, tag = "1")] - pub cons_address: ::prost::alloc::string::String, -} -/// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.QuerySigningInfoResponse")] -pub struct QuerySigningInfoResponse { - /// val_signing_info is the signing info of requested val cons address - #[prost(message, optional, tag = "1")] - pub val_signing_info: ::core::option::Option, -} -/// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.QuerySigningInfosRequest")] -#[proto_query( - path = "/cosmos.slashing.v1beta1.Query/SigningInfos", - response_type = QuerySigningInfosResponse -)] -pub struct QuerySigningInfosRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -/// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.QuerySigningInfosResponse")] -pub struct QuerySigningInfosResponse { - /// info is the signing info of all validators - #[prost(message, repeated, tag = "1")] - pub info: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// MsgUnjail defines the Msg/Unjail request type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.MsgUnjail")] -pub struct MsgUnjail { - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, -} -/// MsgUnjailResponse defines the Msg/Unjail response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.MsgUnjailResponse")] -pub struct MsgUnjailResponse {} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/slashing parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.slashing.v1beta1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct SlashingQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> SlashingQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn signing_info( - &self, - cons_address: ::prost::alloc::string::String, - ) -> Result { - QuerySigningInfoRequest { cons_address }.query(self.querier) - } - pub fn signing_infos( - &self, - pagination: ::core::option::Option, - ) -> Result { - QuerySigningInfosRequest { pagination }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/staking/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/staking/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/staking/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/staking/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/staking/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/staking/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/staking/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/staking/module/v1.rs deleted file mode 100644 index a7d80086..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/staking/module/v1.rs +++ /dev/null @@ -1,30 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the staking module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.module.v1.Module")] -pub struct Module { - /// 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. - #[prost(string, repeated, tag = "1")] - pub hooks_order: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, - /// bech32_prefix_validator is the bech32 validator prefix for the app. - #[prost(string, tag = "3")] - pub bech32_prefix_validator: ::prost::alloc::string::String, - /// bech32_prefix_consensus is the bech32 consensus node prefix for the app. - #[prost(string, tag = "4")] - pub bech32_prefix_consensus: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/staking/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/staking/v1beta1.rs deleted file mode 100644 index 9cbeae02..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/staking/v1beta1.rs +++ /dev/null @@ -1,1918 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.StakeAuthorization")] -pub struct 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. - #[prost(message, optional, tag = "1")] - pub max_tokens: ::core::option::Option, - /// authorization_type defines one of AuthorizationType. - #[prost(enumeration = "AuthorizationType", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub authorization_type: i32, - /// validators is the oneof that represents either allow_list or deny_list - #[prost(oneof = "stake_authorization::Validators", tags = "2, 3")] - pub validators: ::core::option::Option, -} -/// Nested message and enum types in `StakeAuthorization`. -pub mod stake_authorization { - use neutron_std_derive::CosmwasmExt; - /// Validators defines list of validator addresses. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.staking.v1beta1.")] - pub struct Validators_ { - #[prost(string, repeated, tag = "1")] - pub address: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - } - /// validators is the oneof that represents either allow_list or deny_list - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Validators { - /// allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - /// account. - #[prost(message, tag = "2")] - AllowList(Validators_), - /// deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - #[prost(message, tag = "3")] - DenyList(Validators_), - } -} -/// AuthorizationType defines the type of staking module authorization type -/// -/// Since: cosmos-sdk 0.43 -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum AuthorizationType { - /// AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - Unspecified = 0, - /// AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - Delegate = 1, - /// AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - Undelegate = 2, - /// AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - Redelegate = 3, - /// AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION defines an authorization type for Msg/MsgCancelUnbondingDelegation - CancelUnbondingDelegation = 4, -} -impl AuthorizationType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - AuthorizationType::Unspecified => "AUTHORIZATION_TYPE_UNSPECIFIED", - AuthorizationType::Delegate => "AUTHORIZATION_TYPE_DELEGATE", - AuthorizationType::Undelegate => "AUTHORIZATION_TYPE_UNDELEGATE", - AuthorizationType::Redelegate => "AUTHORIZATION_TYPE_REDELEGATE", - AuthorizationType::CancelUnbondingDelegation => { - "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" - } - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "AUTHORIZATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "AUTHORIZATION_TYPE_DELEGATE" => Some(Self::Delegate), - "AUTHORIZATION_TYPE_UNDELEGATE" => Some(Self::Undelegate), - "AUTHORIZATION_TYPE_REDELEGATE" => Some(Self::Redelegate), - "AUTHORIZATION_TYPE_CANCEL_UNBONDING_DELEGATION" => { - Some(Self::CancelUnbondingDelegation) - } - _ => None, - } - } -} -/// 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). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.HistoricalInfo")] -pub struct HistoricalInfo { - #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub valset: ::prost::alloc::vec::Vec, -} -/// CommissionRates defines the initial commission rates to be used for creating -/// a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.CommissionRates")] -pub struct CommissionRates { - /// rate is the commission rate charged to delegators, as a fraction. - #[prost(string, tag = "1")] - pub rate: ::prost::alloc::string::String, - /// max_rate defines the maximum commission rate which validator can ever charge, as a fraction. - #[prost(string, tag = "2")] - pub max_rate: ::prost::alloc::string::String, - /// max_change_rate defines the maximum daily increase of the validator commission, as a fraction. - #[prost(string, tag = "3")] - pub max_change_rate: ::prost::alloc::string::String, -} -/// Commission defines commission parameters for a given validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.Commission")] -pub struct Commission { - /// commission_rates defines the initial commission rates to be used for creating a validator. - #[prost(message, optional, tag = "1")] - pub commission_rates: ::core::option::Option, - /// update_time is the last time the commission rate was changed. - #[prost(message, optional, tag = "2")] - pub update_time: ::core::option::Option, -} -/// Description defines a validator description. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.Description")] -pub struct Description { - /// moniker defines a human-readable name for the validator. - #[prost(string, tag = "1")] - pub moniker: ::prost::alloc::string::String, - /// identity defines an optional identity signature (ex. UPort or Keybase). - #[prost(string, tag = "2")] - pub identity: ::prost::alloc::string::String, - /// website defines an optional website link. - #[prost(string, tag = "3")] - pub website: ::prost::alloc::string::String, - /// security_contact defines an optional email for security contact. - #[prost(string, tag = "4")] - pub security_contact: ::prost::alloc::string::String, - /// details define other optional details. - #[prost(string, tag = "5")] - pub details: ::prost::alloc::string::String, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.Validator")] -pub struct Validator { - /// operator_address defines the address of the validator's operator; bech encoded in JSON. - #[prost(string, tag = "1")] - pub operator_address: ::prost::alloc::string::String, - /// consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. - #[prost(message, optional, tag = "2")] - pub consensus_pubkey: ::core::option::Option, - /// jailed defined whether the validator has been jailed from bonded status or not. - #[prost(bool, tag = "3")] - pub jailed: bool, - /// status is the validator status (bonded/unbonding/unbonded). - #[prost(enumeration = "BondStatus", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, - /// tokens define the delegated tokens (incl. self-delegation). - #[prost(string, tag = "5")] - pub tokens: ::prost::alloc::string::String, - /// delegator_shares defines total shares issued to a validator's delegators. - #[prost(string, tag = "6")] - pub delegator_shares: ::prost::alloc::string::String, - /// description defines the description terms for the validator. - #[prost(message, optional, tag = "7")] - pub description: ::core::option::Option, - /// unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - #[prost(int64, tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub unbonding_height: i64, - /// unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - #[prost(message, optional, tag = "9")] - pub unbonding_time: ::core::option::Option, - /// commission defines the commission parameters. - #[prost(message, optional, tag = "10")] - pub commission: ::core::option::Option, - /// min_self_delegation is the validator's self declared minimum self delegation. - /// - /// Since: cosmos-sdk 0.46 - #[prost(string, tag = "11")] - pub min_self_delegation: ::prost::alloc::string::String, - /// strictly positive if this validator's unbonding has been stopped by external modules - #[prost(int64, tag = "12")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub unbonding_on_hold_ref_count: i64, - /// list of unbonding ids, each uniquely identifing an unbonding of this validator - #[prost(uint64, repeated, tag = "13")] - #[serde(alias = "unbondingIDs")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub unbonding_ids: ::prost::alloc::vec::Vec, -} -/// ValAddresses defines a repeated set of validator addresses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.ValAddresses")] -pub struct ValAddresses { - #[prost(string, repeated, tag = "1")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.DVPair")] -pub struct DvPair { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, -} -/// DVPairs defines an array of DVPair objects. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.DVPairs")] -pub struct DvPairs { - #[prost(message, repeated, tag = "1")] - pub pairs: ::prost::alloc::vec::Vec, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.DVVTriplet")] -pub struct DvvTriplet { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, -} -/// DVVTriplets defines an array of DVVTriplet objects. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.DVVTriplets")] -pub struct DvvTriplets { - #[prost(message, repeated, tag = "1")] - pub triplets: ::prost::alloc::vec::Vec, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.Delegation")] -pub struct Delegation { - /// delegator_address is the encoded address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the encoded address of the validator. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// shares define the delegation shares received. - #[prost(string, tag = "3")] - pub shares: ::prost::alloc::string::String, -} -/// UnbondingDelegation stores all of a single delegator's unbonding bonds -/// for a single validator in an time-ordered list. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.UnbondingDelegation")] -pub struct UnbondingDelegation { - /// delegator_address is the encoded address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_address is the encoded address of the validator. - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// entries are the unbonding delegation entries. - /// - /// unbonding delegation entries - #[prost(message, repeated, tag = "3")] - pub entries: ::prost::alloc::vec::Vec, -} -/// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.UnbondingDelegationEntry")] -pub struct UnbondingDelegationEntry { - /// creation_height is the height which the unbonding took place. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub creation_height: i64, - /// completion_time is the unix time for unbonding completion. - #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option, - /// initial_balance defines the tokens initially scheduled to receive at completion. - #[prost(string, tag = "3")] - pub initial_balance: ::prost::alloc::string::String, - /// balance defines the tokens to receive at completion. - #[prost(string, tag = "4")] - pub balance: ::prost::alloc::string::String, - /// Incrementing id that uniquely identifies this entry - #[prost(uint64, tag = "5")] - #[serde(alias = "unbondingID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub unbonding_id: u64, - /// Strictly positive if this entry's unbonding has been stopped by external modules - #[prost(int64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub unbonding_on_hold_ref_count: i64, -} -/// RedelegationEntry defines a redelegation object with relevant metadata. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.RedelegationEntry")] -pub struct RedelegationEntry { - /// creation_height defines the height which the redelegation took place. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub creation_height: i64, - /// completion_time defines the unix time for redelegation completion. - #[prost(message, optional, tag = "2")] - pub completion_time: ::core::option::Option, - /// initial_balance defines the initial balance when redelegation started. - #[prost(string, tag = "3")] - pub initial_balance: ::prost::alloc::string::String, - /// shares_dst is the amount of destination-validator shares created by redelegation. - #[prost(string, tag = "4")] - pub shares_dst: ::prost::alloc::string::String, - /// Incrementing id that uniquely identifies this entry - #[prost(uint64, tag = "5")] - #[serde(alias = "unbondingID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub unbonding_id: u64, - /// Strictly positive if this entry's unbonding has been stopped by external modules - #[prost(int64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub unbonding_on_hold_ref_count: i64, -} -/// Redelegation contains the list of a particular delegator's redelegating bonds -/// from a particular source validator to a particular destination validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.Redelegation")] -pub struct Redelegation { - /// delegator_address is the bech32-encoded address of the delegator. - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - /// validator_src_address is the validator redelegation source operator address. - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - /// validator_dst_address is the validator redelegation destination operator address. - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, - /// entries are the redelegation entries. - /// - /// redelegation entries - #[prost(message, repeated, tag = "4")] - pub entries: ::prost::alloc::vec::Vec, -} -/// Params defines the parameters for the x/staking module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.Params")] -pub struct Params { - /// unbonding_time is the time duration of unbonding. - #[prost(message, optional, tag = "1")] - pub unbonding_time: ::core::option::Option, - /// max_validators is the maximum number of validators. - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_validators: u32, - /// max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_entries: u32, - /// historical_entries is the number of historical entries to persist. - #[prost(uint32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub historical_entries: u32, - /// bond_denom defines the bondable coin denomination. - #[prost(string, tag = "5")] - pub bond_denom: ::prost::alloc::string::String, - /// min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators - #[prost(string, tag = "6")] - pub min_commission_rate: ::prost::alloc::string::String, -} -/// DelegationResponse is equivalent to Delegation except that it contains a -/// balance in addition to shares which is more suitable for client responses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.DelegationResponse")] -pub struct DelegationResponse { - #[prost(message, optional, tag = "1")] - pub delegation: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub balance: ::core::option::Option, -} -/// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -/// contains a balance in addition to shares which is more suitable for client -/// responses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.RedelegationEntryResponse")] -pub struct RedelegationEntryResponse { - #[prost(message, optional, tag = "1")] - pub redelegation_entry: ::core::option::Option, - #[prost(string, tag = "4")] - pub balance: ::prost::alloc::string::String, -} -/// RedelegationResponse is equivalent to a Redelegation except that its entries -/// contain a balance in addition to shares which is more suitable for client -/// responses. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.RedelegationResponse")] -pub struct RedelegationResponse { - #[prost(message, optional, tag = "1")] - pub redelegation: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub entries: ::prost::alloc::vec::Vec, -} -/// Pool is used for tracking bonded and not-bonded token supply of the bond -/// denomination. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.Pool")] -pub struct Pool { - #[prost(string, tag = "1")] - pub not_bonded_tokens: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub bonded_tokens: ::prost::alloc::string::String, -} -/// ValidatorUpdates defines an array of abci.ValidatorUpdate objects. -/// TODO: explore moving this to proto/cosmos/base to separate modules from tendermint dependence -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.ValidatorUpdates")] -pub struct ValidatorUpdates { - #[prost(message, repeated, tag = "1")] - pub updates: ::prost::alloc::vec::Vec, -} -/// BondStatus is the status of a validator. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum BondStatus { - /// UNSPECIFIED defines an invalid validator status. - Unspecified = 0, - /// UNBONDED defines a validator that is not bonded. - Unbonded = 1, - /// UNBONDING defines a validator that is unbonding. - Unbonding = 2, - /// BONDED defines a validator that is bonded. - Bonded = 3, -} -impl BondStatus { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - BondStatus::Unspecified => "BOND_STATUS_UNSPECIFIED", - BondStatus::Unbonded => "BOND_STATUS_UNBONDED", - BondStatus::Unbonding => "BOND_STATUS_UNBONDING", - BondStatus::Bonded => "BOND_STATUS_BONDED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "BOND_STATUS_UNSPECIFIED" => Some(Self::Unspecified), - "BOND_STATUS_UNBONDED" => Some(Self::Unbonded), - "BOND_STATUS_UNBONDING" => Some(Self::Unbonding), - "BOND_STATUS_BONDED" => Some(Self::Bonded), - _ => None, - } - } -} -/// Infraction indicates the infraction a validator commited. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum Infraction { - /// UNSPECIFIED defines an empty infraction. - Unspecified = 0, - /// DOUBLE_SIGN defines a validator that double-signs a block. - DoubleSign = 1, - /// DOWNTIME defines a validator that missed signing too many blocks. - Downtime = 2, -} -impl Infraction { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Infraction::Unspecified => "INFRACTION_UNSPECIFIED", - Infraction::DoubleSign => "INFRACTION_DOUBLE_SIGN", - Infraction::Downtime => "INFRACTION_DOWNTIME", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "INFRACTION_UNSPECIFIED" => Some(Self::Unspecified), - "INFRACTION_DOUBLE_SIGN" => Some(Self::DoubleSign), - "INFRACTION_DOWNTIME" => Some(Self::Downtime), - _ => None, - } - } -} -/// GenesisState defines the staking module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.GenesisState")] -pub struct GenesisState { - /// params defines all the parameters of related to deposit. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// last_total_power tracks the total amounts of bonded tokens recorded during - /// the previous end block. - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub last_total_power: ::prost::alloc::vec::Vec, - /// last_validator_powers is a special index that provides a historical list - /// of the last-block's bonded validators. - #[prost(message, repeated, tag = "3")] - pub last_validator_powers: ::prost::alloc::vec::Vec, - /// validators defines the validator set at genesis. - #[prost(message, repeated, tag = "4")] - pub validators: ::prost::alloc::vec::Vec, - /// delegations defines the delegations active at genesis. - #[prost(message, repeated, tag = "5")] - pub delegations: ::prost::alloc::vec::Vec, - /// unbonding_delegations defines the unbonding delegations active at genesis. - #[prost(message, repeated, tag = "6")] - pub unbonding_delegations: ::prost::alloc::vec::Vec, - /// redelegations defines the redelegations active at genesis. - #[prost(message, repeated, tag = "7")] - pub redelegations: ::prost::alloc::vec::Vec, - /// exported defines a bool to identify whether the chain dealing with exported or initialized genesis. - #[prost(bool, tag = "8")] - pub exported: bool, -} -/// LastValidatorPower required for validator set update logic. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.LastValidatorPower")] -pub struct LastValidatorPower { - /// address is the address of the validator. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// power defines the power of the validator. - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub power: i64, -} -/// QueryValidatorsRequest is request type for Query/Validators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorsRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/Validators", - response_type = QueryValidatorsResponse -)] -pub struct QueryValidatorsRequest { - /// status enables to query for validators matching a given status. - #[prost(string, tag = "1")] - pub status: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryValidatorsResponse is response type for the Query/Validators RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorsResponse")] -pub struct QueryValidatorsResponse { - /// validators contains all the queried validators. - #[prost(message, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryValidatorRequest is response type for the Query/Validator RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/Validator", - response_type = QueryValidatorResponse -)] -pub struct QueryValidatorRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, -} -/// QueryValidatorResponse is response type for the Query/Validator RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorResponse")] -pub struct QueryValidatorResponse { - /// validator defines the validator info. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, -} -/// QueryValidatorDelegationsRequest is request type for the -/// Query/ValidatorDelegations RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/ValidatorDelegations", - response_type = QueryValidatorDelegationsResponse -)] -pub struct QueryValidatorDelegationsRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryValidatorDelegationsResponse is response type for the -/// Query/ValidatorDelegations RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse")] -pub struct QueryValidatorDelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub delegation_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryValidatorUnbondingDelegationsRequest is required type for the -/// Query/ValidatorUnbondingDelegations RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", - response_type = QueryValidatorUnbondingDelegationsResponse -)] -pub struct QueryValidatorUnbondingDelegationsRequest { - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "1")] - pub validator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryValidatorUnbondingDelegationsResponse is response type for the -/// Query/ValidatorUnbondingDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse")] -pub struct QueryValidatorUnbondingDelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub unbonding_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDelegationRequest is request type for the Query/Delegation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegationRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/Delegation", - response_type = QueryDelegationResponse -)] -pub struct QueryDelegationRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_addr: ::prost::alloc::string::String, -} -/// QueryDelegationResponse is response type for the Query/Delegation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegationResponse")] -pub struct QueryDelegationResponse { - /// delegation_responses defines the delegation info of a delegation. - #[prost(message, optional, tag = "1")] - pub delegation_response: ::core::option::Option, -} -/// QueryUnbondingDelegationRequest is request type for the -/// Query/UnbondingDelegation RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/UnbondingDelegation", - response_type = QueryUnbondingDelegationResponse -)] -pub struct QueryUnbondingDelegationRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_addr: ::prost::alloc::string::String, -} -/// QueryDelegationResponse is response type for the Query/UnbondingDelegation -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse")] -pub struct QueryUnbondingDelegationResponse { - /// unbond defines the unbonding information of a delegation. - #[prost(message, optional, tag = "1")] - pub unbond: ::core::option::Option, -} -/// QueryDelegatorDelegationsRequest is request type for the -/// Query/DelegatorDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/DelegatorDelegations", - response_type = QueryDelegatorDelegationsResponse -)] -pub struct QueryDelegatorDelegationsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDelegatorDelegationsResponse is response type for the -/// Query/DelegatorDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse")] -pub struct QueryDelegatorDelegationsResponse { - /// delegation_responses defines all the delegations' info of a delegator. - #[prost(message, repeated, tag = "1")] - pub delegation_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDelegatorUnbondingDelegationsRequest is request type for the -/// Query/DelegatorUnbondingDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", - response_type = QueryDelegatorUnbondingDelegationsResponse -)] -pub struct QueryDelegatorUnbondingDelegationsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryUnbondingDelegatorDelegationsResponse is response type for the -/// Query/UnbondingDelegatorDelegations RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse")] -pub struct QueryDelegatorUnbondingDelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub unbonding_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryRedelegationsRequest is request type for the Query/Redelegations RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryRedelegationsRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/Redelegations", - response_type = QueryRedelegationsResponse -)] -pub struct QueryRedelegationsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// src_validator_addr defines the validator address to redelegate from. - #[prost(string, tag = "2")] - pub src_validator_addr: ::prost::alloc::string::String, - /// dst_validator_addr defines the validator address to redelegate to. - #[prost(string, tag = "3")] - pub dst_validator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option, -} -/// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryRedelegationsResponse")] -pub struct QueryRedelegationsResponse { - #[prost(message, repeated, tag = "1")] - pub redelegation_responses: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDelegatorValidatorsRequest is request type for the -/// Query/DelegatorValidators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/DelegatorValidators", - response_type = QueryDelegatorValidatorsResponse -)] -pub struct QueryDelegatorValidatorsRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDelegatorValidatorsResponse is response type for the -/// Query/DelegatorValidators RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse")] -pub struct QueryDelegatorValidatorsResponse { - /// validators defines the validators' info of a delegator. - #[prost(message, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// QueryDelegatorValidatorRequest is request type for the -/// Query/DelegatorValidator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/DelegatorValidator", - response_type = QueryDelegatorValidatorResponse -)] -pub struct QueryDelegatorValidatorRequest { - /// delegator_addr defines the delegator address to query for. - #[prost(string, tag = "1")] - pub delegator_addr: ::prost::alloc::string::String, - /// validator_addr defines the validator address to query for. - #[prost(string, tag = "2")] - pub validator_addr: ::prost::alloc::string::String, -} -/// QueryDelegatorValidatorResponse response type for the -/// Query/DelegatorValidator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse")] -pub struct QueryDelegatorValidatorResponse { - /// validator defines the validator info. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, -} -/// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/HistoricalInfo", - response_type = QueryHistoricalInfoResponse -)] -pub struct QueryHistoricalInfoRequest { - /// height defines at which height to query the historical info. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, -} -/// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse")] -pub struct QueryHistoricalInfoResponse { - /// hist defines the historical info at the given height. - #[prost(message, optional, tag = "1")] - pub hist: ::core::option::Option, -} -/// QueryPoolRequest is request type for the Query/Pool RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryPoolRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/Pool", - response_type = QueryPoolResponse -)] -pub struct QueryPoolRequest {} -/// QueryPoolResponse is response type for the Query/Pool RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryPoolResponse")] -pub struct QueryPoolResponse { - /// pool defines the pool info. - #[prost(message, optional, tag = "1")] - pub pool: ::core::option::Option, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/cosmos.staking.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgCreateValidator defines a SDK message for creating a new validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgCreateValidator")] -pub struct MsgCreateValidator { - #[prost(message, optional, tag = "1")] - pub description: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub commission: ::core::option::Option, - #[prost(string, tag = "3")] - pub min_self_delegation: ::prost::alloc::string::String, - /// 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). - #[deprecated] - #[prost(string, tag = "4")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "6")] - pub pubkey: ::core::option::Option, - #[prost(message, optional, tag = "7")] - pub value: ::core::option::Option, -} -/// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgCreateValidatorResponse")] -pub struct MsgCreateValidatorResponse {} -/// MsgEditValidator defines a SDK message for editing an existing validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgEditValidator")] -pub struct MsgEditValidator { - #[prost(message, optional, tag = "1")] - pub description: ::core::option::Option, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// 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 - #[prost(string, tag = "3")] - pub commission_rate: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub min_self_delegation: ::prost::alloc::string::String, -} -/// MsgEditValidatorResponse defines the Msg/EditValidator response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgEditValidatorResponse")] -pub struct MsgEditValidatorResponse {} -/// MsgDelegate defines a SDK message for performing a delegation of coins -/// from a delegator to a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgDelegate")] -pub struct MsgDelegate { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, -} -/// MsgDelegateResponse defines the Msg/Delegate response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgDelegateResponse")] -pub struct MsgDelegateResponse {} -/// MsgBeginRedelegate defines a SDK message for performing a redelegation -/// of coins from a delegator and source validator to a destination validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgBeginRedelegate")] -pub struct MsgBeginRedelegate { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_src_address: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub validator_dst_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "4")] - pub amount: ::core::option::Option, -} -/// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgBeginRedelegateResponse")] -pub struct MsgBeginRedelegateResponse { - #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option, -} -/// MsgUndelegate defines a SDK message for performing an undelegation from a -/// delegate and a validator. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgUndelegate")] -pub struct MsgUndelegate { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, -} -/// MsgUndelegateResponse defines the Msg/Undelegate response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgUndelegateResponse")] -pub struct MsgUndelegateResponse { - #[prost(message, optional, tag = "1")] - pub completion_time: ::core::option::Option, - /// amount returns the amount of undelegated coins - /// - /// Since: cosmos-sdk 0.50 - #[prost(message, optional, tag = "2")] - pub amount: ::core::option::Option, -} -/// MsgCancelUnbondingDelegation defines the SDK message for performing a cancel unbonding delegation for delegator -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation")] -pub struct MsgCancelUnbondingDelegation { - #[prost(string, tag = "1")] - pub delegator_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub validator_address: ::prost::alloc::string::String, - /// amount is always less than or equal to unbonding delegation entry balance - #[prost(message, optional, tag = "3")] - pub amount: ::core::option::Option, - /// creation_height is the height which the unbonding took place. - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub creation_height: i64, -} -/// MsgCancelUnbondingDelegationResponse -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse")] -pub struct MsgCancelUnbondingDelegationResponse {} -/// MsgUpdateParams is the Msg/UpdateParams request type. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/staking parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.staking.v1beta1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct StakingQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> StakingQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn validators( - &self, - status: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryValidatorsRequest { status, pagination }.query(self.querier) - } - pub fn validator( - &self, - validator_addr: ::prost::alloc::string::String, - ) -> Result { - QueryValidatorRequest { validator_addr }.query(self.querier) - } - pub fn validator_delegations( - &self, - validator_addr: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryValidatorDelegationsRequest { - validator_addr, - pagination, - } - .query(self.querier) - } - pub fn validator_unbonding_delegations( - &self, - validator_addr: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryValidatorUnbondingDelegationsRequest { - validator_addr, - pagination, - } - .query(self.querier) - } - pub fn delegation( - &self, - delegator_addr: ::prost::alloc::string::String, - validator_addr: ::prost::alloc::string::String, - ) -> Result { - QueryDelegationRequest { - delegator_addr, - validator_addr, - } - .query(self.querier) - } - pub fn unbonding_delegation( - &self, - delegator_addr: ::prost::alloc::string::String, - validator_addr: ::prost::alloc::string::String, - ) -> Result { - QueryUnbondingDelegationRequest { - delegator_addr, - validator_addr, - } - .query(self.querier) - } - pub fn delegator_delegations( - &self, - delegator_addr: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryDelegatorDelegationsRequest { - delegator_addr, - pagination, - } - .query(self.querier) - } - pub fn delegator_unbonding_delegations( - &self, - delegator_addr: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryDelegatorUnbondingDelegationsRequest { - delegator_addr, - pagination, - } - .query(self.querier) - } - pub fn redelegations( - &self, - delegator_addr: ::prost::alloc::string::String, - src_validator_addr: ::prost::alloc::string::String, - dst_validator_addr: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryRedelegationsRequest { - delegator_addr, - src_validator_addr, - dst_validator_addr, - pagination, - } - .query(self.querier) - } - pub fn delegator_validators( - &self, - delegator_addr: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryDelegatorValidatorsRequest { - delegator_addr, - pagination, - } - .query(self.querier) - } - pub fn delegator_validator( - &self, - delegator_addr: ::prost::alloc::string::String, - validator_addr: ::prost::alloc::string::String, - ) -> Result { - QueryDelegatorValidatorRequest { - delegator_addr, - validator_addr, - } - .query(self.querier) - } - pub fn historical_info( - &self, - height: i64, - ) -> Result { - QueryHistoricalInfoRequest { height }.query(self.querier) - } - pub fn pool(&self) -> Result { - QueryPoolRequest {}.query(self.querier) - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/store/internal/kv/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/store/internal/kv/mod.rs deleted file mode 100644 index 9f64fc82..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/store/internal/kv/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/store/internal/kv/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/store/internal/kv/v1beta1.rs deleted file mode 100644 index 7c60cd18..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/store/internal/kv/v1beta1.rs +++ /dev/null @@ -1,45 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Pairs defines a repeated slice of Pair objects. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.internal.kv.v1beta1.Pairs")] -pub struct Pairs { - #[prost(message, repeated, tag = "1")] - pub pairs: ::prost::alloc::vec::Vec, -} -/// Pair defines a key/value bytes tuple. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.internal.kv.v1beta1.Pair")] -pub struct Pair { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/store/internal/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/store/internal/mod.rs deleted file mode 100644 index 05c6d5b9..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/store/internal/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod kv; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/store/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/store/mod.rs deleted file mode 100644 index b772b151..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/store/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod internal; -pub mod snapshots; -pub mod streaming; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/store/snapshots/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/store/snapshots/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/store/snapshots/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/store/snapshots/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/store/snapshots/v1.rs deleted file mode 100644 index 5ab9ded5..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/store/snapshots/v1.rs +++ /dev/null @@ -1,214 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Snapshot contains Tendermint state sync snapshot info. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.snapshots.v1.Snapshot")] -pub struct Snapshot { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub format: u32, - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub chunks: u32, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "5")] - pub metadata: ::core::option::Option, -} -/// Metadata contains SDK-specific snapshot metadata. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.snapshots.v1.Metadata")] -pub struct Metadata { - /// SHA-256 chunk hashes - #[prost(bytes = "vec", repeated, tag = "1")] - pub chunk_hashes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// SnapshotItem is an item contained in a rootmulti.Store snapshot. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.snapshots.v1.SnapshotItem")] -pub struct SnapshotItem { - /// item is the specific type of snapshot item. - #[prost(oneof = "snapshot_item::Item", tags = "1, 2, 3, 4")] - pub item: ::core::option::Option, -} -/// Nested message and enum types in `SnapshotItem`. -pub mod snapshot_item { - /// item is the specific type of snapshot item. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Item { - #[prost(message, tag = "1")] - Store(super::SnapshotStoreItem), - #[prost(message, tag = "2")] - Iavl(super::SnapshotIavlItem), - #[prost(message, tag = "3")] - Extension(super::SnapshotExtensionMeta), - #[prost(message, tag = "4")] - ExtensionPayload(super::SnapshotExtensionPayload), - } -} -/// SnapshotStoreItem contains metadata about a snapshotted store. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.snapshots.v1.SnapshotStoreItem")] -pub struct SnapshotStoreItem { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -/// SnapshotIAVLItem is an exported IAVL node. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.snapshots.v1.SnapshotIAVLItem")] -pub struct SnapshotIavlItem { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, - /// version is block height - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub version: i64, - /// height is depth of the tree. - #[prost(int32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i32, -} -/// SnapshotExtensionMeta contains metadata about an external snapshotter. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.snapshots.v1.SnapshotExtensionMeta")] -pub struct SnapshotExtensionMeta { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub format: u32, -} -/// SnapshotExtensionPayload contains payloads of an external snapshotter. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.snapshots.v1.SnapshotExtensionPayload")] -pub struct SnapshotExtensionPayload { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub payload: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/store/streaming/abci.rs b/packages/neutron-sdk/src/proto_types/cosmos/store/streaming/abci.rs deleted file mode 100644 index 5e285c7d..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/store/streaming/abci.rs +++ /dev/null @@ -1,76 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.streaming.abci.ListenFinalizeBlockRequest")] -pub struct ListenFinalizeBlockRequest { - #[prost(message, optional, tag = "1")] - pub req: - ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub res: - ::core::option::Option, -} -/// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.streaming.abci.ListenFinalizeBlockResponse")] -pub struct ListenFinalizeBlockResponse {} -/// ListenCommitRequest is the request type for the ListenCommit RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.streaming.abci.ListenCommitRequest")] -pub struct ListenCommitRequest { - /// explicitly pass in block height as ResponseCommit does not contain this info - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_height: i64, - #[prost(message, optional, tag = "2")] - pub res: ::core::option::Option, - #[prost(message, repeated, tag = "3")] - pub change_set: ::prost::alloc::vec::Vec, -} -/// ListenCommitResponse is the response type for the ListenCommit RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.streaming.abci.ListenCommitResponse")] -pub struct ListenCommitResponse {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/store/streaming/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/store/streaming/mod.rs deleted file mode 100644 index c52eb0a4..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/store/streaming/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod abci; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/store/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/store/v1beta1.rs deleted file mode 100644 index f3a675c4..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/store/v1beta1.rs +++ /dev/null @@ -1,139 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.v1beta1.StoreKVPair")] -pub struct StoreKvPair { - /// the store key for the KVStore this pair originates from - #[prost(string, tag = "1")] - pub store_key: ::prost::alloc::string::String, - /// true indicates a delete operation, false indicates a set operation - #[prost(bool, tag = "2")] - pub delete: bool, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, -} -/// BlockMetadata contains all the abci event data of a block -/// the file streamer dump them into files together with the state changes. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.v1beta1.BlockMetadata")] -pub struct BlockMetadata { - #[prost(message, optional, tag = "6")] - pub response_commit: - ::core::option::Option, - #[prost(message, optional, tag = "7")] - pub request_finalize_block: - ::core::option::Option, - /// TODO: should we renumber this? - #[prost(message, optional, tag = "8")] - pub response_finalize_block: - ::core::option::Option, -} -/// CommitInfo defines commit information used by the multi-store when committing -/// a version/height. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.v1beta1.CommitInfo")] -pub struct CommitInfo { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub version: i64, - #[prost(message, repeated, tag = "2")] - pub store_infos: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub timestamp: ::core::option::Option, -} -/// StoreInfo defines store-specific commit information. It contains a reference -/// between a store name and the commit ID. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.v1beta1.StoreInfo")] -pub struct StoreInfo { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - #[serde(alias = "commitID")] - pub commit_id: ::core::option::Option, -} -/// CommitID defines the commitment information when a specific store is -/// committed. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.store.v1beta1.CommitID")] -pub struct CommitId { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub version: i64, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/tx/config/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/tx/config/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/tx/config/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/tx/config/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/tx/config/v1.rs deleted file mode 100644 index 872abbdc..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/tx/config/v1.rs +++ /dev/null @@ -1,24 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Config is the config object of the x/auth/tx package. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.config.v1.Config")] -pub struct Config { - /// skip_ante_handler defines whether the ante handler registration should be skipped in case an app wants to override - /// this functionality. - #[prost(bool, tag = "1")] - pub skip_ante_handler: bool, - /// skip_post_handler defines whether the post handler registration should be skipped in case an app wants to override - /// this functionality. - #[prost(bool, tag = "2")] - pub skip_post_handler: bool, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/tx/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/tx/mod.rs deleted file mode 100644 index 404cbb51..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/tx/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod config; -pub mod signing; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/tx/signing/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/tx/signing/mod.rs deleted file mode 100644 index 9f64fc82..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/tx/signing/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/tx/signing/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/tx/signing/v1beta1.rs deleted file mode 100644 index 09bcfc74..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/tx/signing/v1beta1.rs +++ /dev/null @@ -1,221 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// SignatureDescriptors wraps multiple SignatureDescriptor's. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.signing.v1beta1.SignatureDescriptors")] -pub struct SignatureDescriptors { - /// signatures are the signature descriptors - #[prost(message, repeated, tag = "1")] - pub signatures: ::prost::alloc::vec::Vec, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.signing.v1beta1.SignatureDescriptor")] -pub struct SignatureDescriptor { - /// public_key is the public key of the signer - #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub data: ::core::option::Option, - /// 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. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// Nested message and enum types in `SignatureDescriptor`. -pub mod signature_descriptor { - use neutron_std_derive::CosmwasmExt; - /// Data represents signature data - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.tx.signing.v1beta1.SignatureDescriptor.Data")] - pub struct Data { - /// sum is the oneof that specifies whether this represents single or multi-signature data - #[prost(oneof = "data::Sum", tags = "1, 2")] - pub sum: ::core::option::Option, - } - /// Nested message and enum types in `Data`. - pub mod data { - use neutron_std_derive::CosmwasmExt; - /// Single is the signature data for a single signer - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single")] - pub struct Single { - /// mode is the signing mode of the single signer - #[prost(enumeration = "super::super::SignMode", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub mode: i32, - /// signature is the raw signature bytes - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, - } - /// Multi is the signature data for a multisig public key - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi")] - pub struct Multi { - /// bitarray specifies which keys within the multisig are signing - #[prost(message, optional, tag = "1")] - pub bitarray: ::core::option::Option< - super::super::super::super::super::crypto::multisig::v1beta1::CompactBitArray, - >, - /// signatures is the signatures of the multi-signature - #[prost(message, repeated, tag = "2")] - pub signatures: ::prost::alloc::vec::Vec, - } - /// sum is the oneof that specifies whether this represents single or multi-signature data - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - /// single represents a single signer - #[prost(message, tag = "1")] - Single(Single), - /// multi represents a multisig signer - #[prost(message, tag = "2")] - Multi(Multi), - } - } -} -/// 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. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum SignMode { - /// SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - /// rejected. - Unspecified = 0, - /// SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - /// verified with raw bytes from Tx. - 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. - /// - /// Since: cosmos-sdk 0.50 - 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`. - /// - /// Since: cosmos-sdk 0.46 - DirectAux = 3, - /// SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - /// Amino JSON and will be removed in the future. - LegacyAminoJson = 127, - /// SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - /// SDK. Ref: - /// - /// 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 - Eip191 = 191, -} -impl SignMode { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - SignMode::Unspecified => "SIGN_MODE_UNSPECIFIED", - SignMode::Direct => "SIGN_MODE_DIRECT", - SignMode::Textual => "SIGN_MODE_TEXTUAL", - SignMode::DirectAux => "SIGN_MODE_DIRECT_AUX", - SignMode::LegacyAminoJson => "SIGN_MODE_LEGACY_AMINO_JSON", - SignMode::Eip191 => "SIGN_MODE_EIP_191", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "SIGN_MODE_UNSPECIFIED" => Some(Self::Unspecified), - "SIGN_MODE_DIRECT" => Some(Self::Direct), - "SIGN_MODE_TEXTUAL" => Some(Self::Textual), - "SIGN_MODE_DIRECT_AUX" => Some(Self::DirectAux), - "SIGN_MODE_LEGACY_AMINO_JSON" => Some(Self::LegacyAminoJson), - "SIGN_MODE_EIP_191" => Some(Self::Eip191), - _ => None, - } - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/tx/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/tx/v1beta1.rs deleted file mode 100644 index 5c539983..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/tx/v1beta1.rs +++ /dev/null @@ -1,1022 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Tx is the standard type used for broadcasting transactions. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.Tx")] -pub struct Tx { - /// body is the processable content of the transaction - #[prost(message, optional, tag = "1")] - pub body: ::core::option::Option, - /// auth_info is the authorization related content of the transaction, - /// specifically signers, signer modes and fee - #[prost(message, optional, tag = "2")] - pub auth_info: ::core::option::Option, - /// 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. - #[prost(bytes = "vec", repeated, tag = "3")] - pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxRaw")] -pub struct TxRaw { - /// body_bytes is a protobuf serialization of a TxBody that matches the - /// representation in SignDoc. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub body_bytes: ::prost::alloc::vec::Vec, - /// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - /// representation in SignDoc. - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub auth_info_bytes: ::prost::alloc::vec::Vec, - /// 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. - #[prost(bytes = "vec", repeated, tag = "3")] - pub signatures: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.SignDoc")] -pub struct SignDoc { - /// body_bytes is protobuf serialization of a TxBody that matches the - /// representation in TxRaw. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub body_bytes: ::prost::alloc::vec::Vec, - /// auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - /// representation in TxRaw. - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub auth_info_bytes: ::prost::alloc::vec::Vec, - /// 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 - #[prost(string, tag = "3")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, - /// account_number is the account number of the account in state - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub account_number: u64, -} -/// SignDocDirectAux is the type used for generating sign bytes for -/// SIGN_MODE_DIRECT_AUX. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.SignDocDirectAux")] -pub struct SignDocDirectAux { - /// body_bytes is protobuf serialization of a TxBody that matches the - /// representation in TxRaw. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub body_bytes: ::prost::alloc::vec::Vec, - /// public_key is the public key of the signing account. - #[prost(message, optional, tag = "2")] - pub public_key: ::core::option::Option, - /// chain_id is the identifier of the chain this transaction targets. - /// It prevents signed transactions from being used on another chain by an - /// attacker. - #[prost(string, tag = "3")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, - /// account_number is the account number of the account in state. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub account_number: u64, - /// sequence is the sequence number of the signing account. - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - /// tips have been depreacted and should not be used - #[deprecated] - #[prost(message, optional, tag = "6")] - pub tip: ::core::option::Option, -} -/// TxBody is the body of a transaction that all signers sign over. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxBody")] -pub struct 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. - #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec, - /// 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 ). - #[prost(string, tag = "2")] - pub memo: ::prost::alloc::string::String, - /// timeout is the block height after which this transaction will not - /// be processed by the chain - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timeout_height: u64, - /// 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 - #[prost(message, repeated, tag = "1023")] - pub extension_options: ::prost::alloc::vec::Vec, - /// 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 - #[prost(message, repeated, tag = "2047")] - pub non_critical_extension_options: ::prost::alloc::vec::Vec, -} -/// AuthInfo describes the fee and signer modes that are used to sign a -/// transaction. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.AuthInfo")] -pub struct 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. - #[prost(message, repeated, tag = "1")] - pub signer_infos: ::prost::alloc::vec::Vec, - /// 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. - #[prost(message, optional, tag = "2")] - pub fee: ::core::option::Option, - /// 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 - #[deprecated] - #[prost(message, optional, tag = "3")] - pub tip: ::core::option::Option, -} -/// SignerInfo describes the public key and signing mode of a single top-level -/// signer. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.SignerInfo")] -pub struct 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. - #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option, - /// mode_info describes the signing mode of the signer and is a nested - /// structure to support nested multisig pubkey's - #[prost(message, optional, tag = "2")] - pub mode_info: ::core::option::Option, - /// 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. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// ModeInfo describes the signing mode of a single or nested multisig signer. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.ModeInfo")] -pub struct ModeInfo { - /// sum is the oneof that specifies whether this represents a single or nested - /// multisig signer - #[prost(oneof = "mode_info::Sum", tags = "1, 2")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `ModeInfo`. -pub mod mode_info { - use neutron_std_derive::CosmwasmExt; - /// 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 - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.tx.v1beta1.ModeInfo.Single")] - pub struct Single { - /// mode is the signing mode of the single signer - #[prost(enumeration = "super::super::signing::v1beta1::SignMode", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub mode: i32, - } - /// Multi is the mode info for a multisig public key - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmos.tx.v1beta1.ModeInfo.Multi")] - pub struct Multi { - /// bitarray specifies which keys within the multisig are signing - #[prost(message, optional, tag = "1")] - pub bitarray: - ::core::option::Option, - /// mode_infos is the corresponding modes of the signers of the multisig - /// which could include nested multisig public keys - #[prost(message, repeated, tag = "2")] - pub mode_infos: ::prost::alloc::vec::Vec, - } - /// sum is the oneof that specifies whether this represents a single or nested - /// multisig signer - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - /// single represents a single signer - #[prost(message, tag = "1")] - Single(Single), - /// multi represents a nested multisig signer - #[prost(message, tag = "2")] - Multi(Multi), - } -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.Fee")] -pub struct Fee { - /// amount is the amount of coins to be paid as a fee - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, - /// gas_limit is the maximum gas that can be used in transaction processing - /// before an out of gas error occurs - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub gas_limit: u64, - /// 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. - #[prost(string, tag = "3")] - pub payer: ::prost::alloc::string::String, - /// 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 - #[prost(string, tag = "4")] - pub granter: ::prost::alloc::string::String, -} -/// Tip is the tip used for meta-transactions. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.Tip")] -#[deprecated] -pub struct Tip { - /// amount is the amount of the tip - #[prost(message, repeated, tag = "1")] - pub amount: ::prost::alloc::vec::Vec, - /// tipper is the address of the account paying for the tip - #[prost(string, tag = "2")] - pub tipper: ::prost::alloc::string::String, -} -/// 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.AuxSignerData")] -pub struct 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. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// 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. - #[prost(message, optional, tag = "2")] - pub sign_doc: ::core::option::Option, - /// mode is the signing mode of the single signer. - #[prost(enumeration = "super::signing::v1beta1::SignMode", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub mode: i32, - /// sig is the signature of the sign doc. - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub sig: ::prost::alloc::vec::Vec, -} -/// GetTxsEventRequest is the request type for the Service.TxsByEvents -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.GetTxsEventRequest")] -pub struct GetTxsEventRequest { - /// events is the list of transaction event type. - /// Deprecated post v0.47.x: use query instead, which should contain a valid - /// events query. - #[deprecated] - #[prost(string, repeated, tag = "1")] - pub events: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// pagination defines a pagination for the request. - /// Deprecated post v0.46.x: use page and limit instead. - #[deprecated] - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, - #[prost(enumeration = "OrderBy", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub order_by: i32, - /// page is the page number to query, starts at 1. If not provided, will - /// default to first page. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub page: u64, - /// 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. - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub limit: u64, - /// 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 - #[prost(string, tag = "6")] - pub query: ::prost::alloc::string::String, -} -/// GetTxsEventResponse is the response type for the Service.TxsByEvents -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.GetTxsEventResponse")] -pub struct GetTxsEventResponse { - /// txs is the list of queried transactions. - #[prost(message, repeated, tag = "1")] - pub txs: ::prost::alloc::vec::Vec, - /// tx_responses is the list of queried TxResponses. - #[prost(message, repeated, tag = "2")] - pub tx_responses: ::prost::alloc::vec::Vec, - /// pagination defines a pagination for the response. - /// Deprecated post v0.46.x: use total instead. - #[deprecated] - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, - /// total is total number of results available - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total: u64, -} -/// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.BroadcastTxRequest")] -pub struct BroadcastTxRequest { - /// tx_bytes is the raw transaction. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub tx_bytes: ::prost::alloc::vec::Vec, - #[prost(enumeration = "BroadcastMode", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub mode: i32, -} -/// BroadcastTxResponse is the response type for the -/// Service.BroadcastTx method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.BroadcastTxResponse")] -pub struct BroadcastTxResponse { - /// tx_response is the queried TxResponses. - #[prost(message, optional, tag = "1")] - pub tx_response: ::core::option::Option, -} -/// SimulateRequest is the request type for the Service.Simulate -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.SimulateRequest")] -pub struct SimulateRequest { - /// tx is the transaction to simulate. - /// Deprecated. Send raw tx bytes instead. - #[deprecated] - #[prost(message, optional, tag = "1")] - pub tx: ::core::option::Option, - /// tx_bytes is the raw transaction. - /// - /// Since: cosmos-sdk 0.43 - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub tx_bytes: ::prost::alloc::vec::Vec, -} -/// SimulateResponse is the response type for the -/// Service.SimulateRPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.SimulateResponse")] -pub struct SimulateResponse { - /// gas_info is the information about gas used in the simulation. - #[prost(message, optional, tag = "1")] - pub gas_info: ::core::option::Option, - /// result is the result of the simulation. - #[prost(message, optional, tag = "2")] - pub result: ::core::option::Option, -} -/// GetTxRequest is the request type for the Service.GetTx -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.GetTxRequest")] -pub struct GetTxRequest { - /// hash is the tx hash to query, encoded as a hex string. - #[prost(string, tag = "1")] - pub hash: ::prost::alloc::string::String, -} -/// GetTxResponse is the response type for the Service.GetTx method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.GetTxResponse")] -pub struct GetTxResponse { - /// tx is the queried transaction. - #[prost(message, optional, tag = "1")] - pub tx: ::core::option::Option, - /// tx_response is the queried TxResponses. - #[prost(message, optional, tag = "2")] - pub tx_response: ::core::option::Option, -} -/// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -/// RPC method. -/// -/// Since: cosmos-sdk 0.45.2 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.GetBlockWithTxsRequest")] -pub struct GetBlockWithTxsRequest { - /// height is the height of the block to query. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - /// pagination defines a pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -/// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs -/// method. -/// -/// Since: cosmos-sdk 0.45.2 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.GetBlockWithTxsResponse")] -pub struct GetBlockWithTxsResponse { - /// txs are the transactions in the block. - #[prost(message, repeated, tag = "1")] - pub txs: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub block: ::core::option::Option, - /// pagination defines a pagination for the response. - #[prost(message, optional, tag = "4")] - pub pagination: ::core::option::Option, -} -/// TxDecodeRequest is the request type for the Service.TxDecode -/// RPC method. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxDecodeRequest")] -pub struct TxDecodeRequest { - /// tx_bytes is the raw transaction. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub tx_bytes: ::prost::alloc::vec::Vec, -} -/// TxDecodeResponse is the response type for the -/// Service.TxDecode method. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxDecodeResponse")] -pub struct TxDecodeResponse { - /// tx is the decoded transaction. - #[prost(message, optional, tag = "1")] - pub tx: ::core::option::Option, -} -/// TxEncodeRequest is the request type for the Service.TxEncode -/// RPC method. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxEncodeRequest")] -pub struct TxEncodeRequest { - /// tx is the transaction to encode. - #[prost(message, optional, tag = "1")] - pub tx: ::core::option::Option, -} -/// TxEncodeResponse is the response type for the -/// Service.TxEncode method. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxEncodeResponse")] -pub struct TxEncodeResponse { - /// tx_bytes is the encoded transaction bytes. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub tx_bytes: ::prost::alloc::vec::Vec, -} -/// TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino -/// RPC method. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxEncodeAminoRequest")] -pub struct TxEncodeAminoRequest { - #[prost(string, tag = "1")] - pub amino_json: ::prost::alloc::string::String, -} -/// TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino -/// RPC method. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxEncodeAminoResponse")] -pub struct TxEncodeAminoResponse { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub amino_binary: ::prost::alloc::vec::Vec, -} -/// TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino -/// RPC method. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxDecodeAminoRequest")] -pub struct TxDecodeAminoRequest { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub amino_binary: ::prost::alloc::vec::Vec, -} -/// TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino -/// RPC method. -/// -/// Since: cosmos-sdk 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.tx.v1beta1.TxDecodeAminoResponse")] -pub struct TxDecodeAminoResponse { - #[prost(string, tag = "1")] - pub amino_json: ::prost::alloc::string::String, -} -/// OrderBy defines the sorting order -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum OrderBy { - /// ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults - /// to ASC in this case. - Unspecified = 0, - /// ORDER_BY_ASC defines ascending order - Asc = 1, - /// ORDER_BY_DESC defines descending order - Desc = 2, -} -impl OrderBy { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - OrderBy::Unspecified => "ORDER_BY_UNSPECIFIED", - OrderBy::Asc => "ORDER_BY_ASC", - OrderBy::Desc => "ORDER_BY_DESC", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified), - "ORDER_BY_ASC" => Some(Self::Asc), - "ORDER_BY_DESC" => Some(Self::Desc), - _ => None, - } - } -} -/// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC -/// method. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum BroadcastMode { - /// zero-value for mode ordering - Unspecified = 0, - /// DEPRECATED: use BROADCAST_MODE_SYNC instead, - /// BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. - Block = 1, - /// BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits - /// for a CheckTx execution response only. - Sync = 2, - /// BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client - /// returns immediately. - Async = 3, -} -impl BroadcastMode { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - BroadcastMode::Unspecified => "BROADCAST_MODE_UNSPECIFIED", - BroadcastMode::Block => "BROADCAST_MODE_BLOCK", - BroadcastMode::Sync => "BROADCAST_MODE_SYNC", - BroadcastMode::Async => "BROADCAST_MODE_ASYNC", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "BROADCAST_MODE_UNSPECIFIED" => Some(Self::Unspecified), - "BROADCAST_MODE_BLOCK" => Some(Self::Block), - "BROADCAST_MODE_SYNC" => Some(Self::Sync), - "BROADCAST_MODE_ASYNC" => Some(Self::Async), - _ => None, - } - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/upgrade/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/upgrade/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/upgrade/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/upgrade/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/upgrade/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/upgrade/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/upgrade/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/upgrade/module/v1.rs deleted file mode 100644 index f65891a2..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/upgrade/module/v1.rs +++ /dev/null @@ -1,19 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the upgrade module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.module.v1.Module")] -pub struct Module { - /// authority defines the custom module authority. If not set, defaults to the governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/upgrade/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/upgrade/v1beta1.rs deleted file mode 100644 index da377b6f..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/upgrade/v1beta1.rs +++ /dev/null @@ -1,460 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Plan specifies information about a planned upgrade and when it should occur. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.Plan")] -pub struct Plan { - /// 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. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// 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. - #[deprecated] - #[prost(message, optional, tag = "2")] - pub time: ::core::option::Option, - /// The height at which the upgrade must be performed. - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - /// Any application specific upgrade info to be included on-chain - /// such as a git commit that validators could automatically upgrade to - #[prost(string, tag = "4")] - pub info: ::prost::alloc::string::String, - /// 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. - #[deprecated] - #[prost(message, optional, tag = "5")] - pub upgraded_client_state: ::core::option::Option, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal")] -#[deprecated] -pub struct SoftwareUpgradeProposal { - /// title of the proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// plan of the proposal - #[prost(message, optional, tag = "3")] - pub plan: ::core::option::Option, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal")] -#[deprecated] -pub struct CancelSoftwareUpgradeProposal { - /// title of the proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} -/// ModuleVersion specifies a module and its consensus version. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.ModuleVersion")] -pub struct ModuleVersion { - /// name of the app module - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// consensus version of the app module - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub version: u64, -} -/// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryCurrentPlanRequest")] -#[proto_query( - path = "/cosmos.upgrade.v1beta1.Query/CurrentPlan", - response_type = QueryCurrentPlanResponse -)] -pub struct QueryCurrentPlanRequest {} -/// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryCurrentPlanResponse")] -pub struct QueryCurrentPlanResponse { - /// plan is the current upgrade plan. - #[prost(message, optional, tag = "1")] - pub plan: ::core::option::Option, -} -/// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryAppliedPlanRequest")] -#[proto_query( - path = "/cosmos.upgrade.v1beta1.Query/AppliedPlan", - response_type = QueryAppliedPlanResponse -)] -pub struct QueryAppliedPlanRequest { - /// name is the name of the applied plan to query for. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -/// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryAppliedPlanResponse")] -pub struct QueryAppliedPlanResponse { - /// height is the block height at which the plan was applied. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, -} -/// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest")] -#[proto_query( - path = "/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState", - response_type = QueryUpgradedConsensusStateResponse -)] -#[deprecated] -pub struct QueryUpgradedConsensusStateRequest { - /// last height of the current chain must be sent in request - /// as this is the height under which next consensus state is stored - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_height: i64, -} -/// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse")] -#[deprecated] -pub struct QueryUpgradedConsensusStateResponse { - /// Since: cosmos-sdk 0.43 - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub upgraded_consensus_state: ::prost::alloc::vec::Vec, -} -/// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions -/// RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryModuleVersionsRequest")] -#[proto_query( - path = "/cosmos.upgrade.v1beta1.Query/ModuleVersions", - response_type = QueryModuleVersionsResponse -)] -pub struct 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 - #[prost(string, tag = "1")] - pub module_name: ::prost::alloc::string::String, -} -/// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -/// RPC method. -/// -/// Since: cosmos-sdk 0.43 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryModuleVersionsResponse")] -pub struct QueryModuleVersionsResponse { - /// module_versions is a list of module names with their consensus versions. - #[prost(message, repeated, tag = "1")] - pub module_versions: ::prost::alloc::vec::Vec, -} -/// QueryAuthorityRequest is the request type for Query/Authority -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryAuthorityRequest")] -#[proto_query( - path = "/cosmos.upgrade.v1beta1.Query/Authority", - response_type = QueryAuthorityResponse -)] -pub struct QueryAuthorityRequest {} -/// QueryAuthorityResponse is the response type for Query/Authority -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.QueryAuthorityResponse")] -pub struct QueryAuthorityResponse { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade")] -pub struct MsgSoftwareUpgrade { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// plan is the upgrade plan. - #[prost(message, optional, tag = "2")] - pub plan: ::core::option::Option, -} -/// MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse")] -pub struct MsgSoftwareUpgradeResponse {} -/// MsgCancelUpgrade is the Msg/CancelUpgrade request type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.MsgCancelUpgrade")] -pub struct MsgCancelUpgrade { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} -/// MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse")] -pub struct MsgCancelUpgradeResponse {} -pub struct UpgradeQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> UpgradeQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn current_plan(&self) -> Result { - QueryCurrentPlanRequest {}.query(self.querier) - } - pub fn applied_plan( - &self, - name: ::prost::alloc::string::String, - ) -> Result { - QueryAppliedPlanRequest { name }.query(self.querier) - } - #[deprecated] - pub fn upgraded_consensus_state( - &self, - last_height: i64, - ) -> Result { - QueryUpgradedConsensusStateRequest { last_height }.query(self.querier) - } - pub fn module_versions( - &self, - module_name: ::prost::alloc::string::String, - ) -> Result { - QueryModuleVersionsRequest { module_name }.query(self.querier) - } - pub fn authority(&self) -> Result { - QueryAuthorityRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/vesting/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/vesting/mod.rs deleted file mode 100644 index 537a3360..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/vesting/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/vesting/module/mod.rs b/packages/neutron-sdk/src/proto_types/cosmos/vesting/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/vesting/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmos/vesting/module/v1.rs b/packages/neutron-sdk/src/proto_types/cosmos/vesting/module/v1.rs deleted file mode 100644 index 122b386b..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/vesting/module/v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the vesting module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.module.v1.Module")] -pub struct Module {} diff --git a/packages/neutron-sdk/src/proto_types/cosmos/vesting/v1beta1.rs b/packages/neutron-sdk/src/proto_types/cosmos/vesting/v1beta1.rs deleted file mode 100644 index 4cf45af8..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmos/vesting/v1beta1.rs +++ /dev/null @@ -1,280 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// BaseVestingAccount implements the VestingAccount interface. It contains all -/// the necessary fields needed for any vesting account implementation. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.BaseVestingAccount")] -pub struct BaseVestingAccount { - #[prost(message, optional, tag = "1")] - pub base_account: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub original_vesting: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub delegated_free: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub delegated_vesting: ::prost::alloc::vec::Vec, - /// Vesting end time, as unix timestamp (in seconds). - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub end_time: i64, -} -/// ContinuousVestingAccount implements the VestingAccount interface. It -/// continuously vests by unlocking coins linearly with respect to time. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.ContinuousVestingAccount")] -pub struct ContinuousVestingAccount { - #[prost(message, optional, tag = "1")] - pub base_vesting_account: ::core::option::Option, - /// Vesting start time, as unix timestamp (in seconds). - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub start_time: i64, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.DelayedVestingAccount")] -pub struct DelayedVestingAccount { - #[prost(message, optional, tag = "1")] - pub base_vesting_account: ::core::option::Option, -} -/// Period defines a length of time and amount of coins that will vest. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.Period")] -pub struct Period { - /// Period duration in seconds. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub length: i64, - #[prost(message, repeated, tag = "2")] - pub amount: ::prost::alloc::vec::Vec, -} -/// PeriodicVestingAccount implements the VestingAccount interface. It -/// periodically vests by unlocking coins during each specified period. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.PeriodicVestingAccount")] -pub struct PeriodicVestingAccount { - #[prost(message, optional, tag = "1")] - pub base_vesting_account: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub start_time: i64, - #[prost(message, repeated, tag = "3")] - pub vesting_periods: ::prost::alloc::vec::Vec, -} -/// 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.PermanentLockedAccount")] -pub struct PermanentLockedAccount { - #[prost(message, optional, tag = "1")] - pub base_vesting_account: ::core::option::Option, -} -/// MsgCreateVestingAccount defines a message that enables creating a vesting -/// account. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.MsgCreateVestingAccount")] -pub struct MsgCreateVestingAccount { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub to_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, - /// end of vesting as unix time (in seconds). - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub end_time: i64, - #[prost(bool, tag = "5")] - pub delayed: bool, -} -/// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse")] -pub struct MsgCreateVestingAccountResponse {} -/// MsgCreatePermanentLockedAccount defines a message that enables creating a permanent -/// locked account. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount")] -pub struct MsgCreatePermanentLockedAccount { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub to_address: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub amount: ::prost::alloc::vec::Vec, -} -/// MsgCreatePermanentLockedAccountResponse defines the Msg/CreatePermanentLockedAccount response type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse")] -pub struct MsgCreatePermanentLockedAccountResponse {} -/// MsgCreateVestingAccount defines a message that enables creating a vesting -/// account. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount")] -pub struct MsgCreatePeriodicVestingAccount { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub to_address: ::prost::alloc::string::String, - /// start of vesting as unix time (in seconds). - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub start_time: i64, - #[prost(message, repeated, tag = "4")] - pub vesting_periods: ::prost::alloc::vec::Vec, -} -/// MsgCreateVestingAccountResponse defines the Msg/CreatePeriodicVestingAccount -/// response type. -/// -/// Since: cosmos-sdk 0.46 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse")] -pub struct MsgCreatePeriodicVestingAccountResponse {} diff --git a/packages/neutron-sdk/src/proto_types/cosmwasm/mod.rs b/packages/neutron-sdk/src/proto_types/cosmwasm/mod.rs deleted file mode 100644 index ce1d9f82..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmwasm/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod wasm; diff --git a/packages/neutron-sdk/src/proto_types/cosmwasm/wasm/mod.rs b/packages/neutron-sdk/src/proto_types/cosmwasm/wasm/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmwasm/wasm/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/cosmwasm/wasm/v1.rs b/packages/neutron-sdk/src/proto_types/cosmwasm/wasm/v1.rs deleted file mode 100644 index d85c3a9e..00000000 --- a/packages/neutron-sdk/src/proto_types/cosmwasm/wasm/v1.rs +++ /dev/null @@ -1,2988 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// AccessTypeParam -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.AccessTypeParam")] -pub struct AccessTypeParam { - #[prost(enumeration = "AccessType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub value: i32, -} -/// AccessConfig access control type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.AccessConfig")] -pub struct AccessConfig { - #[prost(enumeration = "AccessType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub permission: i32, - #[prost(string, repeated, tag = "3")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Params defines the set of wasm parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.Params")] -pub struct Params { - #[prost(message, optional, tag = "1")] - pub code_upload_access: ::core::option::Option, - #[prost(enumeration = "AccessType", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub instantiate_default_permission: i32, -} -/// CodeInfo is data for the uploaded contract WASM code -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.CodeInfo")] -pub struct CodeInfo { - /// CodeHash is the unique identifier created by wasmvm - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub code_hash: ::prost::alloc::vec::Vec, - /// Creator address who initially stored the code - #[prost(string, tag = "2")] - pub creator: ::prost::alloc::string::String, - /// InstantiateConfig access control to apply on contract creation, optional - #[prost(message, optional, tag = "5")] - pub instantiate_config: ::core::option::Option, -} -/// ContractInfo stores a WASM contract instance -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.ContractInfo")] -pub struct ContractInfo { - /// CodeID is the reference to the stored Wasm code - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Creator address who initially instantiated the contract - #[prost(string, tag = "2")] - pub creator: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "3")] - pub admin: ::prost::alloc::string::String, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Created Tx position when the contract was instantiated. - #[prost(message, optional, tag = "5")] - pub created: ::core::option::Option, - #[prost(string, tag = "6")] - #[serde(alias = "ibc_portID")] - pub ibc_port_id: ::prost::alloc::string::String, - /// Extension is an extension point to store custom metadata within the - /// persistence model. - #[prost(message, optional, tag = "7")] - pub extension: ::core::option::Option, -} -/// ContractCodeHistoryEntry metadata to a contract. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.ContractCodeHistoryEntry")] -pub struct ContractCodeHistoryEntry { - #[prost(enumeration = "ContractCodeHistoryOperationType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub operation: i32, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "2")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Updated Tx position when the operation was executed. - #[prost(message, optional, tag = "3")] - pub updated: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, -} -/// AbsoluteTxPosition is a unique transaction position that allows for global -/// ordering of transactions. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.AbsoluteTxPosition")] -pub struct AbsoluteTxPosition { - /// BlockHeight is the block the contract was created at - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_height: u64, - /// TxIndex is a monotonic counter within the block (actual transaction index, - /// or gas consumed) - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tx_index: u64, -} -/// Model is a struct that holds a KV pair -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.Model")] -pub struct Model { - /// hex-encode key to read it better (this is often ascii) - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - /// base64-encode raw value - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, -} -/// AccessType permission types -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum AccessType { - /// AccessTypeUnspecified placeholder for empty value - Unspecified = 0, - /// AccessTypeNobody forbidden - Nobody = 1, - /// AccessTypeEverybody unrestricted - Everybody = 3, - /// AccessTypeAnyOfAddresses allow any of the addresses - AnyOfAddresses = 4, -} -impl AccessType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - AccessType::Unspecified => "ACCESS_TYPE_UNSPECIFIED", - AccessType::Nobody => "ACCESS_TYPE_NOBODY", - AccessType::Everybody => "ACCESS_TYPE_EVERYBODY", - AccessType::AnyOfAddresses => "ACCESS_TYPE_ANY_OF_ADDRESSES", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ACCESS_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "ACCESS_TYPE_NOBODY" => Some(Self::Nobody), - "ACCESS_TYPE_EVERYBODY" => Some(Self::Everybody), - "ACCESS_TYPE_ANY_OF_ADDRESSES" => Some(Self::AnyOfAddresses), - _ => None, - } - } -} -/// ContractCodeHistoryOperationType actions that caused a code change -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum ContractCodeHistoryOperationType { - /// ContractCodeHistoryOperationTypeUnspecified placeholder for empty value - Unspecified = 0, - /// ContractCodeHistoryOperationTypeInit on chain contract instantiation - Init = 1, - /// ContractCodeHistoryOperationTypeMigrate code migration - Migrate = 2, - /// ContractCodeHistoryOperationTypeGenesis based on genesis data - Genesis = 3, -} -impl ContractCodeHistoryOperationType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ContractCodeHistoryOperationType::Unspecified => { - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED" - } - ContractCodeHistoryOperationType::Init => "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT", - ContractCodeHistoryOperationType::Migrate => { - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE" - } - ContractCodeHistoryOperationType::Genesis => { - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" - } - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT" => Some(Self::Init), - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE" => Some(Self::Migrate), - "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS" => Some(Self::Genesis), - _ => None, - } - } -} -/// StoreCodeAuthorization defines authorization for wasm code upload. -/// Since: wasmd 0.42 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.StoreCodeAuthorization")] -pub struct StoreCodeAuthorization { - /// Grants for code upload - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, -} -/// ContractExecutionAuthorization defines authorization for wasm execute. -/// Since: wasmd 0.30 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.ContractExecutionAuthorization")] -pub struct ContractExecutionAuthorization { - /// Grants for contract executions - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, -} -/// ContractMigrationAuthorization defines authorization for wasm contract -/// migration. Since: wasmd 0.30 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.ContractMigrationAuthorization")] -pub struct ContractMigrationAuthorization { - /// Grants for contract migrations - #[prost(message, repeated, tag = "1")] - pub grants: ::prost::alloc::vec::Vec, -} -/// CodeGrant a granted permission for a single code -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.CodeGrant")] -pub struct CodeGrant { - /// CodeHash is the unique identifier created by wasmvm - /// Wildcard "*" is used to specify any kind of grant. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub code_hash: ::prost::alloc::vec::Vec, - /// InstantiatePermission is the superset access control to apply - /// on contract creation. - /// Optional - #[prost(message, optional, tag = "2")] - pub instantiate_permission: ::core::option::Option, -} -/// ContractGrant a granted permission for a single contract -/// Since: wasmd 0.30 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.ContractGrant")] -pub struct ContractGrant { - /// Contract is the bech32 address of the smart contract - #[prost(string, tag = "1")] - pub contract: ::prost::alloc::string::String, - /// Limit defines execution limits that are enforced and updated when the grant - /// is applied. When the limit lapsed the grant is removed. - #[prost(message, optional, tag = "2")] - pub limit: ::core::option::Option, - /// Filter define more fine-grained control on the message payload passed - /// to the contract in the operation. When no filter applies on execution, the - /// operation is prohibited. - #[prost(message, optional, tag = "3")] - pub filter: ::core::option::Option, -} -/// MaxCallsLimit limited number of calls to the contract. No funds transferable. -/// Since: wasmd 0.30 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MaxCallsLimit")] -pub struct MaxCallsLimit { - /// Remaining number that is decremented on each execution - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub remaining: u64, -} -/// MaxFundsLimit defines the maximal amounts that can be sent to the contract. -/// Since: wasmd 0.30 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MaxFundsLimit")] -pub struct MaxFundsLimit { - /// Amounts is the maximal amount of tokens transferable to the contract. - #[prost(message, repeated, tag = "1")] - pub amounts: ::prost::alloc::vec::Vec, -} -/// CombinedLimit defines the maximal amounts that can be sent to a contract and -/// the maximal number of calls executable. Both need to remain >0 to be valid. -/// Since: wasmd 0.30 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.CombinedLimit")] -pub struct CombinedLimit { - /// Remaining number that is decremented on each execution - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub calls_remaining: u64, - /// Amounts is the maximal amount of tokens transferable to the contract. - #[prost(message, repeated, tag = "2")] - pub amounts: ::prost::alloc::vec::Vec, -} -/// AllowAllMessagesFilter is a wildcard to allow any type of contract payload -/// message. -/// Since: wasmd 0.30 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.AllowAllMessagesFilter")] -pub struct AllowAllMessagesFilter {} -/// AcceptedMessageKeysFilter accept only the specific contract message keys in -/// the json object to be executed. -/// Since: wasmd 0.30 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.AcceptedMessageKeysFilter")] -pub struct AcceptedMessageKeysFilter { - /// Messages is the list of unique keys - #[prost(string, repeated, tag = "1")] - pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// AcceptedMessagesFilter accept only the specific raw contract messages to be -/// executed. -/// Since: wasmd 0.30 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.AcceptedMessagesFilter")] -pub struct AcceptedMessagesFilter { - /// Messages is the list of raw contract messages - #[prost(bytes = "vec", repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// MsgStoreCode submit Wasm code to the system -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgStoreCode")] -pub struct MsgStoreCode { - /// Sender is the actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission access control to apply on contract creation, - /// optional - #[prost(message, optional, tag = "5")] - pub instantiate_permission: ::core::option::Option, -} -/// MsgStoreCodeResponse returns store result data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgStoreCodeResponse")] -pub struct MsgStoreCodeResponse { - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Checksum is the sha256 hash of the stored code - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub checksum: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContract create a new smart contract instance for the given -/// code id. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgInstantiateContract")] -pub struct MsgInstantiateContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContractResponse return instantiation result data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgInstantiateContractResponse")] -pub struct MsgInstantiateContractResponse { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgInstantiateContract2 create a new smart contract instance for the given -/// code id with a predicable address. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgInstantiateContract2")] -pub struct MsgInstantiateContract2 { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "3")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Label is optional metadata to be stored with a contract instance. - #[prost(string, tag = "4")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, - /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub salt: ::prost::alloc::vec::Vec, - /// FixMsg include the msg value into the hash for the predictable address. - /// Default is false - #[prost(bool, tag = "8")] - pub fix_msg: bool, -} -/// MsgInstantiateContract2Response return instantiation result data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgInstantiateContract2Response")] -pub struct MsgInstantiateContract2Response { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgExecuteContract submits the given message data to a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgExecuteContract")] -pub struct MsgExecuteContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on execution - #[prost(message, repeated, tag = "5")] - pub funds: ::prost::alloc::vec::Vec, -} -/// MsgExecuteContractResponse returns execution result data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgExecuteContractResponse")] -pub struct MsgExecuteContractResponse { - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgMigrateContract runs a code upgrade/ downgrade for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgMigrateContract")] -pub struct MsgMigrateContract { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// CodeID references the new WASM code - #[prost(uint64, tag = "3")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, -} -/// MsgMigrateContractResponse returns contract migration result data. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgMigrateContractResponse")] -pub struct MsgMigrateContractResponse { - /// Data contains same raw bytes returned as data from the wasm contract. - /// (May be empty) - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgUpdateAdmin sets a new admin for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUpdateAdmin")] -pub struct MsgUpdateAdmin { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// NewAdmin address to be set - #[prost(string, tag = "2")] - pub new_admin: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// MsgUpdateAdminResponse returns empty data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUpdateAdminResponse")] -pub struct MsgUpdateAdminResponse {} -/// MsgClearAdmin removes any admin stored for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgClearAdmin")] -pub struct MsgClearAdmin { - /// Sender is the actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// MsgClearAdminResponse returns empty data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgClearAdminResponse")] -pub struct MsgClearAdminResponse {} -/// MsgUpdateInstantiateConfig updates instantiate config for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfig")] -pub struct MsgUpdateInstantiateConfig { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// CodeID references the stored WASM code - #[prost(uint64, tag = "2")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// NewInstantiatePermission is the new access control - #[prost(message, optional, tag = "3")] - pub new_instantiate_permission: ::core::option::Option, -} -/// MsgUpdateInstantiateConfigResponse returns empty data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse")] -pub struct MsgUpdateInstantiateConfigResponse {} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/wasm parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -/// MsgSudoContract is the MsgSudoContract request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgSudoContract")] -pub struct MsgSudoContract { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "2")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract as sudo - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, -} -/// MsgSudoContractResponse defines the response structure for executing a -/// MsgSudoContract message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgSudoContractResponse")] -pub struct MsgSudoContractResponse { - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgPinCodes is the MsgPinCodes request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgPinCodes")] -pub struct MsgPinCodes { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// CodeIDs references the new WASM codes - #[prost(uint64, repeated, packed = "false", tag = "2")] - #[serde(alias = "codeIDs")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub code_ids: ::prost::alloc::vec::Vec, -} -/// MsgPinCodesResponse defines the response structure for executing a -/// MsgPinCodes message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgPinCodesResponse")] -pub struct MsgPinCodesResponse {} -/// MsgUnpinCodes is the MsgUnpinCodes request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUnpinCodes")] -pub struct MsgUnpinCodes { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// CodeIDs references the WASM codes - #[prost(uint64, repeated, packed = "false", tag = "2")] - #[serde(alias = "codeIDs")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub code_ids: ::prost::alloc::vec::Vec, -} -/// MsgUnpinCodesResponse defines the response structure for executing a -/// MsgUnpinCodes message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUnpinCodesResponse")] -pub struct MsgUnpinCodesResponse {} -/// MsgStoreAndInstantiateContract is the MsgStoreAndInstantiateContract -/// request type. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContract")] -pub struct MsgStoreAndInstantiateContract { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "4")] - pub instantiate_permission: ::core::option::Option, - /// UnpinCode code on upload, optional. As default the uploaded contract is - /// pinned to cache. - #[prost(bool, tag = "5")] - pub unpin_code: bool, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "6")] - pub admin: ::prost::alloc::string::String, - /// Label is optional metadata to be stored with a constract instance. - #[prost(string, tag = "7")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred from the authority account to the contract - /// on instantiation - #[prost(message, repeated, tag = "9")] - pub funds: ::prost::alloc::vec::Vec, - /// Source is the URL where the code is hosted - #[prost(string, tag = "10")] - pub source: ::prost::alloc::string::String, - /// Builder is the docker image used to build the code deterministically, used - /// for smart contract verification - #[prost(string, tag = "11")] - pub builder: ::prost::alloc::string::String, - /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart - /// contract verification - #[prost(bytes = "vec", tag = "12")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub code_hash: ::prost::alloc::vec::Vec, -} -/// MsgStoreAndInstantiateContractResponse defines the response structure -/// for executing a MsgStoreAndInstantiateContract message. -/// -/// Since: 0.40 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse")] -pub struct MsgStoreAndInstantiateContractResponse { - /// Address is the bech32 address of the new contract instance. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgAddCodeUploadParamsAddresses is the -/// MsgAddCodeUploadParamsAddresses request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses")] -pub struct MsgAddCodeUploadParamsAddresses { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "2")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgAddCodeUploadParamsAddressesResponse defines the response -/// structure for executing a MsgAddCodeUploadParamsAddresses message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse")] -pub struct MsgAddCodeUploadParamsAddressesResponse {} -/// MsgRemoveCodeUploadParamsAddresses is the -/// MsgRemoveCodeUploadParamsAddresses request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddresses")] -pub struct MsgRemoveCodeUploadParamsAddresses { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "2")] - pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgRemoveCodeUploadParamsAddressesResponse defines the response -/// structure for executing a MsgRemoveCodeUploadParamsAddresses message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse")] -pub struct MsgRemoveCodeUploadParamsAddressesResponse {} -/// MsgStoreAndMigrateContract is the MsgStoreAndMigrateContract -/// request type. -/// -/// Since: 0.42 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgStoreAndMigrateContract")] -pub struct MsgStoreAndMigrateContract { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "3")] - pub instantiate_permission: ::core::option::Option, - /// Contract is the address of the smart contract - #[prost(string, tag = "4")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, -} -/// MsgStoreAndMigrateContractResponse defines the response structure -/// for executing a MsgStoreAndMigrateContract message. -/// -/// Since: 0.42 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgStoreAndMigrateContractResponse")] -pub struct MsgStoreAndMigrateContractResponse { - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Checksum is the sha256 hash of the stored code - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub checksum: ::prost::alloc::vec::Vec, - /// Data contains bytes to returned from the contract - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgUpdateContractLabel sets a new label for a smart contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUpdateContractLabel")] -pub struct MsgUpdateContractLabel { - /// Sender is the that actor that signed the messages - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// NewLabel string to be set - #[prost(string, tag = "2")] - pub new_label: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// MsgUpdateContractLabelResponse returns empty data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgUpdateContractLabelResponse")] -pub struct MsgUpdateContractLabelResponse {} -/// GenesisState - genesis state of x/wasm -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.GenesisState")] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub codes: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub contracts: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub sequences: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub gen_msgs: ::prost::alloc::vec::Vec, -} -/// Nested message and enum types in `GenesisState`. -pub mod genesis_state { - use neutron_std_derive::CosmwasmExt; - /// GenMsgs define the messages that can be executed during genesis phase in - /// order. The intention is to have more human readable data that is auditable. - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, - )] - #[proto_message(type_url = "/cosmwasm.wasm.v1.GenesisState.GenMsgs")] - pub struct GenMsgs { - /// sum is a single message - #[prost(oneof = "gen_msgs::Sum", tags = "1, 2, 3")] - pub sum: ::core::option::Option, - } - /// Nested message and enum types in `GenMsgs`. - pub mod gen_msgs { - /// sum is a single message - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - StoreCode(super::super::MsgStoreCode), - #[prost(message, tag = "2")] - InstantiateContract(super::super::MsgInstantiateContract), - /// MsgInstantiateContract2 intentionally not supported - /// see - #[prost(message, tag = "3")] - ExecuteContract(super::super::MsgExecuteContract), - } - } -} -/// Code struct encompasses CodeInfo and CodeBytes -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.Code")] -pub struct Code { - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - #[prost(message, optional, tag = "2")] - pub code_info: ::core::option::Option, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub code_bytes: ::prost::alloc::vec::Vec, - /// Pinned to wasmvm cache - #[prost(bool, tag = "4")] - pub pinned: bool, -} -/// Contract struct encompasses ContractAddress, ContractInfo, and ContractState -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.Contract")] -pub struct Contract { - #[prost(string, tag = "1")] - pub contract_address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub contract_info: ::core::option::Option, - #[prost(message, repeated, tag = "3")] - pub contract_state: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub contract_code_history: ::prost::alloc::vec::Vec, -} -/// Sequence key and value of an id generation counter -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.Sequence")] -pub struct Sequence { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub id_key: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub value: u64, -} -/// MsgIBCSend -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgIBCSend")] -pub struct MsgIbcSend { - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timeout_height: u64, - /// Timeout timestamp (in nanoseconds) relative to the current block timestamp. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timeout_timestamp: u64, - /// Data is the payload to transfer. We must not make assumption what format or - /// content is in here. - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgIBCSendResponse -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgIBCSendResponse")] -pub struct MsgIbcSendResponse { - /// Sequence number of the IBC packet sent - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// MsgIBCCloseChannel port and channel need to be owned by the contract -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MsgIBCCloseChannel")] -pub struct MsgIbcCloseChannel { - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit StoreCodeProposal. To submit WASM code to the system, -/// a simple MsgStoreCode can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.StoreCodeProposal")] -#[deprecated] -pub struct StoreCodeProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's environment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "7")] - pub instantiate_permission: ::core::option::Option, - /// UnpinCode code on upload, optional - #[prost(bool, tag = "8")] - pub unpin_code: bool, - /// Source is the URL where the code is hosted - #[prost(string, tag = "9")] - pub source: ::prost::alloc::string::String, - /// Builder is the docker image used to build the code deterministically, used - /// for smart contract verification - #[prost(string, tag = "10")] - pub builder: ::prost::alloc::string::String, - /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart - /// contract verification - #[prost(bytes = "vec", tag = "11")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub code_hash: ::prost::alloc::vec::Vec, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit InstantiateContractProposal. To instantiate a contract, -/// a simple MsgInstantiateContract can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.InstantiateContractProposal")] -#[deprecated] -pub struct InstantiateContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's environment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "4")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "5")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Label is optional metadata to be stored with a constract instance. - #[prost(string, tag = "6")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "8")] - pub funds: ::prost::alloc::vec::Vec, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit InstantiateContract2Proposal. To instantiate contract 2, -/// a simple MsgInstantiateContract2 can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.InstantiateContract2Proposal")] -#[deprecated] -pub struct InstantiateContract2Proposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's enviroment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "4")] - pub admin: ::prost::alloc::string::String, - /// CodeID is the reference to the stored WASM code - #[prost(uint64, tag = "5")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Label is optional metadata to be stored with a constract instance. - #[prost(string, tag = "6")] - pub label: ::prost::alloc::string::String, - /// Msg json encode message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "8")] - pub funds: ::prost::alloc::vec::Vec, - /// Salt is an arbitrary value provided by the sender. Size can be 1 to 64. - #[prost(bytes = "vec", tag = "9")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub salt: ::prost::alloc::vec::Vec, - /// FixMsg include the msg value into the hash for the predictable address. - /// Default is false - #[prost(bool, tag = "10")] - pub fix_msg: bool, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit MigrateContractProposal. To migrate a contract, -/// a simple MsgMigrateContract can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.MigrateContractProposal")] -#[deprecated] -pub struct MigrateContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - /// - /// Note: skipping 3 as this was previously used for unneeded run_as - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "4")] - pub contract: ::prost::alloc::string::String, - /// CodeID references the new WASM code - #[prost(uint64, tag = "5")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// Msg json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit SudoContractProposal. To call sudo on a contract, -/// a simple MsgSudoContract can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.SudoContractProposal")] -#[deprecated] -pub struct SudoContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract as sudo - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit ExecuteContractProposal. To call execute on a contract, -/// a simple MsgExecuteContract can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.ExecuteContractProposal")] -#[deprecated] -pub struct ExecuteContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's environment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "4")] - pub contract: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract as execute - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "6")] - pub funds: ::prost::alloc::vec::Vec, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit UpdateAdminProposal. To set an admin for a contract, -/// a simple MsgUpdateAdmin can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.UpdateAdminProposal")] -#[deprecated] -pub struct UpdateAdminProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// NewAdmin address to be set - #[prost(string, tag = "3")] - pub new_admin: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "4")] - pub contract: ::prost::alloc::string::String, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit ClearAdminProposal. To clear the admin of a contract, -/// a simple MsgClearAdmin can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.ClearAdminProposal")] -#[deprecated] -pub struct ClearAdminProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// Contract is the address of the smart contract - #[prost(string, tag = "3")] - pub contract: ::prost::alloc::string::String, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit PinCodesProposal. To pin a set of code ids in the wasmvm -/// cache, a simple MsgPinCodes can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.PinCodesProposal")] -#[deprecated] -pub struct PinCodesProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// CodeIDs references the new WASM codes - #[prost(uint64, repeated, packed = "false", tag = "3")] - #[serde(alias = "codeIDs")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub code_ids: ::prost::alloc::vec::Vec, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm -/// cache, a simple MsgUnpinCodes can be invoked from the x/gov module via -/// a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.UnpinCodesProposal")] -#[deprecated] -pub struct UnpinCodesProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// CodeIDs references the WASM codes - #[prost(uint64, repeated, packed = "false", tag = "3")] - #[serde(alias = "codeIDs")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub code_ids: ::prost::alloc::vec::Vec, -} -/// AccessConfigUpdate contains the code id and the access config to be -/// applied. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.AccessConfigUpdate")] -pub struct AccessConfigUpdate { - /// CodeID is the reference to the stored WASM code to be updated - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// InstantiatePermission to apply to the set of code ids - #[prost(message, optional, tag = "2")] - pub instantiate_permission: ::core::option::Option, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit UpdateInstantiateConfigProposal. To update instantiate config -/// to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from -/// the x/gov module via a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.UpdateInstantiateConfigProposal")] -#[deprecated] -pub struct UpdateInstantiateConfigProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// AccessConfigUpdate contains the list of code ids and the access config - /// to be applied. - #[prost(message, repeated, tag = "3")] - pub access_config_updates: ::prost::alloc::vec::Vec, -} -/// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for -/// an explicit StoreAndInstantiateContractProposal. To store and instantiate -/// the contract, a simple MsgStoreAndInstantiateContract can be invoked from -/// the x/gov module via a v1 governance proposal. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.StoreAndInstantiateContractProposal")] -#[deprecated] -pub struct StoreAndInstantiateContractProposal { - /// Title is a short summary - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// Description is a human readable text - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// RunAs is the address that is passed to the contract's environment as sender - #[prost(string, tag = "3")] - pub run_as: ::prost::alloc::string::String, - /// WASMByteCode can be raw or gzip compressed - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub wasm_byte_code: ::prost::alloc::vec::Vec, - /// InstantiatePermission to apply on contract creation, optional - #[prost(message, optional, tag = "5")] - pub instantiate_permission: ::core::option::Option, - /// UnpinCode code on upload, optional - #[prost(bool, tag = "6")] - pub unpin_code: bool, - /// Admin is an optional address that can execute migrations - #[prost(string, tag = "7")] - pub admin: ::prost::alloc::string::String, - /// Label is optional metadata to be stored with a constract instance. - #[prost(string, tag = "8")] - pub label: ::prost::alloc::string::String, - /// Msg json encoded message to be passed to the contract on instantiation - #[prost(bytes = "vec", tag = "9")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, - /// Funds coins that are transferred to the contract on instantiation - #[prost(message, repeated, tag = "10")] - pub funds: ::prost::alloc::vec::Vec, - /// Source is the URL where the code is hosted - #[prost(string, tag = "11")] - pub source: ::prost::alloc::string::String, - /// Builder is the docker image used to build the code deterministically, used - /// for smart contract verification - #[prost(string, tag = "12")] - pub builder: ::prost::alloc::string::String, - /// CodeHash is the SHA256 sum of the code outputted by builder, used for smart - /// contract verification - #[prost(bytes = "vec", tag = "13")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub code_hash: ::prost::alloc::vec::Vec, -} -/// QueryContractInfoRequest is the request type for the Query/ContractInfo RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryContractInfoRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/ContractInfo", - response_type = QueryContractInfoResponse -)] -pub struct QueryContractInfoRequest { - /// address is the address of the contract to query - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// QueryContractInfoResponse is the response type for the Query/ContractInfo RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryContractInfoResponse")] -pub struct QueryContractInfoResponse { - /// address is the address of the contract - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub contract_info: ::core::option::Option, -} -/// QueryContractHistoryRequest is the request type for the Query/ContractHistory -/// RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryContractHistoryRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/ContractHistory", - response_type = QueryContractHistoryResponse -)] -pub struct QueryContractHistoryRequest { - /// address is the address of the contract to query - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryContractHistoryResponse is the response type for the -/// Query/ContractHistory RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryContractHistoryResponse")] -pub struct QueryContractHistoryResponse { - #[prost(message, repeated, tag = "1")] - pub entries: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryContractsByCodeRequest is the request type for the Query/ContractsByCode -/// RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryContractsByCodeRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/ContractsByCode", - response_type = QueryContractsByCodeResponse -)] -pub struct QueryContractsByCodeRequest { - /// grpc-gateway_out does not support Go style CodID - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryContractsByCodeResponse is the response type for the -/// Query/ContractsByCode RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryContractsByCodeResponse")] -pub struct QueryContractsByCodeResponse { - /// contracts are a set of contract addresses - #[prost(string, repeated, tag = "1")] - pub contracts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryAllContractStateRequest is the request type for the -/// Query/AllContractState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryAllContractStateRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/AllContractState", - response_type = QueryAllContractStateResponse -)] -pub struct QueryAllContractStateRequest { - /// address is the address of the contract - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryAllContractStateResponse is the response type for the -/// Query/AllContractState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryAllContractStateResponse")] -pub struct QueryAllContractStateResponse { - #[prost(message, repeated, tag = "1")] - pub models: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryRawContractStateRequest is the request type for the -/// Query/RawContractState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryRawContractStateRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/RawContractState", - response_type = QueryRawContractStateResponse -)] -pub struct QueryRawContractStateRequest { - /// address is the address of the contract - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub query_data: ::prost::alloc::vec::Vec, -} -/// QueryRawContractStateResponse is the response type for the -/// Query/RawContractState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryRawContractStateResponse")] -pub struct QueryRawContractStateResponse { - /// Data contains the raw store data - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// QuerySmartContractStateRequest is the request type for the -/// Query/SmartContractState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QuerySmartContractStateRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/SmartContractState", - response_type = QuerySmartContractStateResponse -)] -pub struct QuerySmartContractStateRequest { - /// address is the address of the contract - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// QueryData contains the query data passed to the contract - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub query_data: ::prost::alloc::vec::Vec, -} -/// QuerySmartContractStateResponse is the response type for the -/// Query/SmartContractState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QuerySmartContractStateResponse")] -pub struct QuerySmartContractStateResponse { - /// Data contains the json data returned from the smart contract - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// QueryCodeRequest is the request type for the Query/Code RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryCodeRequest")] -#[proto_query(path = "/cosmwasm.wasm.v1.Query/Code", response_type = QueryCodeResponse)] -pub struct QueryCodeRequest { - /// grpc-gateway_out does not support Go style CodID - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, -} -/// CodeInfoResponse contains code meta data from CodeInfo -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.CodeInfoResponse")] -pub struct CodeInfoResponse { - /// id for legacy support - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - #[prost(string, tag = "2")] - pub creator: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data_hash: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub instantiate_permission: ::core::option::Option, -} -/// QueryCodeResponse is the response type for the Query/Code RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryCodeResponse")] -pub struct QueryCodeResponse { - #[prost(message, optional, tag = "1")] - pub code_info: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// QueryCodesRequest is the request type for the Query/Codes RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryCodesRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/Codes", - response_type = QueryCodesResponse -)] -pub struct QueryCodesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: - ::core::option::Option, -} -/// QueryCodesResponse is the response type for the Query/Codes RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryCodesResponse")] -pub struct QueryCodesResponse { - #[prost(message, repeated, tag = "1")] - pub code_infos: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryPinnedCodesRequest is the request type for the Query/PinnedCodes -/// RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryPinnedCodesRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/PinnedCodes", - response_type = QueryPinnedCodesResponse -)] -pub struct QueryPinnedCodesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryPinnedCodesResponse is the response type for the -/// Query/PinnedCodes RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryPinnedCodesResponse")] -pub struct QueryPinnedCodesResponse { - #[prost(uint64, repeated, packed = "false", tag = "1")] - #[serde(alias = "codeIDs")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub code_ids: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryParamsRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryContractsByCreatorRequest is the request type for the -/// Query/ContractsByCreator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryContractsByCreatorRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/ContractsByCreator", - response_type = QueryContractsByCreatorResponse -)] -pub struct QueryContractsByCreatorRequest { - /// CreatorAddress is the address of contract creator - #[prost(string, tag = "1")] - pub creator_address: ::prost::alloc::string::String, - /// Pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryContractsByCreatorResponse is the response type for the -/// Query/ContractsByCreator RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryContractsByCreatorResponse")] -pub struct QueryContractsByCreatorResponse { - /// ContractAddresses result set - #[prost(string, repeated, tag = "1")] - pub contract_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// QueryBuildAddressRequest is the request type for the Query/BuildAddress RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryBuildAddressRequest")] -#[proto_query( - path = "/cosmwasm.wasm.v1.Query/BuildAddress", - response_type = QueryBuildAddressResponse -)] -pub struct QueryBuildAddressRequest { - /// CodeHash is the hash of the code - #[prost(string, tag = "1")] - pub code_hash: ::prost::alloc::string::String, - /// CreatorAddress is the address of the contract instantiator - #[prost(string, tag = "2")] - pub creator_address: ::prost::alloc::string::String, - /// Salt is a hex encoded salt - #[prost(string, tag = "3")] - pub salt: ::prost::alloc::string::String, - /// InitArgs are optional json encoded init args to be used in contract address - /// building if provided - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub init_args: ::prost::alloc::vec::Vec, -} -/// QueryBuildAddressResponse is the response type for the Query/BuildAddress RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/cosmwasm.wasm.v1.QueryBuildAddressResponse")] -pub struct QueryBuildAddressResponse { - /// Address is the contract address - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -pub struct WasmQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> WasmQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn contract_info( - &self, - address: ::prost::alloc::string::String, - ) -> Result { - QueryContractInfoRequest { address }.query(self.querier) - } - pub fn contract_history( - &self, - address: ::prost::alloc::string::String, - pagination: ::core::option::Option< - super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryContractHistoryRequest { - address, - pagination, - } - .query(self.querier) - } - pub fn contracts_by_code( - &self, - code_id: u64, - pagination: ::core::option::Option< - super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryContractsByCodeRequest { - code_id, - pagination, - } - .query(self.querier) - } - pub fn all_contract_state( - &self, - address: ::prost::alloc::string::String, - pagination: ::core::option::Option< - super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryAllContractStateRequest { - address, - pagination, - } - .query(self.querier) - } - pub fn raw_contract_state( - &self, - address: ::prost::alloc::string::String, - query_data: ::prost::alloc::vec::Vec, - ) -> Result { - QueryRawContractStateRequest { - address, - query_data, - } - .query(self.querier) - } - pub fn smart_contract_state( - &self, - address: ::prost::alloc::string::String, - query_data: ::prost::alloc::vec::Vec, - ) -> Result { - QuerySmartContractStateRequest { - address, - query_data, - } - .query(self.querier) - } - pub fn code(&self, code_id: u64) -> Result { - QueryCodeRequest { code_id }.query(self.querier) - } - pub fn codes( - &self, - pagination: ::core::option::Option< - super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryCodesRequest { pagination }.query(self.querier) - } - pub fn pinned_codes( - &self, - pagination: ::core::option::Option< - super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryPinnedCodesRequest { pagination }.query(self.querier) - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn contracts_by_creator( - &self, - creator_address: ::prost::alloc::string::String, - pagination: ::core::option::Option< - super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryContractsByCreatorRequest { - creator_address, - pagination, - } - .query(self.querier) - } - pub fn build_address( - &self, - code_hash: ::prost::alloc::string::String, - creator_address: ::prost::alloc::string::String, - salt: ::prost::alloc::string::String, - init_args: ::prost::alloc::vec::Vec, - ) -> Result { - QueryBuildAddressRequest { - code_hash, - creator_address, - salt, - init_args, - } - .query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/feemarket/feemarket/mod.rs b/packages/neutron-sdk/src/proto_types/feemarket/feemarket/mod.rs deleted file mode 100644 index a8429e39..00000000 --- a/packages/neutron-sdk/src/proto_types/feemarket/feemarket/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/feemarket/feemarket/module/mod.rs b/packages/neutron-sdk/src/proto_types/feemarket/feemarket/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/feemarket/feemarket/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/feemarket/feemarket/module/v1.rs b/packages/neutron-sdk/src/proto_types/feemarket/feemarket/module/v1.rs deleted file mode 100644 index a1f44e70..00000000 --- a/packages/neutron-sdk/src/proto_types/feemarket/feemarket/module/v1.rs +++ /dev/null @@ -1,20 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the builder module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.module.v1.Module")] -pub struct Module { - /// Authority defines the custom module authority. If not set, defaults to the - /// governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/feemarket/feemarket/v1.rs b/packages/neutron-sdk/src/proto_types/feemarket/feemarket/v1.rs deleted file mode 100644 index b289f9b2..00000000 --- a/packages/neutron-sdk/src/proto_types/feemarket/feemarket/v1.rs +++ /dev/null @@ -1,347 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params contains the required set of parameters for the EIP1559 fee market -/// plugin implementation. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.Params")] -pub struct Params { - /// Alpha is the amount we additively increase the learning rate - /// when it is above or below the target +/- threshold. - /// - /// Must be > 0. - #[prost(string, tag = "1")] - pub alpha: ::prost::alloc::string::String, - /// Beta is the amount we multiplicatively decrease the learning rate - /// when it is within the target +/- threshold. - /// - /// Must be [0, 1]. - #[prost(string, tag = "2")] - pub beta: ::prost::alloc::string::String, - /// Gamma is the threshold for the learning rate. If the learning rate is - /// above or below the target +/- threshold, we additively increase the - /// learning rate by Alpha. Otherwise, we multiplicatively decrease the - /// learning rate by Beta. - /// - /// Must be [0, 0.5]. - #[prost(string, tag = "3")] - pub gamma: ::prost::alloc::string::String, - /// Delta is the amount we additively increase/decrease the gas price when the - /// net block utilization difference in the window is above/below the target - /// utilization. - #[prost(string, tag = "4")] - pub delta: ::prost::alloc::string::String, - /// MinBaseGasPrice determines the initial gas price of the module and the - /// global minimum for the network. - #[prost(string, tag = "5")] - pub min_base_gas_price: ::prost::alloc::string::String, - /// MinLearningRate is the lower bound for the learning rate. - #[prost(string, tag = "6")] - pub min_learning_rate: ::prost::alloc::string::String, - /// MaxLearningRate is the upper bound for the learning rate. - #[prost(string, tag = "7")] - pub max_learning_rate: ::prost::alloc::string::String, - /// MaxBlockUtilization is the maximum block utilization. - #[prost(uint64, tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_block_utilization: u64, - /// Window defines the window size for calculating an adaptive learning rate - /// over a moving window of blocks. - #[prost(uint64, tag = "9")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub window: u64, - /// FeeDenom is the denom that will be used for all fee payments. - #[prost(string, tag = "10")] - pub fee_denom: ::prost::alloc::string::String, - /// Enabled is a boolean that determines whether the EIP1559 fee market is - /// enabled. - #[prost(bool, tag = "11")] - pub enabled: bool, - /// DistributeFees is a boolean that determines whether the fees are burned or - /// distributed to all stakers. - #[prost(bool, tag = "12")] - pub distribute_fees: bool, -} -/// GenesisState defines the feemarket module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.GenesisState")] -pub struct GenesisState { - /// Params are the parameters for the feemarket module. These parameters - /// can be utilized to implement both the base EIP-1559 fee market and - /// and the AIMD EIP-1559 fee market. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// State contains the current state of the AIMD fee market. - #[prost(message, optional, tag = "2")] - pub state: ::core::option::Option, -} -/// State is utilized to track the current state of the fee market. This includes -/// the current base fee, learning rate, and block utilization within the -/// specified AIMD window. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.State")] -pub struct State { - /// BaseGasPrice is the current base fee. This is denominated in the fee per - /// gas unit. - #[prost(string, tag = "1")] - pub base_gas_price: ::prost::alloc::string::String, - /// LearningRate is the current learning rate. - #[prost(string, tag = "2")] - pub learning_rate: ::prost::alloc::string::String, - /// Window contains a list of the last blocks' utilization values. This is used - /// to calculate the next base fee. This stores the number of units of gas - /// consumed per block. - #[prost(uint64, repeated, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub window: ::prost::alloc::vec::Vec, - /// Index is the index of the current block in the block utilization window. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u64, -} -/// ParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.ParamsRequest")] -#[proto_query( - path = "/feemarket.feemarket.v1.Query/Params", - response_type = ParamsResponse -)] -pub struct ParamsRequest {} -/// ParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.ParamsResponse")] -pub struct ParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// StateRequest is the request type for the Query/State RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.StateRequest")] -#[proto_query( - path = "/feemarket.feemarket.v1.Query/State", - response_type = StateResponse -)] -pub struct StateRequest {} -/// StateResponse is the response type for the Query/State RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.StateResponse")] -pub struct StateResponse { - #[prost(message, optional, tag = "1")] - pub state: ::core::option::Option, -} -/// GasPriceRequest is the request type for the Query/GasPrice RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.GasPriceRequest")] -#[proto_query( - path = "/feemarket.feemarket.v1.Query/GasPrice", - response_type = GasPriceResponse -)] -pub struct GasPriceRequest { - /// denom we are querying gas price in - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -/// GasPriceResponse is the response type for the Query/GasPrice RPC method. -/// Returns a gas price in specified denom. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.GasPriceResponse")] -pub struct GasPriceResponse { - #[prost(message, optional, tag = "1")] - pub price: ::core::option::Option, -} -/// GasPriceRequest is the request type for the Query/GasPrices RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.GasPricesRequest")] -#[proto_query( - path = "/feemarket.feemarket.v1.Query/GasPrices", - response_type = GasPricesResponse -)] -pub struct GasPricesRequest {} -/// GasPricesResponse is the response type for the Query/GasPrices RPC method. -/// Returns a gas price in all available denoms. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.GasPricesResponse")] -pub struct GasPricesResponse { - #[prost(message, repeated, tag = "1")] - pub prices: ::prost::alloc::vec::Vec, -} -/// MsgParams defines the Msg/Params request type. It contains the -/// new parameters for the feemarket module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.MsgParams")] -pub struct MsgParams { - /// Params defines the new parameters for the feemarket module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// Authority defines the authority that is updating the feemarket module - /// parameters. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgParamsResponse defines the Msg/Params response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/feemarket.feemarket.v1.MsgParamsResponse")] -pub struct MsgParamsResponse {} -pub struct FeemarketQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> FeemarketQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - ParamsRequest {}.query(self.querier) - } - pub fn state(&self) -> Result { - StateRequest {}.query(self.querier) - } - pub fn gas_price( - &self, - denom: ::prost::alloc::string::String, - ) -> Result { - GasPriceRequest { denom }.query(self.querier) - } - pub fn gas_prices(&self) -> Result { - GasPricesRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/feemarket/mod.rs b/packages/neutron-sdk/src/proto_types/feemarket/mod.rs deleted file mode 100644 index 262ae30a..00000000 --- a/packages/neutron-sdk/src/proto_types/feemarket/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod feemarket; diff --git a/packages/neutron-sdk/src/proto_types/gaia/globalfee/mod.rs b/packages/neutron-sdk/src/proto_types/gaia/globalfee/mod.rs deleted file mode 100644 index 9f64fc82..00000000 --- a/packages/neutron-sdk/src/proto_types/gaia/globalfee/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1beta1; diff --git a/packages/neutron-sdk/src/proto_types/gaia/globalfee/v1beta1.rs b/packages/neutron-sdk/src/proto_types/gaia/globalfee/v1beta1.rs deleted file mode 100644 index ea843ba7..00000000 --- a/packages/neutron-sdk/src/proto_types/gaia/globalfee/v1beta1.rs +++ /dev/null @@ -1,145 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the set of module parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/gaia.globalfee.v1beta1.Params")] -pub struct Params { - /// minimum_gas_prices stores the minimum gas price(s) for all TX on the chain. - /// When multiple coins are defined then they are accepted alternatively. - /// The list must be sorted by denoms asc. No duplicate denoms or zero amount - /// values allowed. For more information see - /// - #[prost(message, repeated, tag = "1")] - pub minimum_gas_prices: - ::prost::alloc::vec::Vec, - /// bypass_min_fee_msg_types defines a list of message type urls - /// that are free of fee charge. - #[prost(string, repeated, tag = "2")] - pub bypass_min_fee_msg_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// max_total_bypass_min_fee_msg_gas_usage defines the total maximum gas usage - /// allowed for a transaction containing only messages of types in bypass_min_fee_msg_types - /// to bypass fee charge. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_total_bypass_min_fee_msg_gas_usage: u64, -} -/// GenesisState - initial state of module -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/gaia.globalfee.v1beta1.GenesisState")] -pub struct GenesisState { - /// Params of this module - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryMinimumGasPricesRequest is the request type for the -/// Query/MinimumGasPrices RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/gaia.globalfee.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/gaia.globalfee.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryMinimumGasPricesResponse is the response type for the -/// Query/MinimumGasPrices RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/gaia.globalfee.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/gaia.globalfee.v1beta1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/globalfee parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/gaia.globalfee.v1beta1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct GlobalfeeQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> GlobalfeeQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/gaia/mod.rs b/packages/neutron-sdk/src/proto_types/gaia/mod.rs deleted file mode 100644 index 60178878..00000000 --- a/packages/neutron-sdk/src/proto_types/gaia/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod globalfee; diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/fee/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/fee/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/fee/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/fee/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/fee/v1.rs deleted file mode 100644 index ec506386..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/fee/v1.rs +++ /dev/null @@ -1,1025 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.IncentivizedAcknowledgement")] -pub struct IncentivizedAcknowledgement { - /// the underlying app acknowledgement bytes - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub app_acknowledgement: ::prost::alloc::vec::Vec, - /// the relayer address which submits the recv packet message - #[prost(string, tag = "2")] - pub forward_relayer_address: ::prost::alloc::string::String, - /// success flag of the base application callback - #[prost(bool, tag = "3")] - pub underlying_app_success: bool, -} -/// Fee defines the ICS29 receive, acknowledgement and timeout fees -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.Fee")] -pub struct Fee { - /// the packet receive fee - #[prost(message, repeated, tag = "1")] - pub recv_fee: ::prost::alloc::vec::Vec, - /// the packet acknowledgement fee - #[prost(message, repeated, tag = "2")] - pub ack_fee: ::prost::alloc::vec::Vec, - /// the packet timeout fee - #[prost(message, repeated, tag = "3")] - pub timeout_fee: - ::prost::alloc::vec::Vec, -} -/// PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.PacketFee")] -pub struct PacketFee { - /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet - #[prost(message, optional, tag = "1")] - pub fee: ::core::option::Option, - /// the refund address for unspent fees - #[prost(string, tag = "2")] - pub refund_address: ::prost::alloc::string::String, - /// optional list of relayers permitted to receive fees - #[prost(string, repeated, tag = "3")] - pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// PacketFees contains a list of type PacketFee -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.PacketFees")] -pub struct PacketFees { - /// list of packet fees - #[prost(message, repeated, tag = "1")] - pub packet_fees: ::prost::alloc::vec::Vec, -} -/// IdentifiedPacketFees contains a list of type PacketFee and associated PacketId -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.IdentifiedPacketFees")] -pub struct IdentifiedPacketFees { - /// unique packet identifier comprised of the channel ID, port ID and sequence - #[prost(message, optional, tag = "1")] - #[serde(alias = "packetID")] - pub packet_id: ::core::option::Option, - /// list of packet fees - #[prost(message, repeated, tag = "2")] - pub packet_fees: ::prost::alloc::vec::Vec, -} -/// GenesisState defines the ICS29 fee middleware genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.GenesisState")] -pub struct GenesisState { - /// list of identified packet fees - #[prost(message, repeated, tag = "1")] - pub identified_fees: ::prost::alloc::vec::Vec, - /// list of fee enabled channels - #[prost(message, repeated, tag = "2")] - pub fee_enabled_channels: ::prost::alloc::vec::Vec, - /// list of registered payees - #[prost(message, repeated, tag = "3")] - pub registered_payees: ::prost::alloc::vec::Vec, - /// list of registered counterparty payees - #[prost(message, repeated, tag = "4")] - pub registered_counterparty_payees: ::prost::alloc::vec::Vec, - /// list of forward relayer addresses - #[prost(message, repeated, tag = "5")] - pub forward_relayers: ::prost::alloc::vec::Vec, -} -/// FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.FeeEnabledChannel")] -pub struct FeeEnabledChannel { - /// unique port identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// RegisteredPayee contains the relayer address and payee address for a specific channel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.RegisteredPayee")] -pub struct RegisteredPayee { - /// unique channel identifier - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address - #[prost(string, tag = "2")] - pub relayer: ::prost::alloc::string::String, - /// the payee address - #[prost(string, tag = "3")] - pub payee: ::prost::alloc::string::String, -} -/// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used -/// for recv fee distribution) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.RegisteredCounterpartyPayee")] -pub struct RegisteredCounterpartyPayee { - /// unique channel identifier - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address - #[prost(string, tag = "2")] - pub relayer: ::prost::alloc::string::String, - /// the counterparty payee address - #[prost(string, tag = "3")] - pub counterparty_payee: ::prost::alloc::string::String, -} -/// ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.ForwardRelayerAddress")] -pub struct ForwardRelayerAddress { - /// the forward relayer address - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// unique packet identifer comprised of the channel ID, port ID and sequence - #[prost(message, optional, tag = "2")] - #[serde(alias = "packetID")] - pub packet_id: ::core::option::Option, -} -/// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring -/// See ICS004: -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.Metadata")] -pub struct Metadata { - /// fee_version defines the ICS29 fee version - #[prost(string, tag = "1")] - pub fee_version: ::prost::alloc::string::String, - /// app_version defines the underlying application version, which may or may not be a JSON encoded bytestring - #[prost(string, tag = "2")] - pub app_version: ::prost::alloc::string::String, -} -/// QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryIncentivizedPacketsRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/IncentivizedPackets", - response_type = QueryIncentivizedPacketsResponse -)] -pub struct QueryIncentivizedPacketsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - /// block height at which to query - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_height: u64, -} -/// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryIncentivizedPacketsResponse")] -pub struct QueryIncentivizedPacketsResponse { - /// list of identified fees for incentivized packets - #[prost(message, repeated, tag = "1")] - pub incentivized_packets: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryIncentivizedPacketRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/IncentivizedPacket", - response_type = QueryIncentivizedPacketResponse -)] -pub struct QueryIncentivizedPacketRequest { - /// unique packet identifier comprised of channel ID, port ID and sequence - #[prost(message, optional, tag = "1")] - #[serde(alias = "packetID")] - pub packet_id: ::core::option::Option, - /// block height at which to query - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_height: u64, -} -/// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryIncentivizedPacketResponse")] -pub struct QueryIncentivizedPacketResponse { - /// the identified fees for the incentivized packet - #[prost(message, optional, tag = "1")] - pub incentivized_packet: ::core::option::Option, -} -/// QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets -/// for a specific channel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/IncentivizedPacketsForChannel", - response_type = QueryIncentivizedPacketsForChannelResponse -)] -pub struct QueryIncentivizedPacketsForChannelRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - #[prost(string, tag = "2")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// Height to query at - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_height: u64, -} -/// QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse")] -pub struct QueryIncentivizedPacketsForChannelResponse { - /// Map of all incentivized_packets - #[prost(message, repeated, tag = "1")] - pub incentivized_packets: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryTotalRecvFeesRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/TotalRecvFees", - response_type = QueryTotalRecvFeesResponse -)] -pub struct QueryTotalRecvFeesRequest { - /// the packet identifier for the associated fees - #[prost(message, optional, tag = "1")] - #[serde(alias = "packetID")] - pub packet_id: ::core::option::Option, -} -/// QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryTotalRecvFeesResponse")] -pub struct QueryTotalRecvFeesResponse { - /// the total packet receive fees - #[prost(message, repeated, tag = "1")] - pub recv_fees: - ::prost::alloc::vec::Vec, -} -/// QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryTotalAckFeesRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/TotalAckFees", - response_type = QueryTotalAckFeesResponse -)] -pub struct QueryTotalAckFeesRequest { - /// the packet identifier for the associated fees - #[prost(message, optional, tag = "1")] - #[serde(alias = "packetID")] - pub packet_id: ::core::option::Option, -} -/// QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryTotalAckFeesResponse")] -pub struct QueryTotalAckFeesResponse { - /// the total packet acknowledgement fees - #[prost(message, repeated, tag = "1")] - pub ack_fees: ::prost::alloc::vec::Vec, -} -/// QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/TotalTimeoutFees", - response_type = QueryTotalTimeoutFeesResponse -)] -pub struct QueryTotalTimeoutFeesRequest { - /// the packet identifier for the associated fees - #[prost(message, optional, tag = "1")] - #[serde(alias = "packetID")] - pub packet_id: ::core::option::Option, -} -/// QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse")] -pub struct QueryTotalTimeoutFeesResponse { - /// the total packet timeout fees - #[prost(message, repeated, tag = "1")] - pub timeout_fees: - ::prost::alloc::vec::Vec, -} -/// QueryPayeeRequest defines the request type for the Payee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryPayeeRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/Payee", - response_type = QueryPayeeResponse -)] -pub struct QueryPayeeRequest { - /// unique channel identifier - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address to which the distribution address is registered - #[prost(string, tag = "2")] - pub relayer: ::prost::alloc::string::String, -} -/// QueryPayeeResponse defines the response type for the Payee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryPayeeResponse")] -pub struct QueryPayeeResponse { - /// the payee address to which packet fees are paid out - #[prost(string, tag = "1")] - pub payee_address: ::prost::alloc::string::String, -} -/// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryCounterpartyPayeeRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/CounterpartyPayee", - response_type = QueryCounterpartyPayeeResponse -)] -pub struct QueryCounterpartyPayeeRequest { - /// unique channel identifier - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address to which the counterparty is registered - #[prost(string, tag = "2")] - pub relayer: ::prost::alloc::string::String, -} -/// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryCounterpartyPayeeResponse")] -pub struct QueryCounterpartyPayeeResponse { - /// the counterparty payee address used to compensate forward relaying - #[prost(string, tag = "1")] - pub counterparty_payee: ::prost::alloc::string::String, -} -/// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/FeeEnabledChannels", - response_type = QueryFeeEnabledChannelsResponse -)] -pub struct QueryFeeEnabledChannelsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - /// block height at which to query - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_height: u64, -} -/// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse")] -pub struct QueryFeeEnabledChannelsResponse { - /// list of fee enabled channels - #[prost(message, repeated, tag = "1")] - pub fee_enabled_channels: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryFeeEnabledChannelRequest")] -#[proto_query( - path = "/ibc.applications.fee.v1.Query/FeeEnabledChannel", - response_type = QueryFeeEnabledChannelResponse -)] -pub struct QueryFeeEnabledChannelRequest { - /// unique port identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.QueryFeeEnabledChannelResponse")] -pub struct QueryFeeEnabledChannelResponse { - /// boolean flag representing the fee enabled channel status - #[prost(bool, tag = "1")] - pub fee_enabled: bool, -} -/// MsgRegisterPayee defines the request type for the RegisterPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.MsgRegisterPayee")] -pub struct MsgRegisterPayee { - /// unique port identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address - #[prost(string, tag = "3")] - pub relayer: ::prost::alloc::string::String, - /// the payee address - #[prost(string, tag = "4")] - pub payee: ::prost::alloc::string::String, -} -/// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.MsgRegisterPayeeResponse")] -pub struct MsgRegisterPayeeResponse {} -/// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee")] -pub struct MsgRegisterCounterpartyPayee { - /// unique port identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// the relayer address - #[prost(string, tag = "3")] - pub relayer: ::prost::alloc::string::String, - /// the counterparty payee address - #[prost(string, tag = "4")] - pub counterparty_payee: ::prost::alloc::string::String, -} -/// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse")] -pub struct MsgRegisterCounterpartyPayeeResponse {} -/// MsgPayPacketFee defines the request type for the PayPacketFee rpc -/// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be -/// paid for -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.MsgPayPacketFee")] -pub struct MsgPayPacketFee { - /// fee encapsulates the recv, ack and timeout fees associated with an IBC packet - #[prost(message, optional, tag = "1")] - pub fee: ::core::option::Option, - /// the source port unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "source_portID")] - pub source_port_id: ::prost::alloc::string::String, - /// the source channel unique identifer - #[prost(string, tag = "3")] - #[serde(alias = "source_channelID")] - pub source_channel_id: ::prost::alloc::string::String, - /// account address to refund fee if necessary - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, - /// optional list of relayers permitted to the receive packet fees - #[prost(string, repeated, tag = "5")] - pub relayers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.MsgPayPacketFeeResponse")] -pub struct MsgPayPacketFeeResponse {} -/// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc -/// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.MsgPayPacketFeeAsync")] -pub struct MsgPayPacketFeeAsync { - /// unique packet identifier comprised of the channel ID, port ID and sequence - #[prost(message, optional, tag = "1")] - #[serde(alias = "packetID")] - pub packet_id: ::core::option::Option, - /// the packet fee associated with a particular IBC packet - #[prost(message, optional, tag = "2")] - pub packet_fee: ::core::option::Option, -} -/// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse")] -pub struct MsgPayPacketFeeAsyncResponse {} -pub struct FeeQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> FeeQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn incentivized_packets( - &self, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - query_height: u64, - ) -> Result { - QueryIncentivizedPacketsRequest { - pagination, - query_height, - } - .query(self.querier) - } - pub fn incentivized_packet( - &self, - packet_id: ::core::option::Option, - query_height: u64, - ) -> Result { - QueryIncentivizedPacketRequest { - packet_id, - query_height, - } - .query(self.querier) - } - pub fn incentivized_packets_for_channel( - &self, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - query_height: u64, - ) -> Result { - QueryIncentivizedPacketsForChannelRequest { - pagination, - port_id, - channel_id, - query_height, - } - .query(self.querier) - } - pub fn total_recv_fees( - &self, - packet_id: ::core::option::Option, - ) -> Result { - QueryTotalRecvFeesRequest { packet_id }.query(self.querier) - } - pub fn total_ack_fees( - &self, - packet_id: ::core::option::Option, - ) -> Result { - QueryTotalAckFeesRequest { packet_id }.query(self.querier) - } - pub fn total_timeout_fees( - &self, - packet_id: ::core::option::Option, - ) -> Result { - QueryTotalTimeoutFeesRequest { packet_id }.query(self.querier) - } - pub fn payee( - &self, - channel_id: ::prost::alloc::string::String, - relayer: ::prost::alloc::string::String, - ) -> Result { - QueryPayeeRequest { - channel_id, - relayer, - } - .query(self.querier) - } - pub fn counterparty_payee( - &self, - channel_id: ::prost::alloc::string::String, - relayer: ::prost::alloc::string::String, - ) -> Result { - QueryCounterpartyPayeeRequest { - channel_id, - relayer, - } - .query(self.querier) - } - pub fn fee_enabled_channels( - &self, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - query_height: u64, - ) -> Result { - QueryFeeEnabledChannelsRequest { - pagination, - query_height, - } - .query(self.querier) - } - pub fn fee_enabled_channel( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - ) -> Result { - QueryFeeEnabledChannelRequest { - port_id, - channel_id, - } - .query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/controller/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/controller/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/controller/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/controller/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/controller/v1.rs deleted file mode 100644 index 43edd0cc..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/controller/v1.rs +++ /dev/null @@ -1,273 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the set of on-chain interchain accounts parameters. -/// The following parameters may be used to disable the controller submodule. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.controller.v1.Params")] -pub struct Params { - /// controller_enabled enables or disables the controller submodule. - #[prost(bool, tag = "1")] - pub controller_enabled: bool, -} -/// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message( - type_url = "/ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest" -)] -#[proto_query( - path = "/ibc.applications.interchain_accounts.controller.v1.Query/InterchainAccount", - response_type = QueryInterchainAccountResponse -)] -pub struct QueryInterchainAccountRequest { - #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, -} -/// QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message( - type_url = "/ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse" -)] -pub struct QueryInterchainAccountResponse { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message( - type_url = "/ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest" -)] -#[proto_query( - path = "/ibc.applications.interchain_accounts.controller.v1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message( - type_url = "/ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse" -)] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message( - type_url = "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount" -)] -pub struct MsgRegisterInterchainAccount { - #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub version: ::prost::alloc::string::String, - #[prost( - enumeration = "super::super::super::super::core::channel::v1::Order", - tag = "4" - )] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub ordering: i32, -} -/// MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message( - type_url = "/ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse" -)] -pub struct MsgRegisterInterchainAccountResponse { - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, -} -/// MsgSendTx defines the payload for Msg/SendTx -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.controller.v1.MsgSendTx")] -pub struct MsgSendTx { - #[prost(string, tag = "1")] - pub owner: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub packet_data: ::core::option::Option, - /// Relative timeout timestamp provided will be added to the current block time during transaction execution. - /// The timeout timestamp must be non-zero. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub relative_timeout: u64, -} -/// MsgSendTxResponse defines the response for MsgSendTx -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse")] -pub struct MsgSendTxResponse { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// MsgUpdateParams defines the payload for Msg/UpdateParams -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.controller.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the 27-interchain-accounts/controller parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message( - type_url = "/ibc.applications.interchain_accounts.controller.v1.MsgUpdateParamsResponse" -)] -pub struct MsgUpdateParamsResponse {} -pub struct ControllerQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> ControllerQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn interchain_account( - &self, - owner: ::prost::alloc::string::String, - connection_id: ::prost::alloc::string::String, - ) -> Result { - QueryInterchainAccountRequest { - owner, - connection_id, - } - .query(self.querier) - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/genesis/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/genesis/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/genesis/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/genesis/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/genesis/v1.rs deleted file mode 100644 index e7413b33..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/genesis/v1.rs +++ /dev/null @@ -1,120 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// GenesisState defines the interchain accounts genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.genesis.v1.GenesisState")] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub controller_genesis_state: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub host_genesis_state: ::core::option::Option, -} -/// ControllerGenesisState defines the interchain accounts controller genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message( - type_url = "/ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState" -)] -pub struct ControllerGenesisState { - #[prost(message, repeated, tag = "1")] - pub active_channels: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub interchain_accounts: ::prost::alloc::vec::Vec, - #[prost(string, repeated, tag = "3")] - pub ports: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, -} -/// HostGenesisState defines the interchain accounts host genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.genesis.v1.HostGenesisState")] -pub struct HostGenesisState { - #[prost(message, repeated, tag = "1")] - pub active_channels: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub interchain_accounts: ::prost::alloc::vec::Vec, - #[prost(string, tag = "3")] - pub port: ::prost::alloc::string::String, - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, -} -/// ActiveChannel contains a connection ID, port ID and associated active channel ID, as well as a boolean flag to -/// indicate if the channel is middleware enabled -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.genesis.v1.ActiveChannel")] -pub struct ActiveChannel { - #[prost(string, tag = "1")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(bool, tag = "4")] - pub is_middleware_enabled: bool, -} -/// RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message( - type_url = "/ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount" -)] -pub struct RegisteredInterchainAccount { - #[prost(string, tag = "1")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub account_address: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/host/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/host/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/host/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/host/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/host/v1.rs deleted file mode 100644 index 1536cc63..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/host/v1.rs +++ /dev/null @@ -1,107 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the set of on-chain interchain accounts parameters. -/// The following parameters may be used to disable the host submodule. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.host.v1.Params")] -pub struct Params { - /// host_enabled enables or disables the host submodule. - #[prost(bool, tag = "1")] - pub host_enabled: bool, - /// allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. - #[prost(string, repeated, tag = "2")] - pub allow_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.host.v1.QueryParamsRequest")] -#[proto_query( - path = "/ibc.applications.interchain_accounts.host.v1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.host.v1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgUpdateParams defines the payload for Msg/UpdateParams -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.host.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the 27-interchain-accounts/host parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.host.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct HostQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> HostQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/mod.rs deleted file mode 100644 index c91312e3..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod controller; -pub mod genesis; -pub mod host; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/v1.rs deleted file mode 100644 index 84d70c33..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/interchain_accounts/v1.rs +++ /dev/null @@ -1,135 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.v1.InterchainAccountPacketData")] -pub struct InterchainAccountPacketData { - #[prost(enumeration = "Type", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - #[prost(string, tag = "3")] - pub memo: ::prost::alloc::string::String, -} -/// CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.v1.CosmosTx")] -pub struct CosmosTx { - #[prost(message, repeated, tag = "1")] - pub messages: ::prost::alloc::vec::Vec, -} -/// Type defines a classification of message issued from a controller chain to its associated interchain accounts -/// host -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum Type { - /// Default zero value enumeration - Unspecified = 0, - /// Execute a transaction on an interchain accounts host chain - ExecuteTx = 1, -} -impl Type { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Type::Unspecified => "TYPE_UNSPECIFIED", - Type::ExecuteTx => "TYPE_EXECUTE_TX", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "TYPE_EXECUTE_TX" => Some(Self::ExecuteTx), - _ => None, - } - } -} -/// An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.v1.InterchainAccount")] -pub struct InterchainAccount { - #[prost(message, optional, tag = "1")] - pub base_account: - ::core::option::Option, - #[prost(string, tag = "2")] - pub account_owner: ::prost::alloc::string::String, -} -/// Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring -/// See ICS004: -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.interchain_accounts.v1.Metadata")] -pub struct Metadata { - /// version defines the ICS27 protocol version - #[prost(string, tag = "1")] - pub version: ::prost::alloc::string::String, - /// controller_connection_id is the connection identifier associated with the controller chain - #[prost(string, tag = "2")] - #[serde(alias = "controller_connectionID")] - pub controller_connection_id: ::prost::alloc::string::String, - /// host_connection_id is the connection identifier associated with the host chain - #[prost(string, tag = "3")] - #[serde(alias = "host_connectionID")] - pub host_connection_id: ::prost::alloc::string::String, - /// address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step - /// NOTE: the address field is empty on the OnChanOpenInit handshake step - #[prost(string, tag = "4")] - pub address: ::prost::alloc::string::String, - /// encoding defines the supported codec format - #[prost(string, tag = "5")] - pub encoding: ::prost::alloc::string::String, - /// tx_type defines the type of transactions the interchain account can execute - #[prost(string, tag = "6")] - pub tx_type: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/mod.rs deleted file mode 100644 index a56db2d8..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod fee; -pub mod interchain_accounts; -pub mod transfer; diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/transfer/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/transfer/mod.rs deleted file mode 100644 index ae6adc7c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/transfer/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod v1; -pub mod v2; diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/transfer/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/transfer/v1.rs deleted file mode 100644 index e9936655..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/transfer/v1.rs +++ /dev/null @@ -1,535 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Allocation defines the spend limit for a particular port and channel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.Allocation")] -pub struct Allocation { - /// the port on which the packet will be sent - #[prost(string, tag = "1")] - pub source_port: ::prost::alloc::string::String, - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub source_channel: ::prost::alloc::string::String, - /// spend limitation on the channel - #[prost(message, repeated, tag = "3")] - pub spend_limit: - ::prost::alloc::vec::Vec, - /// allow list of receivers, an empty allow list permits any receiver address - #[prost(string, repeated, tag = "4")] - pub allow_list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// allow list of packet data keys, an empty list prohibits all packet data keys; - /// a list only with "*" permits any packet data key - #[prost(string, repeated, tag = "5")] - pub allowed_packet_data: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// TransferAuthorization allows the grantee to spend up to spend_limit coins from -/// the granter's account for ibc transfer on a specific channel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.TransferAuthorization")] -pub struct TransferAuthorization { - /// port and channel amounts - #[prost(message, repeated, tag = "1")] - pub allocations: ::prost::alloc::vec::Vec, -} -/// DenomTrace contains the base denomination for ICS20 fungible tokens and the -/// source tracing information path. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.DenomTrace")] -pub struct DenomTrace { - /// path defines the chain of port/channel identifiers used for tracing the - /// source of the fungible token. - #[prost(string, tag = "1")] - pub path: ::prost::alloc::string::String, - /// base denomination of the relayed fungible token. - #[prost(string, tag = "2")] - pub base_denom: ::prost::alloc::string::String, -} -/// Params defines the set of IBC transfer parameters. -/// NOTE: To prevent a single token from being transferred, set the -/// TransfersEnabled parameter to true and then set the bank module's SendEnabled -/// parameter for the denomination to false. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.Params")] -pub struct Params { - /// send_enabled enables or disables all cross-chain token transfers from this - /// chain. - #[prost(bool, tag = "1")] - pub send_enabled: bool, - /// receive_enabled enables or disables all cross-chain token transfers to this - /// chain. - #[prost(bool, tag = "2")] - pub receive_enabled: bool, -} -/// GenesisState defines the ibc-transfer genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.GenesisState")] -pub struct GenesisState { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub denom_traces: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub params: ::core::option::Option, - /// total_escrowed contains the total amount of tokens escrowed - /// by the transfer module - #[prost(message, repeated, tag = "4")] - pub total_escrowed: - ::prost::alloc::vec::Vec, -} -/// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryDenomTraceRequest")] -#[proto_query( - path = "/ibc.applications.transfer.v1.Query/DenomTrace", - response_type = QueryDenomTraceResponse -)] -pub struct QueryDenomTraceRequest { - /// hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. - #[prost(string, tag = "1")] - pub hash: ::prost::alloc::string::String, -} -/// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryDenomTraceResponse")] -pub struct QueryDenomTraceResponse { - /// denom_trace returns the requested denomination trace information. - #[prost(message, optional, tag = "1")] - pub denom_trace: ::core::option::Option, -} -/// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryDenomTracesRequest")] -#[proto_query( - path = "/ibc.applications.transfer.v1.Query/DenomTraces", - response_type = QueryDenomTracesResponse -)] -pub struct QueryDenomTracesRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryDenomTracesResponse")] -pub struct QueryDenomTracesResponse { - /// denom_traces returns all denominations trace information. - #[prost(message, repeated, tag = "1")] - pub denom_traces: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryParamsRequest")] -#[proto_query( - path = "/ibc.applications.transfer.v1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryDenomHashRequest is the request type for the Query/DenomHash RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryDenomHashRequest")] -#[proto_query( - path = "/ibc.applications.transfer.v1.Query/DenomHash", - response_type = QueryDenomHashResponse -)] -pub struct QueryDenomHashRequest { - /// The denomination trace (\[port_id]/[channel_id])+/[denom\] - #[prost(string, tag = "1")] - pub trace: ::prost::alloc::string::String, -} -/// QueryDenomHashResponse is the response type for the Query/DenomHash RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryDenomHashResponse")] -pub struct QueryDenomHashResponse { - /// hash (in hex format) of the denomination trace information. - #[prost(string, tag = "1")] - pub hash: ::prost::alloc::string::String, -} -/// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryEscrowAddressRequest")] -#[proto_query( - path = "/ibc.applications.transfer.v1.Query/EscrowAddress", - response_type = QueryEscrowAddressResponse -)] -pub struct QueryEscrowAddressRequest { - /// unique port identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// unique channel identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryEscrowAddressResponse")] -pub struct QueryEscrowAddressResponse { - /// the escrow account address - #[prost(string, tag = "1")] - pub escrow_address: ::prost::alloc::string::String, -} -/// QueryTotalEscrowForDenomRequest is the request type for TotalEscrowForDenom RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest")] -#[proto_query( - path = "/ibc.applications.transfer.v1.Query/TotalEscrowForDenom", - response_type = QueryTotalEscrowForDenomResponse -)] -pub struct QueryTotalEscrowForDenomRequest { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, -} -/// QueryTotalEscrowForDenomResponse is the response type for TotalEscrowForDenom RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse")] -pub struct QueryTotalEscrowForDenomResponse { - #[prost(message, optional, tag = "1")] - pub amount: ::core::option::Option, -} -/// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between -/// ICS20 enabled chains. See ICS Spec here: -/// -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.MsgTransfer")] -pub struct MsgTransfer { - /// the port on which the packet will be sent - #[prost(string, tag = "1")] - pub source_port: ::prost::alloc::string::String, - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub source_channel: ::prost::alloc::string::String, - /// the tokens to be transferred - #[prost(message, optional, tag = "3")] - pub token: ::core::option::Option, - /// the sender address - #[prost(string, tag = "4")] - pub sender: ::prost::alloc::string::String, - /// the recipient address on the destination chain - #[prost(string, tag = "5")] - pub receiver: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(message, optional, tag = "6")] - pub timeout_height: ::core::option::Option, - /// Timeout timestamp in absolute nanoseconds since unix epoch. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timeout_timestamp: u64, - /// optional memo - #[prost(string, tag = "8")] - pub memo: ::prost::alloc::string::String, -} -/// MsgTransferResponse defines the Msg/Transfer response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.MsgTransferResponse")] -pub struct MsgTransferResponse { - /// sequence number of the transfer packet sent - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the transfer parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct TransferQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> TransferQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn denom_traces( - &self, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryDenomTracesRequest { pagination }.query(self.querier) - } - pub fn denom_trace( - &self, - hash: ::prost::alloc::string::String, - ) -> Result { - QueryDenomTraceRequest { hash }.query(self.querier) - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn denom_hash( - &self, - trace: ::prost::alloc::string::String, - ) -> Result { - QueryDenomHashRequest { trace }.query(self.querier) - } - pub fn escrow_address( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - ) -> Result { - QueryEscrowAddressRequest { - port_id, - channel_id, - } - .query(self.querier) - } - pub fn total_escrow_for_denom( - &self, - denom: ::prost::alloc::string::String, - ) -> Result { - QueryTotalEscrowForDenomRequest { denom }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/applications/transfer/v2.rs b/packages/neutron-sdk/src/proto_types/ibc/applications/transfer/v2.rs deleted file mode 100644 index 8ad23139..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/applications/transfer/v2.rs +++ /dev/null @@ -1,33 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// FungibleTokenPacketData defines a struct for the packet payload -/// See FungibleTokenPacketData spec: -/// -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.applications.transfer.v2.FungibleTokenPacketData")] -pub struct FungibleTokenPacketData { - /// the token denomination to be transferred - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - /// the token amount to be transferred - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, - /// the sender address - #[prost(string, tag = "3")] - pub sender: ::prost::alloc::string::String, - /// the recipient address on the destination chain - #[prost(string, tag = "4")] - pub receiver: ::prost::alloc::string::String, - /// optional memo - #[prost(string, tag = "5")] - pub memo: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/channel/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/core/channel/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/channel/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/channel/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/core/channel/v1.rs deleted file mode 100644 index 5b5f0c9b..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/channel/v1.rs +++ /dev/null @@ -1,2849 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Channel defines pipeline for exactly-once packet delivery between specific -/// modules on separate blockchains, which has at least one end capable of -/// sending packets and one end capable of receiving packets. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.Channel")] -pub struct Channel { - /// current state of the channel end - #[prost(enumeration = "State", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub state: i32, - /// whether the channel is ordered or unordered - #[prost(enumeration = "Order", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub ordering: i32, - /// counterparty channel end - #[prost(message, optional, tag = "3")] - pub counterparty: ::core::option::Option, - /// list of connection identifiers, in order, along which packets sent on - /// this channel will travel - #[prost(string, repeated, tag = "4")] - pub connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// opaque channel version, which is agreed upon during the handshake - #[prost(string, tag = "5")] - pub version: ::prost::alloc::string::String, - /// upgrade sequence indicates the latest upgrade attempt performed by this channel - /// the value of 0 indicates the channel has never been upgraded - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub upgrade_sequence: u64, -} -/// IdentifiedChannel defines a channel with additional port and channel -/// identifier fields. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.IdentifiedChannel")] -pub struct IdentifiedChannel { - /// current state of the channel end - #[prost(enumeration = "State", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub state: i32, - /// whether the channel is ordered or unordered - #[prost(enumeration = "Order", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub ordering: i32, - /// counterparty channel end - #[prost(message, optional, tag = "3")] - pub counterparty: ::core::option::Option, - /// list of connection identifiers, in order, along which packets sent on - /// this channel will travel - #[prost(string, repeated, tag = "4")] - pub connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// opaque channel version, which is agreed upon during the handshake - #[prost(string, tag = "5")] - pub version: ::prost::alloc::string::String, - /// port identifier - #[prost(string, tag = "6")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel identifier - #[prost(string, tag = "7")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// upgrade sequence indicates the latest upgrade attempt performed by this channel - /// the value of 0 indicates the channel has never been upgraded - #[prost(uint64, tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub upgrade_sequence: u64, -} -/// Counterparty defines a channel end counterparty -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.Counterparty")] -pub struct Counterparty { - /// port on the counterparty chain which owns the other end of the channel. - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel end on the counterparty chain - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// Packet defines a type that carries data across different chains through IBC -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.Packet")] -pub struct Packet { - /// number corresponds to the order of sends and receives, where a Packet - /// with an earlier sequence number must be sent and received before a Packet - /// with a later sequence number. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - /// identifies the port on the sending chain. - #[prost(string, tag = "2")] - pub source_port: ::prost::alloc::string::String, - /// identifies the channel end on the sending chain. - #[prost(string, tag = "3")] - pub source_channel: ::prost::alloc::string::String, - /// identifies the port on the receiving chain. - #[prost(string, tag = "4")] - pub destination_port: ::prost::alloc::string::String, - /// identifies the channel end on the receiving chain. - #[prost(string, tag = "5")] - pub destination_channel: ::prost::alloc::string::String, - /// actual opaque bytes transferred directly to the application module - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - /// block height after which the packet times out - #[prost(message, optional, tag = "7")] - pub timeout_height: ::core::option::Option, - /// block timestamp (in nanoseconds) after which the packet times out - #[prost(uint64, tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timeout_timestamp: u64, -} -/// PacketState defines the generic type necessary to retrieve and store -/// packet commitments, acknowledgements, and receipts. -/// Caller is responsible for knowing the context necessary to interpret this -/// state as a commitment, acknowledgement, or a receipt. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.PacketState")] -pub struct PacketState { - /// channel port identifier. - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier. - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - /// embedded data that represents packet state. - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// PacketId is an identifer for a unique Packet -/// Source chains refer to packets by source port/channel -/// Destination chains refer to packets by destination port/channel -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.PacketId")] -pub struct PacketId { - /// channel port identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// Acknowledgement is the recommended acknowledgement format to be used by -/// app-specific protocols. -/// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental -/// conflicts with other protobuf message formats used for acknowledgements. -/// The first byte of any message with this format will be the non-ASCII values -/// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: -/// -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.Acknowledgement")] -pub struct Acknowledgement { - /// response contains either a result or an error and must be non-empty - #[prost(oneof = "acknowledgement::Response", tags = "21, 22")] - pub response: ::core::option::Option, -} -/// Nested message and enum types in `Acknowledgement`. -pub mod acknowledgement { - /// response contains either a result or an error and must be non-empty - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Response { - #[prost(bytes, tag = "21")] - Result(::prost::alloc::vec::Vec), - #[prost(string, tag = "22")] - Error(::prost::alloc::string::String), - } -} -/// Timeout defines an execution deadline structure for 04-channel handlers. -/// This includes packet lifecycle handlers as well as the upgrade handshake handlers. -/// A valid Timeout contains either one or both of a timestamp and block height (sequence). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.Timeout")] -pub struct Timeout { - /// block height after which the packet or upgrade times out - #[prost(message, optional, tag = "1")] - pub height: ::core::option::Option, - /// block timestamp (in nanoseconds) after which the packet or upgrade times out - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, -} -/// Params defines the set of IBC channel parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.Params")] -pub struct Params { - /// the relative timeout after which channel upgrades will time out. - #[prost(message, optional, tag = "1")] - pub upgrade_timeout: ::core::option::Option, -} -/// State defines if a channel is in one of the following states: -/// CLOSED, INIT, TRYOPEN, OPEN, FLUSHING, FLUSHCOMPLETE or UNINITIALIZED. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum State { - /// Default State - UninitializedUnspecified = 0, - /// A channel has just started the opening handshake. - Init = 1, - /// A channel has acknowledged the handshake step on the counterparty chain. - Tryopen = 2, - /// A channel has completed the handshake. Open channels are - /// ready to send and receive packets. - Open = 3, - /// A channel has been closed and can no longer be used to send or receive - /// packets. - Closed = 4, - /// A channel has just accepted the upgrade handshake attempt and is flushing in-flight packets. - Flushing = 5, - /// A channel has just completed flushing any in-flight packets. - Flushcomplete = 6, -} -impl State { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - State::UninitializedUnspecified => "STATE_UNINITIALIZED_UNSPECIFIED", - State::Init => "STATE_INIT", - State::Tryopen => "STATE_TRYOPEN", - State::Open => "STATE_OPEN", - State::Closed => "STATE_CLOSED", - State::Flushing => "STATE_FLUSHING", - State::Flushcomplete => "STATE_FLUSHCOMPLETE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "STATE_UNINITIALIZED_UNSPECIFIED" => Some(Self::UninitializedUnspecified), - "STATE_INIT" => Some(Self::Init), - "STATE_TRYOPEN" => Some(Self::Tryopen), - "STATE_OPEN" => Some(Self::Open), - "STATE_CLOSED" => Some(Self::Closed), - "STATE_FLUSHING" => Some(Self::Flushing), - "STATE_FLUSHCOMPLETE" => Some(Self::Flushcomplete), - _ => None, - } - } -} -/// Order defines if a channel is ORDERED or UNORDERED -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum Order { - /// zero-value for channel ordering - NoneUnspecified = 0, - /// packets can be delivered in any order, which may differ from the order in - /// which they were sent. - Unordered = 1, - /// packets are delivered exactly in the order which they were sent - Ordered = 2, -} -impl Order { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Order::NoneUnspecified => "ORDER_NONE_UNSPECIFIED", - Order::Unordered => "ORDER_UNORDERED", - Order::Ordered => "ORDER_ORDERED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ORDER_NONE_UNSPECIFIED" => Some(Self::NoneUnspecified), - "ORDER_UNORDERED" => Some(Self::Unordered), - "ORDER_ORDERED" => Some(Self::Ordered), - _ => None, - } - } -} -/// GenesisState defines the ibc channel submodule's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.GenesisState")] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub acknowledgements: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub commitments: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub receipts: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub send_sequences: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "6")] - pub recv_sequences: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "7")] - pub ack_sequences: ::prost::alloc::vec::Vec, - /// the sequence for the next generated channel identifier - #[prost(uint64, tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_channel_sequence: u64, - #[prost(message, optional, tag = "9")] - pub params: ::core::option::Option, -} -/// PacketSequence defines the genesis type necessary to retrieve and store -/// next send and receive sequences. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.PacketSequence")] -pub struct PacketSequence { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// Upgrade is a verifiable type which contains the relevant information -/// for an attempted upgrade. It provides the proposed changes to the channel -/// end, the timeout for this upgrade attempt and the next packet sequence -/// which allows the counterparty to efficiently know the highest sequence it has received. -/// The next sequence send is used for pruning and upgrading from unordered to ordered channels. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.Upgrade")] -pub struct Upgrade { - #[prost(message, optional, tag = "1")] - pub fields: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub timeout: ::core::option::Option, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_sequence_send: u64, -} -/// UpgradeFields are the fields in a channel end which may be changed -/// during a channel upgrade. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.UpgradeFields")] -pub struct UpgradeFields { - #[prost(enumeration = "Order", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub ordering: i32, - #[prost(string, repeated, tag = "2")] - pub connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, tag = "3")] - pub version: ::prost::alloc::string::String, -} -/// ErrorReceipt defines a type which encapsulates the upgrade sequence and error associated with the -/// upgrade handshake failure. When a channel upgrade handshake is aborted both chains are expected to increment to the -/// next sequence. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.ErrorReceipt")] -pub struct ErrorReceipt { - /// the channel upgrade sequence - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - /// the error message detailing the cause of failure - #[prost(string, tag = "2")] - pub message: ::prost::alloc::string::String, -} -/// QueryChannelRequest is the request type for the Query/Channel RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/Channel", - response_type = QueryChannelResponse -)] -pub struct QueryChannelRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryChannelResponse is the response type for the Query/Channel RPC method. -/// Besides the Channel end, it includes a proof and the height from which the -/// proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelResponse")] -pub struct QueryChannelResponse { - /// channel associated with the request identifiers - #[prost(message, optional, tag = "1")] - pub channel: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryChannelsRequest is the request type for the Query/Channels RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelsRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/Channels", - response_type = QueryChannelsResponse -)] -pub struct QueryChannelsRequest { - /// pagination request - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryChannelsResponse is the response type for the Query/Channels RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelsResponse")] -pub struct QueryChannelsResponse { - /// list of stored channels of the chain. - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryConnectionChannelsRequest is the request type for the -/// Query/QueryConnectionChannels RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryConnectionChannelsRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/ConnectionChannels", - response_type = QueryConnectionChannelsResponse -)] -pub struct QueryConnectionChannelsRequest { - /// connection unique identifier - #[prost(string, tag = "1")] - pub connection: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryConnectionChannelsResponse is the Response type for the -/// Query/QueryConnectionChannels RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryConnectionChannelsResponse")] -pub struct QueryConnectionChannelsResponse { - /// list of channels associated with a connection. - #[prost(message, repeated, tag = "1")] - pub channels: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryChannelClientStateRequest is the request type for the Query/ClientState -/// RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelClientStateRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/ChannelClientState", - response_type = QueryChannelClientStateResponse -)] -pub struct QueryChannelClientStateRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryChannelClientStateResponse is the Response type for the -/// Query/QueryChannelClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelClientStateResponse")] -pub struct QueryChannelClientStateResponse { - /// client state associated with the channel - #[prost(message, optional, tag = "1")] - pub identified_client_state: - ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryChannelConsensusStateRequest is the request type for the -/// Query/ConsensusState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelConsensusStateRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/ChannelConsensusState", - response_type = QueryChannelConsensusStateResponse -)] -pub struct QueryChannelConsensusStateRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// revision number of the consensus state - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision_number: u64, - /// revision height of the consensus state - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision_height: u64, -} -/// QueryChannelClientStateResponse is the Response type for the -/// Query/QueryChannelClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelConsensusStateResponse")] -pub struct QueryChannelConsensusStateResponse { - /// consensus state associated with the channel - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option, - /// client ID associated with the consensus state - #[prost(string, tag = "2")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, -} -/// QueryPacketCommitmentRequest is the request type for the -/// Query/PacketCommitment RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketCommitmentRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/PacketCommitment", - response_type = QueryPacketCommitmentResponse -)] -pub struct QueryPacketCommitmentRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// QueryPacketCommitmentResponse defines the client query response for a packet -/// which also includes a proof and the height from which the proof was -/// retrieved -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketCommitmentResponse")] -pub struct QueryPacketCommitmentResponse { - /// packet associated with the request fields - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub commitment: ::prost::alloc::vec::Vec, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryPacketCommitmentsRequest is the request type for the -/// Query/QueryPacketCommitments RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketCommitmentsRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/PacketCommitments", - response_type = QueryPacketCommitmentsResponse -)] -pub struct QueryPacketCommitmentsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryPacketCommitmentsResponse is the request type for the -/// Query/QueryPacketCommitments RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketCommitmentsResponse")] -pub struct QueryPacketCommitmentsResponse { - #[prost(message, repeated, tag = "1")] - pub commitments: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryPacketReceiptRequest is the request type for the -/// Query/PacketReceipt RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketReceiptRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/PacketReceipt", - response_type = QueryPacketReceiptResponse -)] -pub struct QueryPacketReceiptRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// QueryPacketReceiptResponse defines the client query response for a packet -/// receipt which also includes a proof, and the height from which the proof was -/// retrieved -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketReceiptResponse")] -pub struct QueryPacketReceiptResponse { - /// success flag for if receipt exists - #[prost(bool, tag = "2")] - pub received: bool, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, -} -/// QueryPacketAcknowledgementRequest is the request type for the -/// Query/PacketAcknowledgement RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketAcknowledgementRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/PacketAcknowledgement", - response_type = QueryPacketAcknowledgementResponse -)] -pub struct QueryPacketAcknowledgementRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// packet sequence - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// QueryPacketAcknowledgementResponse defines the client query response for a -/// packet which also includes a proof and the height from which the -/// proof was retrieved -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketAcknowledgementResponse")] -pub struct QueryPacketAcknowledgementResponse { - /// packet associated with the request fields - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub acknowledgement: ::prost::alloc::vec::Vec, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryPacketAcknowledgementsRequest is the request type for the -/// Query/QueryPacketCommitments RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketAcknowledgementsRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/PacketAcknowledgements", - response_type = QueryPacketAcknowledgementsResponse -)] -pub struct QueryPacketAcknowledgementsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - /// list of packet sequences - #[prost(uint64, repeated, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub packet_commitment_sequences: ::prost::alloc::vec::Vec, -} -/// QueryPacketAcknowledgemetsResponse is the request type for the -/// Query/QueryPacketAcknowledgements RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryPacketAcknowledgementsResponse")] -pub struct QueryPacketAcknowledgementsResponse { - #[prost(message, repeated, tag = "1")] - pub acknowledgements: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryUnreceivedPacketsRequest is the request type for the -/// Query/UnreceivedPackets RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryUnreceivedPacketsRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/UnreceivedPackets", - response_type = QueryUnreceivedPacketsResponse -)] -pub struct QueryUnreceivedPacketsRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// list of packet sequences - #[prost(uint64, repeated, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub packet_commitment_sequences: ::prost::alloc::vec::Vec, -} -/// QueryUnreceivedPacketsResponse is the response type for the -/// Query/UnreceivedPacketCommitments RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryUnreceivedPacketsResponse")] -pub struct QueryUnreceivedPacketsResponse { - /// list of unreceived packet sequences - #[prost(uint64, repeated, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub sequences: ::prost::alloc::vec::Vec, - /// query block height - #[prost(message, optional, tag = "2")] - pub height: ::core::option::Option, -} -/// QueryUnreceivedAcks is the request type for the -/// Query/UnreceivedAcks RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryUnreceivedAcksRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/UnreceivedAcks", - response_type = QueryUnreceivedAcksResponse -)] -pub struct QueryUnreceivedAcksRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// list of acknowledgement sequences - #[prost(uint64, repeated, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub packet_ack_sequences: ::prost::alloc::vec::Vec, -} -/// QueryUnreceivedAcksResponse is the response type for the -/// Query/UnreceivedAcks RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryUnreceivedAcksResponse")] -pub struct QueryUnreceivedAcksResponse { - /// list of unreceived acknowledgement sequences - #[prost(uint64, repeated, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub sequences: ::prost::alloc::vec::Vec, - /// query block height - #[prost(message, optional, tag = "2")] - pub height: ::core::option::Option, -} -/// QueryNextSequenceReceiveRequest is the request type for the -/// Query/QueryNextSequenceReceiveRequest RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryNextSequenceReceiveRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/NextSequenceReceive", - response_type = QueryNextSequenceReceiveResponse -)] -pub struct QueryNextSequenceReceiveRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// QuerySequenceResponse is the response type for the -/// Query/QueryNextSequenceReceiveResponse RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryNextSequenceReceiveResponse")] -pub struct QueryNextSequenceReceiveResponse { - /// next sequence receive number - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_sequence_receive: u64, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryNextSequenceSendRequest is the request type for the -/// Query/QueryNextSequenceSend RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryNextSequenceSendRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/NextSequenceSend", - response_type = QueryNextSequenceSendResponse -)] -pub struct QueryNextSequenceSendRequest { - /// port unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// channel unique identifier - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryNextSequenceSendResponse is the request type for the -/// Query/QueryNextSequenceSend RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryNextSequenceSendResponse")] -pub struct QueryNextSequenceSendResponse { - /// next sequence send number - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_sequence_send: u64, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryUpgradeErrorRequest is the request type for the Query/QueryUpgradeError RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryUpgradeErrorRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/UpgradeError", - response_type = QueryUpgradeErrorResponse -)] -pub struct QueryUpgradeErrorRequest { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryUpgradeErrorResponse is the response type for the Query/QueryUpgradeError RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryUpgradeErrorResponse")] -pub struct QueryUpgradeErrorResponse { - #[prost(message, optional, tag = "1")] - pub error_receipt: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryUpgradeRequest is the request type for the QueryUpgradeRequest RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryUpgradeRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/Upgrade", - response_type = QueryUpgradeResponse -)] -pub struct QueryUpgradeRequest { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// QueryUpgradeResponse is the response type for the QueryUpgradeResponse RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryUpgradeResponse")] -pub struct QueryUpgradeResponse { - #[prost(message, optional, tag = "1")] - pub upgrade: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryChannelParamsRequest is the request type for the Query/ChannelParams RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelParamsRequest")] -#[proto_query( - path = "/ibc.core.channel.v1.Query/ChannelParams", - response_type = QueryChannelParamsResponse -)] -pub struct QueryChannelParamsRequest {} -/// QueryChannelParamsResponse is the response type for the Query/ChannelParams RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.QueryChannelParamsResponse")] -pub struct QueryChannelParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It -/// is called by a relayer on Chain A. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelOpenInit")] -pub struct MsgChannelOpenInit { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub channel: ::core::option::Option, - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelOpenInitResponse")] -pub struct MsgChannelOpenInitResponse { - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub version: ::prost::alloc::string::String, -} -/// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel -/// on Chain B. The version field within the Channel field has been deprecated. Its -/// value will be ignored by core IBC. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelOpenTry")] -pub struct MsgChannelOpenTry { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - /// Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. - #[deprecated] - #[prost(string, tag = "2")] - #[serde(alias = "previous_channelID")] - pub previous_channel_id: ::prost::alloc::string::String, - /// NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. - #[prost(message, optional, tag = "3")] - pub channel: ::core::option::Option, - #[prost(string, tag = "4")] - pub counterparty_version: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_init: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelOpenTryResponse")] -pub struct MsgChannelOpenTryResponse { - #[prost(string, tag = "1")] - pub version: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, -} -/// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge -/// the change of channel state to TRYOPEN on Chain B. -/// WARNING: a channel upgrade MUST NOT initialize an upgrade for this channel -/// in the same block as executing this message otherwise the counterparty will -/// be incapable of opening. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelOpenAck")] -pub struct MsgChannelOpenAck { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - #[serde(alias = "counterparty_channelID")] - pub counterparty_channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub counterparty_version: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_try: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelOpenAckResponse")] -pub struct MsgChannelOpenAckResponse {} -/// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to -/// acknowledge the change of channel state to OPEN on Chain A. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelOpenConfirm")] -pub struct MsgChannelOpenConfirm { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_ack: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse")] -pub struct MsgChannelOpenConfirmResponse {} -/// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A -/// to close a channel with Chain B. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelCloseInit")] -pub struct MsgChannelCloseInit { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelCloseInitResponse")] -pub struct MsgChannelCloseInitResponse {} -/// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B -/// to acknowledge the change of channel state to CLOSED on Chain A. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelCloseConfirm")] -pub struct MsgChannelCloseConfirm { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_init: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub counterparty_upgrade_sequence: u64, -} -/// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse")] -pub struct MsgChannelCloseConfirmResponse {} -/// MsgRecvPacket receives incoming IBC packet -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgRecvPacket")] -pub struct MsgRecvPacket { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_commitment: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, -} -/// MsgRecvPacketResponse defines the Msg/RecvPacket response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgRecvPacketResponse")] -pub struct MsgRecvPacketResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, -} -/// MsgTimeout receives timed-out packet -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgTimeout")] -pub struct MsgTimeout { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_unreceived: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_sequence_recv: u64, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -/// MsgTimeoutResponse defines the Msg/Timeout response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgTimeoutResponse")] -pub struct MsgTimeoutResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, -} -/// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgTimeoutOnClose")] -pub struct MsgTimeoutOnClose { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_unreceived: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_close: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_sequence_recv: u64, - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, - #[prost(uint64, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub counterparty_upgrade_sequence: u64, -} -/// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse")] -pub struct MsgTimeoutOnCloseResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, -} -/// MsgAcknowledgement receives incoming IBC acknowledgement -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgAcknowledgement")] -pub struct MsgAcknowledgement { - #[prost(message, optional, tag = "1")] - pub packet: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub acknowledgement: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_acked: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -/// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgAcknowledgementResponse")] -pub struct MsgAcknowledgementResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, -} -/// MsgChannelUpgradeInit defines the request type for the ChannelUpgradeInit rpc -/// WARNING: Initializing a channel upgrade in the same block as opening the channel -/// may result in the counterparty being incapable of opening. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeInit")] -pub struct MsgChannelUpgradeInit { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub fields: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelUpgradeInitResponse defines the MsgChannelUpgradeInit response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeInitResponse")] -pub struct MsgChannelUpgradeInitResponse { - #[prost(message, optional, tag = "1")] - pub upgrade: ::core::option::Option, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub upgrade_sequence: u64, -} -/// MsgChannelUpgradeTry defines the request type for the ChannelUpgradeTry rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeTry")] -pub struct MsgChannelUpgradeTry { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "3")] - pub proposed_upgrade_connection_hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(message, optional, tag = "4")] - pub counterparty_upgrade_fields: ::core::option::Option, - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub counterparty_upgrade_sequence: u64, - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_upgrade: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "8")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "9")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelUpgradeTryResponse defines the MsgChannelUpgradeTry response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeTryResponse")] -pub struct MsgChannelUpgradeTryResponse { - #[prost(message, optional, tag = "1")] - pub upgrade: ::core::option::Option, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub upgrade_sequence: u64, - #[prost(enumeration = "ResponseResultType", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, -} -/// MsgChannelUpgradeAck defines the request type for the ChannelUpgradeAck rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeAck")] -pub struct MsgChannelUpgradeAck { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub counterparty_upgrade: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_upgrade: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelUpgradeAckResponse defines MsgChannelUpgradeAck response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeAckResponse")] -pub struct MsgChannelUpgradeAckResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, -} -/// MsgChannelUpgradeConfirm defines the request type for the ChannelUpgradeConfirm rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeConfirm")] -pub struct MsgChannelUpgradeConfirm { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(enumeration = "State", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub counterparty_channel_state: i32, - #[prost(message, optional, tag = "4")] - pub counterparty_upgrade: ::core::option::Option, - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_upgrade: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "7")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "8")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelUpgradeConfirmResponse defines MsgChannelUpgradeConfirm response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeConfirmResponse")] -pub struct MsgChannelUpgradeConfirmResponse { - #[prost(enumeration = "ResponseResultType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, -} -/// MsgChannelUpgradeOpen defines the request type for the ChannelUpgradeOpen rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeOpen")] -pub struct MsgChannelUpgradeOpen { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(enumeration = "State", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub counterparty_channel_state: i32, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub counterparty_upgrade_sequence: u64, - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "6")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "7")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelUpgradeOpenResponse defines the MsgChannelUpgradeOpen response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeOpenResponse")] -pub struct MsgChannelUpgradeOpenResponse {} -/// MsgChannelUpgradeTimeout defines the request type for the ChannelUpgradeTimeout rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeTimeout")] -pub struct MsgChannelUpgradeTimeout { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub counterparty_channel: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_channel: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "5")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelUpgradeTimeoutRepsonse defines the MsgChannelUpgradeTimeout response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeTimeoutResponse")] -pub struct MsgChannelUpgradeTimeoutResponse {} -/// MsgChannelUpgradeCancel defines the request type for the ChannelUpgradeCancel rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeCancel")] -pub struct MsgChannelUpgradeCancel { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub error_receipt: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_error_receipt: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "5")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, -} -/// MsgChannelUpgradeCancelResponse defines the MsgChannelUpgradeCancel response type -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgChannelUpgradeCancelResponse")] -pub struct MsgChannelUpgradeCancelResponse {} -/// MsgUpdateParams is the MsgUpdateParams request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address that controls the module (defaults to x/gov unless overwritten). - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the channel parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -/// MsgPruneAcknowledgements defines the request type for the PruneAcknowledgements rpc. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgPruneAcknowledgements")] -pub struct MsgPruneAcknowledgements { - #[prost(string, tag = "1")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub limit: u64, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, -} -/// MsgPruneAcknowledgementsResponse defines the response type for the PruneAcknowledgements rpc. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.channel.v1.MsgPruneAcknowledgementsResponse")] -pub struct MsgPruneAcknowledgementsResponse { - /// Number of sequences pruned (includes both packet acknowledgements and packet receipts where appropriate). - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total_pruned_sequences: u64, - /// Number of sequences left after pruning. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total_remaining_sequences: u64, -} -/// ResponseResultType defines the possible outcomes of the execution of a message -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum ResponseResultType { - /// Default zero value enumeration - Unspecified = 0, - /// The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - Noop = 1, - /// The message was executed successfully - Success = 2, - /// The message was executed unsuccessfully - Failure = 3, -} -impl ResponseResultType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ResponseResultType::Unspecified => "RESPONSE_RESULT_TYPE_UNSPECIFIED", - ResponseResultType::Noop => "RESPONSE_RESULT_TYPE_NOOP", - ResponseResultType::Success => "RESPONSE_RESULT_TYPE_SUCCESS", - ResponseResultType::Failure => "RESPONSE_RESULT_TYPE_FAILURE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "RESPONSE_RESULT_TYPE_UNSPECIFIED" => Some(Self::Unspecified), - "RESPONSE_RESULT_TYPE_NOOP" => Some(Self::Noop), - "RESPONSE_RESULT_TYPE_SUCCESS" => Some(Self::Success), - "RESPONSE_RESULT_TYPE_FAILURE" => Some(Self::Failure), - _ => None, - } - } -} -pub struct ChannelQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> ChannelQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn channel( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - ) -> Result { - QueryChannelRequest { - port_id, - channel_id, - } - .query(self.querier) - } - pub fn channels( - &self, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryChannelsRequest { pagination }.query(self.querier) - } - pub fn connection_channels( - &self, - connection: ::prost::alloc::string::String, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryConnectionChannelsRequest { - connection, - pagination, - } - .query(self.querier) - } - pub fn channel_client_state( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - ) -> Result { - QueryChannelClientStateRequest { - port_id, - channel_id, - } - .query(self.querier) - } - pub fn channel_consensus_state( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - revision_number: u64, - revision_height: u64, - ) -> Result { - QueryChannelConsensusStateRequest { - port_id, - channel_id, - revision_number, - revision_height, - } - .query(self.querier) - } - pub fn packet_commitment( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - sequence: u64, - ) -> Result { - QueryPacketCommitmentRequest { - port_id, - channel_id, - sequence, - } - .query(self.querier) - } - pub fn packet_commitments( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryPacketCommitmentsRequest { - port_id, - channel_id, - pagination, - } - .query(self.querier) - } - pub fn packet_receipt( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - sequence: u64, - ) -> Result { - QueryPacketReceiptRequest { - port_id, - channel_id, - sequence, - } - .query(self.querier) - } - pub fn packet_acknowledgement( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - sequence: u64, - ) -> Result { - QueryPacketAcknowledgementRequest { - port_id, - channel_id, - sequence, - } - .query(self.querier) - } - pub fn packet_acknowledgements( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - packet_commitment_sequences: ::prost::alloc::vec::Vec, - ) -> Result { - QueryPacketAcknowledgementsRequest { - port_id, - channel_id, - pagination, - packet_commitment_sequences, - } - .query(self.querier) - } - pub fn unreceived_packets( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - packet_commitment_sequences: ::prost::alloc::vec::Vec, - ) -> Result { - QueryUnreceivedPacketsRequest { - port_id, - channel_id, - packet_commitment_sequences, - } - .query(self.querier) - } - pub fn unreceived_acks( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - packet_ack_sequences: ::prost::alloc::vec::Vec, - ) -> Result { - QueryUnreceivedAcksRequest { - port_id, - channel_id, - packet_ack_sequences, - } - .query(self.querier) - } - pub fn next_sequence_receive( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - ) -> Result { - QueryNextSequenceReceiveRequest { - port_id, - channel_id, - } - .query(self.querier) - } - pub fn next_sequence_send( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - ) -> Result { - QueryNextSequenceSendRequest { - port_id, - channel_id, - } - .query(self.querier) - } - pub fn upgrade_error( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - ) -> Result { - QueryUpgradeErrorRequest { - port_id, - channel_id, - } - .query(self.querier) - } - pub fn upgrade( - &self, - port_id: ::prost::alloc::string::String, - channel_id: ::prost::alloc::string::String, - ) -> Result { - QueryUpgradeRequest { - port_id, - channel_id, - } - .query(self.querier) - } - pub fn channel_params(&self) -> Result { - QueryChannelParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/client/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/core/client/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/client/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/client/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/core/client/v1.rs deleted file mode 100644 index 137c2650..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/client/v1.rs +++ /dev/null @@ -1,1106 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// IdentifiedClientState defines a client state with an additional client -/// identifier field. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.IdentifiedClientState")] -pub struct IdentifiedClientState { - /// client identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// client state - #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option, -} -/// ConsensusStateWithHeight defines a consensus state with an additional height -/// field. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.ConsensusStateWithHeight")] -pub struct ConsensusStateWithHeight { - /// consensus state height - #[prost(message, optional, tag = "1")] - pub height: ::core::option::Option, - /// consensus state - #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option, -} -/// ClientConsensusStates defines all the stored consensus states for a given -/// client. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.ClientConsensusStates")] -pub struct ClientConsensusStates { - /// client identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// consensus states and their heights associated with the client - #[prost(message, repeated, tag = "2")] - pub consensus_states: ::prost::alloc::vec::Vec, -} -/// Height is a monotonically increasing data type -/// that can be compared against another Height for the purposes of updating and -/// freezing clients -/// -/// Normally the RevisionHeight is incremented at each height while keeping -/// RevisionNumber the same. However some consensus algorithms may choose to -/// reset the height in certain conditions e.g. hard forks, state-machine -/// breaking changes In these cases, the RevisionNumber is incremented so that -/// height continues to be monitonically increasing even as the RevisionHeight -/// gets reset -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.Height")] -pub struct Height { - /// the revision that the client is currently on - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision_number: u64, - /// the height within the given revision - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision_height: u64, -} -/// Params defines the set of IBC light client parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.Params")] -pub struct Params { - /// allowed_clients defines the list of allowed client state types which can be created - /// and interacted with. If a client type is removed from the allowed clients list, usage - /// of this client will be disabled until it is added again to the list. - #[prost(string, repeated, tag = "1")] - pub allowed_clients: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// ClientUpdateProposal is a legacy governance proposal. If it passes, the substitute -/// client's latest consensus state is copied over to the subject client. The proposal -/// handler may fail if the subject and the substitute do not match in client and -/// chain parameters (with exception to latest height, frozen height, and chain-id). -/// -/// Deprecated: Please use MsgRecoverClient in favour of this message type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.ClientUpdateProposal")] -#[deprecated] -pub struct ClientUpdateProposal { - /// the title of the update proposal - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - /// the description of the proposal - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - /// the client identifier for the client to be updated if the proposal passes - #[prost(string, tag = "3")] - #[serde(alias = "subject_clientID")] - pub subject_client_id: ::prost::alloc::string::String, - /// the substitute client identifier for the client standing in for the subject - /// client - #[prost(string, tag = "4")] - #[serde(alias = "substitute_clientID")] - pub substitute_client_id: ::prost::alloc::string::String, -} -/// UpgradeProposal is a gov Content type for initiating an IBC breaking -/// upgrade. -/// -/// Deprecated: Please use MsgIBCSoftwareUpgrade in favour of this message type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.UpgradeProposal")] -#[deprecated] -pub struct UpgradeProposal { - #[prost(string, tag = "1")] - pub title: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub plan: ::core::option::Option, - /// An UpgradedClientState must be provided to perform an IBC breaking upgrade. - /// This will make the chain commit to the correct upgraded (self) client state - /// before the upgrade occurs, so that connecting chains can verify that the - /// new upgraded client is valid by verifying a proof on the previous version - /// of the chain. This will allow IBC connections to persist smoothly across - /// planned chain upgrades - #[prost(message, optional, tag = "4")] - pub upgraded_client_state: ::core::option::Option, -} -/// GenesisState defines the ibc client submodule's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.GenesisState")] -pub struct GenesisState { - /// client states with their corresponding identifiers - #[prost(message, repeated, tag = "1")] - pub clients: ::prost::alloc::vec::Vec, - /// consensus states from each client - #[prost(message, repeated, tag = "2")] - pub clients_consensus: ::prost::alloc::vec::Vec, - /// metadata from each client - #[prost(message, repeated, tag = "3")] - pub clients_metadata: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, - /// Deprecated: create_localhost has been deprecated. - /// The localhost client is automatically created at genesis. - #[deprecated] - #[prost(bool, tag = "5")] - pub create_localhost: bool, - /// the sequence for the next generated client identifier - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_client_sequence: u64, -} -/// GenesisMetadata defines the genesis type for metadata that clients may return -/// with ExportMetadata -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.GenesisMetadata")] -pub struct GenesisMetadata { - /// store key of metadata without clientID-prefix - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - /// metadata value - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, -} -/// IdentifiedGenesisMetadata has the client metadata with the corresponding -/// client id. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.IdentifiedGenesisMetadata")] -pub struct IdentifiedGenesisMetadata { - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub client_metadata: ::prost::alloc::vec::Vec, -} -/// QueryClientStateRequest is the request type for the Query/ClientState RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryClientStateRequest")] -#[proto_query( - path = "/ibc.core.client.v1.Query/ClientState", - response_type = QueryClientStateResponse -)] -pub struct QueryClientStateRequest { - /// client state unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, -} -/// QueryClientStateResponse is the response type for the Query/ClientState RPC -/// method. Besides the client state, it includes a proof and the height from -/// which the proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryClientStateResponse")] -pub struct QueryClientStateResponse { - /// client state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub client_state: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryClientStatesRequest is the request type for the Query/ClientStates RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryClientStatesRequest")] -#[proto_query( - path = "/ibc.core.client.v1.Query/ClientStates", - response_type = QueryClientStatesResponse -)] -pub struct QueryClientStatesRequest { - /// pagination request - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryClientStatesResponse is the response type for the Query/ClientStates RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryClientStatesResponse")] -pub struct QueryClientStatesResponse { - /// list of stored ClientStates of the chain. - #[prost(message, repeated, tag = "1")] - pub client_states: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryConsensusStateRequest is the request type for the Query/ConsensusState -/// RPC method. Besides the consensus state, it includes a proof and the height -/// from which the proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryConsensusStateRequest")] -#[proto_query( - path = "/ibc.core.client.v1.Query/ConsensusState", - response_type = QueryConsensusStateResponse -)] -pub struct QueryConsensusStateRequest { - /// client identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// consensus state revision number - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision_number: u64, - /// consensus state revision height - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision_height: u64, - /// latest_height overrrides the height field and queries the latest stored - /// ConsensusState - #[prost(bool, tag = "4")] - pub latest_height: bool, -} -/// QueryConsensusStateResponse is the response type for the Query/ConsensusState -/// RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryConsensusStateResponse")] -pub struct QueryConsensusStateResponse { - /// consensus state associated with the client identifier at the given height - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryConsensusStatesRequest")] -#[proto_query( - path = "/ibc.core.client.v1.Query/ConsensusStates", - response_type = QueryConsensusStatesResponse -)] -pub struct QueryConsensusStatesRequest { - /// client identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryConsensusStatesResponse is the response type for the -/// Query/ConsensusStates RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryConsensusStatesResponse")] -pub struct QueryConsensusStatesResponse { - /// consensus states associated with the identifier - #[prost(message, repeated, tag = "1")] - pub consensus_states: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryConsensusStateHeightsRequest")] -#[proto_query( - path = "/ibc.core.client.v1.Query/ConsensusStateHeights", - response_type = QueryConsensusStateHeightsResponse -)] -pub struct QueryConsensusStateHeightsRequest { - /// client identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// pagination request - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryConsensusStateHeightsResponse is the response type for the -/// Query/ConsensusStateHeights RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryConsensusStateHeightsResponse")] -pub struct QueryConsensusStateHeightsResponse { - /// consensus state heights - #[prost(message, repeated, tag = "1")] - pub consensus_state_heights: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryClientStatusRequest")] -#[proto_query( - path = "/ibc.core.client.v1.Query/ClientStatus", - response_type = QueryClientStatusResponse -)] -pub struct QueryClientStatusRequest { - /// client unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, -} -/// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC -/// method. It returns the current status of the IBC client. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryClientStatusResponse")] -pub struct QueryClientStatusResponse { - #[prost(string, tag = "1")] - pub status: ::prost::alloc::string::String, -} -/// QueryClientParamsRequest is the request type for the Query/ClientParams RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryClientParamsRequest")] -#[proto_query( - path = "/ibc.core.client.v1.Query/ClientParams", - response_type = QueryClientParamsResponse -)] -pub struct QueryClientParamsRequest {} -/// QueryClientParamsResponse is the response type for the Query/ClientParams RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryClientParamsResponse")] -pub struct QueryClientParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryUpgradedClientStateRequest is the request type for the -/// Query/UpgradedClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryUpgradedClientStateRequest")] -#[proto_query( - path = "/ibc.core.client.v1.Query/UpgradedClientState", - response_type = QueryUpgradedClientStateResponse -)] -pub struct QueryUpgradedClientStateRequest {} -/// QueryUpgradedClientStateResponse is the response type for the -/// Query/UpgradedClientState RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryUpgradedClientStateResponse")] -pub struct QueryUpgradedClientStateResponse { - /// client state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub upgraded_client_state: ::core::option::Option, -} -/// QueryUpgradedConsensusStateRequest is the request type for the -/// Query/UpgradedConsensusState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryUpgradedConsensusStateRequest")] -#[proto_query( - path = "/ibc.core.client.v1.Query/UpgradedConsensusState", - response_type = QueryUpgradedConsensusStateResponse -)] -pub struct QueryUpgradedConsensusStateRequest {} -/// QueryUpgradedConsensusStateResponse is the response type for the -/// Query/UpgradedConsensusState RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.QueryUpgradedConsensusStateResponse")] -pub struct QueryUpgradedConsensusStateResponse { - /// Consensus state associated with the request identifier - #[prost(message, optional, tag = "1")] - pub upgraded_consensus_state: ::core::option::Option, -} -/// MsgCreateClient defines a message to create an IBC client -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgCreateClient")] -pub struct MsgCreateClient { - /// light client state - #[prost(message, optional, tag = "1")] - pub client_state: ::core::option::Option, - /// consensus state associated with the client that corresponds to a given - /// height. - #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgCreateClientResponse defines the Msg/CreateClient response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgCreateClientResponse")] -pub struct MsgCreateClientResponse {} -/// MsgUpdateClient defines an sdk.Msg to update a IBC client state using -/// the given client message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgUpdateClient")] -pub struct MsgUpdateClient { - /// client unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// client message to update the light client - #[prost(message, optional, tag = "2")] - pub client_message: ::core::option::Option, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgUpdateClientResponse defines the Msg/UpdateClient response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgUpdateClientResponse")] -pub struct MsgUpdateClientResponse {} -/// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client -/// state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgUpgradeClient")] -pub struct MsgUpgradeClient { - /// client unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// upgraded client state - #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option, - /// upgraded consensus state, only contains enough information to serve as a - /// basis of trust in update logic - #[prost(message, optional, tag = "3")] - pub consensus_state: ::core::option::Option, - /// proof that old chain committed to new client - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_upgrade_client: ::prost::alloc::vec::Vec, - /// proof that old chain committed to new consensus state - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_upgrade_consensus_state: ::prost::alloc::vec::Vec, - /// signer address - #[prost(string, tag = "6")] - pub signer: ::prost::alloc::string::String, -} -/// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgUpgradeClientResponse")] -pub struct MsgUpgradeClientResponse {} -/// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -/// light client misbehaviour. -/// This message has been deprecated. Use MsgUpdateClient instead. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgSubmitMisbehaviour")] -#[deprecated] -pub struct MsgSubmitMisbehaviour { - /// client unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// misbehaviour used for freezing the light client - #[prost(message, optional, tag = "2")] - pub misbehaviour: ::core::option::Option, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgSubmitMisbehaviourResponse")] -pub struct MsgSubmitMisbehaviourResponse {} -/// MsgRecoverClient defines the message used to recover a frozen or expired client. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgRecoverClient")] -pub struct MsgRecoverClient { - /// the client identifier for the client to be updated if the proposal passes - #[prost(string, tag = "1")] - #[serde(alias = "subject_clientID")] - pub subject_client_id: ::prost::alloc::string::String, - /// the substitute client identifier for the client which will replace the subject - /// client - #[prost(string, tag = "2")] - #[serde(alias = "substitute_clientID")] - pub substitute_client_id: ::prost::alloc::string::String, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgRecoverClientResponse defines the Msg/RecoverClient response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgRecoverClientResponse")] -pub struct MsgRecoverClientResponse {} -/// MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgIBCSoftwareUpgrade")] -pub struct MsgIbcSoftwareUpgrade { - #[prost(message, optional, tag = "1")] - pub plan: ::core::option::Option, - /// An UpgradedClientState must be provided to perform an IBC breaking upgrade. - /// This will make the chain commit to the correct upgraded (self) client state - /// before the upgrade occurs, so that connecting chains can verify that the - /// new upgraded client is valid by verifying a proof on the previous version - /// of the chain. This will allow IBC connections to persist smoothly across - /// planned chain upgrades. Correspondingly, the UpgradedClientState field has been - /// deprecated in the Cosmos SDK to allow for this logic to exist solely in - /// the 02-client module. - #[prost(message, optional, tag = "2")] - pub upgraded_client_state: ::core::option::Option, - /// signer address - #[prost(string, tag = "3")] - pub signer: ::prost::alloc::string::String, -} -/// MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgIBCSoftwareUpgradeResponse")] -pub struct MsgIbcSoftwareUpgradeResponse {} -/// MsgUpdateParams defines the sdk.Msg type to update the client parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the client parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.client.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct ClientQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> ClientQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn client_state( - &self, - client_id: ::prost::alloc::string::String, - ) -> Result { - QueryClientStateRequest { client_id }.query(self.querier) - } - pub fn client_states( - &self, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryClientStatesRequest { pagination }.query(self.querier) - } - pub fn consensus_state( - &self, - client_id: ::prost::alloc::string::String, - revision_number: u64, - revision_height: u64, - latest_height: bool, - ) -> Result { - QueryConsensusStateRequest { - client_id, - revision_number, - revision_height, - latest_height, - } - .query(self.querier) - } - pub fn consensus_states( - &self, - client_id: ::prost::alloc::string::String, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryConsensusStatesRequest { - client_id, - pagination, - } - .query(self.querier) - } - pub fn consensus_state_heights( - &self, - client_id: ::prost::alloc::string::String, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryConsensusStateHeightsRequest { - client_id, - pagination, - } - .query(self.querier) - } - pub fn client_status( - &self, - client_id: ::prost::alloc::string::String, - ) -> Result { - QueryClientStatusRequest { client_id }.query(self.querier) - } - pub fn client_params(&self) -> Result { - QueryClientParamsRequest {}.query(self.querier) - } - pub fn upgraded_client_state( - &self, - ) -> Result { - QueryUpgradedClientStateRequest {}.query(self.querier) - } - pub fn upgraded_consensus_state( - &self, - ) -> Result { - QueryUpgradedConsensusStateRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/commitment/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/core/commitment/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/commitment/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/commitment/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/core/commitment/v1.rs deleted file mode 100644 index 8327cc9f..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/commitment/v1.rs +++ /dev/null @@ -1,87 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// MerkleRoot defines a merkle root hash. -/// In the Cosmos SDK, the AppHash of a block header becomes the root. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.commitment.v1.MerkleRoot")] -pub struct MerkleRoot { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, -} -/// MerklePrefix is merkle path prefixed to the key. -/// The constructed key from the Path and the key will be append(Path.KeyPath, -/// append(Path.KeyPrefix, key...)) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.commitment.v1.MerklePrefix")] -pub struct MerklePrefix { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key_prefix: ::prost::alloc::vec::Vec, -} -/// MerklePath is the path used to verify commitment proofs, which can be an -/// arbitrary structured object (defined by a commitment type). -/// MerklePath is represented from root-to-leaf -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.commitment.v1.MerklePath")] -pub struct MerklePath { - #[prost(string, repeated, tag = "1")] - pub key_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// MerkleProof is a wrapper type over a chain of CommitmentProofs. -/// It demonstrates membership or non-membership for an element or set of -/// elements, verifiable in conjunction with a known commitment root. Proofs -/// should be succinct. -/// MerkleProofs are ordered from leaf-to-root -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.commitment.v1.MerkleProof")] -pub struct MerkleProof { - #[prost(message, repeated, tag = "1")] - pub proofs: - ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/connection/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/core/connection/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/connection/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/connection/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/core/connection/v1.rs deleted file mode 100644 index 14417bff..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/connection/v1.rs +++ /dev/null @@ -1,930 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ConnectionEnd defines a stateful object on a chain connected to another -/// separate one. -/// NOTE: there must only be 2 defined ConnectionEnds to establish -/// a connection between two chains. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.ConnectionEnd")] -pub struct ConnectionEnd { - /// client associated with this connection. - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// IBC version which can be utilised to determine encodings or protocols for - /// channels or packets utilising this connection. - #[prost(message, repeated, tag = "2")] - pub versions: ::prost::alloc::vec::Vec, - /// current state of the connection end. - #[prost(enumeration = "State", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub state: i32, - /// counterparty chain associated with this connection. - #[prost(message, optional, tag = "4")] - pub counterparty: ::core::option::Option, - /// delay period that must pass before a consensus state can be used for - /// packet-verification NOTE: delay period logic is only implemented by some - /// clients. - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub delay_period: u64, -} -/// IdentifiedConnection defines a connection with additional connection -/// identifier field. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.IdentifiedConnection")] -pub struct IdentifiedConnection { - /// connection identifier. - #[prost(string, tag = "1")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, - /// client associated with this connection. - #[prost(string, tag = "2")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// IBC version which can be utilised to determine encodings or protocols for - /// channels or packets utilising this connection - #[prost(message, repeated, tag = "3")] - pub versions: ::prost::alloc::vec::Vec, - /// current state of the connection end. - #[prost(enumeration = "State", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub state: i32, - /// counterparty chain associated with this connection. - #[prost(message, optional, tag = "5")] - pub counterparty: ::core::option::Option, - /// delay period associated with this connection. - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub delay_period: u64, -} -/// Counterparty defines the counterparty chain associated with a connection end. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.Counterparty")] -pub struct Counterparty { - /// identifies the client on the counterparty chain associated with a given - /// connection. - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// identifies the connection end on the counterparty chain associated with a - /// given connection. - #[prost(string, tag = "2")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - /// commitment merkle prefix of the counterparty chain. - #[prost(message, optional, tag = "3")] - pub prefix: ::core::option::Option, -} -/// ClientPaths define all the connection paths for a client state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.ClientPaths")] -pub struct ClientPaths { - /// list of connection paths - #[prost(string, repeated, tag = "1")] - pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// ConnectionPaths define all the connection paths for a given client state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.ConnectionPaths")] -pub struct ConnectionPaths { - /// client state unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// list of connection paths - #[prost(string, repeated, tag = "2")] - pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Version defines the versioning scheme used to negotiate the IBC verison in -/// the connection handshake. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.Version")] -pub struct Version { - /// unique version identifier - #[prost(string, tag = "1")] - pub identifier: ::prost::alloc::string::String, - /// list of features compatible with the specified identifier - #[prost(string, repeated, tag = "2")] - pub features: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Params defines the set of Connection parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.Params")] -pub struct Params { - /// maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the - /// largest amount of time that the chain might reasonably take to produce the next block under normal operating - /// conditions. A safe choice is 3-5x the expected time per block. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_expected_time_per_block: u64, -} -/// State defines if a connection is in one of the following states: -/// INIT, TRYOPEN, OPEN or UNINITIALIZED. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum State { - /// Default State - UninitializedUnspecified = 0, - /// A connection end has just started the opening handshake. - Init = 1, - /// A connection end has acknowledged the handshake step on the counterparty - /// chain. - Tryopen = 2, - /// A connection end has completed the handshake. - Open = 3, -} -impl State { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - State::UninitializedUnspecified => "STATE_UNINITIALIZED_UNSPECIFIED", - State::Init => "STATE_INIT", - State::Tryopen => "STATE_TRYOPEN", - State::Open => "STATE_OPEN", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "STATE_UNINITIALIZED_UNSPECIFIED" => Some(Self::UninitializedUnspecified), - "STATE_INIT" => Some(Self::Init), - "STATE_TRYOPEN" => Some(Self::Tryopen), - "STATE_OPEN" => Some(Self::Open), - _ => None, - } - } -} -/// GenesisState defines the ibc connection submodule's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.GenesisState")] -pub struct GenesisState { - #[prost(message, repeated, tag = "1")] - pub connections: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "2")] - pub client_connection_paths: ::prost::alloc::vec::Vec, - /// the sequence for the next generated connection identifier - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_connection_sequence: u64, - #[prost(message, optional, tag = "4")] - pub params: ::core::option::Option, -} -/// QueryConnectionRequest is the request type for the Query/Connection RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionRequest")] -#[proto_query( - path = "/ibc.core.connection.v1.Query/Connection", - response_type = QueryConnectionResponse -)] -pub struct QueryConnectionRequest { - /// connection unique identifier - #[prost(string, tag = "1")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, -} -/// QueryConnectionResponse is the response type for the Query/Connection RPC -/// method. Besides the connection end, it includes a proof and the height from -/// which the proof was retrieved. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionResponse")] -pub struct QueryConnectionResponse { - /// connection associated with the request identifier - #[prost(message, optional, tag = "1")] - pub connection: ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryConnectionsRequest is the request type for the Query/Connections RPC -/// method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionsRequest")] -#[proto_query( - path = "/ibc.core.connection.v1.Query/Connections", - response_type = QueryConnectionsResponse -)] -pub struct QueryConnectionsRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryConnectionsResponse is the response type for the Query/Connections RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionsResponse")] -pub struct QueryConnectionsResponse { - /// list of stored connections of the chain. - #[prost(message, repeated, tag = "1")] - pub connections: ::prost::alloc::vec::Vec, - /// pagination response - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, - /// query block height - #[prost(message, optional, tag = "3")] - pub height: ::core::option::Option, -} -/// QueryClientConnectionsRequest is the request type for the -/// Query/ClientConnections RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryClientConnectionsRequest")] -#[proto_query( - path = "/ibc.core.connection.v1.Query/ClientConnections", - response_type = QueryClientConnectionsResponse -)] -pub struct QueryClientConnectionsRequest { - /// client identifier associated with a connection - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, -} -/// QueryClientConnectionsResponse is the response type for the -/// Query/ClientConnections RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryClientConnectionsResponse")] -pub struct QueryClientConnectionsResponse { - /// slice of all the connection paths associated with a client. - #[prost(string, repeated, tag = "1")] - pub connection_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was generated - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryConnectionClientStateRequest is the request type for the -/// Query/ConnectionClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionClientStateRequest")] -#[proto_query( - path = "/ibc.core.connection.v1.Query/ConnectionClientState", - response_type = QueryConnectionClientStateResponse -)] -pub struct QueryConnectionClientStateRequest { - /// connection identifier - #[prost(string, tag = "1")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, -} -/// QueryConnectionClientStateResponse is the response type for the -/// Query/ConnectionClientState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionClientStateResponse")] -pub struct QueryConnectionClientStateResponse { - /// client state associated with the channel - #[prost(message, optional, tag = "1")] - pub identified_client_state: - ::core::option::Option, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, -} -/// QueryConnectionConsensusStateRequest is the request type for the -/// Query/ConnectionConsensusState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionConsensusStateRequest")] -#[proto_query( - path = "/ibc.core.connection.v1.Query/ConnectionConsensusState", - response_type = QueryConnectionConsensusStateResponse -)] -pub struct QueryConnectionConsensusStateRequest { - /// connection identifier - #[prost(string, tag = "1")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision_number: u64, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision_height: u64, -} -/// QueryConnectionConsensusStateResponse is the response type for the -/// Query/ConnectionConsensusState RPC method -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionConsensusStateResponse")] -pub struct QueryConnectionConsensusStateResponse { - /// consensus state associated with the channel - #[prost(message, optional, tag = "1")] - pub consensus_state: ::core::option::Option, - /// client ID associated with the consensus state - #[prost(string, tag = "2")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// merkle proof of existence - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof: ::prost::alloc::vec::Vec, - /// height at which the proof was retrieved - #[prost(message, optional, tag = "4")] - pub proof_height: ::core::option::Option, -} -/// QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionParamsRequest")] -#[proto_query( - path = "/ibc.core.connection.v1.Query/ConnectionParams", - response_type = QueryConnectionParamsResponse -)] -pub struct QueryConnectionParamsRequest {} -/// QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.QueryConnectionParamsResponse")] -pub struct QueryConnectionParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgConnectionOpenInit defines the msg sent by an account on Chain A to -/// initialize a connection with Chain B. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgConnectionOpenInit")] -pub struct MsgConnectionOpenInit { - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub counterparty: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub delay_period: u64, - #[prost(string, tag = "5")] - pub signer: ::prost::alloc::string::String, -} -/// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response -/// type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgConnectionOpenInitResponse")] -pub struct MsgConnectionOpenInitResponse {} -/// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a -/// connection on Chain B. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgConnectionOpenTry")] -pub struct MsgConnectionOpenTry { - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. - #[deprecated] - #[prost(string, tag = "2")] - #[serde(alias = "previous_connectionID")] - pub previous_connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub client_state: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub counterparty: ::core::option::Option, - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub delay_period: u64, - #[prost(message, repeated, tag = "6")] - pub counterparty_versions: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "7")] - pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain A: `UNITIALIZED -> - /// INIT` - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_init: ::prost::alloc::vec::Vec, - /// proof of client state included in message - #[prost(bytes = "vec", tag = "9")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_client: ::prost::alloc::vec::Vec, - /// proof of client consensus state - #[prost(bytes = "vec", tag = "10")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_consensus: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "11")] - pub consensus_height: ::core::option::Option, - #[prost(string, tag = "12")] - pub signer: ::prost::alloc::string::String, - /// optional proof data for host state machines that are unable to introspect their own consensus state - #[prost(bytes = "vec", tag = "13")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub host_consensus_state_proof: ::prost::alloc::vec::Vec, -} -/// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgConnectionOpenTryResponse")] -pub struct MsgConnectionOpenTryResponse {} -/// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to -/// acknowledge the change of connection state to TRYOPEN on Chain B. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgConnectionOpenAck")] -pub struct MsgConnectionOpenAck { - #[prost(string, tag = "1")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "counterparty_connectionID")] - pub counterparty_connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub version: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub client_state: ::core::option::Option, - #[prost(message, optional, tag = "5")] - pub proof_height: ::core::option::Option, - /// proof of the initialization the connection on Chain B: `UNITIALIZED -> - /// TRYOPEN` - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_try: ::prost::alloc::vec::Vec, - /// proof of client state included in message - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_client: ::prost::alloc::vec::Vec, - /// proof of client consensus state - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_consensus: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "9")] - pub consensus_height: ::core::option::Option, - #[prost(string, tag = "10")] - pub signer: ::prost::alloc::string::String, - /// optional proof data for host state machines that are unable to introspect their own consensus state - #[prost(bytes = "vec", tag = "11")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub host_consensus_state_proof: ::prost::alloc::vec::Vec, -} -/// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgConnectionOpenAckResponse")] -pub struct MsgConnectionOpenAckResponse {} -/// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to -/// acknowledge the change of connection state to OPEN on Chain A. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgConnectionOpenConfirm")] -pub struct MsgConnectionOpenConfirm { - #[prost(string, tag = "1")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - /// proof for the change of the connection state on Chain A: `INIT -> OPEN` - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proof_ack: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof_height: ::core::option::Option, - #[prost(string, tag = "4")] - pub signer: ::prost::alloc::string::String, -} -/// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm -/// response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgConnectionOpenConfirmResponse")] -pub struct MsgConnectionOpenConfirmResponse {} -/// MsgUpdateParams defines the sdk.Msg type to update the connection parameters. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the connection parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.connection.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct ConnectionQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> ConnectionQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn connection( - &self, - connection_id: ::prost::alloc::string::String, - ) -> Result { - QueryConnectionRequest { connection_id }.query(self.querier) - } - pub fn connections( - &self, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryConnectionsRequest { pagination }.query(self.querier) - } - pub fn client_connections( - &self, - client_id: ::prost::alloc::string::String, - ) -> Result { - QueryClientConnectionsRequest { client_id }.query(self.querier) - } - pub fn connection_client_state( - &self, - connection_id: ::prost::alloc::string::String, - ) -> Result { - QueryConnectionClientStateRequest { connection_id }.query(self.querier) - } - pub fn connection_consensus_state( - &self, - connection_id: ::prost::alloc::string::String, - revision_number: u64, - revision_height: u64, - ) -> Result { - QueryConnectionConsensusStateRequest { - connection_id, - revision_number, - revision_height, - } - .query(self.querier) - } - pub fn connection_params( - &self, - ) -> Result { - QueryConnectionParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/core/mod.rs deleted file mode 100644 index 75c439f0..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub mod channel; -pub mod client; -pub mod commitment; -pub mod connection; -pub mod types; diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/types/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/core/types/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/types/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/core/types/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/core/types/v1.rs deleted file mode 100644 index 30fc4508..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/core/types/v1.rs +++ /dev/null @@ -1,25 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// GenesisState defines the ibc module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.core.types.v1.GenesisState")] -pub struct GenesisState { - /// ICS002 - Clients genesis state - #[prost(message, optional, tag = "1")] - pub client_genesis: ::core::option::Option, - /// ICS003 - Connections genesis state - #[prost(message, optional, tag = "2")] - pub connection_genesis: ::core::option::Option, - /// ICS004 - Channel genesis state - #[prost(message, optional, tag = "3")] - pub channel_genesis: ::core::option::Option, -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/localhost/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/localhost/mod.rs deleted file mode 100644 index 7083bd82..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/localhost/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v2; diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/localhost/v2.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/localhost/v2.rs deleted file mode 100644 index bfba5dbf..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/localhost/v2.rs +++ /dev/null @@ -1,19 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ClientState defines the 09-localhost client state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.localhost.v2.ClientState")] -pub struct ClientState { - /// the latest block height - #[prost(message, optional, tag = "1")] - pub latest_height: ::core::option::Option, -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/mod.rs deleted file mode 100644 index c8725b46..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod localhost; -pub mod solomachine; -pub mod tendermint; -pub mod wasm; diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/mod.rs deleted file mode 100644 index e55f7d1f..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod v2; -pub mod v3; diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/v2.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/v2.rs deleted file mode 100644 index ef99e51f..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/v2.rs +++ /dev/null @@ -1,528 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ClientState defines a solo machine client that tracks the current consensus -/// state and if the client is frozen. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.ClientState")] -pub struct ClientState { - /// latest sequence of the client state - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - /// frozen sequence of the solo machine - #[prost(bool, tag = "2")] - pub is_frozen: bool, - #[prost(message, optional, tag = "3")] - pub consensus_state: ::core::option::Option, - /// when set to true, will allow governance to update a solo machine client. - /// The client will be unfrozen if it is frozen. - #[prost(bool, tag = "4")] - pub allow_update_after_proposal: bool, -} -/// ConsensusState defines a solo machine consensus state. The sequence of a -/// consensus state is contained in the "height" key used in storing the -/// consensus state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.ConsensusState")] -pub struct ConsensusState { - /// public key of the solo machine - #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option, - /// diversifier allows the same public key to be re-used across different solo - /// machine clients (potentially on different chains) without being considered - /// misbehaviour. - #[prost(string, tag = "2")] - pub diversifier: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, -} -/// Header defines a solo machine consensus header -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.Header")] -pub struct Header { - /// sequence to update solo machine public key at - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub new_public_key: ::core::option::Option, - #[prost(string, tag = "5")] - pub new_diversifier: ::prost::alloc::string::String, -} -/// Misbehaviour defines misbehaviour for a solo machine which consists -/// of a sequence and two signatures over different messages at that sequence. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.Misbehaviour")] -pub struct Misbehaviour { - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - #[prost(message, optional, tag = "3")] - pub signature_one: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub signature_two: ::core::option::Option, -} -/// SignatureAndData contains a signature and the data signed over to create that -/// signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.SignatureAndData")] -pub struct SignatureAndData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, - #[prost(enumeration = "DataType", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub data_type: i32, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, -} -/// TimestampedSignatureData contains the signature data and the timestamp of the -/// signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.TimestampedSignatureData")] -pub struct TimestampedSignatureData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature_data: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, -} -/// SignBytes defines the signed bytes used for signature verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.SignBytes")] -pub struct SignBytes { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, - #[prost(string, tag = "3")] - pub diversifier: ::prost::alloc::string::String, - /// type of the data used - #[prost(enumeration = "DataType", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub data_type: i32, - /// marshaled data - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// HeaderData returns the SignBytes data for update verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.HeaderData")] -pub struct HeaderData { - /// header public key - #[prost(message, optional, tag = "1")] - pub new_pub_key: ::core::option::Option, - /// header diversifier - #[prost(string, tag = "2")] - pub new_diversifier: ::prost::alloc::string::String, -} -/// ClientStateData returns the SignBytes data for client state verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.ClientStateData")] -pub struct ClientStateData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub client_state: ::core::option::Option, -} -/// ConsensusStateData returns the SignBytes data for consensus state -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.ConsensusStateData")] -pub struct ConsensusStateData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub consensus_state: ::core::option::Option, -} -/// ConnectionStateData returns the SignBytes data for connection state -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.ConnectionStateData")] -pub struct ConnectionStateData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub connection: - ::core::option::Option, -} -/// ChannelStateData returns the SignBytes data for channel state -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.ChannelStateData")] -pub struct ChannelStateData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub channel: ::core::option::Option, -} -/// PacketCommitmentData returns the SignBytes data for packet commitment -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.PacketCommitmentData")] -pub struct PacketCommitmentData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub commitment: ::prost::alloc::vec::Vec, -} -/// PacketAcknowledgementData returns the SignBytes data for acknowledgement -/// verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.PacketAcknowledgementData")] -pub struct PacketAcknowledgementData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub acknowledgement: ::prost::alloc::vec::Vec, -} -/// PacketReceiptAbsenceData returns the SignBytes data for -/// packet receipt absence verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData")] -pub struct PacketReceiptAbsenceData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, -} -/// NextSequenceRecvData returns the SignBytes data for verification of the next -/// sequence to be received. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v2.NextSequenceRecvData")] -pub struct NextSequenceRecvData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_seq_recv: u64, -} -/// DataType defines the type of solo machine proof being created. This is done -/// to preserve uniqueness of different data sign byte encodings. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum DataType { - /// Default State - UninitializedUnspecified = 0, - /// Data type for client state verification - ClientState = 1, - /// Data type for consensus state verification - ConsensusState = 2, - /// Data type for connection state verification - ConnectionState = 3, - /// Data type for channel state verification - ChannelState = 4, - /// Data type for packet commitment verification - PacketCommitment = 5, - /// Data type for packet acknowledgement verification - PacketAcknowledgement = 6, - /// Data type for packet receipt absence verification - PacketReceiptAbsence = 7, - /// Data type for next sequence recv verification - NextSequenceRecv = 8, - /// Data type for header verification - Header = 9, -} -impl DataType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - DataType::UninitializedUnspecified => "DATA_TYPE_UNINITIALIZED_UNSPECIFIED", - DataType::ClientState => "DATA_TYPE_CLIENT_STATE", - DataType::ConsensusState => "DATA_TYPE_CONSENSUS_STATE", - DataType::ConnectionState => "DATA_TYPE_CONNECTION_STATE", - DataType::ChannelState => "DATA_TYPE_CHANNEL_STATE", - DataType::PacketCommitment => "DATA_TYPE_PACKET_COMMITMENT", - DataType::PacketAcknowledgement => "DATA_TYPE_PACKET_ACKNOWLEDGEMENT", - DataType::PacketReceiptAbsence => "DATA_TYPE_PACKET_RECEIPT_ABSENCE", - DataType::NextSequenceRecv => "DATA_TYPE_NEXT_SEQUENCE_RECV", - DataType::Header => "DATA_TYPE_HEADER", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "DATA_TYPE_UNINITIALIZED_UNSPECIFIED" => Some(Self::UninitializedUnspecified), - "DATA_TYPE_CLIENT_STATE" => Some(Self::ClientState), - "DATA_TYPE_CONSENSUS_STATE" => Some(Self::ConsensusState), - "DATA_TYPE_CONNECTION_STATE" => Some(Self::ConnectionState), - "DATA_TYPE_CHANNEL_STATE" => Some(Self::ChannelState), - "DATA_TYPE_PACKET_COMMITMENT" => Some(Self::PacketCommitment), - "DATA_TYPE_PACKET_ACKNOWLEDGEMENT" => Some(Self::PacketAcknowledgement), - "DATA_TYPE_PACKET_RECEIPT_ABSENCE" => Some(Self::PacketReceiptAbsence), - "DATA_TYPE_NEXT_SEQUENCE_RECV" => Some(Self::NextSequenceRecv), - "DATA_TYPE_HEADER" => Some(Self::Header), - _ => None, - } - } -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/v3.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/v3.rs deleted file mode 100644 index 63b6f467..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/solomachine/v3.rs +++ /dev/null @@ -1,252 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ClientState defines a solo machine client that tracks the current consensus -/// state and if the client is frozen. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v3.ClientState")] -pub struct ClientState { - /// latest sequence of the client state - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - /// frozen sequence of the solo machine - #[prost(bool, tag = "2")] - pub is_frozen: bool, - #[prost(message, optional, tag = "3")] - pub consensus_state: ::core::option::Option, -} -/// ConsensusState defines a solo machine consensus state. The sequence of a -/// consensus state is contained in the "height" key used in storing the -/// consensus state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v3.ConsensusState")] -pub struct ConsensusState { - /// public key of the solo machine - #[prost(message, optional, tag = "1")] - pub public_key: ::core::option::Option, - /// diversifier allows the same public key to be re-used across different solo - /// machine clients (potentially on different chains) without being considered - /// misbehaviour. - #[prost(string, tag = "2")] - pub diversifier: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, -} -/// Header defines a solo machine consensus header -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v3.Header")] -pub struct Header { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub new_public_key: ::core::option::Option, - #[prost(string, tag = "4")] - pub new_diversifier: ::prost::alloc::string::String, -} -/// Misbehaviour defines misbehaviour for a solo machine which consists -/// of a sequence and two signatures over different messages at that sequence. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v3.Misbehaviour")] -pub struct Misbehaviour { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - #[prost(message, optional, tag = "2")] - pub signature_one: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub signature_two: ::core::option::Option, -} -/// SignatureAndData contains a signature and the data signed over to create that -/// signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v3.SignatureAndData")] -pub struct SignatureAndData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, -} -/// TimestampedSignatureData contains the signature data and the timestamp of the -/// signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v3.TimestampedSignatureData")] -pub struct TimestampedSignatureData { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature_data: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, -} -/// SignBytes defines the signed bytes used for signature verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v3.SignBytes")] -pub struct SignBytes { - /// the sequence number - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, - /// the proof timestamp - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timestamp: u64, - /// the public key diversifier - #[prost(string, tag = "3")] - pub diversifier: ::prost::alloc::string::String, - /// the standardised path bytes - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub path: ::prost::alloc::vec::Vec, - /// the marshaled data bytes - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// HeaderData returns the SignBytes data for update verification. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.solomachine.v3.HeaderData")] -pub struct HeaderData { - /// header public key - #[prost(message, optional, tag = "1")] - pub new_pub_key: ::core::option::Option, - /// header diversifier - #[prost(string, tag = "2")] - pub new_diversifier: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/tendermint/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/tendermint/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/tendermint/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/tendermint/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/tendermint/v1.rs deleted file mode 100644 index f42c3f3c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/tendermint/v1.rs +++ /dev/null @@ -1,177 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ClientState from Tendermint tracks the current validator set, latest height, -/// and a possible frozen height. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.tendermint.v1.ClientState")] -pub struct ClientState { - #[prost(string, tag = "1")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub trust_level: ::core::option::Option, - /// duration of the period since the LastestTimestamp during which the - /// submitted headers are valid for upgrade - #[prost(message, optional, tag = "3")] - pub trusting_period: ::core::option::Option, - /// duration of the staking unbonding period - #[prost(message, optional, tag = "4")] - pub unbonding_period: ::core::option::Option, - /// defines how much new (untrusted) header's Time can drift into the future. - #[prost(message, optional, tag = "5")] - pub max_clock_drift: ::core::option::Option, - /// Block height when the client was frozen due to a misbehaviour - #[prost(message, optional, tag = "6")] - pub frozen_height: ::core::option::Option, - /// Latest height the client was updated to - #[prost(message, optional, tag = "7")] - pub latest_height: ::core::option::Option, - /// Proof specifications used in verifying counterparty state - #[prost(message, repeated, tag = "8")] - pub proof_specs: - ::prost::alloc::vec::Vec, - /// Path at which next upgraded client will be committed. - /// Each element corresponds to the key for a single CommitmentProof in the - /// chained proof. NOTE: ClientState must stored under - /// `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored - /// under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using - /// the default upgrade module, upgrade_path should be []string{"upgrade", - /// "upgradedIBCState"}` - #[prost(string, repeated, tag = "9")] - pub upgrade_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// allow_update_after_expiry is deprecated - #[deprecated] - #[prost(bool, tag = "10")] - pub allow_update_after_expiry: bool, - /// allow_update_after_misbehaviour is deprecated - #[deprecated] - #[prost(bool, tag = "11")] - pub allow_update_after_misbehaviour: bool, -} -/// ConsensusState defines the consensus state from Tendermint. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.tendermint.v1.ConsensusState")] -pub struct ConsensusState { - /// timestamp that corresponds to the block height in which the ConsensusState - /// was stored. - #[prost(message, optional, tag = "1")] - pub timestamp: ::core::option::Option, - /// commitment root (i.e app hash) - #[prost(message, optional, tag = "2")] - pub root: ::core::option::Option, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub next_validators_hash: ::prost::alloc::vec::Vec, -} -/// Misbehaviour is a wrapper over two conflicting Headers -/// that implements Misbehaviour interface expected by ICS-02 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.tendermint.v1.Misbehaviour")] -pub struct Misbehaviour { - /// ClientID is deprecated - #[deprecated] - #[prost(string, tag = "1")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub header_1: ::core::option::Option
, - #[prost(message, optional, tag = "3")] - pub header_2: ::core::option::Option
, -} -/// Header defines the Tendermint client consensus Header. -/// It encapsulates all the information necessary to update from a trusted -/// Tendermint ConsensusState. The inclusion of TrustedHeight and -/// TrustedValidators allows this update to process correctly, so long as the -/// ConsensusState for the TrustedHeight exists, this removes race conditions -/// among relayers The SignedHeader and ValidatorSet are the new untrusted update -/// fields for the client. The TrustedHeight is the height of a stored -/// ConsensusState on the client that will be used to verify the new untrusted -/// header. The Trusted ConsensusState must be within the unbonding period of -/// current time in order to correctly verify, and the TrustedValidators must -/// hash to TrustedConsensusState.NextValidatorsHash since that is the last -/// trusted validator set at the TrustedHeight. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.tendermint.v1.Header")] -pub struct Header { - #[prost(message, optional, tag = "1")] - pub signed_header: - ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub validator_set: - ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub trusted_height: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub trusted_validators: - ::core::option::Option, -} -/// Fraction defines the protobuf message type for tmmath.Fraction that only -/// supports positive values. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.tendermint.v1.Fraction")] -pub struct Fraction { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub numerator: u64, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub denominator: u64, -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/wasm/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/wasm/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/wasm/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/ibc/lightclients/wasm/v1.rs b/packages/neutron-sdk/src/proto_types/ibc/lightclients/wasm/v1.rs deleted file mode 100644 index f01d6915..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/lightclients/wasm/v1.rs +++ /dev/null @@ -1,385 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// GenesisState defines 08-wasm's keeper genesis state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.GenesisState")] -pub struct GenesisState { - /// uploaded light client wasm contracts - #[prost(message, repeated, tag = "1")] - pub contracts: ::prost::alloc::vec::Vec, -} -/// Contract stores contract code -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.Contract")] -pub struct Contract { - /// contract byte code - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub code_bytes: ::prost::alloc::vec::Vec, -} -/// QueryChecksumsRequest is the request type for the Query/Checksums RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.QueryChecksumsRequest")] -#[proto_query( - path = "/ibc.lightclients.wasm.v1.Query/Checksums", - response_type = QueryChecksumsResponse -)] -pub struct QueryChecksumsRequest { - /// pagination defines an optional pagination for the request. - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, -} -/// QueryChecksumsResponse is the response type for the Query/Checksums RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.QueryChecksumsResponse")] -pub struct QueryChecksumsResponse { - /// checksums is a list of the hex encoded checksums of all wasm codes stored. - #[prost(string, repeated, tag = "1")] - pub checksums: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageResponse, - >, -} -/// QueryCodeRequest is the request type for the Query/Code RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.QueryCodeRequest")] -#[proto_query( - path = "/ibc.lightclients.wasm.v1.Query/Code", - response_type = QueryCodeResponse -)] -pub struct QueryCodeRequest { - /// checksum is a hex encoded string of the code stored. - #[prost(string, tag = "1")] - pub checksum: ::prost::alloc::string::String, -} -/// QueryCodeResponse is the response type for the Query/Code RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.QueryCodeResponse")] -pub struct QueryCodeResponse { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// MsgStoreCode defines the request type for the StoreCode rpc. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.MsgStoreCode")] -pub struct MsgStoreCode { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// wasm byte code of light client contract. It can be raw or gzip compressed - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub wasm_byte_code: ::prost::alloc::vec::Vec, -} -/// MsgStoreCodeResponse defines the response type for the StoreCode rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.MsgStoreCodeResponse")] -pub struct MsgStoreCodeResponse { - /// checksum is the sha256 hash of the stored code - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub checksum: ::prost::alloc::vec::Vec, -} -/// MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.MsgRemoveChecksum")] -pub struct MsgRemoveChecksum { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// checksum is the sha256 hash to be removed from the store - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub checksum: ::prost::alloc::vec::Vec, -} -/// MsgStoreChecksumResponse defines the response type for the StoreCode rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.MsgRemoveChecksumResponse")] -pub struct MsgRemoveChecksumResponse {} -/// MsgMigrateContract defines the request type for the MigrateContract rpc. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.MsgMigrateContract")] -pub struct MsgMigrateContract { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// the client id of the contract - #[prost(string, tag = "2")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - /// checksum is the sha256 hash of the new wasm byte code for the contract - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub checksum: ::prost::alloc::vec::Vec, - /// the json encoded message to be passed to the contract on migration - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub msg: ::prost::alloc::vec::Vec, -} -/// MsgMigrateContractResponse defines the response type for the MigrateContract rpc -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.MsgMigrateContractResponse")] -pub struct MsgMigrateContractResponse {} -/// Wasm light client's Client state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.ClientState")] -pub struct ClientState { - /// bytes encoding the client state of the underlying light client - /// implemented as a Wasm contract. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub checksum: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub latest_height: ::core::option::Option, -} -/// Wasm light client's ConsensusState -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.ConsensusState")] -pub struct ConsensusState { - /// bytes encoding the consensus state of the underlying light client - /// implemented as a Wasm contract. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// Wasm light client message (either header(s) or misbehaviour) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.ClientMessage")] -pub struct ClientMessage { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// Checksums defines a list of all checksums that are stored -/// -/// Deprecated: This message is deprecated in favor of storing the checksums -/// using a Collections.KeySet. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/ibc.lightclients.wasm.v1.Checksums")] -#[deprecated] -pub struct Checksums { - #[prost(bytes = "vec", repeated, tag = "1")] - pub checksums: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -pub struct WasmQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> WasmQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn checksums( - &self, - pagination: ::core::option::Option< - super::super::super::super::cosmos::base::query::v1beta1::PageRequest, - >, - ) -> Result { - QueryChecksumsRequest { pagination }.query(self.querier) - } - pub fn code( - &self, - checksum: ::prost::alloc::string::String, - ) -> Result { - QueryCodeRequest { checksum }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/ibc/mod.rs b/packages/neutron-sdk/src/proto_types/ibc/mod.rs deleted file mode 100644 index c37ae57d..00000000 --- a/packages/neutron-sdk/src/proto_types/ibc/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod applications; -pub mod core; -pub mod lightclients; diff --git a/packages/neutron-sdk/src/proto_types/mod.rs b/packages/neutron-sdk/src/proto_types/mod.rs deleted file mode 100644 index 9f2df66c..00000000 --- a/packages/neutron-sdk/src/proto_types/mod.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub mod capability; -pub mod cosmos; -pub mod cosmwasm; -pub mod feemarket; -pub mod gaia; -pub mod ibc; -pub mod neutron; -pub mod osmosis; -pub mod slinky; -pub mod tendermint; diff --git a/packages/neutron-sdk/src/proto_types/neutron/contractmanager/mod.rs b/packages/neutron-sdk/src/proto_types/neutron/contractmanager/mod.rs deleted file mode 100644 index f882ee5e..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/contractmanager/mod.rs +++ /dev/null @@ -1,264 +0,0 @@ -pub mod v1; -use neutron_std_derive::CosmwasmExt; -/// Failure message contains information about ACK failures and can be used to -/// replay ACK in case of requirement. -/// Note that Failure means that sudo handler to cosmwasm contract failed for -/// some reason -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.Failure")] -pub struct Failure { - /// Address of the failed contract - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// Id of the failure under specific address - #[prost(uint64, tag = "2")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, - /// Serialized MessageSudoCallback with Packet and Ack(if exists) - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub sudo_payload: ::prost::alloc::vec::Vec, - /// Redacted error response of the sudo call. Full error is emitted as an event - #[prost(string, tag = "4")] - pub error: ::prost::alloc::string::String, -} -/// Params defines the parameters for the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.Params")] -pub struct Params { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sudo_call_gas_limit: u64, -} -/// GenesisState defines the contractmanager module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.GenesisState")] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// List of the contract failures - /// - /// this line is used by starport scaffolding # genesis/proto/state - #[prost(message, repeated, tag = "2")] - pub failures_list: ::prost::alloc::vec::Vec, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.QueryParamsRequest")] -#[proto_query( - path = "/neutron.contractmanager.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryFailuresRequest is request type for the Query/Failures RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.QueryFailuresRequest")] -#[proto_query( - path = "/neutron.contractmanager.Query/AddressFailure", - response_type = QueryFailuresResponse -)] -pub struct QueryFailuresRequest { - /// address of the contract which Sudo call failed. - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - /// ID of the failure for the given contract. - #[prost(uint64, tag = "2")] - #[serde(alias = "failureID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub failure_id: u64, - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -/// QueryFailuresResponse is response type for the Query/Failures RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.QueryFailuresResponse")] -pub struct QueryFailuresResponse { - #[prost(message, repeated, tag = "1")] - pub failures: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/contractmanager parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct ContractmanagerQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> ContractmanagerQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn address_failure( - &self, - address: ::prost::alloc::string::String, - failure_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryFailuresRequest { - address, - failure_id, - pagination, - } - .query(self.querier) - } - pub fn address_failures( - &self, - address: ::prost::alloc::string::String, - failure_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryFailuresRequest { - address, - failure_id, - pagination, - } - .query(self.querier) - } - pub fn failures( - &self, - address: ::prost::alloc::string::String, - failure_id: u64, - pagination: ::core::option::Option, - ) -> Result { - QueryFailuresRequest { - address, - failure_id, - pagination, - } - .query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/contractmanager/v1.rs b/packages/neutron-sdk/src/proto_types/neutron/contractmanager/v1.rs deleted file mode 100644 index 96ad83a5..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/contractmanager/v1.rs +++ /dev/null @@ -1,42 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Deprecated. Used only for migration purposes. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.contractmanager.v1.Failure")] -pub struct Failure { - /// ChannelId - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - /// Address of the failed contract - #[prost(string, tag = "2")] - pub address: ::prost::alloc::string::String, - /// id of the failure under specific address - #[prost(uint64, tag = "3")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, - /// ACK id to restore - #[prost(uint64, tag = "4")] - #[serde(alias = "ackID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub ack_id: u64, - /// Acknowledgement type - #[prost(string, tag = "5")] - pub ack_type: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/cron.rs b/packages/neutron-sdk/src/proto_types/neutron/cron.rs deleted file mode 100644 index 8afa0a3f..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/cron.rs +++ /dev/null @@ -1,292 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the parameters for the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.Params")] -pub struct Params { - /// Security address that can remove schedules - #[prost(string, tag = "1")] - pub security_address: ::prost::alloc::string::String, - /// Limit of schedules executed in one block - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub limit: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.Schedule")] -pub struct Schedule { - /// Name of schedule - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// Period in blocks - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub period: u64, - /// Msgs that will be executed every period amount of time - #[prost(message, repeated, tag = "3")] - pub msgs: ::prost::alloc::vec::Vec, - /// Last execution's block height - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_execute_height: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.MsgExecuteContract")] -pub struct MsgExecuteContract { - /// Contract is the address of the smart contract - #[prost(string, tag = "1")] - pub contract: ::prost::alloc::string::String, - /// Msg is json encoded message to be passed to the contract - #[prost(string, tag = "2")] - pub msg: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.ScheduleCount")] -pub struct ScheduleCount { - /// Count is the number of current schedules - #[prost(int32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub count: i32, -} -/// GenesisState defines the cron module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.GenesisState")] -pub struct GenesisState { - #[prost(message, repeated, tag = "2")] - pub schedule_list: ::prost::alloc::vec::Vec, - /// this line is used by starport scaffolding # genesis/proto/state - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.QueryParamsRequest")] -#[proto_query(path = "/neutron.cron.Query/Params", response_type = QueryParamsResponse)] -pub struct QueryParamsRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.QueryGetScheduleRequest")] -#[proto_query( - path = "/neutron.cron.Query/Schedule", - response_type = QueryGetScheduleResponse -)] -pub struct QueryGetScheduleRequest { - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.QueryGetScheduleResponse")] -pub struct QueryGetScheduleResponse { - #[prost(message, optional, tag = "1")] - pub schedule: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.QuerySchedulesRequest")] -#[proto_query( - path = "/neutron.cron.Query/Schedules", - response_type = QuerySchedulesResponse -)] -pub struct QuerySchedulesRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.QuerySchedulesResponse")] -pub struct QuerySchedulesResponse { - #[prost(message, repeated, tag = "1")] - pub schedules: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/cron parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.cron.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct CronQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> CronQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn schedule( - &self, - name: ::prost::alloc::string::String, - ) -> Result { - QueryGetScheduleRequest { name }.query(self.querier) - } - pub fn schedules( - &self, - pagination: ::core::option::Option, - ) -> Result { - QuerySchedulesRequest { pagination }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/dex/mod.rs b/packages/neutron-sdk/src/proto_types/neutron/dex/mod.rs deleted file mode 100644 index ad490437..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/dex/mod.rs +++ /dev/null @@ -1,1834 +0,0 @@ -pub mod v2; -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.PairID")] -pub struct PairId { - #[prost(string, tag = "1")] - pub token0: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub token1: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.TradePairID")] -pub struct TradePairId { - #[prost(string, tag = "2")] - pub maker_denom: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub taker_denom: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.PoolReservesKey")] -pub struct PoolReservesKey { - #[prost(message, optional, tag = "1")] - #[serde(alias = "trade_pairID")] - pub trade_pair_id: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick_index_taker_to_maker: i64, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub fee: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.PoolReserves")] -pub struct PoolReserves { - #[prost(message, optional, tag = "1")] - pub key: ::core::option::Option, - #[prost(string, tag = "2")] - pub reserves_maker_denom: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub price_taker_to_maker: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub price_opposite_taker_to_maker: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.Pool")] -pub struct Pool { - #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, - #[prost(message, optional, tag = "2")] - pub lower_tick0: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub upper_tick1: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.DepositRecord")] -pub struct DepositRecord { - #[prost(message, optional, tag = "1")] - #[serde(alias = "pairID")] - pub pair_id: ::core::option::Option, - #[prost(string, tag = "2")] - pub shares_owned: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub center_tick_index: i64, - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub lower_tick_index: i64, - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub upper_tick_index: i64, - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub fee: u64, - #[prost(string, tag = "7")] - pub total_shares: ::prost::alloc::string::String, - #[prost(message, optional, tag = "8")] - pub pool: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.LimitOrderTrancheKey")] -pub struct LimitOrderTrancheKey { - #[prost(message, optional, tag = "1")] - #[serde(alias = "trade_pairID")] - pub trade_pair_id: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick_index_taker_to_maker: i64, - #[prost(string, tag = "3")] - pub tranche_key: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.LimitOrderTranche")] -pub struct LimitOrderTranche { - #[prost(message, optional, tag = "1")] - pub key: ::core::option::Option, - #[prost(string, tag = "2")] - pub reserves_maker_denom: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub reserves_taker_denom: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub total_maker_denom: ::prost::alloc::string::String, - /// LimitOrders with expiration_time set are valid as long as blockTime <= expiration_time - #[prost(string, tag = "5")] - pub total_taker_denom: ::prost::alloc::string::String, - /// JIT orders also use expiration_time to handle deletion but represent a special case - /// All JIT orders have a expiration_time of 0 and an exception is made to still treat these orders as live - /// Order deletion still functions the same and the orders will be deleted at the end of the block - #[prost(message, optional, tag = "6")] - pub expiration_time: ::core::option::Option, - #[prost(string, tag = "7")] - pub price_taker_to_maker: ::prost::alloc::string::String, -} -/// Params defines the parameters for the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.Params")] -pub struct Params { - #[prost(uint64, repeated, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub fee_tiers: ::prost::alloc::vec::Vec, - #[prost(bool, tag = "3")] - pub paused: bool, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_jits_per_block: u64, - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub good_til_purge_allowance: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.DepositOptions")] -pub struct DepositOptions { - #[prost(bool, tag = "1")] - pub disable_autoswap: bool, - #[prost(bool, tag = "2")] - pub fail_tx_on_bel: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgDeposit")] -pub struct MsgDeposit { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub receiver: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub token_a: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub token_b: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "5")] - pub amounts_a: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "6")] - pub amounts_b: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(int64, repeated, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub tick_indexes_a_to_b: ::prost::alloc::vec::Vec, - #[prost(uint64, repeated, tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub fees: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "9")] - pub options: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.FailedDeposit")] -pub struct FailedDeposit { - #[prost(uint64, tag = "1")] - #[serde(alias = "depositIDx")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub deposit_idx: u64, - #[prost(string, tag = "2")] - pub error: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgDepositResponse")] -pub struct MsgDepositResponse { - #[prost(string, repeated, tag = "1")] - pub reserve0_deposited: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, repeated, tag = "2")] - pub reserve1_deposited: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(message, repeated, tag = "3")] - pub failed_deposits: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgWithdrawal")] -pub struct MsgWithdrawal { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub receiver: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub token_a: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub token_b: ::prost::alloc::string::String, - #[prost(string, repeated, tag = "5")] - pub shares_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(int64, repeated, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub tick_indexes_a_to_b: ::prost::alloc::vec::Vec, - #[prost(uint64, repeated, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub fees: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgWithdrawalResponse")] -pub struct MsgWithdrawalResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgPlaceLimitOrder")] -pub struct MsgPlaceLimitOrder { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub receiver: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub token_in: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub token_out: ::prost::alloc::string::String, - /// DEPRECATED: tick_index_in_to_out will be removed in future release; limit_sell_price should be used instead. - #[deprecated] - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick_index_in_to_out: i64, - #[prost(string, tag = "7")] - pub amount_in: ::prost::alloc::string::String, - #[prost(enumeration = "LimitOrderType", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub order_type: i32, - /// expirationTime is only valid iff orderType == GOOD_TIL_TIME. - #[prost(message, optional, tag = "9")] - pub expiration_time: ::core::option::Option, - #[prost(string, tag = "10")] - pub max_amount_out: ::prost::alloc::string::String, - #[prost(string, tag = "11")] - pub limit_sell_price: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgPlaceLimitOrderResponse")] -pub struct MsgPlaceLimitOrderResponse { - #[prost(string, tag = "1")] - pub tranche_key: ::prost::alloc::string::String, - /// Total amount of coin used for the limit order - #[prost(message, optional, tag = "2")] - pub coin_in: ::core::option::Option, - /// Total amount of coin received from the taker portion of the limit order - /// This is the amount of coin immediately available in the users account after - /// executing the limit order. It does not include any future proceeds from the - /// maker portion which will have withdrawn in the future - #[prost(message, optional, tag = "3")] - pub taker_coin_out: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgWithdrawFilledLimitOrder")] -pub struct MsgWithdrawFilledLimitOrder { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub tranche_key: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgWithdrawFilledLimitOrderResponse")] -pub struct MsgWithdrawFilledLimitOrderResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgCancelLimitOrder")] -pub struct MsgCancelLimitOrder { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub tranche_key: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgCancelLimitOrderResponse")] -pub struct MsgCancelLimitOrderResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MultiHopRoute")] -pub struct MultiHopRoute { - #[prost(string, repeated, tag = "1")] - pub hops: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgMultiHopSwap")] -pub struct MsgMultiHopSwap { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub receiver: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub routes: ::prost::alloc::vec::Vec, - #[prost(string, tag = "4")] - pub amount_in: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub exit_limit_price: ::prost::alloc::string::String, - /// If pickBestRoute == true then all routes are run and the route with the - /// best price is chosen otherwise, the first succesful route is used. - #[prost(bool, tag = "6")] - pub pick_best_route: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgMultiHopSwapResponse")] -pub struct MsgMultiHopSwapResponse { - #[prost(message, optional, tag = "1")] - pub coin_out: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum LimitOrderType { - GoodTilCancelled = 0, - FillOrKill = 1, - ImmediateOrCancel = 2, - JustInTime = 3, - GoodTilTime = 4, -} -impl LimitOrderType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - LimitOrderType::GoodTilCancelled => "GOOD_TIL_CANCELLED", - LimitOrderType::FillOrKill => "FILL_OR_KILL", - LimitOrderType::ImmediateOrCancel => "IMMEDIATE_OR_CANCEL", - LimitOrderType::JustInTime => "JUST_IN_TIME", - LimitOrderType::GoodTilTime => "GOOD_TIL_TIME", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "GOOD_TIL_CANCELLED" => Some(Self::GoodTilCancelled), - "FILL_OR_KILL" => Some(Self::FillOrKill), - "IMMEDIATE_OR_CANCEL" => Some(Self::ImmediateOrCancel), - "JUST_IN_TIME" => Some(Self::JustInTime), - "GOOD_TIL_TIME" => Some(Self::GoodTilTime), - _ => None, - } - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.LimitOrderTrancheUser")] -pub struct LimitOrderTrancheUser { - #[prost(message, optional, tag = "1")] - #[serde(alias = "trade_pairID")] - pub trade_pair_id: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick_index_taker_to_maker: i64, - #[prost(string, tag = "3")] - pub tranche_key: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub address: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub shares_owned: ::prost::alloc::string::String, - #[prost(string, tag = "6")] - pub shares_withdrawn: ::prost::alloc::string::String, - /// TODO: remove this in next release. It is no longer used - #[prost(string, tag = "7")] - pub shares_cancelled: ::prost::alloc::string::String, - #[prost(enumeration = "LimitOrderType", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub order_type: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.PoolMetadata")] -pub struct PoolMetadata { - #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick: i64, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub fee: u64, - #[prost(message, optional, tag = "4")] - #[serde(alias = "pairID")] - pub pair_id: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.TickLiquidity")] -pub struct TickLiquidity { - #[prost(oneof = "tick_liquidity::Liquidity", tags = "1, 2")] - pub liquidity: ::core::option::Option, -} -/// Nested message and enum types in `TickLiquidity`. -pub mod tick_liquidity { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Liquidity { - #[prost(message, tag = "1")] - PoolReserves(super::PoolReserves), - #[prost(message, tag = "2")] - LimitOrderTranche(super::LimitOrderTranche), - } -} -/// GenesisState defines the dex module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.GenesisState")] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub tick_liquidity_list: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "3")] - pub inactive_limit_order_tranche_list: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "4")] - pub limit_order_tranche_user_list: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "5")] - pub pool_metadata_list: ::prost::alloc::vec::Vec, - /// this line is used by starport scaffolding # genesis/proto/state - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub pool_count: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.LimitOrderExpiration")] -pub struct LimitOrderExpiration { - /// see limitOrderTranche.proto for details on expiration_time - #[prost(message, optional, tag = "1")] - pub expiration_time: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub tranche_ref: ::prost::alloc::vec::Vec, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryParamsRequest")] -#[proto_query(path = "/neutron.dex.Query/Params", response_type = QueryParamsResponse)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetLimitOrderTrancheUserRequest")] -#[proto_query( - path = "/neutron.dex.Query/LimitOrderTrancheUser", - response_type = QueryGetLimitOrderTrancheUserResponse -)] -pub struct QueryGetLimitOrderTrancheUserRequest { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub tranche_key: ::prost::alloc::string::String, - #[prost(bool, tag = "3")] - pub calc_withdrawable_shares: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetLimitOrderTrancheUserResponse")] -pub struct QueryGetLimitOrderTrancheUserResponse { - #[prost(message, optional, tag = "1")] - pub limit_order_tranche_user: ::core::option::Option, - #[prost(string, tag = "2")] - pub withdrawable_shares: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllLimitOrderTrancheUserRequest")] -#[proto_query( - path = "/neutron.dex.Query/LimitOrderTrancheUserAll", - response_type = QueryAllLimitOrderTrancheUserResponse -)] -pub struct QueryAllLimitOrderTrancheUserRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllLimitOrderTrancheUserResponse")] -pub struct QueryAllLimitOrderTrancheUserResponse { - #[prost(message, repeated, tag = "1")] - pub limit_order_tranche_user: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetLimitOrderTrancheRequest")] -#[proto_query( - path = "/neutron.dex.Query/LimitOrderTranche", - response_type = QueryGetLimitOrderTrancheResponse -)] -pub struct QueryGetLimitOrderTrancheRequest { - #[prost(string, tag = "1")] - #[serde(alias = "pairID")] - pub pair_id: ::prost::alloc::string::String, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick_index: i64, - #[prost(string, tag = "3")] - pub token_in: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub tranche_key: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetLimitOrderTrancheResponse")] -pub struct QueryGetLimitOrderTrancheResponse { - #[prost(message, optional, tag = "1")] - pub limit_order_tranche: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllLimitOrderTrancheRequest")] -#[proto_query( - path = "/neutron.dex.Query/LimitOrderTrancheAll", - response_type = QueryAllLimitOrderTrancheResponse -)] -pub struct QueryAllLimitOrderTrancheRequest { - #[prost(string, tag = "1")] - #[serde(alias = "pairID")] - pub pair_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub token_in: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllLimitOrderTrancheResponse")] -pub struct QueryAllLimitOrderTrancheResponse { - #[prost(message, repeated, tag = "1")] - pub limit_order_tranche: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllUserDepositsRequest")] -#[proto_query( - path = "/neutron.dex.Query/UserDepositsAll", - response_type = QueryAllUserDepositsResponse -)] -pub struct QueryAllUserDepositsRequest { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, - #[prost(bool, tag = "3")] - pub include_pool_data: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllUserDepositsResponse")] -pub struct QueryAllUserDepositsResponse { - #[prost(message, repeated, tag = "1")] - pub deposits: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllLimitOrderTrancheUserByAddressRequest")] -#[proto_query( - path = "/neutron.dex.Query/LimitOrderTrancheUserAllByAddress", - response_type = QueryAllLimitOrderTrancheUserByAddressResponse -)] -pub struct QueryAllLimitOrderTrancheUserByAddressRequest { - #[prost(string, tag = "1")] - pub address: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub pagination: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllLimitOrderTrancheUserByAddressResponse")] -pub struct QueryAllLimitOrderTrancheUserByAddressResponse { - #[prost(message, repeated, tag = "1")] - pub limit_orders: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllTickLiquidityRequest")] -#[proto_query( - path = "/neutron.dex.Query/TickLiquidityAll", - response_type = QueryAllTickLiquidityResponse -)] -pub struct QueryAllTickLiquidityRequest { - #[prost(string, tag = "1")] - #[serde(alias = "pairID")] - pub pair_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub token_in: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllTickLiquidityResponse")] -pub struct QueryAllTickLiquidityResponse { - #[prost(message, repeated, tag = "1")] - pub tick_liquidity: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetInactiveLimitOrderTrancheRequest")] -#[proto_query( - path = "/neutron.dex.Query/InactiveLimitOrderTranche", - response_type = QueryGetInactiveLimitOrderTrancheResponse -)] -pub struct QueryGetInactiveLimitOrderTrancheRequest { - #[prost(string, tag = "1")] - #[serde(alias = "pairID")] - pub pair_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub token_in: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick_index: i64, - #[prost(string, tag = "4")] - pub tranche_key: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetInactiveLimitOrderTrancheResponse")] -pub struct QueryGetInactiveLimitOrderTrancheResponse { - #[prost(message, optional, tag = "1")] - pub inactive_limit_order_tranche: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllInactiveLimitOrderTrancheRequest")] -#[proto_query( - path = "/neutron.dex.Query/InactiveLimitOrderTrancheAll", - response_type = QueryAllInactiveLimitOrderTrancheResponse -)] -pub struct QueryAllInactiveLimitOrderTrancheRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllInactiveLimitOrderTrancheResponse")] -pub struct QueryAllInactiveLimitOrderTrancheResponse { - #[prost(message, repeated, tag = "1")] - pub inactive_limit_order_tranche: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllPoolReservesRequest")] -#[proto_query( - path = "/neutron.dex.Query/PoolReservesAll", - response_type = QueryAllPoolReservesResponse -)] -pub struct QueryAllPoolReservesRequest { - #[prost(string, tag = "1")] - #[serde(alias = "pairID")] - pub pair_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub token_in: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllPoolReservesResponse")] -pub struct QueryAllPoolReservesResponse { - #[prost(message, repeated, tag = "1")] - pub pool_reserves: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetPoolReservesRequest")] -#[proto_query( - path = "/neutron.dex.Query/PoolReserves", - response_type = QueryGetPoolReservesResponse -)] -pub struct QueryGetPoolReservesRequest { - #[prost(string, tag = "1")] - #[serde(alias = "pairID")] - pub pair_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub token_in: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick_index: i64, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub fee: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetPoolReservesResponse")] -pub struct QueryGetPoolReservesResponse { - #[prost(message, optional, tag = "1")] - pub pool_reserves: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryEstimateMultiHopSwapRequest")] -#[proto_query( - path = "/neutron.dex.Query/EstimateMultiHopSwap", - response_type = QueryEstimateMultiHopSwapResponse -)] -pub struct QueryEstimateMultiHopSwapRequest { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub receiver: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "3")] - pub routes: ::prost::alloc::vec::Vec, - #[prost(string, tag = "4")] - pub amount_in: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub exit_limit_price: ::prost::alloc::string::String, - /// If pickBestRoute == true then all routes are run and the route with the - /// best price is chosen otherwise, the first succesful route is used. - #[prost(bool, tag = "6")] - pub pick_best_route: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryEstimateMultiHopSwapResponse")] -pub struct QueryEstimateMultiHopSwapResponse { - #[prost(message, optional, tag = "1")] - pub coin_out: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryEstimatePlaceLimitOrderRequest")] -#[proto_query( - path = "/neutron.dex.Query/EstimatePlaceLimitOrder", - response_type = QueryEstimatePlaceLimitOrderResponse -)] -pub struct QueryEstimatePlaceLimitOrderRequest { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub receiver: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub token_in: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub token_out: ::prost::alloc::string::String, - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick_index_in_to_out: i64, - #[prost(string, tag = "6")] - pub amount_in: ::prost::alloc::string::String, - #[prost(enumeration = "LimitOrderType", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub order_type: i32, - /// expirationTime is only valid iff orderType == GOOD_TIL_TIME. - #[prost(message, optional, tag = "8")] - pub expiration_time: ::core::option::Option, - #[prost(string, tag = "9")] - pub max_amount_out: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryEstimatePlaceLimitOrderResponse")] -pub struct QueryEstimatePlaceLimitOrderResponse { - /// Total amount of coin used for the limit order - /// You can derive makerLimitInCoin using the equation: totalInCoin = - /// swapInCoin + makerLimitInCoin - #[prost(message, optional, tag = "1")] - pub total_in_coin: ::core::option::Option, - /// Total amount of the token in that was immediately swapped for swapOutCoin - #[prost(message, optional, tag = "2")] - pub swap_in_coin: ::core::option::Option, - /// Total amount of coin received from the taker portion of the limit order - /// This is the amount of coin immediately available in the users account after - /// executing the limit order. It does not include any future proceeds from the - /// maker portion which will have withdrawn in the future - #[prost(message, optional, tag = "3")] - pub swap_out_coin: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryPoolRequest")] -#[proto_query(path = "/neutron.dex.Query/Pool", response_type = QueryPoolResponse)] -pub struct QueryPoolRequest { - #[prost(string, tag = "1")] - #[serde(alias = "pairID")] - pub pair_id: ::prost::alloc::string::String, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tick_index: i64, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub fee: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryPoolByIDRequest")] -#[proto_query(path = "/neutron.dex.Query/PoolByID", response_type = QueryPoolResponse)] -pub struct QueryPoolByIdRequest { - #[prost(uint64, tag = "1")] - #[serde(alias = "poolID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub pool_id: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryPoolResponse")] -pub struct QueryPoolResponse { - #[prost(message, optional, tag = "1")] - pub pool: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetPoolMetadataRequest")] -#[proto_query( - path = "/neutron.dex.Query/PoolMetadata", - response_type = QueryGetPoolMetadataResponse -)] -pub struct QueryGetPoolMetadataRequest { - #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryGetPoolMetadataResponse")] -pub struct QueryGetPoolMetadataResponse { - #[prost(message, optional, tag = "1")] - pub pool_metadata: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllPoolMetadataRequest")] -#[proto_query( - path = "/neutron.dex.Query/PoolMetadataAll", - response_type = QueryAllPoolMetadataResponse -)] -pub struct QueryAllPoolMetadataRequest { - #[prost(message, optional, tag = "1")] - pub pagination: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.QueryAllPoolMetadataResponse")] -pub struct QueryAllPoolMetadataResponse { - #[prost(message, repeated, tag = "1")] - pub pool_metadata: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -pub struct DexQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> DexQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn limit_order_tranche_user( - &self, - address: ::prost::alloc::string::String, - tranche_key: ::prost::alloc::string::String, - calc_withdrawable_shares: bool, - ) -> Result { - QueryGetLimitOrderTrancheUserRequest { - address, - tranche_key, - calc_withdrawable_shares, - } - .query(self.querier) - } - pub fn limit_order_tranche_user_all( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryAllLimitOrderTrancheUserRequest { pagination }.query(self.querier) - } - pub fn limit_order_tranche_user_all_by_address( - &self, - address: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryAllLimitOrderTrancheUserByAddressRequest { - address, - pagination, - } - .query(self.querier) - } - pub fn limit_order_tranche( - &self, - pair_id: ::prost::alloc::string::String, - tick_index: i64, - token_in: ::prost::alloc::string::String, - tranche_key: ::prost::alloc::string::String, - ) -> Result { - QueryGetLimitOrderTrancheRequest { - pair_id, - tick_index, - token_in, - tranche_key, - } - .query(self.querier) - } - pub fn limit_order_tranche_all( - &self, - pair_id: ::prost::alloc::string::String, - token_in: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryAllLimitOrderTrancheRequest { - pair_id, - token_in, - pagination, - } - .query(self.querier) - } - pub fn user_deposits_all( - &self, - address: ::prost::alloc::string::String, - pagination: ::core::option::Option, - include_pool_data: bool, - ) -> Result { - QueryAllUserDepositsRequest { - address, - pagination, - include_pool_data, - } - .query(self.querier) - } - pub fn tick_liquidity_all( - &self, - pair_id: ::prost::alloc::string::String, - token_in: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryAllTickLiquidityRequest { - pair_id, - token_in, - pagination, - } - .query(self.querier) - } - pub fn inactive_limit_order_tranche( - &self, - pair_id: ::prost::alloc::string::String, - token_in: ::prost::alloc::string::String, - tick_index: i64, - tranche_key: ::prost::alloc::string::String, - ) -> Result { - QueryGetInactiveLimitOrderTrancheRequest { - pair_id, - token_in, - tick_index, - tranche_key, - } - .query(self.querier) - } - pub fn inactive_limit_order_tranche_all( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryAllInactiveLimitOrderTrancheRequest { pagination }.query(self.querier) - } - pub fn pool_reserves_all( - &self, - pair_id: ::prost::alloc::string::String, - token_in: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryAllPoolReservesRequest { - pair_id, - token_in, - pagination, - } - .query(self.querier) - } - pub fn pool_reserves( - &self, - pair_id: ::prost::alloc::string::String, - token_in: ::prost::alloc::string::String, - tick_index: i64, - fee: u64, - ) -> Result { - QueryGetPoolReservesRequest { - pair_id, - token_in, - tick_index, - fee, - } - .query(self.querier) - } - pub fn estimate_multi_hop_swap( - &self, - creator: ::prost::alloc::string::String, - receiver: ::prost::alloc::string::String, - routes: ::prost::alloc::vec::Vec, - amount_in: ::prost::alloc::string::String, - exit_limit_price: ::prost::alloc::string::String, - pick_best_route: bool, - ) -> Result { - QueryEstimateMultiHopSwapRequest { - creator, - receiver, - routes, - amount_in, - exit_limit_price, - pick_best_route, - } - .query(self.querier) - } - #[allow(clippy::too_many_arguments)] - pub fn estimate_place_limit_order( - &self, - creator: ::prost::alloc::string::String, - receiver: ::prost::alloc::string::String, - token_in: ::prost::alloc::string::String, - token_out: ::prost::alloc::string::String, - tick_index_in_to_out: i64, - amount_in: ::prost::alloc::string::String, - order_type: i32, - expiration_time: ::core::option::Option, - max_amount_out: ::prost::alloc::string::String, - ) -> Result { - QueryEstimatePlaceLimitOrderRequest { - creator, - receiver, - token_in, - token_out, - tick_index_in_to_out, - amount_in, - order_type, - expiration_time, - max_amount_out, - } - .query(self.querier) - } - pub fn pool( - &self, - pair_id: ::prost::alloc::string::String, - tick_index: i64, - fee: u64, - ) -> Result { - QueryPoolRequest { - pair_id, - tick_index, - fee, - } - .query(self.querier) - } - pub fn pool_by_id(&self, pool_id: u64) -> Result { - QueryPoolByIdRequest { pool_id }.query(self.querier) - } - pub fn pool_metadata( - &self, - id: u64, - ) -> Result { - QueryGetPoolMetadataRequest { id }.query(self.querier) - } - pub fn pool_metadata_all( - &self, - pagination: ::core::option::Option, - ) -> Result { - QueryAllPoolMetadataRequest { pagination }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/dex/v2.rs b/packages/neutron-sdk/src/proto_types/neutron/dex/v2.rs deleted file mode 100644 index 9c2b53bd..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/dex/v2.rs +++ /dev/null @@ -1,24 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the parameters for the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dex.v2.Params")] -pub struct Params { - #[prost(uint64, repeated, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub fee_tiers: ::prost::alloc::vec::Vec, - #[prost(string, tag = "2")] - pub max_true_taker_spread: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/dynamicfees/mod.rs b/packages/neutron-sdk/src/proto_types/neutron/dynamicfees/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/dynamicfees/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/neutron/dynamicfees/v1.rs b/packages/neutron-sdk/src/proto_types/neutron/dynamicfees/v1.rs deleted file mode 100644 index fa818b81..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/dynamicfees/v1.rs +++ /dev/null @@ -1,124 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the parameters for the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dynamicfees.v1.Params")] -pub struct Params { - /// List of asset prices by the NTRN - /// it's used in cooperation with feemarket module - /// ntrn_prices is a data source to convert gas_price from feemarket's base_denom (untrn) - /// into a given asset - #[prost(message, repeated, tag = "1")] - pub ntrn_prices: ::prost::alloc::vec::Vec, -} -/// GenesisState defines the dynamicfees module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dynamicfees.v1.GenesisState")] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dynamicfees.v1.QueryParamsRequest")] -#[proto_query( - path = "/neutron.dynamicfees.v1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dynamicfees.v1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgUpdateParams is the MsgUpdateParams request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dynamicfees.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/dynamicfees parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.dynamicfees.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct DynamicfeesQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> DynamicfeesQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/feeburner.rs b/packages/neutron-sdk/src/proto_types/neutron/feeburner.rs deleted file mode 100644 index 54c92518..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/feeburner.rs +++ /dev/null @@ -1,194 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the parameters for the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feeburner.Params")] -pub struct Params { - /// Defines Neutron denom, which will be burned during fee processing, any - /// other denom will be sent to Treasury - #[prost(string, tag = "1")] - pub neutron_denom: ::prost::alloc::string::String, - /// Deprecated in v0.4.4. Is not used anymore - #[prost(string, tag = "2")] - pub reserve_address: ::prost::alloc::string::String, - /// Defines treasury address - #[prost(string, tag = "3")] - pub treasury_address: ::prost::alloc::string::String, -} -/// TotalBurnedNeutronsAmount defines total amount of burned neutron fees -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feeburner.TotalBurnedNeutronsAmount")] -pub struct TotalBurnedNeutronsAmount { - #[prost(message, optional, tag = "1")] - pub coin: ::core::option::Option, -} -/// GenesisState defines the feeburner module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feeburner.GenesisState")] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// this line is used by starport scaffolding # genesis/proto/state - #[prost(message, optional, tag = "2")] - pub total_burned_neutrons_amount: ::core::option::Option, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feeburner.QueryParamsRequest")] -#[proto_query( - path = "/neutron.feeburner.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feeburner.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryTotalBurnedNeutronsAmountRequest is request type for the -/// Query/QueryTotalBurnedNeutronsAmount method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest")] -#[proto_query( - path = "/neutron.feeburner.Query/TotalBurnedNeutronsAmount", - response_type = QueryTotalBurnedNeutronsAmountResponse -)] -pub struct QueryTotalBurnedNeutronsAmountRequest {} -/// QueryTotalBurnedNeutronsAmountResponse is response type for the -/// Query/QueryTotalBurnedNeutronsAmount method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse")] -pub struct QueryTotalBurnedNeutronsAmountResponse { - #[prost(message, optional, tag = "1")] - pub total_burned_neutrons_amount: ::core::option::Option, -} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feeburner.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/feeburner parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feeburner.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct FeeburnerQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> FeeburnerQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn total_burned_neutrons_amount( - &self, - ) -> Result { - QueryTotalBurnedNeutronsAmountRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/feerefunder.rs b/packages/neutron-sdk/src/proto_types/neutron/feerefunder.rs deleted file mode 100644 index af86eedd..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/feerefunder.rs +++ /dev/null @@ -1,257 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Fee defines the ICS29 receive, acknowledgement and timeout fees -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.Fee")] -pub struct Fee { - /// the packet receive fee - #[prost(message, repeated, tag = "1")] - pub recv_fee: ::prost::alloc::vec::Vec, - /// the packet acknowledgement fee - #[prost(message, repeated, tag = "2")] - pub ack_fee: ::prost::alloc::vec::Vec, - /// the packet timeout fee - #[prost(message, repeated, tag = "3")] - pub timeout_fee: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.PacketID")] -pub struct PacketId { - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -/// Params defines the parameters for the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.Params")] -pub struct Params { - #[prost(message, optional, tag = "1")] - pub min_fee: ::core::option::Option, -} -/// GenesisState defines the fee module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.GenesisState")] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// this line is used by starport scaffolding # genesis/proto/state - #[prost(message, repeated, tag = "2")] - pub fee_infos: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.FeeInfo")] -pub struct FeeInfo { - #[prost(string, tag = "1")] - pub payer: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - #[serde(alias = "packetID")] - pub packet_id: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub fee: ::core::option::Option, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.QueryParamsRequest")] -#[proto_query( - path = "/neutron.feerefunder.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.FeeInfoRequest")] -#[proto_query( - path = "/neutron.feerefunder.Query/FeeInfo", - response_type = FeeInfoResponse -)] -pub struct FeeInfoRequest { - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.FeeInfoResponse")] -pub struct FeeInfoResponse { - #[prost(message, optional, tag = "1")] - pub fee_info: ::core::option::Option, -} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/feerefunder parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.feerefunder.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct FeerefunderQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> FeerefunderQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn fee_info( - &self, - channel_id: ::prost::alloc::string::String, - port_id: ::prost::alloc::string::String, - sequence: u64, - ) -> Result { - FeeInfoRequest { - channel_id, - port_id, - sequence, - } - .query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/interchainqueries.rs b/packages/neutron-sdk/src/proto_types/neutron/interchainqueries.rs deleted file mode 100644 index 218970d1..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/interchainqueries.rs +++ /dev/null @@ -1,782 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the parameters for the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.Params")] -pub struct Params { - /// Defines amount of blocks required before query becomes available for - /// removal by anybody - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_submit_timeout: u64, - /// Amount of coins deposited for the query. - #[prost(message, repeated, tag = "2")] - pub query_deposit: ::prost::alloc::vec::Vec, - /// Amount of tx hashes to be removed during a single EndBlock. Can vary to - /// balance between network cleaning speed and EndBlock duration. A zero value - /// means no limit. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub tx_query_removal_limit: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.RegisteredQuery")] -pub struct RegisteredQuery { - /// The unique id of the registered query. - #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, - /// The address that registered the query. - #[prost(string, tag = "2")] - pub owner: ::prost::alloc::string::String, - /// The query type identifier: `kv` or `tx` now - #[prost(string, tag = "3")] - pub query_type: ::prost::alloc::string::String, - /// The KV-storage keys for which we want to get values from remote chain - #[prost(message, repeated, tag = "4")] - pub keys: ::prost::alloc::vec::Vec, - /// The filter for transaction search ICQ - #[prost(string, tag = "5")] - pub transactions_filter: ::prost::alloc::string::String, - /// The IBC connection ID for getting ConsensusState to verify proofs - #[prost(string, tag = "6")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - /// Parameter that defines how often the query must be updated. - #[prost(uint64, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub update_period: u64, - /// The local chain last block height when the query result was updated. - #[prost(uint64, tag = "8")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_submitted_result_local_height: u64, - /// The remote chain last block height when the query result was updated. - #[prost(message, optional, tag = "9")] - pub last_submitted_result_remote_height: - ::core::option::Option, - /// Amount of coins deposited for the query. - #[prost(message, repeated, tag = "10")] - pub deposit: ::prost::alloc::vec::Vec, - /// Timeout before query becomes available for everybody to remove. - #[prost(uint64, tag = "11")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub submit_timeout: u64, - /// The local chain height when the query was registered. - #[prost(uint64, tag = "12")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub registered_at_height: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.KVKey")] -pub struct KvKey { - /// Path (storage prefix) to the storage where you want to read value by key - /// (usually name of cosmos-sdk module: 'staking', 'bank', etc.) - #[prost(string, tag = "1")] - pub path: ::prost::alloc::string::String, - /// Key you want to read from the storage - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, -} -/// GenesisState defines the interchainqueries module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.GenesisState")] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub registered_queries: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgRegisterInterchainQuery")] -pub struct MsgRegisterInterchainQuery { - /// defines a query type: `kv` or `tx` now - #[prost(string, tag = "1")] - pub query_type: ::prost::alloc::string::String, - /// is used to define KV-storage keys for which we want to get values from - /// remote chain - #[prost(message, repeated, tag = "2")] - pub keys: ::prost::alloc::vec::Vec, - /// is used to define a filter for transaction search ICQ - #[prost(string, tag = "3")] - pub transactions_filter: ::prost::alloc::string::String, - /// is IBC connection ID for getting ConsensusState to verify proofs - #[prost(string, tag = "4")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - /// is used to specify how often (in neutron blocks) the query must be updated - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub update_period: u64, - /// is the signer of the message - #[prost(string, tag = "6")] - pub sender: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgRegisterInterchainQueryResponse")] -pub struct MsgRegisterInterchainQueryResponse { - #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgSubmitQueryResult")] -pub struct MsgSubmitQueryResult { - #[prost(uint64, tag = "1")] - #[serde(alias = "queryID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_id: u64, - #[prost(string, tag = "2")] - pub sender: ::prost::alloc::string::String, - /// is the IBC client ID for an IBC connection between Neutron chain and target - /// chain (where the result was obtained from) - #[prost(string, tag = "3")] - #[serde(alias = "clientID")] - pub client_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "4")] - pub result: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryResult")] -pub struct QueryResult { - #[prost(message, repeated, tag = "1")] - pub kv_results: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub block: ::core::option::Option, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub revision: u64, - #[prost(bool, tag = "5")] - pub allow_kv_callbacks: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.StorageValue")] -pub struct StorageValue { - /// is the substore name (acc, staking, etc.) - #[prost(string, tag = "1")] - pub storage_prefix: ::prost::alloc::string::String, - /// is the key in IAVL store - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - /// is the value in IAVL store - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, - /// is the Merkle Proof which proves existence of key-value pair in IAVL - /// storage - #[prost(message, optional, tag = "4")] - pub proof: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.Block")] -pub struct Block { - /// We need to know block X+1 to verify response of transaction for block X - /// since LastResultsHash is root hash of all results from the txs from the - /// previous block - #[prost(message, optional, tag = "1")] - pub next_block_header: ::core::option::Option, - /// We need to know block X to verify inclusion of transaction for block X - #[prost(message, optional, tag = "2")] - pub header: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub tx: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.TxValue")] -pub struct TxValue { - #[prost(message, optional, tag = "1")] - pub response: ::core::option::Option, - /// is the Merkle Proof which proves existence of response in block with height - /// next_block_header.Height - #[prost(message, optional, tag = "2")] - pub delivery_proof: ::core::option::Option, - /// is the Merkle Proof which proves existence of data in block with height - /// header.Height - #[prost(message, optional, tag = "3")] - pub inclusion_proof: ::core::option::Option, - /// is body of the transaction - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgSubmitQueryResultResponse")] -pub struct MsgSubmitQueryResultResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgRemoveInterchainQueryRequest")] -pub struct MsgRemoveInterchainQueryRequest { - #[prost(uint64, tag = "1")] - #[serde(alias = "queryID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_id: u64, - /// is the signer of the message - #[prost(string, tag = "2")] - pub sender: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgRemoveInterchainQueryResponse")] -pub struct MsgRemoveInterchainQueryResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgUpdateInterchainQueryRequest")] -pub struct MsgUpdateInterchainQueryRequest { - #[prost(uint64, tag = "1")] - #[serde(alias = "queryID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_id: u64, - #[prost(message, repeated, tag = "2")] - pub new_keys: ::prost::alloc::vec::Vec, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub new_update_period: u64, - #[prost(string, tag = "4")] - pub new_transactions_filter: ::prost::alloc::string::String, - /// is the signer of the message - #[prost(string, tag = "5")] - pub sender: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgUpdateInterchainQueryResponse")] -pub struct MsgUpdateInterchainQueryResponse {} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/interchainqueries parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryParamsRequest")] -#[proto_query( - path = "/neutron.interchainqueries.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueriesRequest")] -#[proto_query( - path = "/neutron.interchainqueries.Query/RegisteredQueries", - response_type = QueryRegisteredQueriesResponse -)] -pub struct QueryRegisteredQueriesRequest { - #[prost(string, repeated, tag = "1")] - pub owners: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - #[prost(string, tag = "2")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub pagination: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueriesResponse")] -pub struct QueryRegisteredQueriesResponse { - #[prost(message, repeated, tag = "1")] - pub registered_queries: ::prost::alloc::vec::Vec, - /// pagination defines the pagination in the response. - #[prost(message, optional, tag = "2")] - pub pagination: - ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueryRequest")] -#[proto_query( - path = "/neutron.interchainqueries.Query/RegisteredQuery", - response_type = QueryRegisteredQueryResponse -)] -pub struct QueryRegisteredQueryRequest { - #[prost(uint64, tag = "1")] - #[serde(alias = "queryID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_id: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueryResponse")] -pub struct QueryRegisteredQueryResponse { - #[prost(message, optional, tag = "1")] - pub registered_query: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueryResultRequest")] -#[proto_query( - path = "/neutron.interchainqueries.Query/QueryResult", - response_type = QueryRegisteredQueryResultResponse -)] -pub struct QueryRegisteredQueryResultRequest { - #[prost(uint64, tag = "1")] - #[serde(alias = "queryID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub query_id: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueryResultResponse")] -pub struct QueryRegisteredQueryResultResponse { - #[prost(message, optional, tag = "1")] - pub result: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.Transaction")] -pub struct Transaction { - #[prost(uint64, tag = "1")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryLastRemoteHeight")] -#[proto_query( - path = "/neutron.interchainqueries.Query/LastRemoteHeight", - response_type = QueryLastRemoteHeightResponse -)] -pub struct QueryLastRemoteHeight { - #[prost(string, tag = "1")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchainqueries.QueryLastRemoteHeightResponse")] -pub struct QueryLastRemoteHeightResponse { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, -} -pub struct InterchainqueriesQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> InterchainqueriesQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn registered_queries( - &self, - owners: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - connection_id: ::prost::alloc::string::String, - pagination: ::core::option::Option, - ) -> Result { - QueryRegisteredQueriesRequest { - owners, - connection_id, - pagination, - } - .query(self.querier) - } - pub fn registered_query( - &self, - query_id: u64, - ) -> Result { - QueryRegisteredQueryRequest { query_id }.query(self.querier) - } - pub fn query_result( - &self, - query_id: u64, - ) -> Result { - QueryRegisteredQueryResultRequest { query_id }.query(self.querier) - } - pub fn last_remote_height( - &self, - connection_id: ::prost::alloc::string::String, - ) -> Result { - QueryLastRemoteHeight { connection_id }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/interchaintxs/mod.rs b/packages/neutron-sdk/src/proto_types/neutron/interchaintxs/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/interchaintxs/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/neutron/interchaintxs/v1.rs b/packages/neutron-sdk/src/proto_types/neutron/interchaintxs/v1.rs deleted file mode 100644 index f34f90ca..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/interchaintxs/v1.rs +++ /dev/null @@ -1,308 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Params defines the parameters for the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.Params")] -pub struct Params { - /// Defines maximum amount of messages to be passed in MsgSubmitTx - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub msg_submit_tx_max_messages: u64, - /// Defines a minimum fee required to register interchain account - #[prost(message, repeated, tag = "2")] - pub register_fee: ::prost::alloc::vec::Vec, -} -/// GenesisState defines the interchaintxs module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.GenesisState")] -pub struct GenesisState { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryParamsRequest is request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.QueryParamsRequest")] -#[proto_query( - path = "/neutron.interchaintxs.v1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params holds all the parameters of this module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.QueryInterchainAccountAddressRequest")] -#[proto_query( - path = "/neutron.interchaintxs.v1.Query/InterchainAccountAddress", - response_type = QueryInterchainAccountAddressResponse -)] -pub struct QueryInterchainAccountAddressRequest { - /// owner_address is the owner of the interchain account on the controller - /// chain - #[prost(string, tag = "1")] - pub owner_address: ::prost::alloc::string::String, - /// interchain_account_id is an identifier of your interchain account from - /// which you want to execute msgs - #[prost(string, tag = "2")] - #[serde(alias = "interchain_accountID")] - pub interchain_account_id: ::prost::alloc::string::String, - /// connection_id is an IBC connection identifier between Neutron and remote - /// chain - #[prost(string, tag = "3")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, -} -/// Query response for an interchain account address -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.QueryInterchainAccountAddressResponse")] -pub struct QueryInterchainAccountAddressResponse { - /// The corresponding interchain account address on the host chain - #[prost(string, tag = "1")] - pub interchain_account_address: ::prost::alloc::string::String, -} -/// MsgRegisterInterchainAccount is used to register an account on a remote zone. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.MsgRegisterInterchainAccount")] -pub struct MsgRegisterInterchainAccount { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - #[serde(alias = "interchain_accountID")] - pub interchain_account_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "4")] - pub register_fee: ::prost::alloc::vec::Vec, -} -/// MsgRegisterInterchainAccountResponse is the response type for -/// MsgRegisterInterchainAccount. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse")] -pub struct MsgRegisterInterchainAccountResponse { - #[prost(string, tag = "1")] - #[serde(alias = "channelID")] - pub channel_id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - #[serde(alias = "portID")] - pub port_id: ::prost::alloc::string::String, -} -/// MsgSubmitTx defines the payload for Msg/SubmitTx -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.MsgSubmitTx")] -pub struct MsgSubmitTx { - #[prost(string, tag = "1")] - pub from_address: ::prost::alloc::string::String, - /// interchain_account_id is supposed to be the unique identifier, e.g., - /// lido/kava. This allows contracts to have more than one interchain accounts - /// on remote zone This identifier will be a part of the portID that we'll - /// claim our capability for. - #[prost(string, tag = "2")] - #[serde(alias = "interchain_accountID")] - pub interchain_account_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - #[serde(alias = "connectionID")] - pub connection_id: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "4")] - pub msgs: ::prost::alloc::vec::Vec, - #[prost(string, tag = "5")] - pub memo: ::prost::alloc::string::String, - /// timeout in seconds after which the packet times out - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timeout: u64, - #[prost(message, optional, tag = "7")] - pub fee: ::core::option::Option, -} -/// MsgSubmitTxResponse defines the response for Msg/SubmitTx -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.MsgSubmitTxResponse")] -pub struct MsgSubmitTxResponse { - /// channel's sequence_id for outgoing ibc packet. Unique per a channel. - #[prost(uint64, tag = "1")] - #[serde(alias = "sequenceID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence_id: u64, - /// channel src channel on neutron side transaction was submitted from - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, -} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/interchaintxs parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.interchaintxs.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct InterchaintxsQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> InterchaintxsQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn interchain_account_address( - &self, - owner_address: ::prost::alloc::string::String, - interchain_account_id: ::prost::alloc::string::String, - connection_id: ::prost::alloc::string::String, - ) -> Result { - QueryInterchainAccountAddressRequest { - owner_address, - interchain_account_id, - connection_id, - } - .query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/neutron/mod.rs b/packages/neutron-sdk/src/proto_types/neutron/mod.rs deleted file mode 100644 index aa66dd62..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub mod contractmanager; -pub mod cron; -pub mod dex; -pub mod dynamicfees; -pub mod feeburner; -pub mod feerefunder; -pub mod interchainqueries; -pub mod interchaintxs; -pub mod transfer; diff --git a/packages/neutron-sdk/src/proto_types/neutron/transfer.rs b/packages/neutron-sdk/src/proto_types/neutron/transfer.rs deleted file mode 100644 index 6d9272da..00000000 --- a/packages/neutron-sdk/src/proto_types/neutron/transfer.rs +++ /dev/null @@ -1,120 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.transfer.MsgTransfer")] -pub struct MsgTransfer { - /// the port on which the packet will be sent - #[prost(string, tag = "1")] - pub source_port: ::prost::alloc::string::String, - /// the channel by which the packet will be sent - #[prost(string, tag = "2")] - pub source_channel: ::prost::alloc::string::String, - /// the tokens to be transferred - #[prost(message, optional, tag = "3")] - pub token: ::core::option::Option, - /// the sender address - #[prost(string, tag = "4")] - pub sender: ::prost::alloc::string::String, - /// the recipient address on the destination chain - #[prost(string, tag = "5")] - pub receiver: ::prost::alloc::string::String, - /// Timeout height relative to the current block height. - /// The timeout is disabled when set to 0. - #[prost(message, optional, tag = "6")] - pub timeout_height: ::core::option::Option, - /// Timeout timestamp in absolute nanoseconds since unix epoch. - /// The timeout is disabled when set to 0. - #[prost(uint64, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub timeout_timestamp: u64, - #[prost(string, tag = "8")] - pub memo: ::prost::alloc::string::String, - #[prost(message, optional, tag = "9")] - pub fee: ::core::option::Option, -} -/// MsgTransferResponse is the modified response type for -/// ibc-go MsgTransfer. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.transfer.MsgTransferResponse")] -pub struct MsgTransferResponse { - /// channel's sequence_id for outgoing ibc packet. Unique per a channel. - #[prost(uint64, tag = "1")] - #[serde(alias = "sequenceID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub sequence_id: u64, - /// channel src channel on neutron side transaction was submitted from - #[prost(string, tag = "2")] - pub channel: ::prost::alloc::string::String, -} -/// MsgUpdateParams is the Msg/UpdateParams request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.transfer.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// signer address - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// params defines the transfer parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/neutron.transfer.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -#[allow(dead_code)] -pub struct TransferQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> TransferQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } -} diff --git a/packages/neutron-sdk/src/proto_types/osmosis/mod.rs b/packages/neutron-sdk/src/proto_types/osmosis/mod.rs deleted file mode 100644 index 0996d45e..00000000 --- a/packages/neutron-sdk/src/proto_types/osmosis/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod tokenfactory; diff --git a/packages/neutron-sdk/src/proto_types/osmosis/tokenfactory/mod.rs b/packages/neutron-sdk/src/proto_types/osmosis/tokenfactory/mod.rs deleted file mode 100644 index 8a438a5f..00000000 --- a/packages/neutron-sdk/src/proto_types/osmosis/tokenfactory/mod.rs +++ /dev/null @@ -1,65 +0,0 @@ -pub mod v1beta1; -use neutron_std_derive::CosmwasmExt; -/// WhitelistedHook describes a beforeSendHook which is allowed to be added and executed -/// SetBeforeSendHook can only be called on denoms where the denom creator and -/// code_id for the `contract_addr` match a WhitelistedHook -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.WhitelistedHook")] -pub struct WhitelistedHook { - #[prost(uint64, tag = "1")] - #[serde(alias = "codeID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code_id: u64, - #[prost(string, tag = "2")] - pub denom_creator: ::prost::alloc::string::String, -} -/// Params defines the parameters for the tokenfactory module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.Params")] -pub struct Params { - /// DenomCreationFee defines the fee to be charged on the creation of a new - /// denom. The fee is drawn from the MsgCreateDenom's sender account, and - /// transferred to the community pool. - #[prost(message, repeated, tag = "1")] - pub denom_creation_fee: ::prost::alloc::vec::Vec, - /// DenomCreationGasConsume defines the gas cost for creating a new denom. - /// This is intended as a spam deterrence mechanism. - /// - /// See: - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub denom_creation_gas_consume: u64, - /// FeeCollectorAddress is the address where fees collected from denom creation - /// are sent to - #[prost(string, tag = "3")] - pub fee_collector_address: ::prost::alloc::string::String, - /// whitelisted_hooks is the list of hooks which are allowed to be added and executed - #[prost(message, repeated, tag = "4")] - pub whitelisted_hooks: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/osmosis/tokenfactory/v1beta1.rs b/packages/neutron-sdk/src/proto_types/osmosis/tokenfactory/v1beta1.rs deleted file mode 100644 index a4404833..00000000 --- a/packages/neutron-sdk/src/proto_types/osmosis/tokenfactory/v1beta1.rs +++ /dev/null @@ -1,590 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata")] -pub struct DenomAuthorityMetadata { - /// Can be empty for no admin, or a valid osmosis address - #[prost(string, tag = "1")] - pub admin: ::prost::alloc::string::String, -} -/// GenesisState defines the tokenfactory module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.GenesisState")] -pub struct GenesisState { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub factory_denoms: ::prost::alloc::vec::Vec, -} -/// GenesisDenom defines a tokenfactory denom that is defined within genesis -/// state. The structure contains DenomAuthorityMetadata which defines the -/// denom's admin. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.GenesisDenom")] -pub struct GenesisDenom { - #[prost(string, tag = "1")] - pub denom: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub authority_metadata: ::core::option::Option, - #[prost(string, tag = "3")] - pub hook_contract_address: ::prost::alloc::string::String, -} -/// Params defines the parameters for the tokenfactory module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.Params")] -pub struct Params { - /// DenomCreationFee defines the fee to be charged on the creation of a new - /// denom. The fee is drawn from the MsgCreateDenom's sender account, and - /// transferred to the community pool. - #[prost(message, repeated, tag = "1")] - pub denom_creation_fee: - ::prost::alloc::vec::Vec, - /// DenomCreationGasConsume defines the gas cost for creating a new denom. - /// This is intended as a spam deterrence mechanism. - /// - /// See: - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub denom_creation_gas_consume: u64, - /// FeeCollectorAddress is the address where fees collected from denom creation - /// are sent to - #[prost(string, tag = "3")] - pub fee_collector_address: ::prost::alloc::string::String, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryParamsRequest")] -#[proto_query( - path = "/osmosis.tokenfactory.v1beta1.Query/Params", - response_type = QueryParamsResponse -)] -pub struct QueryParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryParamsResponse")] -pub struct QueryParamsResponse { - /// params defines the parameters of the module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// QueryDenomAuthorityMetadataRequest defines the request structure for the -/// DenomAuthorityMetadata gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest")] -#[proto_query( - path = "/osmosis.tokenfactory.v1beta1.Query/DenomAuthorityMetadata", - response_type = QueryDenomAuthorityMetadataResponse -)] -pub struct QueryDenomAuthorityMetadataRequest { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub subdenom: ::prost::alloc::string::String, -} -/// QueryDenomAuthorityMetadataResponse defines the response structure for the -/// DenomAuthorityMetadata gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse")] -pub struct QueryDenomAuthorityMetadataResponse { - #[prost(message, optional, tag = "1")] - pub authority_metadata: ::core::option::Option, -} -/// QueryDenomsFromCreatorRequest defines the request structure for the -/// DenomsFromCreator gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest")] -#[proto_query( - path = "/osmosis.tokenfactory.v1beta1.Query/DenomsFromCreator", - response_type = QueryDenomsFromCreatorResponse -)] -pub struct QueryDenomsFromCreatorRequest { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, -} -/// QueryDenomsFromCreatorRequest defines the response structure for the -/// DenomsFromCreator gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse")] -pub struct QueryDenomsFromCreatorResponse { - #[prost(string, repeated, tag = "1")] - pub denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest")] -#[proto_query( - path = "/osmosis.tokenfactory.v1beta1.Query/BeforeSendHookAddress", - response_type = QueryBeforeSendHookAddressResponse -)] -pub struct QueryBeforeSendHookAddressRequest { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub subdenom: ::prost::alloc::string::String, -} -/// QueryBeforeSendHookAddressResponse defines the response structure for the -/// DenomBeforeSendHook gRPC query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse")] -pub struct QueryBeforeSendHookAddressResponse { - #[prost(string, tag = "1")] - pub contract_addr: ::prost::alloc::string::String, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgCreateDenom")] -pub struct MsgCreateDenom { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// subdenom can be up to 44 "alphanumeric" characters long. - #[prost(string, tag = "2")] - pub subdenom: ::prost::alloc::string::String, -} -/// MsgCreateDenomResponse is the return value of MsgCreateDenom -/// It returns the full string of the newly created denom -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse")] -pub struct MsgCreateDenomResponse { - #[prost(string, tag = "1")] - pub new_token_denom: ::prost::alloc::string::String, -} -/// 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgMint")] -pub struct MsgMint { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub amount: ::core::option::Option, - #[prost(string, tag = "3")] - pub mint_to_address: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgMintResponse")] -pub struct 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgBurn")] -pub struct MsgBurn { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub amount: ::core::option::Option, - #[prost(string, tag = "3")] - pub burn_from_address: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgBurnResponse")] -pub struct MsgBurnResponse {} -/// MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign -/// adminship of a denom to a new account -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgChangeAdmin")] -pub struct MsgChangeAdmin { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub denom: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub new_admin: ::prost::alloc::string::String, -} -/// MsgChangeAdminResponse defines the response structure for an executed -/// MsgChangeAdmin message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse")] -pub struct MsgChangeAdminResponse {} -/// MsgSetBeforeSendHook is the sdk.Msg type for allowing an admin account to -/// assign a CosmWasm contract to call with a BeforeSend hook -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook")] -pub struct MsgSetBeforeSendHook { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub denom: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub contract_addr: ::prost::alloc::string::String, -} -/// MsgSetBeforeSendHookResponse defines the response structure for an executed -/// MsgSetBeforeSendHook message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse")] -pub struct MsgSetBeforeSendHookResponse {} -/// MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set -/// the denom's bank metadata -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata")] -pub struct MsgSetDenomMetadata { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub metadata: ::core::option::Option, -} -/// MsgSetDenomMetadataResponse defines the response structure for an executed -/// MsgSetDenomMetadata message. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse")] -pub struct MsgSetDenomMetadataResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgForceTransfer")] -pub struct MsgForceTransfer { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub amount: ::core::option::Option, - #[prost(string, tag = "3")] - pub transfer_from_address: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub transfer_to_address: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgForceTransferResponse")] -pub struct MsgForceTransferResponse {} -/// MsgUpdateParams is the MsgUpdateParams request type. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// Authority is the address of the governance account. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params defines the x/tokenfactory parameters to update. - /// - /// NOTE: All parameters must be supplied. - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -/// MsgUpdateParamsResponse defines the response structure for executing a -/// MsgUpdateParams message. -/// -/// Since: 0.47 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct TokenfactoryQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> TokenfactoryQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn params(&self) -> Result { - QueryParamsRequest {}.query(self.querier) - } - pub fn denom_authority_metadata( - &self, - creator: ::prost::alloc::string::String, - subdenom: ::prost::alloc::string::String, - ) -> Result { - QueryDenomAuthorityMetadataRequest { creator, subdenom }.query(self.querier) - } - pub fn denoms_from_creator( - &self, - creator: ::prost::alloc::string::String, - ) -> Result { - QueryDenomsFromCreatorRequest { creator }.query(self.querier) - } - pub fn before_send_hook_address( - &self, - creator: ::prost::alloc::string::String, - subdenom: ::prost::alloc::string::String, - ) -> Result { - QueryBeforeSendHookAddressRequest { creator, subdenom }.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/abci/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/abci/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/abci/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/abci/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/abci/v1.rs deleted file mode 100644 index cdf80f5c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/abci/v1.rs +++ /dev/null @@ -1,21 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// OracleVoteExtension defines the vote extension structure for oracle prices. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.abci.v1.OracleVoteExtension")] -pub struct OracleVoteExtension { - /// Prices defines a map of id(CurrencyPair) -> price.Bytes() . i.e. 1 -> - /// 0x123.. (bytes). Notice the `id` function is determined by the - /// `CurrencyPairIDStrategy` used in the VoteExtensionHandler. - #[prost(map = "uint64, bytes", tag = "1")] - pub prices: ::std::collections::HashMap>, -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/alerts/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/alerts/mod.rs deleted file mode 100644 index a8429e39..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/alerts/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/alerts/module/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/alerts/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/alerts/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/alerts/module/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/alerts/module/v1.rs deleted file mode 100644 index cf7303a2..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/alerts/module/v1.rs +++ /dev/null @@ -1,21 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the alerts module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.module.v1.Module")] -pub struct Module { - /// Authority defines the custom module authority. The authority will default - /// to the governance module account if not set. If the authority is set, the - /// address provided must be a valid bech-32 address - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/alerts/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/alerts/v1.rs deleted file mode 100644 index 4a53cdac..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/alerts/v1.rs +++ /dev/null @@ -1,576 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Alert defines the basic meta-data necessary for the alerts module to resolve -/// a claim that the price of a CurrencyPair on-chain is deviating from the price -/// off-chain. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.Alert")] -pub struct Alert { - /// height represents the height for which the alert is filed. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - /// signer is the signer of this alert, this is the address that will receive - /// the reward in the case of a positive conclusion, or whose bond will get - /// slashed in the event of a negative conclusion. - #[prost(string, tag = "2")] - pub signer: ::prost::alloc::string::String, - /// currency_pair is the currency-pair that this claim asserts is deviating - /// from the price off-chain. - #[prost(message, optional, tag = "3")] - pub currency_pair: ::core::option::Option, -} -/// AlertStatus contains the module specific state for an alert: Has the alert -/// been concluded? What height was the alert submitted, what height should the -/// alert be purged? -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertStatus")] -pub struct AlertStatus { - /// ConclusionStatus determines whether the alert has been concluded. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub conclusion_status: u64, - /// SubmissionHeight is the height that the alert was submitted in. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub submission_height: u64, - /// SubmissionTimestamp is the block-timestamp of the block that the alert was - /// submitted in (as a UTC value in Unix time). - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub submission_timestamp: u64, - /// PurgeHeight is the height at which the alert should be purged. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub purge_height: u64, -} -/// AlertWithStatus represents a wrapper around the Alert and AlertStatus -/// objects, this is so that the module specific information about Alerts can be -/// packaged together. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertWithStatus")] -pub struct AlertWithStatus { - /// alert is the alert that this status corresponds to. - #[prost(message, optional, tag = "1")] - pub alert: ::core::option::Option, - /// status is the status of the alert. - #[prost(message, optional, tag = "2")] - pub status: ::core::option::Option, -} -/// Signature is a container for a signer address mapped to a signature. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.Signature")] -pub struct Signature { - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, -} -/// MultiSigConcluson defines a conclusion that is accompanied by a set of -/// signatures. The signature is defined over the alert UID, status, OracleData, -/// and PriceBound. The signatures are used to verify that the conclusion is -/// valid. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MultiSigConclusion")] -pub struct MultiSigConclusion { - /// alert is the alert that this conclusion corresponds to. - #[prost(message, optional, tag = "1")] - pub alert: ::core::option::Option, - /// oracle_data is the oracle data that this conclusion references. - #[prost(message, optional, tag = "2")] - pub extended_commit_info: - ::core::option::Option, - /// signatures is a map of signer -> signature. Where the signature is over - /// Alert.UID, PriceBound, the marshalled ExtendedCommitInfo, and status. - #[prost(message, repeated, tag = "3")] - pub signatures: ::prost::alloc::vec::Vec, - /// price-bound is the price bound of the currency-pair off-chain for the - /// designated time-range. - #[prost(message, optional, tag = "4")] - pub price_bound: ::core::option::Option, - /// status is the status of the conclusion. - #[prost(bool, tag = "5")] - pub status: bool, - /// CurrencyPairID is the ID of the currency-pair that this conclusion - /// corresponds to. - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub currency_pair_i_d: u64, -} -/// MultiSigConclusionVerificationParams defines the parameters necessary to -/// verify a MultiSigConclusion. It contains a map between signer and public key. -/// Notice, the public-key (value) are the base-64 encoded bytes of the public -/// key. And the signer (key) is the bech32 encoded address of the signer. -/// Notice, all public keys must be secp256 keys. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MultiSigConclusionVerificationParams")] -pub struct MultiSigConclusionVerificationParams { - /// signers is a map of signer -> public key. - #[prost(message, repeated, tag = "1")] - pub signers: ::prost::alloc::vec::Vec, -} -/// PriceBound represents the bounds of the price of a currency-pair off chain -/// for a designated time-range -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.PriceBound")] -pub struct PriceBound { - #[prost(string, tag = "1")] - pub high: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub low: ::prost::alloc::string::String, -} -/// AlertParams is the set of parameters for the x/Alerts module's Alerting. It -/// defines whether or not Alerts can be submitted, and if so, the minimum -/// bond amount required to submit an Alert. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertParams")] -pub struct AlertParams { - /// Enabled is a boolean defining whether or not Alerts can be submitted - /// to the module - #[prost(bool, tag = "1")] - pub enabled: bool, - /// BondAmount is the minimum amount of bond required to submit an - /// Alert - #[prost(message, optional, tag = "2")] - pub bond_amount: ::core::option::Option, - /// MaxBlockAge defines the maximum age of an Alert before it is pruned, notice - /// this is defined wrt. the height that the Alert references, i.e Alerts are - /// only relevant until Alert.Height + MaxBlockAge is reached. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_block_age: u64, -} -/// PruningParams defines the criterion for pruning Alerts from the state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.PruningParams")] -pub struct PruningParams { - /// Enabled defines whether Alerts are to be pruned - #[prost(bool, tag = "1")] - pub enabled: bool, - /// BlocksToPrune defines the number of blocks until an Alert will be pruned - /// from state, notice this is defined wrt. the current block height, i.e - /// Alerts will be stored in state until current_height + BlocksToPrune is - /// reached. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub blocks_to_prune: u64, -} -/// Params is the set of parameters for the x/Alerts module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.Params")] -pub struct Params { - /// AlertParams is the set of parameters for the x/Alerts module's Alerting. - #[prost(message, optional, tag = "1")] - pub alert_params: ::core::option::Option, - /// ConclusionVerificationParams is the set of parameters for the x/Alerts - /// module's conclusion verification. - #[prost(message, optional, tag = "2")] - pub conclusion_verification_params: ::core::option::Option, - /// PruningParams is the set of parameters for the x/Alerts module's pruning. - #[prost(message, optional, tag = "3")] - pub pruning_params: ::core::option::Option, -} -/// GenesisState is the state that must be provided at genesis. It contains -/// params for the module, and the set initial Alerts. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.GenesisState")] -pub struct GenesisState { - /// Params is the set of x/Alerts parameters - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// Alerts is the set of Alerts that have been submitted to the module - #[prost(message, repeated, tag = "2")] - pub alerts: ::prost::alloc::vec::Vec, -} -/// AlertsRequest is the request type for the Query.Alerts RPC method, the status -/// field indicates whether the request should return only Unconcluded / -/// Concluded Alerts, or all Alerts. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertsRequest")] -#[proto_query(path = "/slinky.alerts.v1.Query/Alerts", response_type = AlertsResponse)] -pub struct AlertsRequest { - #[prost(enumeration = "AlertStatusId", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, -} -/// AlertsResponse is the response type for the Query.Alerts RPC method, it -/// contains the list of Alerts that are being tracked by the alerts module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.AlertsResponse")] -pub struct AlertsResponse { - #[prost(message, repeated, tag = "1")] - pub alerts: ::prost::alloc::vec::Vec, -} -/// ParamsRequest is the request type for the Query.Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.ParamsRequest")] -#[proto_query(path = "/slinky.alerts.v1.Query/Params", response_type = ParamsResponse)] -pub struct ParamsRequest {} -/// ParamsResponse is the response type for the Query.Params RPC method, it -/// contains the Params of the module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.ParamsResponse")] -pub struct ParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// AlertStatus is the type for the status of an Alert, it can be Unconcluded or -/// Concluded. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum AlertStatusId { - ConclusionStatusUnspecified = 0, - ConclusionStatusUnconcluded = 1, - ConclusionStatusConcluded = 2, -} -impl AlertStatusId { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - AlertStatusId::ConclusionStatusUnspecified => "CONCLUSION_STATUS_UNSPECIFIED", - AlertStatusId::ConclusionStatusUnconcluded => "CONCLUSION_STATUS_UNCONCLUDED", - AlertStatusId::ConclusionStatusConcluded => "CONCLUSION_STATUS_CONCLUDED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "CONCLUSION_STATUS_UNSPECIFIED" => Some(Self::ConclusionStatusUnspecified), - "CONCLUSION_STATUS_UNCONCLUDED" => Some(Self::ConclusionStatusUnconcluded), - "CONCLUSION_STATUS_CONCLUDED" => Some(Self::ConclusionStatusConcluded), - _ => None, - } - } -} -/// ValidatorAlertIncentive defines the incentive strategy to be executed for a -/// validator that has been confirmed to have at fault for an x/alerts alert. -/// This strategy is expected to slash half of the validator's stake. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.ValidatorAlertIncentive")] -pub struct ValidatorAlertIncentive { - /// The validator that has been confirmed to have been at fault for an alert. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, - /// AlertSigner is the signer of the alert referenced by the conclusion that - /// created this incentive. - #[prost(string, tag = "2")] - pub alert_signer: ::prost::alloc::string::String, - /// AlertHeight is the height at which the infraction occurred - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub alert_height: u64, -} -/// MsgAlert defines a message to create an alert. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgAlert")] -pub struct MsgAlert { - /// alert is the alert to be filed - #[prost(message, optional, tag = "1")] - pub alert: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgAlertResponse")] -pub struct MsgAlertResponse {} -/// MsgConclusion defines a message carrying a Conclusion made by the SecondTier, -/// which will be used to close an alert. And trigger any ramifications of the -/// conclusion. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgConclusion")] -pub struct MsgConclusion { - /// signer is the signer of this transaction (notice, this may not always be a - /// node from the SecondTier) - #[prost(string, tag = "1")] - pub signer: ::prost::alloc::string::String, - /// conclusion is the conclusion to be filed - #[prost(message, optional, tag = "2")] - pub conclusion: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgConclusionResponse")] -pub struct MsgConclusionResponse {} -/// MsgUpdateParams defines the message type expected by the UpdateParams rpc. It -/// contains an authority address, and the new Params for the x/alerts module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgUpdateParams")] -pub struct MsgUpdateParams { - /// authority is the address of the authority that is submitting the update - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// params is the new set of parameters for the x/alerts module - #[prost(message, optional, tag = "2")] - pub params: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.alerts.v1.MsgUpdateParamsResponse")] -pub struct MsgUpdateParamsResponse {} -pub struct AlertsQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> AlertsQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn alerts(&self, status: i32) -> Result { - AlertsRequest { status }.query(self.querier) - } - pub fn params(&self) -> Result { - ParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/incentives/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/incentives/mod.rs deleted file mode 100644 index a8429e39..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/incentives/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/incentives/module/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/incentives/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/incentives/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/incentives/module/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/incentives/module/v1.rs deleted file mode 100644 index 33edfda7..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/incentives/module/v1.rs +++ /dev/null @@ -1,15 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the incentives module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.module.v1.Module")] -pub struct Module {} diff --git a/packages/neutron-sdk/src/proto_types/slinky/incentives/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/incentives/v1.rs deleted file mode 100644 index 3753eb9c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/incentives/v1.rs +++ /dev/null @@ -1,192 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// BadPriceIncentive is a message that contains the information about a bad -/// price that was submitted by a validator. -/// -/// NOTE: This is an example of a bad price incentive. It is not used in -/// production. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.BadPriceIncentive")] -pub struct BadPriceIncentive { - /// Validator is the address of the validator that submitted the bad price. - #[prost(string, tag = "1")] - pub validator: ::prost::alloc::string::String, - /// Amount is the amount to slash. - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -/// GoodPriceIncentive is a message that contains the information about a good -/// price that was submitted by a validator. -/// -/// NOTE: This is an example of a good price incentive. It is not used in -/// production. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.GoodPriceIncentive")] -pub struct GoodPriceIncentive { - /// Validator is the address of the validator that submitted the good price. - #[prost(string, tag = "1")] - pub validator: ::prost::alloc::string::String, - /// Amount is the amount to reward. - #[prost(string, tag = "2")] - pub amount: ::prost::alloc::string::String, -} -/// GenesisState is the genesis-state for the x/incentives module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.GenesisState")] -pub struct GenesisState { - /// Registry is a list of incentives by type. The registry defined here - /// should be a subset of the incentive types defined in the incentive - /// module (keeper). - #[prost(message, repeated, tag = "1")] - pub registry: ::prost::alloc::vec::Vec, -} -/// IncentivesByType encapsulates a list of incentives by type. Each of the -/// entries here must correspond to the same incentive type defined here. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.IncentivesByType")] -pub struct IncentivesByType { - /// IncentiveType is the incentive type i.e. (BadPriceIncentiveType, - /// GoodPriceIncentiveType). - #[prost(string, tag = "1")] - pub incentive_type: ::prost::alloc::string::String, - /// Entries is a list of incentive bytes. - #[prost(bytes = "vec", repeated, tag = "2")] - pub entries: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// GetIncentivesByTypeRequest is the request type for the -/// Query/GetIncentivesByType RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.GetIncentivesByTypeRequest")] -#[proto_query( - path = "/slinky.incentives.v1.Query/GetIncentivesByType", - response_type = GetIncentivesByTypeResponse -)] -pub struct GetIncentivesByTypeRequest { - /// IncentiveType is the incentive type i.e. (BadPriceIncentiveType, - /// GoodPriceIncentiveType). - #[prost(string, tag = "1")] - pub incentive_type: ::prost::alloc::string::String, -} -/// GetIncentivesByTypeResponse is the response type for the -/// Query/GetIncentivesByType RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.GetIncentivesByTypeResponse")] -pub struct GetIncentivesByTypeResponse { - /// Entries is the list of incentives of the given type. - #[prost(bytes = "vec", repeated, tag = "1")] - pub entries: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// GetAllIncentivesRequest is the request type for the Query/GetAllIncentives -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.GetAllIncentivesRequest")] -#[proto_query( - path = "/slinky.incentives.v1.Query/GetAllIncentives", - response_type = GetAllIncentivesResponse -)] -pub struct GetAllIncentivesRequest {} -/// GetAllIncentivesResponse is the response type for the Query/GetAllIncentives -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.incentives.v1.GetAllIncentivesResponse")] -pub struct GetAllIncentivesResponse { - /// Registry is the list of all incentives, grouped by type. - #[prost(message, repeated, tag = "1")] - pub registry: ::prost::alloc::vec::Vec, -} -pub struct IncentivesQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> IncentivesQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn get_incentives_by_type( - &self, - incentive_type: ::prost::alloc::string::String, - ) -> Result { - GetIncentivesByTypeRequest { incentive_type }.query(self.querier) - } - pub fn get_all_incentives(&self) -> Result { - GetAllIncentivesRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/marketmap/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/marketmap/mod.rs deleted file mode 100644 index a8429e39..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/marketmap/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/marketmap/module/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/marketmap/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/marketmap/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/marketmap/module/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/marketmap/module/v1.rs deleted file mode 100644 index c6f0e95e..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/marketmap/module/v1.rs +++ /dev/null @@ -1,25 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the builder module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.module.v1.Module")] -pub struct Module { - /// Authority defines the custom module authority. If not set, defaults to the - /// governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// HooksOrder specifies the order of marketmap hooks and should be a list - /// of module names which provide a marketmap hooks instance. If no order is - /// provided, then hooks will be applied in alphabetical order of module names. - #[prost(string, repeated, tag = "2")] - pub hooks_order: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/marketmap/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/marketmap/v1.rs deleted file mode 100644 index 3664e92f..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/marketmap/v1.rs +++ /dev/null @@ -1,522 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Market encapsulates a Ticker and its provider-specific configuration. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.Market")] -pub struct Market { - /// Ticker represents a price feed for a given asset pair i.e. BTC/USD. The - /// price feed is scaled to a number of decimal places and has a minimum number - /// of providers required to consider the ticker valid. - #[prost(message, optional, tag = "1")] - pub ticker: ::core::option::Option, - /// ProviderConfigs is the list of provider-specific configs for this Market. - #[prost(message, repeated, tag = "2")] - pub provider_configs: ::prost::alloc::vec::Vec, -} -/// Ticker represents a price feed for a given asset pair i.e. BTC/USD. The price -/// feed is scaled to a number of decimal places and has a minimum number of -/// providers required to consider the ticker valid. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.Ticker")] -pub struct Ticker { - /// CurrencyPair is the currency pair for this ticker. - #[prost(message, optional, tag = "1")] - pub currency_pair: ::core::option::Option, - /// Decimals is the number of decimal places for the ticker. The number of - /// decimal places is used to convert the price to a human-readable format. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub decimals: u64, - /// MinProviderCount is the minimum number of providers required to consider - /// the ticker valid. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub min_provider_count: u64, - /// Enabled is the flag that denotes if the Ticker is enabled for price - /// fetching by an oracle. - #[prost(bool, tag = "14")] - pub enabled: bool, - /// MetadataJSON is a string of JSON that encodes any extra configuration - /// for the given ticker. - #[prost(string, tag = "15")] - pub metadata_json: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.ProviderConfig")] -pub struct ProviderConfig { - /// Name corresponds to the name of the provider for which the configuration is - /// being set. - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, - /// OffChainTicker is the off-chain representation of the ticker i.e. BTC/USD. - /// The off-chain ticker is unique to a given provider and is used to fetch the - /// price of the ticker from the provider. - #[prost(string, tag = "2")] - pub off_chain_ticker: ::prost::alloc::string::String, - /// NormalizeByPair is the currency pair for this ticker to be normalized by. - /// For example, if the desired Ticker is BTC/USD, this market could be reached - /// using: OffChainTicker = BTC/USDT NormalizeByPair = USDT/USD This field is - /// optional and nullable. - #[prost(message, optional, tag = "3")] - pub normalize_by_pair: ::core::option::Option, - /// Invert is a boolean indicating if the BASE and QUOTE of the market should - /// be inverted. i.e. BASE -> QUOTE, QUOTE -> BASE - #[prost(bool, tag = "4")] - pub invert: bool, - /// MetadataJSON is a string of JSON that encodes any extra configuration - /// for the given provider config. - #[prost(string, tag = "15")] - pub metadata_json: ::prost::alloc::string::String, -} -/// MarketMap maps ticker strings to their Markets. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketMap")] -pub struct MarketMap { - /// Markets is the full list of tickers and their associated configurations - /// to be stored on-chain. - #[prost(map = "string, message", tag = "1")] - pub markets: ::std::collections::HashMap<::prost::alloc::string::String, Market>, -} -/// Params defines the parameters for the x/marketmap module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.Params")] -pub struct Params { - /// MarketAuthorities is the list of authority accounts that are able to - /// control updating the marketmap. - #[prost(string, repeated, tag = "1")] - pub market_authorities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Admin is an address that can remove addresses from the MarketAuthorities - /// list. Only governance can add to the MarketAuthorities or change the Admin. - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, -} -/// GenesisState defines the x/marketmap module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.GenesisState")] -pub struct GenesisState { - /// MarketMap defines the global set of market configurations for all providers - /// and markets. - #[prost(message, optional, tag = "1")] - pub market_map: ::core::option::Option, - /// LastUpdated is the last block height that the market map was updated. - /// This field can be used as an optimization for clients checking if there - /// is a new update to the map. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_updated: u64, - /// Params are the parameters for the x/marketmap module. - #[prost(message, optional, tag = "3")] - pub params: ::core::option::Option, -} -/// MarketMapRequest is the query request for the MarketMap query. -/// It takes no arguments. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketMapRequest")] -#[proto_query( - path = "/slinky.marketmap.v1.Query/MarketMap", - response_type = MarketMapResponse -)] -pub struct MarketMapRequest {} -/// MarketMapResponse is the query response for the MarketMap query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketMapResponse")] -pub struct MarketMapResponse { - /// MarketMap defines the global set of market configurations for all providers - /// and markets. - #[prost(message, optional, tag = "1")] - pub market_map: ::core::option::Option, - /// LastUpdated is the last block height that the market map was updated. - /// This field can be used as an optimization for clients checking if there - /// is a new update to the map. - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_updated: u64, - /// ChainId is the chain identifier for the market map. - #[prost(string, tag = "3")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, -} -/// MarketRequest is the query request for the Market query. -/// It takes the currency pair of the market as an argument. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketRequest")] -#[proto_query( - path = "/slinky.marketmap.v1.Query/Market", - response_type = MarketResponse -)] -pub struct MarketRequest { - /// CurrencyPair is the currency pair associated with the market being - /// requested. - #[prost(message, optional, tag = "1")] - pub currency_pair: ::core::option::Option, -} -/// MarketResponse is the query response for the Market query. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MarketResponse")] -pub struct MarketResponse { - /// Market is the configuration of a single market to be price-fetched for. - #[prost(message, optional, tag = "1")] - pub market: ::core::option::Option, -} -/// ParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.ParamsRequest")] -#[proto_query( - path = "/slinky.marketmap.v1.Query/Params", - response_type = ParamsResponse -)] -pub struct ParamsRequest {} -/// ParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.ParamsResponse")] -pub struct ParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// LastUpdatedRequest is the request type for the Query/LastUpdated RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.LastUpdatedRequest")] -#[proto_query( - path = "/slinky.marketmap.v1.Query/LastUpdated", - response_type = LastUpdatedResponse -)] -pub struct LastUpdatedRequest {} -/// LastUpdatedResponse is the response type for the Query/LastUpdated RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.LastUpdatedResponse")] -pub struct LastUpdatedResponse { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_updated: u64, -} -/// MsgCreateMarkets defines a message carrying a payload for creating markets in -/// the x/marketmap module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgCreateMarkets")] -pub struct MsgCreateMarkets { - /// Authority is the signer of this transaction. This authority must be - /// authorized by the module to execute the message. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// CreateMarkets is the list of all markets to be created for the given - /// transaction. - #[prost(message, repeated, tag = "2")] - pub create_markets: ::prost::alloc::vec::Vec, -} -/// MsgUpdateMarketMapResponse is the response message for MsgUpdateMarketMap. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgCreateMarketsResponse")] -pub struct MsgCreateMarketsResponse {} -/// MsgUpdateMarkets defines a message carrying a payload for updating the -/// x/marketmap module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgUpdateMarkets")] -pub struct MsgUpdateMarkets { - /// Authority is the signer of this transaction. This authority must be - /// authorized by the module to execute the message. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// UpdateMarkets is the list of all markets to be updated for the given - /// transaction. - #[prost(message, repeated, tag = "2")] - pub update_markets: ::prost::alloc::vec::Vec, -} -/// MsgUpdateMarketsResponse is the response message for MsgUpdateMarkets. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgUpdateMarketsResponse")] -pub struct MsgUpdateMarketsResponse {} -/// MsgParams defines the Msg/Params request type. It contains the -/// new parameters for the x/marketmap module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgParams")] -pub struct MsgParams { - /// Params defines the new parameters for the x/marketmap module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// Authority defines the authority that is updating the x/marketmap module - /// parameters. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgParamsResponse defines the Msg/Params response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgParamsResponse")] -pub struct MsgParamsResponse {} -/// MsgRemoveMarketAuthorities defines the Msg/RemoveMarketAuthoritiesResponse -/// request type. It contains the new addresses to remove from the list of -/// authorities -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgRemoveMarketAuthorities")] -pub struct MsgRemoveMarketAuthorities { - /// RemoveAddresses is the list of addresses to remove. - #[prost(string, repeated, tag = "1")] - pub remove_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Admin defines the authority that is the x/marketmap - /// Admin account. This account is set in the module parameters. - #[prost(string, tag = "2")] - pub admin: ::prost::alloc::string::String, -} -/// MsgRemoveMarketAuthoritiesResponse defines the -/// Msg/RemoveMarketAuthoritiesResponse response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.marketmap.v1.MsgRemoveMarketAuthoritiesResponse")] -pub struct MsgRemoveMarketAuthoritiesResponse {} -pub struct MarketmapQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> MarketmapQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn market_map(&self) -> Result { - MarketMapRequest {}.query(self.querier) - } - pub fn market( - &self, - currency_pair: ::core::option::Option, - ) -> Result { - MarketRequest { currency_pair }.query(self.querier) - } - pub fn last_updated(&self) -> Result { - LastUpdatedRequest {}.query(self.querier) - } - pub fn params(&self) -> Result { - ParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/mod.rs deleted file mode 100644 index a4651eaf..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ -pub mod abci; -pub mod alerts; -pub mod incentives; -pub mod marketmap; -pub mod oracle; -pub mod service; -pub mod sla; -pub mod types; diff --git a/packages/neutron-sdk/src/proto_types/slinky/oracle/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/oracle/mod.rs deleted file mode 100644 index a8429e39..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/oracle/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/oracle/module/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/oracle/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/oracle/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/oracle/module/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/oracle/module/v1.rs deleted file mode 100644 index 9c8d5f65..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/oracle/module/v1.rs +++ /dev/null @@ -1,20 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the builder module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.module.v1.Module")] -pub struct Module { - /// Authority defines the custom module authority. If not set, defaults to the - /// governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/oracle/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/oracle/v1.rs deleted file mode 100644 index c508ed44..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/oracle/v1.rs +++ /dev/null @@ -1,425 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// QuotePrice is the representation of the aggregated prices for a CurrencyPair, -/// where price represents the price of Base in terms of Quote -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.QuotePrice")] -pub struct QuotePrice { - #[prost(string, tag = "1")] - pub price: ::prost::alloc::string::String, - /// BlockTimestamp tracks the block height associated with this price update. - /// We include block timestamp alongside the price to ensure that smart - /// contracts and applications are not utilizing stale oracle prices - #[prost(message, optional, tag = "2")] - pub block_timestamp: ::core::option::Option, - /// BlockHeight is height of block mentioned above - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_height: u64, -} -/// CurrencyPairState represents the stateful information tracked by the x/oracle -/// module per-currency-pair. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.CurrencyPairState")] -pub struct CurrencyPairState { - /// QuotePrice is the latest price for a currency-pair, notice this value can - /// be null in the case that no price exists for the currency-pair - #[prost(message, optional, tag = "1")] - pub price: ::core::option::Option, - /// Nonce is the number of updates this currency-pair has received - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub nonce: u64, - /// ID is the ID of the CurrencyPair - #[prost(uint64, tag = "3")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, -} -/// CurrencyPairGenesis is the information necessary for initialization of a -/// CurrencyPair. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.CurrencyPairGenesis")] -pub struct CurrencyPairGenesis { - /// The CurrencyPair to be added to module state - #[prost(message, optional, tag = "1")] - pub currency_pair: ::core::option::Option, - /// A genesis price if one exists (note this will be empty, unless it results - /// from forking the state of this module) - #[prost(message, optional, tag = "2")] - pub currency_pair_price: ::core::option::Option, - /// nonce is the nonce (number of updates) for the CP (same case as above, - /// likely 0 unless it results from fork of module) - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub nonce: u64, - /// id is the ID of the CurrencyPair - #[prost(uint64, tag = "4")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, -} -/// GenesisState is the genesis-state for the x/oracle module, it takes a set of -/// predefined CurrencyPairGeneses -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.GenesisState")] -pub struct GenesisState { - /// CurrencyPairGenesis is the set of CurrencyPairGeneses for the module. I.e - /// the starting set of CurrencyPairs for the module + information regarding - /// their latest update. - #[prost(message, repeated, tag = "1")] - pub currency_pair_genesis: ::prost::alloc::vec::Vec, - /// NextID is the next ID to be used for a CurrencyPair - #[prost(uint64, tag = "2")] - #[serde(alias = "nextID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub next_id: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.GetAllCurrencyPairsRequest")] -#[proto_query( - path = "/slinky.oracle.v1.Query/GetAllCurrencyPairs", - response_type = GetAllCurrencyPairsResponse -)] -pub struct GetAllCurrencyPairsRequest {} -/// GetAllCurrencyPairsResponse returns all CurrencyPairs that the module is -/// currently tracking. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.GetAllCurrencyPairsResponse")] -pub struct GetAllCurrencyPairsResponse { - #[prost(message, repeated, tag = "1")] - pub currency_pairs: ::prost::alloc::vec::Vec, -} -/// GetPriceRequest either takes a CurrencyPair, or an identifier for the -/// CurrencyPair in the format base/quote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.GetPriceRequest")] -#[proto_query( - path = "/slinky.oracle.v1.Query/GetPrice", - response_type = GetPriceResponse -)] -pub struct GetPriceRequest { - /// CurrencyPair represents the pair that the user wishes to query. - #[prost(message, optional, tag = "1")] - pub currency_pair: ::core::option::Option, -} -/// GetPriceResponse is the response from the GetPrice grpc method exposed from -/// the x/oracle query service. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.GetPriceResponse")] -pub struct GetPriceResponse { - /// QuotePrice represents the quote-price for the CurrencyPair given in - /// GetPriceRequest (possibly nil if no update has been made) - #[prost(message, optional, tag = "1")] - pub price: ::core::option::Option, - /// nonce represents the nonce for the CurrencyPair if it exists in state - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub nonce: u64, - /// decimals represents the number of decimals that the quote-price is - /// represented in. For Pairs where ETHEREUM is the quote this will be 18, - /// otherwise it will be 8. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub decimals: u64, - /// ID represents the identifier for the CurrencyPair. - #[prost(uint64, tag = "4")] - #[serde(alias = "ID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub id: u64, -} -/// GetPricesRequest takes an identifier for the CurrencyPair -/// in the format base/quote. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.GetPricesRequest")] -#[proto_query( - path = "/slinky.oracle.v1.Query/GetPrices", - response_type = GetPricesResponse -)] -pub struct GetPricesRequest { - #[prost(string, repeated, tag = "1")] - #[serde(alias = "currency_pairIDs")] - pub currency_pair_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// GetPricesResponse is the response from the GetPrices grpc method exposed from -/// the x/oracle query service. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.GetPricesResponse")] -pub struct GetPricesResponse { - #[prost(message, repeated, tag = "1")] - pub prices: ::prost::alloc::vec::Vec, -} -/// GetCurrencyPairMappingRequest is the GetCurrencyPairMapping request type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.GetCurrencyPairMappingRequest")] -#[proto_query( - path = "/slinky.oracle.v1.Query/GetCurrencyPairMapping", - response_type = GetCurrencyPairMappingResponse -)] -pub struct GetCurrencyPairMappingRequest {} -/// GetCurrencyPairMappingResponse is the GetCurrencyPairMapping response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.GetCurrencyPairMappingResponse")] -pub struct GetCurrencyPairMappingResponse { - /// currency_pair_mapping is a mapping of the id representing the currency pair - /// to the currency pair itself. - #[prost(map = "uint64, message", tag = "1")] - pub currency_pair_mapping: - ::std::collections::HashMap, -} -/// Given an authority + a set of CurrencyPairs, the x/oracle module will -/// check to see that the authority has permissions to update the set of -/// CurrencyPairs tracked in the oracle, and add the given CurrencyPairs to be -/// tracked in each VoteExtension -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.MsgAddCurrencyPairs")] -pub struct MsgAddCurrencyPairs { - /// authority is the address of the account that is authorized to update the - /// x/oracle's CurrencyPairs - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// set of CurrencyPairs to be added to the module (+ prices if they are to be - /// set) - #[prost(message, repeated, tag = "2")] - pub currency_pairs: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.MsgAddCurrencyPairsResponse")] -pub struct MsgAddCurrencyPairsResponse {} -/// Given an authority + a set of CurrencyPairIDs, the x/oracle module's message -/// service will remove all of the CurrencyPairs identified by each -/// CurrencyPairID in the request from state. Notice, if a given currency-pair -/// does not exist in state, the module ignores that currency-pair and continues -/// removing the rest. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.MsgRemoveCurrencyPairs")] -pub struct MsgRemoveCurrencyPairs { - /// authority is the address of the account that is authorized to update the - /// x/oracle's CurrencyPairs - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, - /// currency_pair_ids are the stringified representation of a currency-pairs - /// (base/quote) to be removed from the module's state - #[prost(string, repeated, tag = "2")] - #[serde(alias = "currency_pairIDs")] - pub currency_pair_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.oracle.v1.MsgRemoveCurrencyPairsResponse")] -pub struct MsgRemoveCurrencyPairsResponse {} -pub struct OracleQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> OracleQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn get_all_currency_pairs( - &self, - ) -> Result { - GetAllCurrencyPairsRequest {}.query(self.querier) - } - pub fn get_price( - &self, - currency_pair: ::core::option::Option, - ) -> Result { - GetPriceRequest { currency_pair }.query(self.querier) - } - pub fn get_prices( - &self, - currency_pair_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - ) -> Result { - GetPricesRequest { currency_pair_ids }.query(self.querier) - } - pub fn get_currency_pair_mapping( - &self, - ) -> Result { - GetCurrencyPairMappingRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/service/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/service/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/service/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/service/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/service/v1.rs deleted file mode 100644 index 8088343d..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/service/v1.rs +++ /dev/null @@ -1,68 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// QueryPricesRequest defines the request type for the the Prices method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.service.v1.QueryPricesRequest")] -pub struct QueryPricesRequest {} -/// QueryPricesResponse defines the response type for the Prices method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.service.v1.QueryPricesResponse")] -pub struct QueryPricesResponse { - /// prices defines the list of prices. - #[prost(map = "string, string", tag = "1")] - pub prices: - ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>, - #[prost(message, optional, tag = "2")] - pub timestamp: ::core::option::Option, -} -/// QueryMarketMapRequest defines the request type for the MarketMap method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.service.v1.QueryMarketMapRequest")] -pub struct QueryMarketMapRequest {} -/// QueryMarketMapResponse defines the response type for the MarketMap method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.service.v1.QueryMarketMapResponse")] -pub struct QueryMarketMapResponse { - /// market_map defines the current market map configuration. - #[prost(message, optional, tag = "1")] - pub market_map: ::core::option::Option, -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/sla/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/sla/mod.rs deleted file mode 100644 index a8429e39..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/sla/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod module; -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/sla/module/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/sla/module/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/sla/module/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/sla/module/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/sla/module/v1.rs deleted file mode 100644 index 084d0dcd..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/sla/module/v1.rs +++ /dev/null @@ -1,20 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// Module is the config object of the builder module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.module.v1.Module")] -pub struct Module { - /// Authority defines the custom module authority. If not set, defaults to the - /// governance module. - #[prost(string, tag = "1")] - pub authority: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/sla/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/sla/v1.rs deleted file mode 100644 index c6f261f1..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/sla/v1.rs +++ /dev/null @@ -1,396 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// GenesisState defines the sla module's genesis state. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.GenesisState")] -pub struct GenesisState { - /// SLAs are the SLAs that are currently active. - #[prost(message, repeated, tag = "1")] - pub slas: ::prost::alloc::vec::Vec, - /// PrceFeeds are the price feeds that are currently active. - #[prost(message, repeated, tag = "2")] - pub price_feeds: ::prost::alloc::vec::Vec, - /// Params are the parameters for the sla module. - #[prost(message, optional, tag = "3")] - pub params: ::core::option::Option, -} -/// Params defines the parameters for the sla module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.Params")] -pub struct Params { - /// Enabled is a flag to enable or disable the sla module. - #[prost(bool, tag = "1")] - pub enabled: bool, -} -/// PriceFeedSLA defines the the desired SLA for a given set of price feeds. A -/// price feed is defined to be a set of price prices for the same (currency -/// pair, validator). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.PriceFeedSLA")] -pub struct PriceFeedSla { - /// MaximumViableWindow is the maximum time window that we are interested - /// for the SLA. This is used to determine the moving window of blocks that - /// we are interested in. - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub maximum_viable_window: u64, - /// ExpectedUptime is the expected uptime for the given validator and price - /// feed. - #[prost(string, tag = "2")] - pub expected_uptime: ::prost::alloc::string::String, - /// SlashConstant is the constant by which we will multiply the deviation from - /// the expected uptime. - #[prost(string, tag = "3")] - pub slash_constant: ::prost::alloc::string::String, - /// MinimumBlockUpdates is the minimum number of blocks that the - /// validator had to have voted on in the maximum viable window - /// in order to be considered for the SLA. - #[prost(uint64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub minimum_block_updates: u64, - /// Frequency is the frequency at which we will check the SLA. - #[prost(uint64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub frequency: u64, - /// ID is the unique identifier for the SLA. - #[prost(string, tag = "6")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, -} -/// PriceFeed defines the object type that will be utilized to monitor how -/// frequently validators are voting with price updates across the network. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.PriceFeed")] -pub struct PriceFeed { - /// UpdateMap represents the relevant moving window of price feed updates. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub update_map: ::prost::alloc::vec::Vec, - /// InclusionMap represents the relevant moving window of blocks that the - /// validator has voted on. - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub inclusion_map: ::prost::alloc::vec::Vec, - /// Index corresponds to the current index into the bitmap. - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u64, - /// Validator represents the validator that this SLA corresponds to. - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub validator: ::prost::alloc::vec::Vec, - /// CurrencyPair represents the currency pair that this SLA corresponds to. - #[prost(message, optional, tag = "5")] - pub currency_pair: ::core::option::Option, - /// MaximumViableWindow represents the maximum number of blocks that can be - /// represented by the bit map. - #[prost(uint64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub maximum_viable_window: u64, - /// ID corresponds to the SLA ID that this price feed corresponds to. - #[prost(string, tag = "7")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, -} -/// QueryAllSLAsRequest is the request type for the Query/GetAllSLAs RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.GetAllSLAsRequest")] -#[proto_query( - path = "/slinky.sla.v1.Query/GetAllSLAs", - response_type = GetAllSlAsResponse -)] -pub struct GetAllSlAsRequest {} -/// QueryAllSLAsResponse is the response type for the Query/GetAllSLAs RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.GetAllSLAsResponse")] -pub struct GetAllSlAsResponse { - #[prost(message, repeated, tag = "1")] - pub slas: ::prost::alloc::vec::Vec, -} -/// QueryGetPriceFeedsRequest is the request type for the Query/GetPriceFeeds RPC -/// method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.GetPriceFeedsRequest")] -#[proto_query( - path = "/slinky.sla.v1.Query/GetPriceFeeds", - response_type = GetPriceFeedsResponse -)] -pub struct GetPriceFeedsRequest { - /// ID defines the SLA to query price feeds for. - #[prost(string, tag = "1")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, -} -/// QueryGetPriceFeedsResponse is the response type for the Query/GetPriceFeeds -/// RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.GetPriceFeedsResponse")] -pub struct GetPriceFeedsResponse { - /// PriceFeeds defines the price feeds for the given SLA. - #[prost(message, repeated, tag = "1")] - pub price_feeds: ::prost::alloc::vec::Vec, -} -/// QueryParamsRequest is the request type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.ParamsRequest")] -#[proto_query(path = "/slinky.sla.v1.Query/Params", response_type = ParamsResponse)] -pub struct ParamsRequest {} -/// QueryParamsResponse is the response type for the Query/Params RPC method. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.ParamsResponse")] -pub struct ParamsResponse { - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, -} -/// MsgAddSLAs defines the Msg/AddSLAs request type. It contains the -/// SLAs to be added to the store. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgAddSLAs")] -pub struct MsgAddSlAs { - /// SLAs defines the SLAs to be added to the store. - #[prost(message, repeated, tag = "1")] - pub slas: ::prost::alloc::vec::Vec, - /// Authority defines the authority that is adding the SLAs. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgAddSLAsResponse defines the Msg/AddSLAs response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgAddSLAsResponse")] -pub struct MsgAddSlAsResponse {} -/// MsgRemoveSLAs defines the Msg/RemoveSLAs request type. It contains the -/// IDs of the SLAs to be removed from the store. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgRemoveSLAs")] -pub struct MsgRemoveSlAs { - /// IDs defines the IDs of the SLAs to be removed from the store. - #[prost(string, repeated, tag = "1")] - pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, - /// Authority defines the authority that is removing the SLAs. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgRemoveSLAsResponse defines the Msg/RemoveSLAs response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgRemoveSLAsResponse")] -pub struct MsgRemoveSlAsResponse {} -/// MsgParams defines the Msg/Params request type. It contains the -/// new parameters for the SLA module. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgParams")] -pub struct MsgParams { - /// Params defines the new parameters for the SLA module. - #[prost(message, optional, tag = "1")] - pub params: ::core::option::Option, - /// Authority defines the authority that is updating the SLA module parameters. - #[prost(string, tag = "2")] - pub authority: ::prost::alloc::string::String, -} -/// MsgParamsResponse defines the Msg/Params response type. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.sla.v1.MsgParamsResponse")] -pub struct MsgParamsResponse {} -pub struct SlaQuerier<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, -} -impl<'a, Q: cosmwasm_std::CustomQuery> SlaQuerier<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - pub fn get_all_sl_as(&self) -> Result { - GetAllSlAsRequest {}.query(self.querier) - } - pub fn get_price_feeds( - &self, - id: ::prost::alloc::string::String, - ) -> Result { - GetPriceFeedsRequest { id }.query(self.querier) - } - pub fn params(&self) -> Result { - ParamsRequest {}.query(self.querier) - } -} diff --git a/packages/neutron-sdk/src/proto_types/slinky/types/mod.rs b/packages/neutron-sdk/src/proto_types/slinky/types/mod.rs deleted file mode 100644 index a3a6d96c..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/types/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod v1; diff --git a/packages/neutron-sdk/src/proto_types/slinky/types/v1.rs b/packages/neutron-sdk/src/proto_types/slinky/types/v1.rs deleted file mode 100644 index 3dbc8f75..00000000 --- a/packages/neutron-sdk/src/proto_types/slinky/types/v1.rs +++ /dev/null @@ -1,21 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// CurrencyPair is the standard representation of a pair of assets, where one -/// (Base) is priced in terms of the other (Quote) -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/slinky.types.v1.CurrencyPair")] -pub struct CurrencyPair { - #[prost(string, tag = "1")] - pub base: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub quote: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/abci.rs b/packages/neutron-sdk/src/proto_types/tendermint/abci.rs deleted file mode 100644 index 10e87795..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/abci.rs +++ /dev/null @@ -1,1677 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.Request")] -pub struct Request { - #[prost( - oneof = "request::Value", - tags = "1, 2, 3, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20" - )] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `Request`. -pub mod request { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Value { - #[prost(message, tag = "1")] - Echo(super::RequestEcho), - #[prost(message, tag = "2")] - Flush(super::RequestFlush), - #[prost(message, tag = "3")] - Info(super::RequestInfo), - #[prost(message, tag = "5")] - InitChain(super::RequestInitChain), - #[prost(message, tag = "6")] - Query(super::RequestQuery), - #[prost(message, tag = "8")] - CheckTx(super::RequestCheckTx), - #[prost(message, tag = "11")] - Commit(super::RequestCommit), - #[prost(message, tag = "12")] - ListSnapshots(super::RequestListSnapshots), - #[prost(message, tag = "13")] - OfferSnapshot(super::RequestOfferSnapshot), - #[prost(message, tag = "14")] - LoadSnapshotChunk(super::RequestLoadSnapshotChunk), - #[prost(message, tag = "15")] - ApplySnapshotChunk(super::RequestApplySnapshotChunk), - #[prost(message, tag = "16")] - PrepareProposal(super::RequestPrepareProposal), - #[prost(message, tag = "17")] - ProcessProposal(super::RequestProcessProposal), - #[prost(message, tag = "18")] - ExtendVote(super::RequestExtendVote), - #[prost(message, tag = "19")] - VerifyVoteExtension(super::RequestVerifyVoteExtension), - #[prost(message, tag = "20")] - FinalizeBlock(super::RequestFinalizeBlock), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestEcho")] -pub struct RequestEcho { - #[prost(string, tag = "1")] - pub message: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestFlush")] -pub struct RequestFlush {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestInfo")] -pub struct RequestInfo { - #[prost(string, tag = "1")] - pub version: ::prost::alloc::string::String, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_version: u64, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub p2p_version: u64, - #[prost(string, tag = "4")] - pub abci_version: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestInitChain")] -pub struct RequestInitChain { - #[prost(message, optional, tag = "1")] - pub time: ::core::option::Option, - #[prost(string, tag = "2")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, - #[prost(message, optional, tag = "3")] - pub consensus_params: ::core::option::Option, - #[prost(message, repeated, tag = "4")] - pub validators: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub app_state_bytes: ::prost::alloc::vec::Vec, - #[prost(int64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub initial_height: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestQuery")] -pub struct RequestQuery { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - #[prost(string, tag = "2")] - pub path: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(bool, tag = "4")] - pub prove: bool, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestCheckTx")] -pub struct RequestCheckTx { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub tx: ::prost::alloc::vec::Vec, - #[prost(enumeration = "CheckTxType", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestCommit")] -pub struct RequestCommit {} -/// lists available snapshots -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestListSnapshots")] -pub struct RequestListSnapshots {} -/// offers a snapshot to the application -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestOfferSnapshot")] -pub struct RequestOfferSnapshot { - /// snapshot offered by peers - #[prost(message, optional, tag = "1")] - pub snapshot: ::core::option::Option, - /// light client-verified app hash for snapshot height - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub app_hash: ::prost::alloc::vec::Vec, -} -/// loads a snapshot chunk -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestLoadSnapshotChunk")] -pub struct RequestLoadSnapshotChunk { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub format: u32, - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub chunk: u32, -} -/// Applies a snapshot chunk -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestApplySnapshotChunk")] -pub struct RequestApplySnapshotChunk { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub chunk: ::prost::alloc::vec::Vec, - #[prost(string, tag = "3")] - pub sender: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestPrepareProposal")] -pub struct RequestPrepareProposal { - /// the modified transactions cannot exceed this size. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_tx_bytes: i64, - /// txs is an array of transactions that will be included in a block, - /// sent to the app for possible modifications. - #[prost(bytes = "vec", repeated, tag = "2")] - pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, - #[prost(message, optional, tag = "3")] - pub local_last_commit: ::core::option::Option, - #[prost(message, repeated, tag = "4")] - pub misbehavior: ::prost::alloc::vec::Vec, - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(message, optional, tag = "6")] - pub time: ::core::option::Option, - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub next_validators_hash: ::prost::alloc::vec::Vec, - /// address of the public key of the validator proposing the block. - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proposer_address: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestProcessProposal")] -pub struct RequestProcessProposal { - #[prost(bytes = "vec", repeated, tag = "1")] - pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, - #[prost(message, optional, tag = "2")] - pub proposed_last_commit: ::core::option::Option, - #[prost(message, repeated, tag = "3")] - pub misbehavior: ::prost::alloc::vec::Vec, - /// hash is the merkle root hash of the fields of the proposed block. - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(message, optional, tag = "6")] - pub time: ::core::option::Option, - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub next_validators_hash: ::prost::alloc::vec::Vec, - /// address of the public key of the original proposer of the block. - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proposer_address: ::prost::alloc::vec::Vec, -} -/// Extends a vote with application-injected data -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestExtendVote")] -pub struct RequestExtendVote { - /// the hash of the block that this vote may be referring to - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, - /// the height of the extended vote - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - /// info of the block that this vote may be referring to - #[prost(message, optional, tag = "3")] - pub time: ::core::option::Option, - #[prost(bytes = "vec", repeated, tag = "4")] - pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, - #[prost(message, optional, tag = "5")] - pub proposed_last_commit: ::core::option::Option, - #[prost(message, repeated, tag = "6")] - pub misbehavior: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub next_validators_hash: ::prost::alloc::vec::Vec, - /// address of the public key of the original proposer of the block. - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proposer_address: ::prost::alloc::vec::Vec, -} -/// Verify the vote extension -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestVerifyVoteExtension")] -pub struct RequestVerifyVoteExtension { - /// the hash of the block that this received vote corresponds to - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, - /// the validator that signed the vote extension - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub validator_address: ::prost::alloc::vec::Vec, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub vote_extension: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.RequestFinalizeBlock")] -pub struct RequestFinalizeBlock { - #[prost(bytes = "vec", repeated, tag = "1")] - pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, - #[prost(message, optional, tag = "2")] - pub decided_last_commit: ::core::option::Option, - #[prost(message, repeated, tag = "3")] - pub misbehavior: ::prost::alloc::vec::Vec, - /// hash is the merkle root hash of the fields of the decided block. - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(message, optional, tag = "6")] - pub time: ::core::option::Option, - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub next_validators_hash: ::prost::alloc::vec::Vec, - /// proposer_address is the address of the public key of the original proposer of the block. - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proposer_address: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.Response")] -pub struct Response { - #[prost( - oneof = "response::Value", - tags = "1, 2, 3, 4, 6, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21" - )] - pub value: ::core::option::Option, -} -/// Nested message and enum types in `Response`. -pub mod response { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Value { - #[prost(message, tag = "1")] - Exception(super::ResponseException), - #[prost(message, tag = "2")] - Echo(super::ResponseEcho), - #[prost(message, tag = "3")] - Flush(super::ResponseFlush), - #[prost(message, tag = "4")] - Info(super::ResponseInfo), - #[prost(message, tag = "6")] - InitChain(super::ResponseInitChain), - #[prost(message, tag = "7")] - Query(super::ResponseQuery), - #[prost(message, tag = "9")] - CheckTx(super::ResponseCheckTx), - #[prost(message, tag = "12")] - Commit(super::ResponseCommit), - #[prost(message, tag = "13")] - ListSnapshots(super::ResponseListSnapshots), - #[prost(message, tag = "14")] - OfferSnapshot(super::ResponseOfferSnapshot), - #[prost(message, tag = "15")] - LoadSnapshotChunk(super::ResponseLoadSnapshotChunk), - #[prost(message, tag = "16")] - ApplySnapshotChunk(super::ResponseApplySnapshotChunk), - #[prost(message, tag = "17")] - PrepareProposal(super::ResponsePrepareProposal), - #[prost(message, tag = "18")] - ProcessProposal(super::ResponseProcessProposal), - #[prost(message, tag = "19")] - ExtendVote(super::ResponseExtendVote), - #[prost(message, tag = "20")] - VerifyVoteExtension(super::ResponseVerifyVoteExtension), - #[prost(message, tag = "21")] - FinalizeBlock(super::ResponseFinalizeBlock), - } -} -/// nondeterministic -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseException")] -pub struct ResponseException { - #[prost(string, tag = "1")] - pub error: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseEcho")] -pub struct ResponseEcho { - #[prost(string, tag = "1")] - pub message: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseFlush")] -pub struct ResponseFlush {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseInfo")] -pub struct ResponseInfo { - #[prost(string, tag = "1")] - pub data: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub version: ::prost::alloc::string::String, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub app_version: u64, - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_block_height: i64, - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub last_block_app_hash: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseInitChain")] -pub struct ResponseInitChain { - #[prost(message, optional, tag = "1")] - pub consensus_params: ::core::option::Option, - #[prost(message, repeated, tag = "2")] - pub validators: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub app_hash: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseQuery")] -pub struct ResponseQuery { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code: u32, - /// bytes data = 2; // use "value" instead. - /// - /// nondeterministic - #[prost(string, tag = "3")] - pub log: ::prost::alloc::string::String, - /// nondeterministic - #[prost(string, tag = "4")] - pub info: ::prost::alloc::string::String, - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: i64, - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub value: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "8")] - pub proof_ops: ::core::option::Option, - #[prost(int64, tag = "9")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(string, tag = "10")] - pub codespace: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseCheckTx")] -pub struct ResponseCheckTx { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code: u32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - /// nondeterministic - #[prost(string, tag = "3")] - pub log: ::prost::alloc::string::String, - /// nondeterministic - #[prost(string, tag = "4")] - pub info: ::prost::alloc::string::String, - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub gas_wanted: i64, - #[prost(int64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub gas_used: i64, - #[prost(message, repeated, tag = "7")] - pub events: ::prost::alloc::vec::Vec, - #[prost(string, tag = "8")] - pub codespace: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseCommit")] -pub struct ResponseCommit { - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub retain_height: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseListSnapshots")] -pub struct ResponseListSnapshots { - #[prost(message, repeated, tag = "1")] - pub snapshots: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseOfferSnapshot")] -pub struct ResponseOfferSnapshot { - #[prost(enumeration = "response_offer_snapshot::Result", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, -} -/// Nested message and enum types in `ResponseOfferSnapshot`. -pub mod response_offer_snapshot { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - #[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] - pub enum Result { - /// Unknown result, abort all snapshot restoration - Unknown = 0, - /// Snapshot accepted, apply chunks - Accept = 1, - /// Abort all snapshot restoration - Abort = 2, - /// Reject this specific snapshot, try others - Reject = 3, - /// Reject all snapshots of this format, try others - RejectFormat = 4, - /// Reject all snapshots from the sender(s), try others - RejectSender = 5, - } - impl Result { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Result::Unknown => "UNKNOWN", - Result::Accept => "ACCEPT", - Result::Abort => "ABORT", - Result::Reject => "REJECT", - Result::RejectFormat => "REJECT_FORMAT", - Result::RejectSender => "REJECT_SENDER", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNKNOWN" => Some(Self::Unknown), - "ACCEPT" => Some(Self::Accept), - "ABORT" => Some(Self::Abort), - "REJECT" => Some(Self::Reject), - "REJECT_FORMAT" => Some(Self::RejectFormat), - "REJECT_SENDER" => Some(Self::RejectSender), - _ => None, - } - } - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseLoadSnapshotChunk")] -pub struct ResponseLoadSnapshotChunk { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub chunk: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseApplySnapshotChunk")] -pub struct ResponseApplySnapshotChunk { - #[prost(enumeration = "response_apply_snapshot_chunk::Result", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub result: i32, - /// Chunks to refetch and reapply - #[prost(uint32, repeated, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub refetch_chunks: ::prost::alloc::vec::Vec, - /// Chunk senders to reject and ban - #[prost(string, repeated, tag = "3")] - pub reject_senders: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// Nested message and enum types in `ResponseApplySnapshotChunk`. -pub mod response_apply_snapshot_chunk { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - #[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] - pub enum Result { - /// Unknown result, abort all snapshot restoration - Unknown = 0, - /// Chunk successfully accepted - Accept = 1, - /// Abort all snapshot restoration - Abort = 2, - /// Retry chunk (combine with refetch and reject) - Retry = 3, - /// Retry snapshot (combine with refetch and reject) - RetrySnapshot = 4, - /// Reject this snapshot, try others - RejectSnapshot = 5, - } - impl Result { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Result::Unknown => "UNKNOWN", - Result::Accept => "ACCEPT", - Result::Abort => "ABORT", - Result::Retry => "RETRY", - Result::RetrySnapshot => "RETRY_SNAPSHOT", - Result::RejectSnapshot => "REJECT_SNAPSHOT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNKNOWN" => Some(Self::Unknown), - "ACCEPT" => Some(Self::Accept), - "ABORT" => Some(Self::Abort), - "RETRY" => Some(Self::Retry), - "RETRY_SNAPSHOT" => Some(Self::RetrySnapshot), - "REJECT_SNAPSHOT" => Some(Self::RejectSnapshot), - _ => None, - } - } - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponsePrepareProposal")] -pub struct ResponsePrepareProposal { - #[prost(bytes = "vec", repeated, tag = "1")] - pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseProcessProposal")] -pub struct ResponseProcessProposal { - #[prost(enumeration = "response_process_proposal::ProposalStatus", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, -} -/// Nested message and enum types in `ResponseProcessProposal`. -pub mod response_process_proposal { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - #[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] - pub enum ProposalStatus { - Unknown = 0, - Accept = 1, - Reject = 2, - } - impl ProposalStatus { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - ProposalStatus::Unknown => "UNKNOWN", - ProposalStatus::Accept => "ACCEPT", - ProposalStatus::Reject => "REJECT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNKNOWN" => Some(Self::Unknown), - "ACCEPT" => Some(Self::Accept), - "REJECT" => Some(Self::Reject), - _ => None, - } - } - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseExtendVote")] -pub struct ResponseExtendVote { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub vote_extension: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseVerifyVoteExtension")] -pub struct ResponseVerifyVoteExtension { - #[prost( - enumeration = "response_verify_vote_extension::VerifyStatus", - tag = "1" - )] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub status: i32, -} -/// Nested message and enum types in `ResponseVerifyVoteExtension`. -pub mod response_verify_vote_extension { - #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] - #[repr(i32)] - #[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] - pub 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, - } - impl VerifyStatus { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - VerifyStatus::Unknown => "UNKNOWN", - VerifyStatus::Accept => "ACCEPT", - VerifyStatus::Reject => "REJECT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNKNOWN" => Some(Self::Unknown), - "ACCEPT" => Some(Self::Accept), - "REJECT" => Some(Self::Reject), - _ => None, - } - } - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ResponseFinalizeBlock")] -pub struct ResponseFinalizeBlock { - /// set of block events emmitted as part of executing the block - #[prost(message, repeated, tag = "1")] - pub events: ::prost::alloc::vec::Vec, - /// 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 - #[prost(message, repeated, tag = "2")] - pub tx_results: ::prost::alloc::vec::Vec, - /// a list of updates to the validator set. These will reflect the validator set at current height + 2. - #[prost(message, repeated, tag = "3")] - pub validator_updates: ::prost::alloc::vec::Vec, - /// updates to the consensus params, if any. - #[prost(message, optional, tag = "4")] - pub consensus_param_updates: ::core::option::Option, - /// 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. - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub app_hash: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.CommitInfo")] -pub struct CommitInfo { - #[prost(int32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(message, repeated, tag = "2")] - pub votes: ::prost::alloc::vec::Vec, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ExtendedCommitInfo")] -pub struct ExtendedCommitInfo { - /// The round at which the block proposer decided in the previous height. - #[prost(int32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - /// List of validators' addresses in the last validator set with their voting - /// information, including vote extensions. - #[prost(message, repeated, tag = "2")] - pub votes: ::prost::alloc::vec::Vec, -} -/// Event allows application developers to attach additional information to -/// ResponseFinalizeBlock and ResponseCheckTx. -/// Later, transactions may be queried using these events. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.Event")] -pub struct Event { - #[prost(string, tag = "1")] - pub r#type: ::prost::alloc::string::String, - #[prost(message, repeated, tag = "2")] - pub attributes: ::prost::alloc::vec::Vec, -} -/// EventAttribute is a single key-value pair, associated with an event. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.EventAttribute")] -pub struct EventAttribute { - #[prost(string, tag = "1")] - pub key: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub value: ::prost::alloc::string::String, - /// nondeterministic - #[prost(bool, tag = "3")] - pub index: bool, -} -/// ExecTxResult contains results of executing one individual transaction. -/// -/// * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ExecTxResult")] -pub struct ExecTxResult { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code: u32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - /// nondeterministic - #[prost(string, tag = "3")] - pub log: ::prost::alloc::string::String, - /// nondeterministic - #[prost(string, tag = "4")] - pub info: ::prost::alloc::string::String, - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub gas_wanted: i64, - #[prost(int64, tag = "6")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub gas_used: i64, - /// nondeterministic - #[prost(message, repeated, tag = "7")] - pub events: ::prost::alloc::vec::Vec, - #[prost(string, tag = "8")] - pub codespace: ::prost::alloc::string::String, -} -/// TxResult contains results of executing the transaction. -/// -/// One usage is indexing transaction results. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.TxResult")] -pub struct TxResult { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u32, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub tx: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "4")] - pub result: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.Validator")] -pub struct Validator { - /// The first 20 bytes of SHA256(public key) - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub address: ::prost::alloc::vec::Vec, - /// PubKey pub_key = 2 \[(gogoproto.nullable)=false\]; - /// - /// The voting power - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub power: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ValidatorUpdate")] -pub struct ValidatorUpdate { - #[prost(message, optional, tag = "1")] - pub pub_key: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub power: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.VoteInfo")] -pub struct VoteInfo { - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, - #[prost(enumeration = "super::types::BlockIdFlag", tag = "3")] - #[serde(alias = "blockID_flag")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_id_flag: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.ExtendedVoteInfo")] -pub struct ExtendedVoteInfo { - /// The validator that sent the vote. - #[prost(message, optional, tag = "1")] - pub validator: ::core::option::Option, - /// Non-deterministic extension provided by the sending validator's application. - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub vote_extension: ::prost::alloc::vec::Vec, - /// Vote extension signature created by CometBFT - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub extension_signature: ::prost::alloc::vec::Vec, - /// block_id_flag indicates whether the validator voted for a block, nil, or did not vote at all - #[prost(enumeration = "super::types::BlockIdFlag", tag = "5")] - #[serde(alias = "blockID_flag")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_id_flag: i32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.Misbehavior")] -pub struct Misbehavior { - #[prost(enumeration = "MisbehaviorType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, - /// The offending validator - #[prost(message, optional, tag = "2")] - pub validator: ::core::option::Option, - /// The height when the offense occurred - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - /// The corresponding time where the offense occurred - #[prost(message, optional, tag = "4")] - pub time: ::core::option::Option, - /// Total voting power of the validator set in case the ABCI application does - /// not store historical validators. - /// - #[prost(int64, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total_voting_power: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.abci.Snapshot")] -pub struct Snapshot { - /// The height at which the snapshot was taken - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - /// The application-specific snapshot format - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub format: u32, - /// Number of chunks in the snapshot - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub chunks: u32, - /// Arbitrary snapshot hash, equal only if identical - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, - /// Arbitrary application metadata - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub metadata: ::prost::alloc::vec::Vec, -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum CheckTxType { - New = 0, - Recheck = 1, -} -impl CheckTxType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - CheckTxType::New => "NEW", - CheckTxType::Recheck => "RECHECK", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "NEW" => Some(Self::New), - "RECHECK" => Some(Self::Recheck), - _ => None, - } - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum MisbehaviorType { - Unknown = 0, - DuplicateVote = 1, - LightClientAttack = 2, -} -impl MisbehaviorType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - MisbehaviorType::Unknown => "UNKNOWN", - MisbehaviorType::DuplicateVote => "DUPLICATE_VOTE", - MisbehaviorType::LightClientAttack => "LIGHT_CLIENT_ATTACK", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "UNKNOWN" => Some(Self::Unknown), - "DUPLICATE_VOTE" => Some(Self::DuplicateVote), - "LIGHT_CLIENT_ATTACK" => Some(Self::LightClientAttack), - _ => None, - } - } -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/blocksync.rs b/packages/neutron-sdk/src/proto_types/tendermint/blocksync.rs deleted file mode 100644 index f782f17f..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/blocksync.rs +++ /dev/null @@ -1,144 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// BlockRequest requests a block for a specific height -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.blocksync.BlockRequest")] -pub struct BlockRequest { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, -} -/// NoBlockResponse informs the node that the peer does not have block at the requested height -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.blocksync.NoBlockResponse")] -pub struct NoBlockResponse { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, -} -/// BlockResponse returns block to the requested -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.blocksync.BlockResponse")] -pub struct BlockResponse { - #[prost(message, optional, tag = "1")] - pub block: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub ext_commit: ::core::option::Option, -} -/// StatusRequest requests the status of a peer. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.blocksync.StatusRequest")] -pub struct StatusRequest {} -/// StatusResponse is a peer response to inform their status. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.blocksync.StatusResponse")] -pub struct StatusResponse { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub base: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.blocksync.Message")] -pub struct Message { - #[prost(oneof = "message::Sum", tags = "1, 2, 3, 4, 5")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `Message`. -pub mod message { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - BlockRequest(super::BlockRequest), - #[prost(message, tag = "2")] - NoBlockResponse(super::NoBlockResponse), - #[prost(message, tag = "3")] - BlockResponse(Box), - #[prost(message, tag = "4")] - StatusRequest(super::StatusRequest), - #[prost(message, tag = "5")] - StatusResponse(super::StatusResponse), - } -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/consensus.rs b/packages/neutron-sdk/src/proto_types/tendermint/consensus.rs deleted file mode 100644 index 5af6d6ff..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/consensus.rs +++ /dev/null @@ -1,471 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// NewRoundStep is sent for every step taken in the ConsensusState. -/// For every height/round/step transition -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.NewRoundStep")] -pub struct NewRoundStep { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub step: u32, - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub seconds_since_start_time: i64, - #[prost(int32, tag = "5")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_commit_round: i32, -} -/// NewValidBlock is sent when a validator observes a valid block B in some round r, -/// i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. -/// In case the block is also committed, then IsCommit flag is set to true. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.NewValidBlock")] -pub struct NewValidBlock { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(message, optional, tag = "3")] - pub block_part_set_header: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub block_parts: ::core::option::Option, - #[prost(bool, tag = "5")] - pub is_commit: bool, -} -/// Proposal is sent when a new block is proposed. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.Proposal")] -pub struct Proposal { - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, -} -/// ProposalPOL is sent when a previous proposal is re-proposed. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.ProposalPOL")] -pub struct ProposalPol { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposal_pol_round: i32, - #[prost(message, optional, tag = "3")] - pub proposal_pol: ::core::option::Option, -} -/// BlockPart is sent when gossipping a piece of the proposed block. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.BlockPart")] -pub struct BlockPart { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(message, optional, tag = "3")] - pub part: ::core::option::Option, -} -/// Vote is sent when voting for a proposal (or lack thereof). -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.Vote")] -pub struct Vote { - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, -} -/// HasVote is sent to indicate that a particular vote has been received. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.HasVote")] -pub struct HasVote { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(enumeration = "super::types::SignedMsgType", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, - #[prost(int32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: i32, -} -/// VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.VoteSetMaj23")] -pub struct VoteSetMaj23 { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(enumeration = "super::types::SignedMsgType", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, - #[prost(message, optional, tag = "4")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, -} -/// VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.VoteSetBits")] -pub struct VoteSetBits { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(enumeration = "super::types::SignedMsgType", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, - #[prost(message, optional, tag = "4")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - #[prost(message, optional, tag = "5")] - pub votes: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.Message")] -pub struct Message { - #[prost(oneof = "message::Sum", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `Message`. -pub mod message { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - NewRoundStep(super::NewRoundStep), - #[prost(message, tag = "2")] - NewValidBlock(super::NewValidBlock), - #[prost(message, tag = "3")] - Proposal(super::Proposal), - #[prost(message, tag = "4")] - ProposalPol(super::ProposalPol), - #[prost(message, tag = "5")] - BlockPart(super::BlockPart), - #[prost(message, tag = "6")] - Vote(super::Vote), - #[prost(message, tag = "7")] - HasVote(super::HasVote), - #[prost(message, tag = "8")] - VoteSetMaj23(super::VoteSetMaj23), - #[prost(message, tag = "9")] - VoteSetBits(super::VoteSetBits), - } -} -/// MsgInfo are msgs from the reactor which may update the state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.MsgInfo")] -pub struct MsgInfo { - #[prost(message, optional, tag = "1")] - pub msg: ::core::option::Option, - #[prost(string, tag = "2")] - #[serde(alias = "peerID")] - pub peer_id: ::prost::alloc::string::String, -} -/// TimeoutInfo internally generated messages which may update the state -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.TimeoutInfo")] -pub struct TimeoutInfo { - #[prost(message, optional, tag = "1")] - pub duration: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(uint32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub step: u32, -} -/// EndHeight marks the end of the given height inside WAL. -/// @internal used by scripts/wal2json util. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.EndHeight")] -pub struct EndHeight { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.WALMessage")] -pub struct WalMessage { - #[prost(oneof = "wal_message::Sum", tags = "1, 2, 3, 4")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `WALMessage`. -pub mod wal_message { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - EventDataRoundState(super::super::types::EventDataRoundState), - #[prost(message, tag = "2")] - MsgInfo(super::MsgInfo), - #[prost(message, tag = "3")] - TimeoutInfo(super::TimeoutInfo), - #[prost(message, tag = "4")] - EndHeight(super::EndHeight), - } -} -/// TimedWALMessage wraps WALMessage and adds Time for debugging purposes. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.consensus.TimedWALMessage")] -pub struct TimedWalMessage { - #[prost(message, optional, tag = "1")] - pub time: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub msg: ::core::option::Option, -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/crypto.rs b/packages/neutron-sdk/src/proto_types/tendermint/crypto.rs deleted file mode 100644 index 8ace81a7..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/crypto.rs +++ /dev/null @@ -1,163 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.crypto.Proof")] -pub struct Proof { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total: i64, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: i64, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub leaf_hash: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", repeated, tag = "4")] - pub aunts: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.crypto.ValueOp")] -pub struct ValueOp { - /// Encoded in ProofOp.Key. - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - /// To encode in ProofOp.Data - #[prost(message, optional, tag = "2")] - pub proof: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.crypto.DominoOp")] -pub struct DominoOp { - #[prost(string, tag = "1")] - pub key: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub input: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub output: ::prost::alloc::string::String, -} -/// ProofOp defines an operation used for calculating Merkle root -/// The data could be arbitrary format, providing nessecary data -/// for example neighbouring node hash -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.crypto.ProofOp")] -pub struct ProofOp { - #[prost(string, tag = "1")] - pub r#type: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub key: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -/// ProofOps is Merkle proof defined by the list of ProofOps -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.crypto.ProofOps")] -pub struct ProofOps { - #[prost(message, repeated, tag = "1")] - pub ops: ::prost::alloc::vec::Vec, -} -/// PublicKey defines the keys available for use with Validators -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.crypto.PublicKey")] -pub struct PublicKey { - #[prost(oneof = "public_key::Sum", tags = "1, 2")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `PublicKey`. -pub mod public_key { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(bytes, tag = "1")] - Ed25519(::prost::alloc::vec::Vec), - #[prost(bytes, tag = "2")] - Secp256k1(::prost::alloc::vec::Vec), - } -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/libs/bits.rs b/packages/neutron-sdk/src/proto_types/tendermint/libs/bits.rs deleted file mode 100644 index 31177d2b..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/libs/bits.rs +++ /dev/null @@ -1,27 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.libs.bits.BitArray")] -pub struct BitArray { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub bits: i64, - #[prost(uint64, repeated, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - pub elems: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/libs/mod.rs b/packages/neutron-sdk/src/proto_types/tendermint/libs/mod.rs deleted file mode 100644 index e79b623c..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/libs/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod bits; diff --git a/packages/neutron-sdk/src/proto_types/tendermint/mempool.rs b/packages/neutron-sdk/src/proto_types/tendermint/mempool.rs deleted file mode 100644 index 6f2f29bf..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/mempool.rs +++ /dev/null @@ -1,50 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.mempool.Txs")] -pub struct Txs { - #[prost(bytes = "vec", repeated, tag = "1")] - pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.mempool.Message")] -pub struct Message { - #[prost(oneof = "message::Sum", tags = "1")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `Message`. -pub mod message { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - Txs(super::Txs), - } -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/mod.rs b/packages/neutron-sdk/src/proto_types/tendermint/mod.rs deleted file mode 100644 index 09b25428..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -pub mod abci; -pub mod blocksync; -pub mod consensus; -pub mod crypto; -pub mod libs; -pub mod mempool; -pub mod p2p; -pub mod privval; -pub mod rpc; -pub mod state; -pub mod statesync; -pub mod store; -pub mod types; -pub mod version; diff --git a/packages/neutron-sdk/src/proto_types/tendermint/p2p.rs b/packages/neutron-sdk/src/proto_types/tendermint/p2p.rs deleted file mode 100644 index 0371bcba..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/p2p.rs +++ /dev/null @@ -1,289 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.PacketPing")] -pub struct PacketPing {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.PacketPong")] -pub struct PacketPong {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.PacketMsg")] -pub struct PacketMsg { - #[prost(int32, tag = "1")] - #[serde(alias = "channelID")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub channel_id: i32, - #[prost(bool, tag = "2")] - pub eof: bool, - #[prost(bytes = "vec", tag = "3")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.Packet")] -pub struct Packet { - #[prost(oneof = "packet::Sum", tags = "1, 2, 3")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `Packet`. -pub mod packet { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - PacketPing(super::PacketPing), - #[prost(message, tag = "2")] - PacketPong(super::PacketPong), - #[prost(message, tag = "3")] - PacketMsg(super::PacketMsg), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.AuthSigMessage")] -pub struct AuthSigMessage { - #[prost(message, optional, tag = "1")] - pub pub_key: ::core::option::Option, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub sig: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.NetAddress")] -pub struct NetAddress { - #[prost(string, tag = "1")] - #[serde(alias = "ID")] - pub id: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub ip: ::prost::alloc::string::String, - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub port: u32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.ProtocolVersion")] -pub struct ProtocolVersion { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub p2p: u64, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block: u64, - #[prost(uint64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub app: u64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.DefaultNodeInfo")] -pub struct DefaultNodeInfo { - #[prost(message, optional, tag = "1")] - pub protocol_version: ::core::option::Option, - #[prost(string, tag = "2")] - #[serde(alias = "default_nodeID")] - pub default_node_id: ::prost::alloc::string::String, - #[prost(string, tag = "3")] - pub listen_addr: ::prost::alloc::string::String, - #[prost(string, tag = "4")] - pub network: ::prost::alloc::string::String, - #[prost(string, tag = "5")] - pub version: ::prost::alloc::string::String, - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub channels: ::prost::alloc::vec::Vec, - #[prost(string, tag = "7")] - pub moniker: ::prost::alloc::string::String, - #[prost(message, optional, tag = "8")] - pub other: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.DefaultNodeInfoOther")] -pub struct DefaultNodeInfoOther { - #[prost(string, tag = "1")] - pub tx_index: ::prost::alloc::string::String, - #[prost(string, tag = "2")] - pub rpc_address: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.PexRequest")] -pub struct PexRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.PexAddrs")] -pub struct PexAddrs { - #[prost(message, repeated, tag = "1")] - pub addrs: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.p2p.Message")] -pub struct Message { - #[prost(oneof = "message::Sum", tags = "1, 2")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `Message`. -pub mod message { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - PexRequest(super::PexRequest), - #[prost(message, tag = "2")] - PexAddrs(super::PexAddrs), - } -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/privval.rs b/packages/neutron-sdk/src/proto_types/tendermint/privval.rs deleted file mode 100644 index cf5984ea..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/privval.rs +++ /dev/null @@ -1,252 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.RemoteSignerError")] -pub struct RemoteSignerError { - #[prost(int32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub code: i32, - #[prost(string, tag = "2")] - pub description: ::prost::alloc::string::String, -} -/// PubKeyRequest requests the consensus public key from the remote signer. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.PubKeyRequest")] -pub struct PubKeyRequest { - #[prost(string, tag = "1")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, -} -/// PubKeyResponse is a response message containing the public key. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.PubKeyResponse")] -pub struct PubKeyResponse { - #[prost(message, optional, tag = "1")] - pub pub_key: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub error: ::core::option::Option, -} -/// SignVoteRequest is a request to sign a vote -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.SignVoteRequest")] -pub struct SignVoteRequest { - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, - #[prost(string, tag = "2")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, -} -/// SignedVoteResponse is a response containing a signed vote or an error -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.SignedVoteResponse")] -pub struct SignedVoteResponse { - #[prost(message, optional, tag = "1")] - pub vote: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub error: ::core::option::Option, -} -/// SignProposalRequest is a request to sign a proposal -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.SignProposalRequest")] -pub struct SignProposalRequest { - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, - #[prost(string, tag = "2")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, -} -/// SignedProposalResponse is response containing a signed proposal or an error -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.SignedProposalResponse")] -pub struct SignedProposalResponse { - #[prost(message, optional, tag = "1")] - pub proposal: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub error: ::core::option::Option, -} -/// PingRequest is a request to confirm that the connection is alive. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.PingRequest")] -pub struct PingRequest {} -/// PingResponse is a response to confirm that the connection is alive. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.PingResponse")] -pub struct PingResponse {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.privval.Message")] -pub struct Message { - #[prost(oneof = "message::Sum", tags = "1, 2, 3, 4, 5, 6, 7, 8")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `Message`. -pub mod message { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - PubKeyRequest(super::PubKeyRequest), - #[prost(message, tag = "2")] - PubKeyResponse(super::PubKeyResponse), - #[prost(message, tag = "3")] - SignVoteRequest(super::SignVoteRequest), - #[prost(message, tag = "4")] - SignedVoteResponse(super::SignedVoteResponse), - #[prost(message, tag = "5")] - SignProposalRequest(super::SignProposalRequest), - #[prost(message, tag = "6")] - SignedProposalResponse(super::SignedProposalResponse), - #[prost(message, tag = "7")] - PingRequest(super::PingRequest), - #[prost(message, tag = "8")] - PingResponse(super::PingResponse), - } -} -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum Errors { - Unknown = 0, - UnexpectedResponse = 1, - NoConnection = 2, - ConnectionTimeout = 3, - ReadTimeout = 4, - WriteTimeout = 5, -} -impl Errors { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Errors::Unknown => "ERRORS_UNKNOWN", - Errors::UnexpectedResponse => "ERRORS_UNEXPECTED_RESPONSE", - Errors::NoConnection => "ERRORS_NO_CONNECTION", - Errors::ConnectionTimeout => "ERRORS_CONNECTION_TIMEOUT", - Errors::ReadTimeout => "ERRORS_READ_TIMEOUT", - Errors::WriteTimeout => "ERRORS_WRITE_TIMEOUT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ERRORS_UNKNOWN" => Some(Self::Unknown), - "ERRORS_UNEXPECTED_RESPONSE" => Some(Self::UnexpectedResponse), - "ERRORS_NO_CONNECTION" => Some(Self::NoConnection), - "ERRORS_CONNECTION_TIMEOUT" => Some(Self::ConnectionTimeout), - "ERRORS_READ_TIMEOUT" => Some(Self::ReadTimeout), - "ERRORS_WRITE_TIMEOUT" => Some(Self::WriteTimeout), - _ => None, - } - } -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/rpc/grpc.rs b/packages/neutron-sdk/src/proto_types/tendermint/rpc/grpc.rs deleted file mode 100644 index dd8e0b8a..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/rpc/grpc.rs +++ /dev/null @@ -1,65 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.rpc.grpc.RequestPing")] -pub struct RequestPing {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.rpc.grpc.RequestBroadcastTx")] -pub struct RequestBroadcastTx { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub tx: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.rpc.grpc.ResponsePing")] -pub struct ResponsePing {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.rpc.grpc.ResponseBroadcastTx")] -pub struct ResponseBroadcastTx { - #[prost(message, optional, tag = "1")] - pub check_tx: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub tx_result: ::core::option::Option, -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/rpc/mod.rs b/packages/neutron-sdk/src/proto_types/tendermint/rpc/mod.rs deleted file mode 100644 index 773d491c..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/rpc/mod.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod grpc; diff --git a/packages/neutron-sdk/src/proto_types/tendermint/state.rs b/packages/neutron-sdk/src/proto_types/tendermint/state.rs deleted file mode 100644 index 0b192828..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/state.rs +++ /dev/null @@ -1,231 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// LegacyABCIResponses retains the responses -/// of the legacy ABCI calls during block processing. -/// Note ReponseDeliverTx is renamed to ExecTxResult but they are semantically the same -/// Kept for backwards compatibility for versions prior to v0.38 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.state.LegacyABCIResponses")] -pub struct LegacyAbciResponses { - #[prost(message, repeated, tag = "1")] - pub deliver_txs: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub end_block: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub begin_block: ::core::option::Option, -} -/// ResponseBeginBlock is kept for backwards compatibility for versions prior to v0.38 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.state.ResponseBeginBlock")] -pub struct ResponseBeginBlock { - #[prost(message, repeated, tag = "1")] - pub events: ::prost::alloc::vec::Vec, -} -/// ResponseEndBlock is kept for backwards compatibility for versions prior to v0.38 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.state.ResponseEndBlock")] -pub struct ResponseEndBlock { - #[prost(message, repeated, tag = "1")] - pub validator_updates: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub consensus_param_updates: ::core::option::Option, - #[prost(message, repeated, tag = "3")] - pub events: ::prost::alloc::vec::Vec, -} -/// ValidatorsInfo represents the latest validator set, or the last height it changed -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.state.ValidatorsInfo")] -pub struct ValidatorsInfo { - #[prost(message, optional, tag = "1")] - pub validator_set: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_height_changed: i64, -} -/// ConsensusParamsInfo represents the latest consensus params, or the last height it changed -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.state.ConsensusParamsInfo")] -pub struct ConsensusParamsInfo { - #[prost(message, optional, tag = "1")] - pub consensus_params: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_height_changed: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.state.ABCIResponsesInfo")] -pub struct AbciResponsesInfo { - #[prost(message, optional, tag = "1")] - pub legacy_abci_responses: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(message, optional, tag = "3")] - pub response_finalize_block: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.state.Version")] -pub struct Version { - #[prost(message, optional, tag = "1")] - pub consensus: ::core::option::Option, - #[prost(string, tag = "2")] - pub software: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.state.State")] -pub struct State { - #[prost(message, optional, tag = "1")] - pub version: ::core::option::Option, - /// immutable - #[prost(string, tag = "2")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, - #[prost(int64, tag = "14")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub initial_height: i64, - /// LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_block_height: i64, - #[prost(message, optional, tag = "4")] - #[serde(alias = "last_blockID")] - pub last_block_id: ::core::option::Option, - #[prost(message, optional, tag = "5")] - pub last_block_time: ::core::option::Option, - /// LastValidators is used to validate block.LastCommit. - /// Validators are persisted to the database separately every time they change, - /// so we can query for historical validator sets. - /// Note that if s.LastBlockHeight causes a valset change, - /// we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1 - /// Extra +1 due to nextValSet delay. - #[prost(message, optional, tag = "6")] - pub next_validators: ::core::option::Option, - #[prost(message, optional, tag = "7")] - pub validators: ::core::option::Option, - #[prost(message, optional, tag = "8")] - pub last_validators: ::core::option::Option, - #[prost(int64, tag = "9")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_height_validators_changed: i64, - /// Consensus parameters used for validating blocks. - /// Changes returned by EndBlock and updated after Commit. - #[prost(message, optional, tag = "10")] - pub consensus_params: ::core::option::Option, - #[prost(int64, tag = "11")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub last_height_consensus_params_changed: i64, - /// Merkle root of the results from executing prev block - #[prost(bytes = "vec", tag = "12")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub last_results_hash: ::prost::alloc::vec::Vec, - /// the latest AppHash we've received from calling abci.Commit() - #[prost(bytes = "vec", tag = "13")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub app_hash: ::prost::alloc::vec::Vec, -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/statesync.rs b/packages/neutron-sdk/src/proto_types/tendermint/statesync.rs deleted file mode 100644 index 22335fa1..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/statesync.rs +++ /dev/null @@ -1,169 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.statesync.Message")] -pub struct Message { - #[prost(oneof = "message::Sum", tags = "1, 2, 3, 4")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `Message`. -pub mod message { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - SnapshotsRequest(super::SnapshotsRequest), - #[prost(message, tag = "2")] - SnapshotsResponse(super::SnapshotsResponse), - #[prost(message, tag = "3")] - ChunkRequest(super::ChunkRequest), - #[prost(message, tag = "4")] - ChunkResponse(super::ChunkResponse), - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.statesync.SnapshotsRequest")] -pub struct SnapshotsRequest {} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.statesync.SnapshotsResponse")] -pub struct SnapshotsResponse { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub format: u32, - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub chunks: u32, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub metadata: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.statesync.ChunkRequest")] -pub struct ChunkRequest { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub format: u32, - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u32, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.statesync.ChunkResponse")] -pub struct ChunkResponse { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: u64, - #[prost(uint32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub format: u32, - #[prost(uint32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u32, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub chunk: ::prost::alloc::vec::Vec, - #[prost(bool, tag = "5")] - pub missing: bool, -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/store.rs b/packages/neutron-sdk/src/proto_types/tendermint/store.rs deleted file mode 100644 index 57dd918b..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/store.rs +++ /dev/null @@ -1,27 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.store.BlockStoreState")] -pub struct BlockStoreState { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub base: i64, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/types.rs b/packages/neutron-sdk/src/proto_types/tendermint/types.rs deleted file mode 100644 index 30a2a344..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/types.rs +++ /dev/null @@ -1,1268 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// ConsensusParams contains consensus critical parameters that determine the -/// validity of blocks. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.ConsensusParams")] -pub struct ConsensusParams { - #[prost(message, optional, tag = "1")] - pub block: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub evidence: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub validator: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub version: ::core::option::Option, - #[prost(message, optional, tag = "5")] - pub abci: ::core::option::Option, -} -/// BlockParams contains limits on the block size. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.BlockParams")] -pub struct BlockParams { - /// Max block size, in bytes. - /// Note: must be greater than 0 - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_bytes: i64, - /// Max gas per block. - /// Note: must be greater or equal to -1 - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_gas: i64, -} -/// EvidenceParams determine how we handle evidence of malfeasance. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.EvidenceParams")] -pub struct EvidenceParams { - /// Max age of evidence, in blocks. - /// - /// The basic formula for calculating this is: MaxAgeDuration / {average block - /// time}. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_age_num_blocks: i64, - /// 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](). - #[prost(message, optional, tag = "2")] - pub max_age_duration: ::core::option::Option, - /// 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 - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub max_bytes: i64, -} -/// ValidatorParams restrict the public key types validators can use. -/// NOTE: uses ABCI pubkey naming, not Amino names. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.ValidatorParams")] -pub struct ValidatorParams { - #[prost(string, repeated, tag = "1")] - pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} -/// VersionParams contains the ABCI application version. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.VersionParams")] -pub struct VersionParams { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub app: u64, -} -/// HashedParams is a subset of ConsensusParams. -/// -/// It is hashed into the Header.ConsensusHash. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.HashedParams")] -pub struct HashedParams { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_max_bytes: i64, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_max_gas: i64, -} -/// ABCIParams configure functionality specific to the Application Blockchain Interface. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.ABCIParams")] -pub struct 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. - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub vote_extensions_enable_height: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.ValidatorSet")] -pub struct ValidatorSet { - #[prost(message, repeated, tag = "1")] - pub validators: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub proposer: ::core::option::Option, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total_voting_power: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.Validator")] -pub struct Validator { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub address: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub pub_key: ::core::option::Option, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub voting_power: i64, - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub proposer_priority: i64, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.SimpleValidator")] -pub struct SimpleValidator { - #[prost(message, optional, tag = "1")] - pub pub_key: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub voting_power: i64, -} -/// BlockIdFlag indicates which BlockID the signature is for -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum BlockIdFlag { - /// indicates an error condition - Unknown = 0, - /// the vote was not received - Absent = 1, - /// voted for the block that received the majority - Commit = 2, - /// voted for nil - Nil = 3, -} -impl BlockIdFlag { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - BlockIdFlag::Unknown => "BLOCK_ID_FLAG_UNKNOWN", - BlockIdFlag::Absent => "BLOCK_ID_FLAG_ABSENT", - BlockIdFlag::Commit => "BLOCK_ID_FLAG_COMMIT", - BlockIdFlag::Nil => "BLOCK_ID_FLAG_NIL", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "BLOCK_ID_FLAG_UNKNOWN" => Some(Self::Unknown), - "BLOCK_ID_FLAG_ABSENT" => Some(Self::Absent), - "BLOCK_ID_FLAG_COMMIT" => Some(Self::Commit), - "BLOCK_ID_FLAG_NIL" => Some(Self::Nil), - _ => None, - } - } -} -/// PartsetHeader -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.PartSetHeader")] -pub struct PartSetHeader { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total: u32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.Part")] -pub struct Part { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub index: u32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub bytes: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof: ::core::option::Option, -} -/// BlockID -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.BlockID")] -pub struct BlockId { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub part_set_header: ::core::option::Option, -} -/// Header defines the structure of a block header. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.Header")] -pub struct Header { - /// basic block info - #[prost(message, optional, tag = "1")] - pub version: ::core::option::Option, - #[prost(string, tag = "2")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(message, optional, tag = "4")] - pub time: ::core::option::Option, - /// prev block info - #[prost(message, optional, tag = "5")] - #[serde(alias = "last_blockID")] - pub last_block_id: ::core::option::Option, - /// hashes of block data - /// - /// commit from validators from the last block - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub last_commit_hash: ::prost::alloc::vec::Vec, - /// transactions - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data_hash: ::prost::alloc::vec::Vec, - /// hashes from the app output from the prev block - /// - /// validators for the current block - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub validators_hash: ::prost::alloc::vec::Vec, - /// validators for the next block - #[prost(bytes = "vec", tag = "9")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub next_validators_hash: ::prost::alloc::vec::Vec, - /// consensus params for current block - #[prost(bytes = "vec", tag = "10")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub consensus_hash: ::prost::alloc::vec::Vec, - /// state after txs from the previous block - #[prost(bytes = "vec", tag = "11")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub app_hash: ::prost::alloc::vec::Vec, - /// root hash of all results from the txs from the previous block - #[prost(bytes = "vec", tag = "12")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub last_results_hash: ::prost::alloc::vec::Vec, - /// consensus info - /// - /// evidence included in the block - #[prost(bytes = "vec", tag = "13")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub evidence_hash: ::prost::alloc::vec::Vec, - /// original proposer of the block - #[prost(bytes = "vec", tag = "14")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub proposer_address: ::prost::alloc::vec::Vec, -} -/// Data contains the set of transactions included in the block -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.Data")] -pub struct 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. - #[prost(bytes = "vec", repeated, tag = "1")] - pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec>, -} -/// Vote represents a prevote or precommit vote from validators for -/// consensus. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.Vote")] -pub struct Vote { - #[prost(enumeration = "SignedMsgType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - /// zero if vote is nil. - #[prost(message, optional, tag = "4")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - #[prost(message, optional, tag = "5")] - pub timestamp: ::core::option::Option, - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub validator_address: ::prost::alloc::vec::Vec, - #[prost(int32, tag = "7")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub validator_index: i32, - /// Vote signature by the validator if they participated in consensus for the - /// associated block. - #[prost(bytes = "vec", tag = "8")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, - /// Vote extension provided by the application. Only valid for precommit - /// messages. - #[prost(bytes = "vec", tag = "9")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub extension: ::prost::alloc::vec::Vec, - /// Vote extension signature by the validator if they participated in - /// consensus for the associated block. - /// Only valid for precommit messages. - #[prost(bytes = "vec", tag = "10")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub extension_signature: ::prost::alloc::vec::Vec, -} -/// Commit contains the evidence that a block was committed by a set of validators. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.Commit")] -pub struct Commit { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(message, optional, tag = "3")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - #[prost(message, repeated, tag = "4")] - pub signatures: ::prost::alloc::vec::Vec, -} -/// CommitSig is a part of the Vote included in a Commit. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.CommitSig")] -pub struct CommitSig { - #[prost(enumeration = "BlockIdFlag", tag = "1")] - #[serde(alias = "blockID_flag")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_id_flag: i32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub validator_address: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub timestamp: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.ExtendedCommit")] -pub struct ExtendedCommit { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(message, optional, tag = "3")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - #[prost(message, repeated, tag = "4")] - pub extended_signatures: ::prost::alloc::vec::Vec, -} -/// 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 -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.ExtendedCommitSig")] -pub struct ExtendedCommitSig { - #[prost(enumeration = "BlockIdFlag", tag = "1")] - #[serde(alias = "blockID_flag")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_id_flag: i32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub validator_address: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub timestamp: ::core::option::Option, - #[prost(bytes = "vec", tag = "4")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, - /// Vote extension data - #[prost(bytes = "vec", tag = "5")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub extension: ::prost::alloc::vec::Vec, - /// Vote extension signature - #[prost(bytes = "vec", tag = "6")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub extension_signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.Proposal")] -pub struct Proposal { - #[prost(enumeration = "SignedMsgType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(int32, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub pol_round: i32, - #[prost(message, optional, tag = "5")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - #[prost(message, optional, tag = "6")] - pub timestamp: ::core::option::Option, - #[prost(bytes = "vec", tag = "7")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub signature: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.SignedHeader")] -pub struct SignedHeader { - #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option
, - #[prost(message, optional, tag = "2")] - pub commit: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.LightBlock")] -pub struct LightBlock { - #[prost(message, optional, tag = "1")] - pub signed_header: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub validator_set: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.BlockMeta")] -pub struct BlockMeta { - #[prost(message, optional, tag = "1")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block_size: i64, - #[prost(message, optional, tag = "3")] - pub header: ::core::option::Option
, - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub num_txs: i64, -} -/// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.TxProof")] -pub struct TxProof { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub root_hash: ::prost::alloc::vec::Vec, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub data: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "3")] - pub proof: ::core::option::Option, -} -/// SignedMsgType is a type of signed message in the consensus. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] -#[repr(i32)] -#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] -pub enum SignedMsgType { - Unknown = 0, - /// Votes - Prevote = 1, - Precommit = 2, - /// Proposals - Proposal = 32, -} -impl SignedMsgType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - SignedMsgType::Unknown => "SIGNED_MSG_TYPE_UNKNOWN", - SignedMsgType::Prevote => "SIGNED_MSG_TYPE_PREVOTE", - SignedMsgType::Precommit => "SIGNED_MSG_TYPE_PRECOMMIT", - SignedMsgType::Proposal => "SIGNED_MSG_TYPE_PROPOSAL", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "SIGNED_MSG_TYPE_UNKNOWN" => Some(Self::Unknown), - "SIGNED_MSG_TYPE_PREVOTE" => Some(Self::Prevote), - "SIGNED_MSG_TYPE_PRECOMMIT" => Some(Self::Precommit), - "SIGNED_MSG_TYPE_PROPOSAL" => Some(Self::Proposal), - _ => None, - } - } -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.Evidence")] -pub struct Evidence { - #[prost(oneof = "evidence::Sum", tags = "1, 2")] - pub sum: ::core::option::Option, -} -/// Nested message and enum types in `Evidence`. -pub mod evidence { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive( - Clone, - PartialEq, - Eq, - ::prost::Oneof, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - )] - pub enum Sum { - #[prost(message, tag = "1")] - DuplicateVoteEvidence(super::DuplicateVoteEvidence), - #[prost(message, tag = "2")] - LightClientAttackEvidence(super::LightClientAttackEvidence), - } -} -/// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.DuplicateVoteEvidence")] -pub struct DuplicateVoteEvidence { - #[prost(message, optional, tag = "1")] - pub vote_a: ::core::option::Option, - #[prost(message, optional, tag = "2")] - pub vote_b: ::core::option::Option, - #[prost(int64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total_voting_power: i64, - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub validator_power: i64, - #[prost(message, optional, tag = "5")] - pub timestamp: ::core::option::Option, -} -/// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.LightClientAttackEvidence")] -pub struct LightClientAttackEvidence { - #[prost(message, optional, tag = "1")] - pub conflicting_block: ::core::option::Option, - #[prost(int64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub common_height: i64, - #[prost(message, repeated, tag = "3")] - pub byzantine_validators: ::prost::alloc::vec::Vec, - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total_voting_power: i64, - #[prost(message, optional, tag = "5")] - pub timestamp: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.EvidenceList")] -pub struct EvidenceList { - #[prost(message, repeated, tag = "1")] - pub evidence: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.Block")] -pub struct Block { - #[prost(message, optional, tag = "1")] - pub header: ::core::option::Option
, - #[prost(message, optional, tag = "2")] - pub data: ::core::option::Option, - #[prost(message, optional, tag = "3")] - pub evidence: ::core::option::Option, - #[prost(message, optional, tag = "4")] - pub last_commit: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.EventDataRoundState")] -pub struct EventDataRoundState { - #[prost(int64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(int32, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i32, - #[prost(string, tag = "3")] - pub step: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.CanonicalBlockID")] -pub struct CanonicalBlockId { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, - #[prost(message, optional, tag = "2")] - pub part_set_header: ::core::option::Option, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.CanonicalPartSetHeader")] -pub struct CanonicalPartSetHeader { - #[prost(uint32, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub total: u32, - #[prost(bytes = "vec", tag = "2")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub hash: ::prost::alloc::vec::Vec, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.CanonicalProposal")] -pub struct CanonicalProposal { - /// type alias for byte - #[prost(enumeration = "SignedMsgType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, - /// canonicalization requires fixed size encoding here - #[prost(sfixed64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - /// canonicalization requires fixed size encoding here - #[prost(sfixed64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i64, - #[prost(int64, tag = "4")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub pol_round: i64, - #[prost(message, optional, tag = "5")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - #[prost(message, optional, tag = "6")] - pub timestamp: ::core::option::Option, - #[prost(string, tag = "7")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, -} -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.CanonicalVote")] -pub struct CanonicalVote { - /// type alias for byte - #[prost(enumeration = "SignedMsgType", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub r#type: i32, - /// canonicalization requires fixed size encoding here - #[prost(sfixed64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - /// canonicalization requires fixed size encoding here - #[prost(sfixed64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i64, - #[prost(message, optional, tag = "4")] - #[serde(alias = "blockID")] - pub block_id: ::core::option::Option, - #[prost(message, optional, tag = "5")] - pub timestamp: ::core::option::Option, - #[prost(string, tag = "6")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, -} -/// CanonicalVoteExtension provides us a way to serialize a vote extension from -/// a particular validator such that we can sign over those serialized bytes. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.types.CanonicalVoteExtension")] -pub struct CanonicalVoteExtension { - #[prost(bytes = "vec", tag = "1")] - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - pub extension: ::prost::alloc::vec::Vec, - #[prost(sfixed64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub height: i64, - #[prost(sfixed64, tag = "3")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub round: i64, - #[prost(string, tag = "4")] - #[serde(alias = "chainID")] - pub chain_id: ::prost::alloc::string::String, -} diff --git a/packages/neutron-sdk/src/proto_types/tendermint/version.rs b/packages/neutron-sdk/src/proto_types/tendermint/version.rs deleted file mode 100644 index f4e8d455..00000000 --- a/packages/neutron-sdk/src/proto_types/tendermint/version.rs +++ /dev/null @@ -1,55 +0,0 @@ -use neutron_std_derive::CosmwasmExt; -/// App includes the protocol and software version for the application. -/// This information is included in ResponseInfo. The App.Protocol can be -/// updated in ResponseEndBlock. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.version.App")] -pub struct App { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub protocol: u64, - #[prost(string, tag = "2")] - pub software: ::prost::alloc::string::String, -} -/// 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. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive( - Clone, - PartialEq, - Eq, - ::prost::Message, - ::serde::Serialize, - ::serde::Deserialize, - ::schemars::JsonSchema, - CosmwasmExt, -)] -#[proto_message(type_url = "/tendermint.version.Consensus")] -pub struct Consensus { - #[prost(uint64, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub block: u64, - #[prost(uint64, tag = "2")] - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - pub app: u64, -} diff --git a/packages/neutron-sdk/src/serde/mod.rs b/packages/neutron-sdk/src/serde/mod.rs deleted file mode 100644 index 5461e99a..00000000 --- a/packages/neutron-sdk/src/serde/mod.rs +++ /dev/null @@ -1,104 +0,0 @@ -pub mod as_str { - use serde::{de, Deserialize, Deserializer, Serializer}; - use std::{fmt::Display, str::FromStr}; - - pub fn deserialize<'de, T, D>(deserializer: D) -> Result - where - T: FromStr, - T::Err: Display, - D: Deserializer<'de>, - { - let s = String::deserialize(deserializer)?; - T::from_str(&s).map_err(de::Error::custom) - } - - pub fn serialize(value: &T, serializer: S) -> Result - where - S: Serializer, - T: Display, - { - serializer.serialize_str(&value.to_string()) - } -} - -pub mod as_str_vec { - use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; - use std::{fmt::Display, str::FromStr}; - - pub fn deserialize<'de, T, D>(deserializer: D) -> Result, D::Error> - where - T: FromStr, - T::Err: Display, - D: Deserializer<'de>, - { - let vec_of_strings: Vec = Vec::deserialize(deserializer)?; - vec_of_strings - .into_iter() - .map(|s| T::from_str(&s).map_err(de::Error::custom)) - .collect() - } - - pub fn serialize(values: &[T], serializer: S) -> Result - where - S: Serializer, - T: Display, - { - let vec_of_strings: Vec = values.iter().map(|value| value.to_string()).collect(); - vec_of_strings.serialize(serializer) - } -} - -pub mod as_base64_encoded_string { - use cosmwasm_std::Binary; - use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; - - pub fn deserialize<'de, D>(deserializer: D) -> Result, D::Error> - where - D: Deserializer<'de>, - { - let encoded_string = String::deserialize(deserializer)?; - Binary::from_base64(&encoded_string) - .map(|b| b.to_vec()) - .map_err(de::Error::custom) - } - - pub fn serialize(values: &[u8], serializer: S) -> Result - where - S: Serializer, - { - Binary::new(values.to_vec()) - .to_base64() - .serialize(serializer) - } -} - -pub mod as_option_base64_encoded_string { - use cosmwasm_std::Binary; - use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; - - pub fn deserialize<'de, D>(deserializer: D) -> Result>, D::Error> - where - D: Deserializer<'de>, - { - let encoded_string: Option = Option::deserialize(deserializer)?; - match encoded_string { - Some(s) => Binary::from_base64(&s) - .map(|b| Some(b.to_vec())) - .map_err(de::Error::custom), - None => Ok(None), - } - } - - pub fn serialize(value: &Option>, serializer: S) -> Result - where - S: Serializer, - { - match value { - Some(vec) => { - let encoded_string = Binary::new(vec.clone()).to_base64(); - encoded_string.serialize(serializer) - } - None => serializer.serialize_none(), - } - } -} diff --git a/packages/neutron-sdk/src/shim.rs b/packages/neutron-sdk/src/shim.rs deleted file mode 100644 index 28e4e85e..00000000 --- a/packages/neutron-sdk/src/shim.rs +++ /dev/null @@ -1,375 +0,0 @@ -use ::serde::{Deserialize, Deserializer, Serialize, Serializer}; -use chrono::{DateTime, Utc}; -use cosmwasm_std::StdResult; -use serde::de; -use serde::de::Visitor; - -use std::fmt; -use std::str::FromStr; - -#[derive(Clone, PartialEq, Eq, ::prost::Message, schemars::JsonSchema)] -pub struct Timestamp { - /// Represents seconds of UTC time since Unix epoch - /// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - /// 9999-12-31T23:59:59Z inclusive. - #[prost(int64, tag = "1")] - pub seconds: i64, - /// Non-negative fractions of a second at nanosecond resolution. Negative - /// second values with fractions must still have non-negative nanos values - /// that count forward in time. Must be from 0 to 999,999,999 - /// inclusive. - #[prost(int32, tag = "2")] - pub nanos: i32, -} - -impl Serialize for Timestamp { - fn serialize(&self, serializer: S) -> Result<::Ok, ::Error> - where - S: Serializer, - { - let mut ts = prost_types::Timestamp { - seconds: self.seconds, - nanos: self.nanos, - }; - ts.normalize(); - let dt = DateTime::from_timestamp(ts.seconds, ts.nanos as u32) - .expect("invalid or out-of-range datetime"); - serializer.serialize_str(format!("{:?}", dt).as_str()) - } -} - -impl<'de> Deserialize<'de> for Timestamp { - fn deserialize(deserializer: D) -> Result>::Error> - where - D: Deserializer<'de>, - { - struct TimestampVisitor; - - impl<'de> Visitor<'de> for TimestampVisitor { - type Value = Timestamp; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Timestamp in RFC3339 format") - } - - fn visit_str(self, value: &str) -> Result - where - E: de::Error, - { - let utc: DateTime = chrono::DateTime::from_str(value).map_err(|err| { - serde::de::Error::custom(format!( - "Failed to parse {} as datetime: {:?}", - value, err - )) - })?; - let ts = Timestamp::from(utc); - Ok(ts) - } - } - deserializer.deserialize_str(TimestampVisitor) - } -} - -impl From> for Timestamp { - fn from(dt: DateTime) -> Self { - Timestamp { - seconds: dt.timestamp(), - nanos: dt.timestamp_subsec_nanos() as i32, - } - } -} -#[derive(Clone, PartialEq, Eq, ::prost::Message, schemars::JsonSchema)] -pub struct Duration { - /// Signed seconds of the span of time. Must be from -315,576,000,000 - /// to +315,576,000,000 inclusive. Note: these bounds are computed from: - /// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - #[prost(int64, tag = "1")] - pub seconds: i64, - /// Signed fractions of a second at nanosecond resolution of the span - /// of time. Durations less than one second are represented with a 0 - /// `seconds` field and a positive or negative `nanos` field. For durations - /// of one second or more, a non-zero value for the `nanos` field must be - /// of the same sign as the `seconds` field. Must be from -999,999,999 - /// to +999,999,999 inclusive. - #[prost(int32, tag = "2")] - pub nanos: i32, -} - -impl Serialize for Duration { - fn serialize(&self, serializer: S) -> Result<::Ok, ::Error> - where - S: Serializer, - { - let mut d = prost_types::Duration::from(self.to_owned()); - d.normalize(); - - serializer.serialize_str(d.to_string().as_str()) - } -} - -impl<'de> Deserialize<'de> for Duration { - fn deserialize(deserializer: D) -> Result>::Error> - where - D: Deserializer<'de>, - { - struct DurationVisitor; - - impl<'de> Visitor<'de> for DurationVisitor { - type Value = Duration; - - fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { - formatter.write_str("Timestamp in RFC3339 format") - } - - fn visit_str(self, value: &str) -> Result - where - E: de::Error, - { - value - .parse::() - .map(Into::into) - .map_err(de::Error::custom) - } - } - deserializer.deserialize_str(DurationVisitor) - } -} - -#[derive(Clone, PartialEq, Eq, ::prost::Message, schemars::JsonSchema)] -pub struct Any { - /// A URL/resource name that uniquely identifies the type of the serialized - /// protocol buffer message. This string must contain at least - /// one "/" character. The last segment of the URL's path must represent - /// the fully qualified name of the type (as in - /// `path/google.protobuf.Duration`). The name should be in a canonical form - /// (e.g., leading "." is not accepted). - /// - /// In practice, teams usually precompile into the binary all types that they - /// expect it to use in the context of Any. However, for URLs which use the - /// scheme `http`, `https`, or no scheme, one can optionally set up a type - /// server that maps type URLs to message definitions as follows: - /// - /// * If no scheme is provided, `https` is assumed. - /// * An HTTP GET on the URL must yield a \[google.protobuf.Type][\] - /// value in binary format, or produce an error. - /// * Applications are allowed to cache lookup results based on the - /// URL, or have them precompiled into a binary to avoid any - /// lookup. Therefore, binary compatibility needs to be preserved - /// on changes to types. (Use versioned type names to manage - /// breaking changes.) - /// - /// Note: this functionality is not currently available in the official - /// protobuf release, and it is not used for type URLs beginning with - /// type.googleapis.com. - /// - /// Schemes other than `http`, `https` (or the empty scheme) might be - /// used with implementation specific semantics. - /// - #[prost(string, tag = "1")] - pub type_url: ::prost::alloc::string::String, - /// Must be a valid serialized protocol buffer of the above specified type. - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, -} - -macro_rules! expand_as_any { - ($($ty:path,)*) => { - - // TODO: make serialized data contains `@type` (https://github.com/osmosis-labs/osmosis-rust/issues/43) - impl Serialize for Any { - fn serialize( - &self, - _serializer: S, - ) -> Result<::Ok, ::Error> - where - S: ::serde::Serializer, - { - $( - if self.type_url == <$ty>::TYPE_URL { - let value: Result<$ty, ::Error> = - prost::Message::decode(self.value.as_slice()).map_err(ser::Error::custom); - - if let Ok(value) = value { - return value.serialize(serializer); - } - } - )* - - Err(serde::ser::Error::custom( - "data did not match any type that supports serialization as `Any`", - )) - } - } - - impl<'de> Deserialize<'de> for Any { - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - let value = match serde_cw_value::Value::deserialize(deserializer) { - Ok(value) => value, - Err(err) => { - return Err(err); - } - }; - - // must be map er else error - let type_url = if let serde_cw_value::Value::Map(m) = value.clone() { - m.get(&serde_cw_value::Value::String("@type".to_string())) - .map(|t| match t.to_owned() { - serde_cw_value::Value::String(s) => Ok(s), - _ => Err(serde::de::Error::custom("type_url must be String")), - }) - .transpose() - } else { - Err(serde::de::Error::custom("data must have map structure")) - }?; - - match type_url { - // @type found - Some(_) => { - $( - if t == <$ty>::TYPE_URL { - return <$ty>::deserialize( - serde_cw_value::ValueDeserializer::::new( - value.clone(), - ), - ) - .map(|v| Any { - type_url: <$ty>::TYPE_URL.to_string(), - value: v.encode_to_vec(), - }) - .map_err(serde::de::Error::custom); - } - )* - } - // @type not found, try match the type structure - None => { - $( - if let Ok(v) = <$ty>::deserialize( - serde_cw_value::ValueDeserializer::::new( - value.clone(), - ), - ) { - return Ok(Any { - type_url: <$ty>::TYPE_URL.to_string(), - value: v.encode_to_vec(), - }); - } - )* - } - }; - - Err(serde::de::Error::custom( - "data did not match any type that supports deserialization as `Any`", - )) - } - } - - $( - impl TryFrom for $ty { - type Error = prost::DecodeError; - - fn try_from(value: Any) -> Result { - prost::Message::decode(value.value.as_slice()) - } - } - )* - }; -} - -// [HACK] Register all types that can serde as Any manually for now. -// must order by type that has more information for Any deserialization to -// work correctly. Since after serialization, it currently loses @type tag. -// And deserialization works by trying to iteratively match the structure. -expand_as_any!(); - -macro_rules! impl_prost_types_exact_conversion { - ($t:ident | $($arg:ident),*) => { - impl From<$t> for prost_types::$t { - fn from(src: $t) -> Self { - prost_types::$t { - $( - $arg: src.$arg, - )* - } - } - } - - impl From for $t { - fn from(src: prost_types::$t) -> Self { - $t { - $( - $arg: src.$arg, - )* - } - } - } - }; -} - -impl_prost_types_exact_conversion! { Timestamp | seconds, nanos } -impl_prost_types_exact_conversion! { Duration | seconds, nanos } -impl_prost_types_exact_conversion! { Any | type_url, value } - -impl From for crate::proto_types::cosmos::base::v1beta1::Coin { - fn from(cosmwasm_std::Coin { denom, amount }: cosmwasm_std::Coin) -> Self { - crate::proto_types::cosmos::base::v1beta1::Coin { - denom, - amount: amount.into(), - } - } -} - -impl TryFrom for cosmwasm_std::Coin { - type Error = cosmwasm_std::StdError; - - fn try_from( - crate::proto_types::cosmos::base::v1beta1::Coin { denom, amount }: crate::proto_types::cosmos::base::v1beta1::Coin, - ) -> cosmwasm_std::StdResult { - Ok(cosmwasm_std::Coin { - denom, - amount: amount.parse()?, - }) - } -} - -/// Convert a list of `Coin` from generated proto `Coin` type to cosmwasm `Coin` type -pub fn try_proto_to_cosmwasm_coins( - coins: impl IntoIterator, -) -> StdResult> { - coins.into_iter().map(|c| c.try_into()).collect() -} - -/// Convert a list of `Coin` from cosmwasm `Coin` type to generated proto `Coin` type -pub fn cosmwasm_to_proto_coins( - coins: impl IntoIterator, -) -> Vec { - coins.into_iter().map(|c| c.into()).collect() -} - -#[cfg(test)] -mod tests { - use cosmwasm_std::Uint128; - - use super::*; - - #[test] - fn test_coins_conversion() { - let coins = vec![ - cosmwasm_std::Coin { - denom: "uatom".to_string(), - amount: Uint128::new(100), - }, - cosmwasm_std::Coin { - denom: "uosmo".to_string(), - amount: Uint128::new(200), - }, - ]; - - let proto_coins = cosmwasm_to_proto_coins(coins.clone()); - let cosmwasm_coins = try_proto_to_cosmwasm_coins(proto_coins).unwrap(); - - assert_eq!(coins, cosmwasm_coins); - } -} diff --git a/packages/neutron-std-derive/Cargo.toml b/packages/neutron-std-derive/Cargo.toml deleted file mode 100644 index 081779f1..00000000 --- a/packages/neutron-std-derive/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -description = "Procedural macro for `neutron-std`. This package is a modified copy of the osmosis package - https://github.com/osmosis-labs/osmosis-rust/tree/main/packages/osmosis-std-derive" -edition = "2021" -license = "MIT OR Apache-2.0" -name = "neutron-std-derive" -version = "0.20.1" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lib] -proc-macro = true - -[dependencies] -itertools = "0.10.3" -proc-macro2 = "1.0.40" -prost-types = { workspace = true } -quote = "1.0.20" -syn = "1.0.98" - -[dev-dependencies] -cosmwasm-std = { workspace = true, features = ["cosmwasm_2_0"] } -prost = { workspace = true } -serde = "1.0.142" -trybuild = {version = "1.0.63", features = ["diff"]} diff --git a/packages/neutron-std-derive/src/lib.rs b/packages/neutron-std-derive/src/lib.rs deleted file mode 100644 index 85ab7e26..00000000 --- a/packages/neutron-std-derive/src/lib.rs +++ /dev/null @@ -1,227 +0,0 @@ -use itertools::Itertools; -use proc_macro::TokenStream; -use proc_macro2::TokenTree; -use quote::quote; -use syn::{parse_macro_input, DeriveInput}; - -macro_rules! match_kv_attr { - ($key:expr, $value_type:tt) => { - |tt| { - if let [TokenTree::Ident(key), TokenTree::Punct(eq), TokenTree::$value_type(value)] = - &tt[..] - { - if (key == $key) && (eq.as_char() == '=') { - Some(quote!(#value)) - } else { - None - } - } else { - None - } - } - }; -} - -#[proc_macro_derive(CosmwasmExt, attributes(proto_message, proto_query))] -pub fn derive_cosmwasm_ext(input: TokenStream) -> TokenStream { - let input = parse_macro_input!(input as DeriveInput); - let ident = input.ident; - - let type_url = get_type_url(&input.attrs); - - // `EncodeError` always indicates that a message failed to encode because the - // provided buffer had insufficient capacity. Message encoding is otherwise - // infallible. - - let (query_request_conversion, cosmwasm_query) = if get_attr("proto_query", &input.attrs) - .is_some() - { - let path = get_query_attrs(&input.attrs, match_kv_attr!("path", Literal)); - let res = get_query_attrs(&input.attrs, match_kv_attr!("response_type", Ident)); - - let query_request_conversion = quote! { - impl From<#ident> for cosmwasm_std::QueryRequest { - fn from(msg: #ident) -> Self { - cosmwasm_std::QueryRequest::::Grpc(cosmwasm_std::GrpcQuery { - path: #path.to_string(), - data: msg.into(), - }) - } - } - }; - - let cosmwasm_query = quote! { - pub fn query(self, querier: &cosmwasm_std::QuerierWrapper) -> cosmwasm_std::StdResult<#res> { - use prost::Message; - let resp = #res::decode( - querier.query_grpc( - #path.to_string(), - self.to_proto_bytes().into(), - )? - .as_slice(), - ); - match resp { - Err(e) => Err(cosmwasm_std::StdError::generic_err(format!( - "Can't decode item: {}", - e - ))), - Ok(data) => Ok(data), - } - } - }; - - (query_request_conversion, cosmwasm_query) - } else { - (quote!(), quote!()) - }; - - (quote! { - impl #ident { - pub const TYPE_URL: &'static str = #type_url; - #cosmwasm_query - - pub fn to_proto_bytes(&self) -> Vec { - let mut bytes = Vec::new(); - prost::Message::encode(self, &mut bytes) - .expect("Message encoding must be infallible"); - bytes - } - pub fn to_any(&self) -> crate::shim::Any { - crate::shim::Any { - type_url: Self::TYPE_URL.to_string(), - value: self.to_proto_bytes(), - } - } - } - - #query_request_conversion - - impl From<#ident> for cosmwasm_std::Binary { - fn from(msg: #ident) -> Self { - cosmwasm_std::Binary::new(msg.to_proto_bytes()) - } - } - - impl From<#ident> for cosmwasm_std::CosmosMsg { - fn from(msg: #ident) -> Self { - cosmwasm_std::CosmosMsg::::Any(cosmwasm_std::AnyMsg { - type_url: #type_url.to_string(), - value: msg.into(), - }) - } - } - - impl TryFrom for #ident { - type Error = cosmwasm_std::StdError; - - fn try_from(binary: cosmwasm_std::Binary) -> ::std::result::Result { - use ::prost::Message; - Self::decode(&binary[..]).map_err(|e| { - cosmwasm_std::StdError::parse_err( - stringify!(#ident), - format!( - "Unable to decode binary: \n - base64: {}\n - bytes array: {:?}\n\n{:?}", - binary, - binary.to_vec(), - e - ) - ) - }) - } - } - - impl TryFrom for #ident { - type Error = cosmwasm_std::StdError; - - fn try_from(result: cosmwasm_std::SubMsgResult) -> ::std::result::Result { - result - .into_result() - .map_err(|e| cosmwasm_std::StdError::generic_err(e))? - .data - .ok_or_else(|| cosmwasm_std::StdError::not_found("cosmwasm_std::SubMsgResult::"))? - .try_into() - } - } - }) - .into() -} - -fn get_type_url(attrs: &[syn::Attribute]) -> proc_macro2::TokenStream { - let proto_message = get_attr("proto_message", attrs).and_then(|a| a.parse_meta().ok()); - - if let Some(syn::Meta::List(meta)) = proto_message.clone() { - match meta.nested[0].clone() { - syn::NestedMeta::Meta(syn::Meta::NameValue(meta)) => { - if meta.path.is_ident("type_url") { - match meta.lit { - syn::Lit::Str(s) => quote!(#s), - _ => proto_message_attr_error(meta.lit), - } - } else { - proto_message_attr_error(meta.path) - } - } - t => proto_message_attr_error(t), - } - } else { - proto_message_attr_error(proto_message) - } -} - -fn get_query_attrs(attrs: &[syn::Attribute], f: F) -> proc_macro2::TokenStream -where - F: FnMut(&Vec) -> Option, -{ - let proto_query = get_attr("proto_query", attrs); - - if let Some(attr) = proto_query { - if attr.tokens.clone().into_iter().count() != 1 { - return proto_query_attr_error(proto_query); - } - - if let Some(TokenTree::Group(group)) = attr.tokens.clone().into_iter().next() { - let kv_groups = group.stream().into_iter().group_by(|t| { - if let TokenTree::Punct(punct) = t { - punct.as_char() != ',' - } else { - true - } - }); - let mut key_values: Vec> = vec![]; - - for (non_sep, g) in &kv_groups { - if non_sep { - key_values.push(g.collect()); - } - } - - return key_values - .iter() - .find_map(f) - .unwrap_or_else(|| proto_query_attr_error(proto_query)); - } - - proto_query_attr_error(proto_query) - } else { - proto_query_attr_error(proto_query) - } -} - -fn get_attr<'a>(attr_ident: &str, attrs: &'a [syn::Attribute]) -> Option<&'a syn::Attribute> { - attrs - .iter() - .find(|&attr| attr.path.segments.len() == 1 && attr.path.segments[0].ident == attr_ident) -} - -fn proto_message_attr_error(tokens: T) -> proc_macro2::TokenStream { - syn::Error::new_spanned(tokens, "expected `proto_message(type_url = \"...\")`") - .to_compile_error() -} - -fn proto_query_attr_error(tokens: T) -> proc_macro2::TokenStream { - syn::Error::new_spanned( - tokens, - "expected `proto_query(path = \"...\", response_type = ...)`", - ) - .to_compile_error() -} diff --git a/packages/neutron-std-derive/tests/main.rs b/packages/neutron-std-derive/tests/main.rs deleted file mode 100644 index f9257487..00000000 --- a/packages/neutron-std-derive/tests/main.rs +++ /dev/null @@ -1,6 +0,0 @@ -#[test] -fn tests() { - let t = trybuild::TestCases::new(); - t.pass("tests/struct.rs"); - t.pass("tests/query.rs"); -} diff --git a/packages/neutron-std-derive/tests/query.rs b/packages/neutron-std-derive/tests/query.rs deleted file mode 100644 index 7a76eb1d..00000000 --- a/packages/neutron-std-derive/tests/query.rs +++ /dev/null @@ -1,37 +0,0 @@ -use cosmwasm_std::{Empty, QueryRequest}; -use neutron_std_derive::CosmwasmExt; - -#[derive( - Clone, PartialEq, Eq, ::prost::Message, serde::Serialize, serde::Deserialize, CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest")] -#[proto_query( - path = "/osmosis.tokenfactory.v1beta1.Query/DenomsFromCreator", - response_type = QueryDenomsFromCreatorResponse -)] -pub struct QueryDenomsFromCreatorRequest { - #[prost(string, tag = "1")] - pub creator: ::prost::alloc::string::String, -} -#[derive( - Clone, PartialEq, Eq, ::prost::Message, serde::Serialize, serde::Deserialize, CosmwasmExt, -)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse")] -pub struct QueryDenomsFromCreatorResponse { - #[prost(string, repeated, tag = "1")] - pub denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} - -fn main() { - let _: QueryRequest = QueryDenomsFromCreatorRequest { - creator: "neutron1m9l358xunhhwds0568za49mzhvuxx9ux8xafx2".to_string(), - } - .into(); -} - -mod shim { - pub struct Any { - pub type_url: String, - pub value: Vec, - } -} diff --git a/packages/neutron-std-derive/tests/struct.rs b/packages/neutron-std-derive/tests/struct.rs deleted file mode 100644 index 6600d59c..00000000 --- a/packages/neutron-std-derive/tests/struct.rs +++ /dev/null @@ -1,32 +0,0 @@ -use cosmwasm_std::CosmosMsg; -use neutron_std_derive::CosmwasmExt; - -#[derive(Clone, PartialEq, Eq, ::prost::Message, CosmwasmExt)] -#[proto_message(type_url = "/osmosis.tokenfactory.v1beta1.MsgCreateDenom")] -pub struct MsgCreateDenom { - #[prost(string, tag = "1")] - pub sender: ::prost::alloc::string::String, - /// subdenom can be up to 44 "alphanumeric" characters long. - #[prost(string, tag = "2")] - pub subdenom: ::prost::alloc::string::String, -} - -fn main() { - assert_eq!( - MsgCreateDenom::TYPE_URL, - "/osmosis.tokenfactory.v1beta1.MsgCreateDenom" - ); - let msg = MsgCreateDenom { - sender: "neutron1m9l358xunhhwds0568za49mzhvuxx9ux8xafx2".to_string(), - subdenom: "uxxx".to_string(), - }; - - let _: CosmosMsg = msg.into(); -} - -mod shim { - pub struct Any { - pub type_url: String, - pub value: Vec, - } -} diff --git a/proto-build/Cargo.toml b/proto-build/Cargo.toml deleted file mode 100644 index 184ed276..00000000 --- a/proto-build/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -description = "This package is a modified copy of the osmosis package - https://github.com/osmosis-labs/osmosis-rust/tree/main/packages/proto-build" -authors = ["Supanat Potiwarakorn ", "Justin Kilpatrick ", "Tony Arcieri "] -edition = "2021" -name = "proto-build" -publish = false -version = "0.1.0" - -[dependencies] -heck = "0.4.0" -itertools = "0.10.3" -log = "0.4.17" -pretty_env_logger = "0.4.0" -prettyplease = "0.1.16" -proc-macro2 = "1.0.52" -prost = "0.12" -prost-build = "0.12" -prost-types = { workspace = true } -quote = "1.0.26" -regex = "1" -syn = {version = "1.0.98", features = ["full", "parsing", "extra-traits"]} -tonic = "0.10" -tonic-build = "0.10" -walkdir = "2" diff --git a/proto-build/buf.gen.yaml b/proto-build/buf.gen.yaml deleted file mode 100644 index d0f2f350..00000000 --- a/proto-build/buf.gen.yaml +++ /dev/null @@ -1,9 +0,0 @@ -version: v1 -plugins: - # - remote: buf.build/prost/plugins/prost:v0.2.1-1 - - plugin: buf.build/community/neoeinstein-prost:v0.2.3 - out: . - opt: - - extern_path=.google.protobuf.Timestamp=crate::shim::Timestamp - - extern_path=.google.protobuf.Duration=crate::shim::Duration - - extern_path=.google.protobuf.Any=crate::shim::Any diff --git a/proto-build/buf.lock b/proto-build/buf.lock deleted file mode 100644 index 958ce7c0..00000000 --- a/proto-build/buf.lock +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: cosmos - repository: cosmos-proto - commit: 1935555c206d4afb9e94615dfd0fad31 - - remote: buf.build - owner: cosmos - repository: cosmos-sdk - commit: 4074ba39c09e4b4799271a56a053227c - - remote: buf.build - owner: cosmos - repository: gogo-proto - commit: 34d970b699f84aa382f3c29773a60836 - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 75b4300737fb4efca0831636be94e517 diff --git a/proto-build/buf.yaml b/proto-build/buf.yaml deleted file mode 100644 index d49b53e6..00000000 --- a/proto-build/buf.yaml +++ /dev/null @@ -1,23 +0,0 @@ -version: v1 -name: buf.build/neutron-org/neutron-sdk -deps: - - buf.build/cosmos/cosmos-sdk - - buf.build/cosmos/cosmos-proto - - buf.build/cosmos/gogo-proto - - buf.build/googleapis/googleapis -breaking: - use: - - FILE -lint: - use: - - DEFAULT - - COMMENTS - - FILE_LOWER_SNAKE_CASE - except: - - UNARY_RPC - - COMMENT_FIELD - - SERVICE_SUFFIX - - PACKAGE_VERSION_SUFFIX - - RPC_REQUEST_STANDARD_NAME - ignore: - - tendermint diff --git a/proto-build/src/code_generator.rs b/proto-build/src/code_generator.rs deleted file mode 100644 index c91d529a..00000000 --- a/proto-build/src/code_generator.rs +++ /dev/null @@ -1,256 +0,0 @@ -use std::fs::{create_dir_all, remove_dir_all}; -use std::path::{Path, PathBuf}; -use std::process::Command; -use std::{env, fs, io}; - -use log::{debug, info}; -use prost::Message; -use prost_types::FileDescriptorSet; -use walkdir::WalkDir; - -use crate::{mod_gen, transform}; - -#[derive(Clone, Debug)] -pub struct CosmosProject { - pub name: String, - pub version: String, - pub project_dir: String, - - /// determines which modules to exclude from the project - pub exclude_mods: Vec, -} - -pub struct CodeGenerator { - project: CosmosProject, - root: PathBuf, - out_dir: PathBuf, - tmp_build_dir: PathBuf, - deps: Vec, -} - -impl CodeGenerator { - pub fn new( - out_dir: PathBuf, - // TODO: remove tmp_build_dir from constructor in favor of generated tmp dir - tmp_build_dir: PathBuf, - project: CosmosProject, - deps: Vec, - ) -> Self { - Self { - project, - root: PathBuf::from(env!("CARGO_MANIFEST_DIR")), - out_dir, - tmp_build_dir, - deps, - } - } - - pub fn generate(&self) { - self.prepare_dir(); - self.compile_proto(); - - info!( - "🧪 [{}] Embellishing modules to expose nice API for library user...", - self.project.name - ); - - self.transform(); - self.generate_mod_file(); - self.fmt(); - - info!( - "✨ [{}] Library is successfully generated!", - self.project.name - ); - } - - fn prepare_dir(&self) { - if self.tmp_build_dir.exists() { - remove_dir_all(self.tmp_build_dir.clone()).unwrap(); - } - create_dir_all(self.tmp_namespaced_dir()).unwrap(); - output_version_file( - &self.project.name, - &self.project.version, - &self.tmp_namespaced_dir(), - ); - } - - fn generate_mod_file(&self) { - mod_gen::generate_mod_file(&self.absolute_out_dir()); - } - - fn transform(&self) { - transform::copy_and_transform_all( - &self.tmp_namespaced_dir(), - &self.absolute_out_dir(), - &self.file_descriptor_set(), - ); - } - - fn absolute_out_dir(&self) -> PathBuf { - self.root.join(&self.out_dir) - } - - fn fmt(&self) { - let manifest_path = find_cargo_toml(&self.absolute_out_dir()); - let exit_status = Command::new("cargo") - .arg("fmt") - .arg("--manifest-path") - .arg(manifest_path.to_string_lossy().to_string()) - .spawn() - .unwrap() - .wait() - .unwrap(); - - if !exit_status.success() { - panic!( - "unable to format with: cargo fmt --manifest-path {}", - manifest_path.to_string_lossy() - ); - } - } - - fn compile_proto(&self) { - let mut all_related_projects = self.deps.clone(); - all_related_projects.push(self.project.clone()); - - let buf_gen_template = self.root.join("buf.gen.yaml"); - - info!( - "🧪 [{}] Compiling types from protobuf definitions...", - self.project.name - ); - - // Compile proto files for each file in `protos` variable - // `buf generate —template {` - for project in all_related_projects { - let buf_root = if project.name == "cosmos" || project.name == "ics23" { - self.root.join(&project.project_dir).join("proto") - } else { - WalkDir::new(&self.root.join(&project.project_dir)) - .into_iter() - .filter_map(|e| e.ok()) - .find(|e| { - e.file_name() - .to_str() - .map(|s| s == "buf.yaml" || s == "buf.yml") - .unwrap_or(false) - }) - .map(|e| e.path().parent().unwrap().to_path_buf()) - .unwrap() - }; - - debug!("buf_root for project {:?}: {:?}", project.name, buf_root); - - let proto_path = &self.root.join(&project.project_dir).join("proto"); - - let mut cmd = Command::new("buf"); - cmd.arg("generate") - .arg(buf_root.to_string_lossy().to_string()) - .arg("--template") - .arg(buf_gen_template.to_string_lossy().to_string()) - .arg("--output") - .arg(self.tmp_namespaced_dir().to_string_lossy().to_string()); - - if !project.exclude_mods.is_empty() { - for excluded_mod in project.exclude_mods.clone() { - cmd.arg("--exclude-path") - .arg(proto_path.join(project.name.clone()).join(excluded_mod)); - } - } - - let exit_status = cmd.spawn().unwrap().wait().unwrap(); - - if !exit_status.success() { - panic!( - "unable to generate with: {:?}", - cmd.get_args().collect::>() - ); - } - - let descriptor_file = self - .tmp_namespaced_dir() - .join(format!("descriptor_{}.bin", project.name)); - - // generate descriptor file with `buf build buf.yaml --as-file-descriptor-set -o {descriptor_file}` - let mut cmd = Command::new("buf"); - cmd.arg("build") - .arg(buf_root.to_string_lossy().to_string()) - .arg("--as-file-descriptor-set") - .arg("-o") - .arg(descriptor_file.to_string_lossy().to_string()); - - if !project.exclude_mods.is_empty() { - for include_mod in project.exclude_mods { - cmd.arg("--exclude-path") - .arg(proto_path.join(project.name.clone()).join(include_mod)); - } - } - - let exit_status = cmd.spawn().unwrap().wait().unwrap(); - - if !exit_status.success() { - panic!( - "unable to build with: {:?}", - cmd.get_args().collect::>() - ); - } - } - - info!( - "✨ [{}] Types from protobuf definitions is compiled successfully!", - self.project.name - ); - } - - pub fn file_descriptor_set(&self) -> FileDescriptorSet { - // list all files in self.tmp_namespaced_dir() - let files = fs::read_dir(self.tmp_namespaced_dir()) - .unwrap() - .map(|res| res.map(|e| e.path())) - .collect::, io::Error>>() - .unwrap(); - - // filter only files that match "descriptor_*.bin" - let descriptor_files = files - .iter() - .filter(|f| { - f.file_name() - .unwrap() - .to_str() - .unwrap() - .starts_with("descriptor_") - }) - .collect::>(); - - // read all files and merge them into one FileDescriptorSet - let mut file_descriptor_set = FileDescriptorSet { file: vec![] }; - for descriptor_file in descriptor_files { - let descriptor_bytes = &fs::read(descriptor_file).unwrap()[..]; - let mut file_descriptor_set_tmp = FileDescriptorSet::decode(descriptor_bytes).unwrap(); - file_descriptor_set - .file - .append(&mut file_descriptor_set_tmp.file); - } - - file_descriptor_set - } - - fn tmp_namespaced_dir(&self) -> PathBuf { - self.tmp_build_dir.join(&self.project.name) - } -} - -fn output_version_file(project_name: &str, versions: &str, out_dir: &Path) { - let path = out_dir.join(format!("{}_COMMIT", project_name.to_uppercase())); - fs::write(path, versions).unwrap(); -} - -fn find_cargo_toml(path: &Path) -> PathBuf { - if path.join("Cargo.toml").exists() { - path.to_path_buf().join("Cargo.toml") - } else { - find_cargo_toml(path.parent().expect("Cargo.toml not found")) - } -} diff --git a/proto-build/src/git.rs b/proto-build/src/git.rs deleted file mode 100644 index 9583b203..00000000 --- a/proto-build/src/git.rs +++ /dev/null @@ -1,32 +0,0 @@ -use log::info; -use std::ffi::OsStr; -use std::path::PathBuf; -use std::process::{Command, Stdio}; - -fn run_git(args: impl IntoIterator>) -> Result<(), String> { - let stdout = Stdio::inherit(); - - let exit_status = Command::new("git") - .args(args) - .stdout(stdout) - .status() - .expect("git exit status missing"); - - if !exit_status.success() { - return Err(format!( - "git exited with error code: {:?}", - exit_status.code() - )); - } - - Ok(()) -} - -pub fn clone_repo(repo: &str, dir: &str, rev: &str) { - let full_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join(dir); - - info!("Cloning {} repo...", dir.split('/').nth(2).unwrap()); - - run_git(["clone", repo, full_path.to_str().unwrap()]).expect("failed to clone"); - run_git(["-C", full_path.to_str().unwrap(), "checkout", rev]).expect("failed to checkout"); -} diff --git a/proto-build/src/lib.rs b/proto-build/src/lib.rs deleted file mode 100644 index ab8e7460..00000000 --- a/proto-build/src/lib.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub mod code_generator; -pub mod git; -pub mod mod_gen; -pub mod transform; -pub mod transformers; diff --git a/proto-build/src/main.rs b/proto-build/src/main.rs deleted file mode 100644 index 52f00d8c..00000000 --- a/proto-build/src/main.rs +++ /dev/null @@ -1,168 +0,0 @@ -//! Build Neutron proto files. This build script clones the CosmosSDK and Neutron version -//! specified in the COSMOS_SDK_REV and NEUTRON_REV constant respectively and then -//! uses that to build the required proto files for further compilation. -//! This is based on the proto-compiler code in github.com/informalsystems/ibc-rs - -use std::{fs, path::PathBuf}; - -use proto_build::{ - code_generator::{CodeGenerator, CosmosProject}, - git, -}; - -const COSMOS_SDK_REPO: &str = "https://github.com/neutron-org/cosmos-sdk.git"; -const NEUTRON_REPO: &str = "https://github.com/neutron-org/neutron.git"; -const WASMD_REPO: &str = "https://github.com/neutron-org/wasmd.git"; -const COMETBFT_REPO: &str = "https://github.com/cometbft/cometbft.git"; -const IBC_GO_REPO: &str = "https://github.com/cosmos/ibc-go.git"; -const ICS23_REPO: &str = "https://github.com/cosmos/ics23.git"; -const FEEMARKET_REPO: &str = "https://github.com/skip-mev/feemarket.git"; -const SLINKY_REPO: &str = "https://github.com/skip-mev/slinky.git"; - -/// The Cosmos SDK commit or tag to be cloned and used to build the proto files -const COSMOS_SDK_REV: &str = "v0.50.8-neutron"; - -/// The Neutron commit or tag to be cloned and used to build the proto files -const NEUTRON_REV: &str = "v4.1.0"; - -/// The wasmd commit or tag to be cloned and used to build the proto files -const WASMD_REV: &str = "v0.51.0"; - -/// The cometbft commit or tag to be cloned and used to build the proto files -const COMETBFT_REV: &str = "v0.38.10"; - -/// The ibc-go commit or tag to be cloned and used to build the proto files -const IBC_GO_REV: &str = "v8.2.1"; - -/// The ics23 commit or tag to be cloned and used to build the proto files -const ICS23_REV: &str = "go/v0.10.0"; - -const FEEMARKET_REV: &str = "v1.0.3"; - -const SLINKY_REV: &str = "v1.0.3"; - -// All paths must end with a / and either be absolute or include a ./ to reference the current -// working directory. - -/// Directory where the cosmos-sdk repo is located -const COSMOS_SDK_DIR: &str = "../dependencies/cosmos-sdk/"; -/// Directory where the neutron repo is located -const NEUTRON_DIR: &str = "../dependencies/neutron/"; -/// Directory where the wasmd repo is located -const WASMD_DIR: &str = "../dependencies/wasmd/"; -/// Directory where the cometbft repo is located -const COMETBFT_DIR: &str = "../dependencies/cometbft/"; -/// Directory where the ibc-go repo is located -const IBC_GO_DIR: &str = "../dependencies/ibc-go/"; -/// Directory where the ics23 repo is located -const ICS23_DIR: &str = "../dependencies/ics23/"; -/// Directory where the feemarket repo is located -const FEEMARKET_DIR: &str = "../dependencies/feemarket/"; -/// Directory where the slinky repo is located -const SLINKY_DIR: &str = "../dependencies/slinky/"; - -/// A temporary directory for repos storing -const TMP_REPOS_DIR: &str = "./dependencies/"; -/// A temporary directory for proto building -const TMP_BUILD_DIR: &str = "/tmp/tmp-protobuf/"; -/// The directory generated cosmos-sdk proto files go into in this repo -const OUT_DIR: &str = "../packages/neutron-sdk/src/proto_types/"; - -pub fn generate() { - let tmp_repos_dir: PathBuf = TMP_REPOS_DIR.parse().unwrap(); - if tmp_repos_dir.exists() { - fs::remove_dir_all(tmp_repos_dir.clone()).unwrap(); - } - - git::clone_repo(COSMOS_SDK_REPO, COSMOS_SDK_DIR, COSMOS_SDK_REV); - git::clone_repo(NEUTRON_REPO, NEUTRON_DIR, NEUTRON_REV); - git::clone_repo(WASMD_REPO, WASMD_DIR, WASMD_REV); - git::clone_repo(COMETBFT_REPO, COMETBFT_DIR, COMETBFT_REV); - git::clone_repo(IBC_GO_REPO, IBC_GO_DIR, IBC_GO_REV); - git::clone_repo(ICS23_REPO, ICS23_DIR, ICS23_REV); - git::clone_repo(FEEMARKET_REPO, FEEMARKET_DIR, FEEMARKET_REV); - git::clone_repo(SLINKY_REPO, SLINKY_DIR, SLINKY_REV); - - let tmp_build_dir: PathBuf = TMP_BUILD_DIR.parse().unwrap(); - let out_dir: PathBuf = OUT_DIR.parse().unwrap(); - - let cosmos_project = CosmosProject { - name: "cosmos".to_string(), - version: COSMOS_SDK_REV.to_string(), - project_dir: COSMOS_SDK_DIR.to_string(), - exclude_mods: vec!["reflection".to_string(), "autocli".to_string()], - }; - - let neutron_project = CosmosProject { - name: "neutron".to_string(), - version: NEUTRON_REV.to_string(), - project_dir: NEUTRON_DIR.to_string(), - exclude_mods: vec![], - }; - - let wasmd_project = CosmosProject { - name: "wasmd".to_string(), - version: WASMD_REV.to_string(), - project_dir: WASMD_DIR.to_string(), - exclude_mods: vec![], - }; - - let cometbft_project = CosmosProject { - name: "tendermint".to_string(), - version: COMETBFT_REV.to_string(), - project_dir: COMETBFT_DIR.to_string(), - exclude_mods: vec![], - }; - - let ibc_project = CosmosProject { - name: "ibc".to_string(), - version: IBC_GO_REV.to_string(), - project_dir: IBC_GO_DIR.to_string(), - exclude_mods: vec![], - }; - - let ics23_project = CosmosProject { - name: "ics23".to_string(), - version: ICS23_REV.to_string(), - project_dir: ICS23_DIR.to_string(), - exclude_mods: vec![], - }; - - let feemarket_project = CosmosProject { - name: "feemarket".to_string(), - version: FEEMARKET_REV.to_string(), - project_dir: FEEMARKET_DIR.to_string(), - exclude_mods: vec![], - }; - - let slinky_project = CosmosProject { - name: "slinky".to_string(), - version: SLINKY_REV.to_string(), - project_dir: SLINKY_DIR.to_string(), - exclude_mods: vec![], - }; - - let neutron_code_generator = CodeGenerator::new( - out_dir, - tmp_build_dir, - neutron_project, - vec![ - cosmos_project, - wasmd_project, - cometbft_project, - ibc_project, - ics23_project, - feemarket_project, - slinky_project, - ], - ); - - neutron_code_generator.generate(); - - fs::remove_dir_all(tmp_repos_dir.clone()).unwrap(); -} - -fn main() { - pretty_env_logger::init(); - generate(); -} diff --git a/proto-build/src/mod_gen.rs b/proto-build/src/mod_gen.rs deleted file mode 100644 index 9297fb47..00000000 --- a/proto-build/src/mod_gen.rs +++ /dev/null @@ -1,115 +0,0 @@ -use itertools::Itertools; -use proc_macro2::TokenStream as TokenStream2; -use quote::{format_ident, quote}; -use std::ffi::OsStr; -use std::fs; -use std::fs::create_dir_all; -use std::path::{Path, PathBuf}; - -pub fn generate_mod_file(for_dir: &Path) { - let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - let types_dir = root.join(for_dir); - - let paths = fs::read_dir(&types_dir) - .expect("[error] Unable to read dir") - .filter_map(|d| { - let f = d.expect("[error] Unable to get dir entry"); - if f.path().extension() == Some(OsStr::new("rs")) { - f.path() - .file_stem() - .and_then(|s| s.to_str()) - .map(|s| s.to_string()) - } else { - None - } - }) - .map(|s| s.split('.').map(|s| s.to_string()).collect::>()) - .collect::>>(); - - paths - .iter() - .for_each(|p| create_dir_all(for_dir.join(p[..(p.len() - 1)].join("/"))).unwrap()); - - recur_gen_mod(&types_dir, &types_dir, paths, ""); -} - -fn recur_gen_mod(for_dir: &Path, start_dir: &Path, paths: Vec>, include_file: &str) { - let uniq_keys = paths - .iter() - .filter_map(|p| (*p).first()) - .map(|s| s.to_owned()) - .unique() - .sorted() - .collect::>(); - - // base case - if uniq_keys.is_empty() { - let from = start_dir.join(format!("{}.rs", include_file.replace('/', "."))); - let to = for_dir - .parent() - .unwrap() - .join(format!("{}.rs", include_file.split('.').last().unwrap())); - fs::rename(from, to).unwrap(); - } else { - let ts = uniq_keys.iter().map(|k| { - let module = format_ident!("{}", k); - quote! { pub mod #module; } - }); - - let additional_mod_content = if paths.iter().any(|p| p.is_empty()) && paths.len() > 1 { - let src_file = start_dir.join(format!("{}.rs", include_file)); - let tk = fs::read_to_string(src_file.clone()) - .unwrap() - .parse::() - .unwrap(); - - fs::remove_file(src_file).unwrap(); - - tk - } else { - quote!() - }; - - create_mod_rs( - quote! { - #(#ts)* - - #additional_mod_content - }, - for_dir, - ); - - for k in uniq_keys { - let paths: Vec> = paths - .iter() - // only if head = k - .filter(|p| (**p).first() == Some(&k)) - // get tail - .map(|p| p.split_at(1).1.to_vec()) - .collect(); - let include_file = if include_file.is_empty() { - k.clone() - } else { - format!("{include_file}.{k}") - }; - - recur_gen_mod( - &for_dir.join(k.clone()), - start_dir, - paths.clone(), - &include_file, - ); - } - } -} - -fn create_mod_rs(ts: TokenStream2, path: &Path) { - let file = syn::parse_file(ts.to_string().as_str()) - .expect("[error] Unable to parse generated content as file while genrating mod.rs"); - - let write = fs::write(path.join("mod.rs"), prettyplease::unparse(&file)); - - if let Err(e) = write { - panic!("[error] Error while generating mod.rs: {}", e); - } -} diff --git a/proto-build/src/transform.rs b/proto-build/src/transform.rs deleted file mode 100644 index 810fd38b..00000000 --- a/proto-build/src/transform.rs +++ /dev/null @@ -1,204 +0,0 @@ -use heck::ToUpperCamelCase; -use log::debug; -use prost_types::FileDescriptorSet; - -use regex::Regex; -use std::ffi::OsStr; -use std::fs::{create_dir_all, remove_dir_all}; -use std::path::{Path, PathBuf}; -use std::{fs, io}; -use syn::{File, Item, ItemMod}; -use walkdir::WalkDir; - -use crate::transformers; - -/// Protos belonging to these Protobuf packages will be excluded -/// (i.e. because they are sourced from `tendermint-proto`) -const EXCLUDED_PROTO_PACKAGES: &[&str] = &["cosmos_proto", "gogoproto", "google"]; - -pub fn copy_and_transform_all(from_dir: &Path, to_dir: &Path, descriptor: &FileDescriptorSet) { - let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - let to_dir = root.join(to_dir); - debug!("Copying generated files into '{}'...", to_dir.display()); - - // Remove old compiled files - remove_dir_all(&to_dir).unwrap_or_default(); - create_dir_all(&to_dir).unwrap(); - - let mut filenames = Vec::new(); - - // Copy new compiled files (prost does not use folder structures) - let errors = WalkDir::new(from_dir) - .into_iter() - .filter_map(|e| e.ok()) - .filter(|e| e.file_type().is_file()) - .map(|e| { - let filename = e.file_name().to_os_string().to_str().unwrap().to_string(); - filenames.push(filename.clone()); - copy_and_transform( - e.path(), - format!("{}{}", to_dir.display(), &filename), - descriptor, - ) - }) - .filter_map(|e| e.err()) - .collect::>(); - - if !errors.is_empty() { - for e in errors { - eprintln!("[error] Error while copying compiled file: {}", e); - } - - panic!("[error] Aborted."); - } -} - -fn copy_and_transform( - src: &Path, - dest: impl AsRef, - descriptor: &FileDescriptorSet, -) -> io::Result<()> { - debug!("copy_and_transform: {:?} -> {:?}", src, dest.as_ref()); - // Skip proto files belonging to `EXCLUDED_PROTO_PACKAGES` - for package in EXCLUDED_PROTO_PACKAGES { - if let Some(filename) = src.file_name().and_then(OsStr::to_str) { - if filename.starts_with(&format!("{}.", package)) { - return Ok(()); - } - } - } - - let mut contents = match fs::read_to_string(src) { - Ok(c) => c, - Err(e) => { - debug!("{:?} – {}, copy_and_transform skipped", src, e); - return Ok(()); - } - }; - - for &(filename, regex, replacement) in transformers::LARGE_SIZE_ENUM_REPLACEMENTS { - if src.file_name().and_then(OsStr::to_str).unwrap() == filename { - contents = Regex::new(regex) - .unwrap_or_else(|_| panic!("invalid regex: {}", regex)) - .replace_all(&contents, replacement) - .to_string(); - } - } - - for &(regex, replacement) in transformers::REPLACEMENTS { - contents = Regex::new(regex) - .unwrap_or_else(|_| panic!("invalid regex: {}", regex)) - .replace_all(&contents, replacement) - .to_string(); - } - - let file = syn::parse_file(&contents); - if let Ok(file) = file { - // only transform rust file (skipping `*_COMMIT` file) - let items = transform_module(file.items, src, &[], descriptor, false); - contents = prettyplease::unparse(&File { items, ..file }); - } - - fs::write(dest, &*contents) -} - -fn transform_module( - items: Vec, - src: &Path, - ancestors: &[String], - descriptor: &FileDescriptorSet, - nested_mod: bool, -) -> Vec { - let mut items = transform_items(items, src, ancestors, descriptor); - - if items.iter().any(|i| matches!(i, Item::Struct(_))) { - items = prepend(items); - } - - append(items, src, descriptor, nested_mod) -} - -fn prepend(items: Vec) -> Vec { - let mut items = items; - - let mut prepending_items = vec![syn::parse_quote! { - use neutron_std_derive::CosmwasmExt; - }]; - - items.splice(0..0, prepending_items.drain(..)); - items -} - -fn append( - items: Vec, - src: &Path, - descriptor: &FileDescriptorSet, - nested_mod: bool, -) -> Vec { - transformers::append_querier(items, src, nested_mod, descriptor) -} - -fn transform_items( - items: Vec, - src: &Path, - ancestors: &[String], - descriptor: &FileDescriptorSet, -) -> Vec { - items - .into_iter() - .map(|i| match i { - Item::Struct(s) => Item::Struct({ - let s = transformers::add_derive_eq_struct(&s); - let s = transformers::append_attrs_struct(src, &s, descriptor); - let s = transformers::serde_alias_id_with_uppercased(s); - // A hack to make Pagination::next_key optional. - // Remove if [this PR](https://github.com/cosmos/cosmos-sdk/pull/20246) is merged and released - let s = transformers::make_next_key_optional(s); - let s = transformers::allow_serde_option_vec_u8_as_base64_encoded_string(s); - let s = transformers::allow_serde_vec_u8_as_base64_encoded_string(s); - let s = transformers::allow_serde_int_as_str(s); - - transformers::allow_serde_vec_int_as_vec_str(s) - }), - - Item::Enum(e) => Item::Enum({ - let e = transformers::add_derive_eq_enum(&e); - transformers::append_attrs_enum(src, &e, descriptor) - }), - - // This is a temporary hack to fix the issue with clashing stake authorization validators - Item::Mod(m) => Item::Mod(transformers::fix_clashing_stake_authorization_validators(m)), - - i => i, - }) - .map(|i: Item| transform_nested_mod(i, src, ancestors, descriptor)) - .collect::>() -} - -fn transform_nested_mod( - i: Item, - src: &Path, - ancestors: &[String], - descriptor: &FileDescriptorSet, -) -> Item { - match i.clone() { - Item::Mod(m) => { - let parent = &m.ident.to_string().to_upper_camel_case(); - let content = m.content.map(|(brace, items)| { - ( - brace, - transform_module( - items, - src, - &[ancestors, &[parent.to_string()]].concat(), - descriptor, - true, - ), - ) - }); - - Item::Mod(ItemMod { content, ..m }) - } - _ => i, - } -} diff --git a/proto-build/src/transformers.rs b/proto-build/src/transformers.rs deleted file mode 100644 index 157d063e..00000000 --- a/proto-build/src/transformers.rs +++ /dev/null @@ -1,873 +0,0 @@ -use std::collections::HashMap; -use std::path::Path; - -use heck::ToSnakeCase; -use heck::ToUpperCamelCase; -use proc_macro2::{Group, TokenStream as TokenStream2, TokenTree}; -use prost_types::{ - DescriptorProto, EnumDescriptorProto, FileDescriptorSet, ServiceDescriptorProto, -}; -use quote::{format_ident, quote}; -use regex::Regex; -use syn::ItemEnum; -use syn::ItemMod; -use syn::{parse_quote, Attribute, Fields, Ident, Item, ItemStruct, Type}; - -const TOO_MANY_ARGUMENTS_FUNCS: &[&str] = &["estimate_place_limit_order"]; - -pub const LARGE_SIZE_ENUM_REPLACEMENTS: &[(&str, &str, &str)] = &[( - "tendermint.blocksync.rs", - "super::BlockResponse", - "Box", -)]; - -/// Regex substitutions to apply to the prost-generated output -pub const REPLACEMENTS: &[(&str, &str)] = &[ - // Feature-gate gRPC client modules - ( - "/// Generated client implementations.", - "/// Generated client implementations.\n\ - #[cfg(feature = \"grpc\")]\n\ - #[cfg_attr(docsrs, doc(cfg(feature = \"grpc\")))]", - ), - // Feature-gate gRPC client impls which use `tonic::transport` - ( - "impl (.+)Client", - "#[cfg(feature = \"grpc-transport\")]\n \ - #[cfg_attr(docsrs, doc(cfg(feature = \"grpc-transport\")))]\n \ - impl ${1}Client", - ), -]; - -pub fn add_derive_eq(mut attr: Attribute) -> Attribute { - // find derive attribute - if attr.path.is_ident("derive") { - attr.tokens = attr - .tokens - .into_iter() - .map(|token_tree| { - match token_tree { - // with group token stream, which is `#[derive( ... )]` - TokenTree::Group(group) => { - let has_ident = |ident_str: &str| { - group.stream().into_iter().any(|token| match token { - TokenTree::Ident(ident) => ident == format_ident!("{}", ident_str), - _ => false, - }) - }; - - // if does not have both PartialEq and Eq - let stream = if !(has_ident("PartialEq") && has_ident("Eq")) { - // construct new token stream - group - .stream() - .into_iter() - .flat_map(|token| { - match token { - // if there exist `PartialEq` in derive attr - TokenTree::Ident(ident) => { - if ident == format_ident!("PartialEq") { - // expand token stream in group with `#[derive( ..., PartialEq, ... )]` to ``#[derive( ..., PartialEq, Eq, ... )]`` - let expanded_token_stream: TokenStream2 = - syn::parse_quote!(PartialEq, Eq); - expanded_token_stream.into_iter().collect() - } else { - vec![TokenTree::Ident(ident)] - } - } - tt => vec![tt], - } - }) - .collect() - } else { - group.stream() - }; - - TokenTree::Group(Group::new(group.delimiter(), stream)) - } - _ => token_tree, - } - }) - .collect(); - attr - } else { - attr - } -} - -pub fn add_derive_eq_struct(s: &ItemStruct) -> ItemStruct { - let mut item_struct = s.clone(); - item_struct.attrs = item_struct.attrs.into_iter().map(add_derive_eq).collect(); - - item_struct -} - -pub fn add_derive_eq_enum(s: &ItemEnum) -> ItemEnum { - let mut item_enum = s.clone(); - item_enum.attrs = item_enum.attrs.into_iter().map(add_derive_eq).collect(); - - item_enum -} - -pub fn append_attrs_struct( - src: &Path, - s: &ItemStruct, - descriptor: &FileDescriptorSet, -) -> ItemStruct { - let mut s = s.clone(); - let query_services = extract_query_services(descriptor); - let type_url = get_type_url(src, &s.ident, descriptor); - - let deprecated = get_deprecation(src, &s.ident, descriptor); - - s.attrs.append(&mut vec![ - syn::parse_quote! { #[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, CosmwasmExt)] }, - syn::parse_quote! { #[proto_message(type_url = #type_url)] }, - ]); - - if let Some(attr) = get_query_attr(src, &s.ident, &query_services) { - s.attrs.append(&mut vec![attr]) - } - - if deprecated { - s.attrs - .append(&mut vec![syn::parse_quote! { #[deprecated] }]); - } - - s -} - -pub fn append_attrs_enum(src: &Path, e: &ItemEnum, descriptor: &FileDescriptorSet) -> ItemEnum { - let mut e = e.clone(); - let deprecated = get_deprecation(src, &e.ident, descriptor); - - e.attrs.append(&mut vec![ - syn::parse_quote! { #[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema)] }, - ]); - - if deprecated { - e.attrs - .append(&mut vec![syn::parse_quote! { #[deprecated] }]); - } - - e -} - -pub fn allow_serde_int_as_str(s: ItemStruct) -> ItemStruct { - let fields_vec = s - .fields - .clone() - .into_iter() - .map(|mut field| { - let int_types = vec![ - parse_quote!(i8), - parse_quote!(i16), - parse_quote!(i32), - parse_quote!(i64), - parse_quote!(i128), - parse_quote!(isize), - parse_quote!(u8), - parse_quote!(u16), - parse_quote!(u32), - parse_quote!(u64), - parse_quote!(u128), - parse_quote!(usize), - ]; - - if int_types.contains(&field.ty) { - let from_str: syn::Attribute = parse_quote! { - #[serde( - serialize_with = "crate::serde::as_str::serialize", - deserialize_with = "crate::serde::as_str::deserialize" - )] - }; - field.attrs.append(&mut vec![from_str]); - field - } else { - field - } - }) - .collect::>(); - - let fields_named: syn::FieldsNamed = parse_quote! { - { #(#fields_vec,)* } - }; - let fields = syn::Fields::Named(fields_named); - - syn::ItemStruct { fields, ..s } -} - -pub fn allow_serde_vec_int_as_vec_str(s: ItemStruct) -> ItemStruct { - let fields_vec = s - .fields - .clone() - .into_iter() - .map(|mut field| { - let vec_int_types = vec![ - parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), - // parse_quote!(::prost::alloc::vec::Vec), -- this is not included because it is used for bytes and has it's own rule - parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), - parse_quote!(::prost::alloc::vec::Vec), - ]; - - if vec_int_types.contains(&field.ty) { - let from_str: syn::Attribute = parse_quote! { - #[serde( - serialize_with = "crate::serde::as_str_vec::serialize", - deserialize_with = "crate::serde::as_str_vec::deserialize" - )] - }; - field.attrs.append(&mut vec![from_str]); - field - } else { - field - } - }) - .collect::>(); - - let fields_named: syn::FieldsNamed = parse_quote! { - { #(#fields_vec,)* } - }; - let fields = syn::Fields::Named(fields_named); - - syn::ItemStruct { fields, ..s } -} - -pub fn allow_serde_vec_u8_as_base64_encoded_string(s: ItemStruct) -> ItemStruct { - let fields_vec = s - .fields - .clone() - .into_iter() - .map(|mut field| { - if field.ty == parse_quote!(::prost::alloc::vec::Vec) { - let from_str: syn::Attribute = parse_quote! { - #[serde( - serialize_with = "crate::serde::as_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_base64_encoded_string::deserialize" - )] - }; - field.attrs.append(&mut vec![from_str]); - field - } else { - field - } - }) - .collect::>(); - - let fields_named: syn::FieldsNamed = parse_quote! { - { #(#fields_vec,)* } - }; - let fields = syn::Fields::Named(fields_named); - - syn::ItemStruct { fields, ..s } -} - -/// some of proto's fields in osmosis' modules are named `ID` but prost generates `id` field -/// this function adds `#[serde(alias = "ID")]` to the `id` field -/// so that serde can deserialize `ID` field to `id` field. -/// This is required because the `ID` field is used in the query response and is serialized as json. -pub fn serde_alias_id_with_uppercased(s: ItemStruct) -> ItemStruct { - let fields_vec = s - .fields - .clone() - .into_iter() - .map(|mut field| { - if let Some(ident) = &field.ident { - let ident_str = ident.to_string(); - if ident_str == "id" { - let serde_alias_id: syn::Attribute = parse_quote! { - #[serde(alias = "ID")] - }; - field.attrs.append(&mut vec![serde_alias_id]); - field - } else if ident_str.contains("_id") { - let ident_str = ident_str.replace("_id", "ID"); - let serde_alias_id: syn::Attribute = parse_quote! { - #[serde(alias = #ident_str)] - }; - field.attrs.append(&mut vec![serde_alias_id]); - field - } else { - field - } - } else { - field - } - }) - .collect::>(); - - let fields_named: syn::FieldsNamed = parse_quote! { - { #(#fields_vec,)* } - }; - let fields = syn::Fields::Named(fields_named); - - syn::ItemStruct { fields, ..s } -} - -pub fn make_next_key_optional(mut s: ItemStruct) -> ItemStruct { - if s.ident == "PageResponse" { - if let Fields::Named(ref mut fields_named) = s.fields { - for field in fields_named.named.iter_mut() { - if let Some(ident) = &field.ident { - if ident == "next_key" { - field.ty = - parse_quote!(::core::option::Option<::prost::alloc::vec::Vec>); - for attr in field.attrs.iter_mut() { - if attr.path.is_ident("prost") { - *attr = parse_quote! { - #[prost(bytes = "vec", optional, tag = "1")] - }; - } - } - } - } - } - } - } - - s -} - -pub fn allow_serde_option_vec_u8_as_base64_encoded_string(s: syn::ItemStruct) -> syn::ItemStruct { - let fields_vec = s.fields - .clone() - .into_iter() - .map(|mut field| { - if let syn::Type::Path(type_path) = &field.ty { - if let Some(segment) = type_path.path.segments.last() { - if segment.ident == "Option" { - if let syn::PathArguments::AngleBracketed(args) = &segment.arguments { - if let Some(syn::GenericArgument::Type(syn::Type::Path(inner_path))) = args.args.first() { - if let Some(inner_segment) = inner_path.path.segments.last() { - if inner_segment.ident == "Vec" { - let from_str: syn::Attribute = parse_quote! { - #[serde( - serialize_with = "crate::serde::as_option_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_option_base64_encoded_string::deserialize" - )] - }; - field.attrs.push(from_str); - } - } - } - } - } - } - } - field - }) - .collect::>(); - - let fields_named: syn::FieldsNamed = parse_quote! { - { #(#fields_vec,)* } - }; - let fields = syn::Fields::Named(fields_named); - - syn::ItemStruct { fields, ..s } -} - -// ====== helpers ====== - -fn get_query_attr( - src: &Path, - ident: &Ident, - query_services: &HashMap, -) -> Option { - let package = src.file_stem().unwrap().to_str().unwrap(); - let service = query_services.get(package); - - let method = service?.method.iter().find(|m| { - let input_type = m.input_type.clone().unwrap(); - let input_type = input_type.split('.').last().unwrap(); - *ident == input_type.to_upper_camel_case() - }); - - let method_name = method?.name.clone().unwrap(); - let response_type = method?.output_type.clone().unwrap(); - let response_type = response_type.split('.').last().unwrap(); - let response_type = format_ident!("{}", response_type.to_upper_camel_case()); - - let path = format!("/{}.Query/{}", package, method_name); - Some(syn::parse_quote! { #[proto_query(path = #path, response_type = #response_type)] }) -} - -fn get_type_url(src: &Path, ident: &Ident, descriptor: &FileDescriptorSet) -> String { - let type_path = src.file_stem().unwrap().to_str().unwrap(); - let init_path = ""; - - let name: Option = descriptor - .file - .clone() - .into_iter() - .filter(|f| f.package.to_owned().unwrap() == type_path) - .flat_map(|f| { - let target = ident.to_string(); - vec![ - extract_type_path_from_enum(&target, &f.enum_type, init_path), - extract_type_path_from_descriptor(&target, &f.message_type, init_path), - ] - }) - .filter(|r| r.is_some()) - .take(1) - .collect(); - - format!("/{}.{}", type_path, name.unwrap()) -} - -fn get_deprecation(src: &Path, ident: &Ident, descriptor: &FileDescriptorSet) -> bool { - let type_path = src.file_stem().unwrap().to_str().unwrap(); - - let deprecation: Option = descriptor - .file - .clone() - .into_iter() - .filter(|f| f.package.to_owned().unwrap() == type_path) - .flat_map(|f| { - let target = ident.to_string(); - vec![ - extract_deprecation_from_enum(&target, &f.enum_type), - extract_deprecation_from_descriptor(&target, &f.message_type), - ] - }) - .find(|r| r.is_some()) - .flatten(); - - deprecation.unwrap_or(false) -} - -fn extract_deprecation_from_descriptor( - target: &str, - message_type: &[DescriptorProto], -) -> Option { - message_type.iter().find_map(|descriptor| { - let message_name = descriptor.name.to_owned().unwrap(); - - if message_name.to_upper_camel_case() == target { - descriptor.clone().options?.deprecated - } else if let Some(deprecated) = - extract_deprecation_from_descriptor(target, &descriptor.nested_type) - { - Some(deprecated) - } else { - extract_deprecation_from_enum(target, &descriptor.enum_type) - } - }) -} - -fn extract_deprecation_from_enum(target: &str, enum_type: &[EnumDescriptorProto]) -> Option { - enum_type - .iter() - .find(|e| e.name.to_owned().unwrap().to_upper_camel_case() == target) - .and_then(|e| e.clone().options?.deprecated) -} - -fn extract_type_path_from_descriptor( - target: &str, - message_type: &[DescriptorProto], - path: &str, -) -> Option { - message_type.iter().find_map(|descriptor| { - let message_name = descriptor.name.to_owned().unwrap(); - - if message_name.to_upper_camel_case() == target { - Some(append_type_path(path, &message_name)) - } else if let Some(message_name) = extract_type_path_from_descriptor( - target, - &descriptor.nested_type, - &append_type_path(path, &message_name), - ) { - Some(message_name) - } else { - extract_type_path_from_enum( - target, - &descriptor.enum_type, - &append_type_path(path, &message_name), - ) - } - }) -} - -pub fn extract_type_path_from_service_str(s: &str) -> String { - let mut parts: Vec<_> = s.trim_start_matches('.').split('.').collect(); - parts.pop(); - parts.join(".") -} - -fn extract_type_path_from_enum( - target: &str, - enum_type: &[EnumDescriptorProto], - path: &str, -) -> Option { - enum_type - .iter() - .find(|e| e.name.to_owned().unwrap().to_upper_camel_case() == target) - .map(|e| append_type_path(path, &e.name.to_owned().unwrap())) -} - -pub fn extract_query_services( - descriptor: &FileDescriptorSet, -) -> HashMap { - descriptor - .clone() - .file - .into_iter() - .filter_map(|f| { - let service = f - .service - .into_iter() - .find(|s| s.name == Some("Query".to_string())); - - if let Some(service) = service { - Some(( - f.package.expect("Missing package name in file descriptor"), - service, - )) - } else { - None - } - }) - .collect() -} - -fn append_type_path(path: &str, name: &str) -> String { - if path.is_empty() { - name.to_string() - } else { - format!("{}.{}", path, name) - } -} - -pub fn append_querier( - items: Vec, - src: &Path, - nested_mod: bool, - descriptor: &FileDescriptorSet, -) -> Vec { - let package = src.file_stem().unwrap().to_str().unwrap(); - let re = Regex::new(r"([^.]*)(\.v\d+(beta\d+)?)?$").unwrap(); - - let package_stem = re.captures(package).unwrap().get(1).unwrap().as_str(); - - let querier_wrapper_ident = format_ident!("{}Querier", &package_stem.to_upper_camel_case()); - - let query_services = extract_query_services(descriptor); - let query_fns = query_services.get(package).map(|service| service.method.iter().map(|method_desc| { - if nested_mod { - return quote! {}; - } - - let deprecated = method_desc.clone().options.map(|opt| opt.deprecated.unwrap_or(false)).unwrap_or(false); - let deprecated_attr = if deprecated { - quote!(#[deprecated]) - } else { - quote!() - }; - - let method_desc = method_desc.clone(); - - // Some requests are defined in other packages and imported, but end up in the - // ServiceDescriptorProto anyway, so we need to filter them out - let req_package = extract_type_path_from_service_str(method_desc.input_type.as_ref().unwrap()); - if req_package != package { - return quote! {}; - } - - let name = format_ident!("{}", method_desc.name.unwrap().as_str().to_snake_case()); - let req_type = format_ident!("{}", method_desc.input_type.unwrap().split('.').last().unwrap().to_string().to_upper_camel_case()); - let res_type = format_ident!("{}", method_desc.output_type.unwrap().split('.').last().unwrap().to_string().to_upper_camel_case()); - - let allow_too_many_arguments_attr = if TOO_MANY_ARGUMENTS_FUNCS.iter().any(|&i| name == i) { - quote!(#[allow(clippy::too_many_arguments)]) - } else { - quote!() - }; - - let req_args = items.clone().into_iter() - .find_map(|item| match item { - Item::Struct(s) => { - if s.ident == req_type { - match s.fields { - Fields::Named(fields_named) => { - Some(fields_named.named) - } - _ => None - } - } else { - None - } - } - _ => None - }); - - let arg_idents = req_args.clone().unwrap().into_iter().map(|arg| arg.ident.unwrap()).collect::>(); - let arg_ty = req_args.unwrap().into_iter().map(|arg| arg.ty).collect::>(); - - quote! { - #deprecated_attr - #allow_too_many_arguments_attr - pub fn #name( &self, #(#arg_idents : #arg_ty),* ) -> Result<#res_type, cosmwasm_std::StdError> { - #req_type { #(#arg_idents),* }.query(self.querier) - } - } - }).collect::>()); - - let querier = if let Some(query_fns) = query_fns { - if !nested_mod { - let allow_dead_code_attr = if query_fns.iter().any(|i| !i.is_empty()) { - quote!() - } else { - quote!(#[allow(dead_code)]) - }; - - vec![ - parse_quote! { - #allow_dead_code_attr - pub struct #querier_wrapper_ident<'a, Q: cosmwasm_std::CustomQuery> { - querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>, - } - }, - parse_quote! { - impl<'a, Q: cosmwasm_std::CustomQuery> #querier_wrapper_ident<'a, Q> { - pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self { - Self { querier } - } - #(#query_fns)* - } - }, - ] - } else { - vec![] - } - } else { - vec![] - }; - - [items, querier].concat() -} - -/// This is a hack to fix a clashing name in the stake_authorization module -pub fn fix_clashing_stake_authorization_validators(input: ItemMod) -> ItemMod { - // do this only if the module is named "stake_authorization" - if input.ident != "stake_authorization" { - return input; - } - let new_name = Ident::new("Validators_", input.ident.span()); - let mut validators = None; - let items = input.content.clone().unwrap().1; - - // Iterate over the items in the module and look for the Validators struct then rename it - let items = items.into_iter().map(|mut item| { - if let Item::Struct(ref mut s) = item { - if s.ident == "Validators" { - s.ident = new_name.clone(); - validators = Some(s.clone()); - } - } - item - }); - - // Update any references to the struct - let items = items.into_iter().map(|mut item| { - if let Item::Enum(ref mut e) = item { - if e.ident == "Validators" { - for v in e.variants.iter_mut() { - if let Fields::Unnamed(ref mut f) = v.fields { - if let Type::Path(ref mut p) = f.unnamed.first_mut().unwrap().ty { - if p.path.segments.first().unwrap().ident == "Validators" { - p.path.segments.first_mut().unwrap().ident = new_name.clone(); - } - } - } - } - } - } - item - }); - - ItemMod { - content: Some((input.content.unwrap().0, items.collect())), - ..input - } -} - -#[cfg(test)] -mod tests { - use super::*; - use syn::ItemStruct; - - macro_rules! assert_ast_eq { - ($left:ident, $right:ident) => { - let left_fmt = - prettyplease::unparse(&syn::parse_file("e! { #$left }.to_string()).unwrap()); - let right_fmt = - prettyplease::unparse(&syn::parse_file("e! { #$right}.to_string()).unwrap()); - - assert!( - $left == $right, - "Left is: \n\n{} \n\n but right is: \n\n{} \n\n", - left_fmt, - right_fmt - ); - }; - } - - #[test] - fn test_add_derive_eq_if_there_is_partial_eq() { - let item_struct: ItemStruct = syn::parse_quote! { - #[derive(PartialEq, Debug)] - struct Hello { - name: String - } - }; - - let result = add_derive_eq_struct(&item_struct); - let expected: ItemStruct = syn::parse_quote! { - #[derive(PartialEq, Eq, Debug)] - struct Hello { - name: String - } - }; - - assert_ast_eq!(result, expected); - } - - #[test] - fn test_add_derive_eq_does_not_add_if_there_is_no_partial_eq() { - let item_struct: ItemStruct = syn::parse_quote! { - #[derive(Debug)] - struct Hello { - name: String - } - }; - - let result = add_derive_eq_struct(&item_struct); - - assert_ast_eq!(item_struct, result); - } - - #[test] - fn test_add_derive_eq_does_not_add_if_there_is_partial_eq_and_eq() { - let item_struct: ItemStruct = syn::parse_quote! { - #[derive(PartialEq, Eq, Debug)] - struct Hello { - name: String - } - }; - - let result = add_derive_eq_struct(&item_struct); - - let expected: ItemStruct = syn::parse_quote! { - #[derive(PartialEq, Eq, Debug)] - struct Hello { - name: String - } - }; - - assert_ast_eq!(result, expected); - } - - #[test] - #[allow(non_snake_case)] - fn test_alias_id_with_ID_if_there_id_a_field_named_id() { - let item_struct: ItemStruct = syn::parse_quote! { - #[derive(PartialEq, Eq, Debug)] - struct PeriodLock { - id: u64, - duration: Duration, - } - }; - - let result = serde_alias_id_with_uppercased(item_struct); - - let expected: ItemStruct = syn::parse_quote! { - #[derive(PartialEq, Eq, Debug)] - struct PeriodLock { - #[serde(alias = "ID")] - id: u64, - duration: Duration, - } - }; - - assert_ast_eq!(result, expected); - } - - #[test] - #[allow(non_snake_case)] - fn test_alias_partial_id_with_ID() { - let item_struct: ItemStruct = syn::parse_quote! { - #[derive(PartialEq, Eq, Debug)] - pub struct FeeToken { - pub denom: ::prost::alloc::string::String, - - pub pool_id: u64, - } - }; - - let result = serde_alias_id_with_uppercased(item_struct); - - let expected: ItemStruct = syn::parse_quote! { - #[derive(PartialEq, Eq, Debug)] - pub struct FeeToken { - pub denom: ::prost::alloc::string::String, - #[serde(alias = "poolID")] - pub pool_id: u64, - } - }; - - assert_ast_eq!(result, expected); - } - - #[test] - fn test_make_next_key_optional() { - let input: ItemStruct = parse_quote! { - pub struct PageResponse { - #[prost(bytes = "vec", tag = "1")] - pub next_key: ::prost::alloc::vec::Vec, - } - }; - - let result = make_next_key_optional(input); - - let expected: ItemStruct = parse_quote! { - pub struct PageResponse { - #[prost(bytes = "vec", optional, tag = "1")] - pub next_key: ::core::option::Option<::prost::alloc::vec::Vec>, - } - }; - - assert_ast_eq!(result, expected); - } - - #[test] - fn test_allow_serde_option_vec_u8_as_base64_encoded_string() { - let input: ItemStruct = parse_quote! { - pub struct PageResponse { - #[prost(bytes = "vec", optional, tag = "1")] - pub next_key: ::core::option::Option<::prost::alloc::vec::Vec>, - } - }; - - let result = allow_serde_option_vec_u8_as_base64_encoded_string(input); - - let expected: ItemStruct = parse_quote! { - pub struct PageResponse { - #[prost(bytes = "vec", optional, tag = "1")] - #[serde( - serialize_with = "crate::serde::as_option_base64_encoded_string::serialize", - deserialize_with = "crate::serde::as_option_base64_encoded_string::deserialize" - )] - pub next_key: ::core::option::Option<::prost::alloc::vec::Vec>, - } - }; - - assert_ast_eq!(result, expected); - } -}