From 4b8dbb4d6f369fb64e78be6d0b2989e8bb123701 Mon Sep 17 00:00:00 2001 From: Hanjun Kim Date: Fri, 22 Nov 2024 14:27:18 +0800 Subject: [PATCH] refactor!: remove stride's ICA liquid staking modules (#186) ## Description Closes: MILK-151 --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [ ] targeted the correct branch (see [PR Targeting](https://github.com/milkyway-labs/milkyway/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html) - [ ] included the necessary unit and integration [tests](https://github.com/milkyway-labs/milkyway/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --- .golangci.yml | 5 - README.md | 3 +- api/stride/epochs/genesis.pulsar.go | 1593 - api/stride/epochs/query.pulsar.go | 3162 -- api/stride/epochs/query_grpc.pb.go | 207 - .../icacallbacks/callback_data.pulsar.go | 926 - api/stride/icacallbacks/genesis.pulsar.go | 825 - api/stride/icacallbacks/packet.pulsar.go | 1046 - api/stride/icacallbacks/params.pulsar.go | 498 - api/stride/icacallbacks/query.pulsar.go | 3141 -- api/stride/icacallbacks/query_grpc.pb.go | 207 - api/stride/icacallbacks/tx.pulsar.go | 79 - api/stride/icacallbacks/tx_grpc.pb.go | 80 - .../interchainquery/v1/genesis.pulsar.go | 2751 -- .../interchainquery/v1/messages.pulsar.go | 1391 - .../interchainquery/v1/messages_grpc.pb.go | 127 - api/stride/interchainquery/v1/query.pulsar.go | 1074 - .../interchainquery/v1/query_grpc.pb.go | 121 - api/stride/records/callbacks.pulsar.go | 1046 - api/stride/records/genesis.pulsar.go | 1404 - api/stride/records/params.pulsar.go | 493 - api/stride/records/query.pulsar.go | 12042 ------- api/stride/records/query_grpc.pb.go | 533 - api/stride/records/records.pulsar.go | 4816 --- .../stakeibc/address_unbonding.pulsar.go | 992 - api/stride/stakeibc/callbacks.pulsar.go | 8448 ----- api/stride/stakeibc/epoch_tracker.pulsar.go | 744 - api/stride/stakeibc/genesis.pulsar.go | 981 - api/stride/stakeibc/host_zone.pulsar.go | 3405 -- api/stride/stakeibc/ica_account.pulsar.go | 854 - api/stride/stakeibc/packet.pulsar.go | 1043 - api/stride/stakeibc/params.pulsar.go | 1457 - api/stride/stakeibc/query.pulsar.go | 11119 ------- api/stride/stakeibc/query_grpc.pb.go | 529 - api/stride/stakeibc/trade_route.pulsar.go | 2339 -- api/stride/stakeibc/tx.pulsar.go | 25990 ---------------- api/stride/stakeibc/tx_grpc.pb.go | 923 - api/stride/stakeibc/validator.pulsar.go | 1142 - app/keepers/keepers.go | 96 +- app/keepers/keys.go | 12 - app/keepers/modules.go | 12 - app/modules.go | 39 +- proto/stride/epochs/genesis.proto | 36 - proto/stride/epochs/query.proto | 74 - proto/stride/icacallbacks/callback_data.proto | 13 - proto/stride/icacallbacks/genesis.proto | 17 - proto/stride/icacallbacks/packet.proto | 17 - proto/stride/icacallbacks/params.proto | 9 - proto/stride/icacallbacks/query.proto | 60 - proto/stride/icacallbacks/tx.proto | 16 - proto/stride/interchainquery/v1/genesis.proto | 51 - .../stride/interchainquery/v1/messages.proto | 46 - proto/stride/interchainquery/v1/query.proto | 21 - proto/stride/records/callbacks.proto | 10 - proto/stride/records/genesis.proto | 24 - proto/stride/records/params.proto | 7 - proto/stride/records/query.proto | 185 - proto/stride/records/records.proto | 111 - proto/stride/stakeibc/README.md | 5 - proto/stride/stakeibc/address_unbonding.proto | 19 - proto/stride/stakeibc/callbacks.proto | 93 - proto/stride/stakeibc/epoch_tracker.proto | 11 - proto/stride/stakeibc/genesis.proto | 22 - proto/stride/stakeibc/host_zone.proto | 138 - proto/stride/stakeibc/ica_account.proto | 22 - proto/stride/stakeibc/packet.proto | 17 - proto/stride/stakeibc/params.proto | 32 - proto/stride/stakeibc/query.proto | 161 - proto/stride/stakeibc/trade_route.proto | 90 - proto/stride/stakeibc/tx.proto | 453 - proto/stride/stakeibc/validator.proto | 31 - scripts/protoc-swagger-gen.sh | 1 - scripts/protocgen-pulsar.sh | 1 - scripts/protocgen.sh | 1 - utils/utils.go | 215 - x/epochs/LICENSE | 201 - x/epochs/README.md | 183 - x/epochs/client/cli/query.go | 159 - x/epochs/genesis.go | 41 - x/epochs/keeper/abci.go | 80 - x/epochs/keeper/epoch.go | 67 - x/epochs/keeper/grpc_query.go | 77 - x/epochs/keeper/hooks.go | 17 - x/epochs/keeper/keeper.go | 43 - x/epochs/module.go | 184 - x/epochs/simulation/genesis.go | 47 - x/epochs/testutil/hooks_mocks.go | 66 - x/epochs/types/codec.go | 8 - x/epochs/types/events.go | 9 - x/epochs/types/genesis.go | 96 - x/epochs/types/genesis.pb.go | 786 - x/epochs/types/hooks.go | 35 - x/epochs/types/identifier.go | 26 - x/epochs/types/keys.go | 27 - x/epochs/types/query.pb.go | 1419 - x/epochs/types/query.pb.gw.go | 337 - x/icacallbacks/README.md | 70 - x/icacallbacks/client/cli/query.go | 33 - .../client/cli/query_callback_data.go | 74 - x/icacallbacks/client/cli/query_params.go | 35 - x/icacallbacks/client/cli/tx.go | 26 - x/icacallbacks/genesis.go | 28 - x/icacallbacks/ibc_module.go | 173 - x/icacallbacks/icacallbacks.go | 88 - x/icacallbacks/keeper/callback_data.go | 63 - x/icacallbacks/keeper/grpc_query.go | 7 - .../keeper/grpc_query_callback_data.go | 57 - x/icacallbacks/keeper/grpc_query_params.go | 20 - x/icacallbacks/keeper/keeper.go | 83 - x/icacallbacks/keeper/msg_server.go | 17 - x/icacallbacks/keeper/params.go | 16 - x/icacallbacks/module.go | 165 - x/icacallbacks/module_simulation.go | 51 - x/icacallbacks/simulation/simap.go | 15 - .../testutil/expected_keepers_mocks.go | 92 - .../types/acknowledgement_response.go | 15 - x/icacallbacks/types/callback_data.pb.go | 564 - x/icacallbacks/types/callbacks.go | 16 - x/icacallbacks/types/codec.go | 24 - x/icacallbacks/types/errors.go | 18 - x/icacallbacks/types/events_ibc.go | 12 - x/icacallbacks/types/expected_keepers.go | 19 - x/icacallbacks/types/genesis.go | 41 - x/icacallbacks/types/genesis.pb.go | 439 - x/icacallbacks/types/key_callback_data.go | 25 - x/icacallbacks/types/keys.go | 37 - x/icacallbacks/types/packet.pb.go | 502 - x/icacallbacks/types/params.go | 26 - x/icacallbacks/types/params.pb.go | 265 - x/icacallbacks/types/query.pb.go | 1390 - x/icacallbacks/types/query.pb.gw.go | 337 - x/icacallbacks/types/tx.pb.go | 84 - x/icacallbacks/types/types.go | 1 - x/interchainquery/LICENSE | 201 - x/interchainquery/README.md | 118 - x/interchainquery/client/cli/query.go | 69 - x/interchainquery/genesis.go | 25 - x/interchainquery/keeper/abci.go | 49 - x/interchainquery/keeper/grpc_query.go | 25 - x/interchainquery/keeper/keeper.go | 104 - x/interchainquery/keeper/msg_server.go | 226 - x/interchainquery/keeper/queries.go | 181 - x/interchainquery/module.go | 202 - x/interchainquery/types/callbacks.go | 12 - x/interchainquery/types/codec.go | 33 - x/interchainquery/types/error.go | 13 - x/interchainquery/types/events.go | 14 - x/interchainquery/types/genesis.go | 18 - x/interchainquery/types/genesis.pb.go | 1446 - x/interchainquery/types/keys.go | 64 - x/interchainquery/types/messages.pb.go | 764 - x/interchainquery/types/messages.pb.gw.go | 169 - x/interchainquery/types/msgs.go | 46 - x/interchainquery/types/query.go | 18 - x/interchainquery/types/query.pb.go | 544 - x/interchainquery/types/query.pb.gw.go | 153 - x/records/README.md | 80 - x/records/client/cli/query.go | 39 - x/records/client/cli/query_deposit_record.go | 105 - .../cli/query_epoch_unbonding_record.go | 78 - x/records/client/cli/query_lsm_deposits.go | 93 - x/records/client/cli/query_params.go | 35 - .../cli/query_user_redemption_record.go | 74 - x/records/client/cli/tx.go | 30 - x/records/genesis.go | 52 - x/records/keeper/callback_lsm_transfer.go | 55 - x/records/keeper/callback_native_transfer.go | 82 - x/records/keeper/callbacks.go | 15 - x/records/keeper/deposit_record.go | 115 - x/records/keeper/epoch_unbonding_record.go | 158 - x/records/keeper/grpc_query.go | 7 - x/records/keeper/grpc_query_deposit_record.go | 73 - .../grpc_query_epoch_unbonding_record.go | 56 - x/records/keeper/grpc_query_lsm_deposits.go | 62 - x/records/keeper/grpc_query_params.go | 20 - .../grpc_query_user_redemption_record.go | 56 - ...c_query_user_redemption_record_for_user.go | 44 - x/records/keeper/ibc.go | 46 - x/records/keeper/keeper.go | 52 - x/records/keeper/lsm_token_deposit.go | 81 - x/records/keeper/params.go | 16 - x/records/keeper/transfer.go | 107 - x/records/keeper/user_redemption_record.go | 73 - x/records/module.go | 163 - x/records/module_ibc.go | 332 - x/records/simulation/simap.go | 15 - x/records/testutil/expected_keepers_mocks.go | 106 - x/records/types/callbacks.pb.go | 482 - x/records/types/codec.go | 13 - x/records/types/errors.go | 15 - x/records/types/events_ibc.go | 11 - x/records/types/expected_keepers.go | 20 - x/records/types/genesis.go | 79 - x/records/types/genesis.pb.go | 704 - x/records/types/keys.go | 55 - x/records/types/params.go | 16 - x/records/types/params.pb.go | 263 - x/records/types/query.pb.go | 5031 --- x/records/types/query.pb.gw.go | 1197 - x/records/types/records.go | 10 - x/records/types/records.pb.go | 2457 -- x/records/types/types.go | 7 - x/stakeibc/README.md | 120 - x/stakeibc/client/cli/query.go | 35 - x/stakeibc/client/cli/query_epoch_tracker.go | 66 - x/stakeibc/client/cli/query_host_zone.go | 74 - x/stakeibc/client/cli/query_module_address.go | 46 - .../client/cli/query_next_packet_sequence.go | 40 - x/stakeibc/client/cli/query_params.go | 35 - x/stakeibc/client/cli/query_register_ica.go | 34 - x/stakeibc/client/cli/query_trade_routes.go | 36 - x/stakeibc/client/cli/query_validator.go | 39 - x/stakeibc/client/cli/tx.go | 47 - x/stakeibc/client/cli/tx_add_validators.go | 74 - .../client/cli/tx_calibrate_delegation.go | 41 - .../client/cli/tx_change_validator_weight.go | 140 - .../client/cli/tx_claim_undelegated_tokens.go | 51 - x/stakeibc/client/cli/tx_clear_balance.go | 53 - x/stakeibc/client/cli/tx_delete_validator.go | 41 - x/stakeibc/client/cli/tx_liquid_stake.go | 51 - x/stakeibc/client/cli/tx_lsm_liquid_stake.go | 47 - .../client/cli/tx_rebalance_validators.go | 47 - x/stakeibc/client/cli/tx_redeem_stake.go | 54 - .../client/cli/tx_register_host_zone.go | 111 - .../cli/tx_restore_interchain_account.go | 58 - x/stakeibc/client/cli/tx_resume_host_zone.go | 39 - .../cli/tx_set_community_pool_rebate.go | 60 - .../client/cli/tx_toggle_trade_controller.go | 56 - x/stakeibc/client/cli/tx_update_delegation.go | 45 - .../tx_update_inner_redemption_rate_bounds.go | 44 - x/stakeibc/genesis.go | 34 - x/stakeibc/ibc_middleware.go | 161 - x/stakeibc/keeper/abci.go | 47 - x/stakeibc/keeper/claim.go | 142 - x/stakeibc/keeper/community_pool.go | 314 - x/stakeibc/keeper/consumer.go | 40 - x/stakeibc/keeper/delegation.go | 178 - x/stakeibc/keeper/epoch_tracker.go | 144 - x/stakeibc/keeper/events.go | 157 - x/stakeibc/keeper/grpc_query.go | 252 - x/stakeibc/keeper/hooks.go | 135 - x/stakeibc/keeper/host_zone.go | 291 - x/stakeibc/keeper/ibc.go | 265 - x/stakeibc/keeper/icacallbacks.go | 27 - x/stakeibc/keeper/icacallbacks_claim.go | 112 - x/stakeibc/keeper/icacallbacks_delegate.go | 109 - x/stakeibc/keeper/icacallbacks_detokenize.go | 87 - x/stakeibc/keeper/icacallbacks_rebalance.go | 115 - x/stakeibc/keeper/icacallbacks_redemption.go | 91 - x/stakeibc/keeper/icacallbacks_reinvest.go | 141 - x/stakeibc/keeper/icacallbacks_undelegate.go | 228 - x/stakeibc/keeper/icqcallbacks.go | 62 - .../icqcallbacks_callibrate_delegation.go | 85 - ...icqcallbacks_community_pool_ica_balance.go | 86 - .../keeper/icqcallbacks_delegator_shares.go | 255 - x/stakeibc/keeper/icqcallbacks_fee_balance.go | 92 - x/stakeibc/keeper/icqcallbacks_pool_price.go | 98 - .../icqcallbacks_trade_converted_balance.go | 64 - .../icqcallbacks_trade_reward_balance.go | 66 - .../icqcallbacks_validator_exchange_rate.go | 196 - .../icqcallbacks_withdrawal_host_balance.go | 123 - .../icqcallbacks_withdrawal_reward_balance.go | 66 - x/stakeibc/keeper/interchainaccounts.go | 312 - x/stakeibc/keeper/interchainqueries.go | 242 - x/stakeibc/keeper/invariants.go | 69 - x/stakeibc/keeper/keeper.go | 163 - x/stakeibc/keeper/lsm.go | 505 - x/stakeibc/keeper/msg_server.go | 1298 - x/stakeibc/keeper/params.go | 22 - x/stakeibc/keeper/rebalance.go | 262 - x/stakeibc/keeper/records.go | 84 - x/stakeibc/keeper/redemption_rate.go | 161 - x/stakeibc/keeper/redemption_sweep.go | 144 - x/stakeibc/keeper/reward_allocation.go | 86 - x/stakeibc/keeper/reward_converter.go | 676 - x/stakeibc/keeper/trade_route.go | 64 - x/stakeibc/keeper/transfer.go | 224 - x/stakeibc/keeper/unbonding.go | 569 - x/stakeibc/keeper/validator.go | 276 - x/stakeibc/module.go | 186 - x/stakeibc/move/bcs.go | 165 - x/stakeibc/move/connector.go | 7 - x/stakeibc/move/denom.go | 56 - x/stakeibc/move/keys.go | 17 - x/stakeibc/move/serialize.go | 13 - x/stakeibc/move/types.go | 53 - x/stakeibc/simulation/add_validator.go | 30 - .../simulation/change_validator_weight.go | 30 - .../simulation/claim_undelegated_tokens.go | 30 - x/stakeibc/simulation/delete_validator.go | 30 - x/stakeibc/simulation/liquid_stake.go | 30 - x/stakeibc/simulation/rebalance_validators.go | 30 - .../simulation/restore_interchain_account.go | 30 - x/stakeibc/simulation/simap.go | 15 - x/stakeibc/simulation/update_delegation.go | 30 - x/stakeibc/testutil/hooks_mocks.go | 10 - x/stakeibc/types/address_unbonding.pb.go | 606 - x/stakeibc/types/callbacks.pb.go | 3529 --- x/stakeibc/types/codec.go | 66 - x/stakeibc/types/epoch_tracker.pb.go | 428 - x/stakeibc/types/errors.go | 70 - x/stakeibc/types/events.go | 59 - x/stakeibc/types/expected_keepers.go | 48 - x/stakeibc/types/genesis.go | 50 - x/stakeibc/types/genesis.pb.go | 506 - x/stakeibc/types/hooks.go | 18 - x/stakeibc/types/host_zone.go | 66 - x/stakeibc/types/host_zone.pb.go | 2039 -- x/stakeibc/types/ica_account.go | 21 - x/stakeibc/types/ica_account.pb.go | 508 - x/stakeibc/types/interchainqueries.go | 46 - x/stakeibc/types/keys.go | 70 - x/stakeibc/types/lsm_msgs.go | 64 - x/stakeibc/types/lsm_tx.pb.go | 709 - x/stakeibc/types/message_add_validators.go | 64 - .../types/message_calibrate_delegation.go | 61 - .../types/message_change_validator_weight.go | 59 - .../types/message_claim_undelegated_tokens.go | 56 - x/stakeibc/types/message_clear_balance.go | 63 - .../types/message_create_trade_route.go | 139 - .../types/message_delete_trade_route.go | 49 - x/stakeibc/types/message_delete_validator.go | 48 - x/stakeibc/types/message_liquid_stake.go | 62 - x/stakeibc/types/message_lsm_liquid_stake.go | 63 - .../types/message_rebalance_validators.go | 58 - x/stakeibc/types/message_redeem_stake.go | 65 - .../types/message_register_host_zone.go | 135 - .../message_restore_interchain_account.go | 63 - x/stakeibc/types/message_resume_host_zone.go | 47 - .../message_set_community_pool_rebate.go | 68 - .../types/message_toggle_trade_controller.go | 62 - x/stakeibc/types/message_update_delegation.go | 63 - .../types/message_update_host_zone_params.go | 44 - ...age_update_inner_redemption_rate_bounds.go | 54 - .../types/message_update_trade_route.go | 63 - x/stakeibc/types/osmosis.pb.go | 1370 - x/stakeibc/types/packet.pb.go | 501 - x/stakeibc/types/params.go | 241 - x/stakeibc/types/params.pb.go | 858 - x/stakeibc/types/query.pb.go | 4500 --- x/stakeibc/types/query.pb.gw.go | 994 - x/stakeibc/types/query_register_ica.go | 16 - x/stakeibc/types/trade_route.go | 23 - x/stakeibc/types/trade_route.pb.go | 1333 - x/stakeibc/types/tx.pb.go | 11494 ------- x/stakeibc/types/validator.pb.go | 687 - 346 files changed, 5 insertions(+), 169781 deletions(-) delete mode 100644 api/stride/epochs/genesis.pulsar.go delete mode 100644 api/stride/epochs/query.pulsar.go delete mode 100644 api/stride/epochs/query_grpc.pb.go delete mode 100644 api/stride/icacallbacks/callback_data.pulsar.go delete mode 100644 api/stride/icacallbacks/genesis.pulsar.go delete mode 100644 api/stride/icacallbacks/packet.pulsar.go delete mode 100644 api/stride/icacallbacks/params.pulsar.go delete mode 100644 api/stride/icacallbacks/query.pulsar.go delete mode 100644 api/stride/icacallbacks/query_grpc.pb.go delete mode 100644 api/stride/icacallbacks/tx.pulsar.go delete mode 100644 api/stride/icacallbacks/tx_grpc.pb.go delete mode 100644 api/stride/interchainquery/v1/genesis.pulsar.go delete mode 100644 api/stride/interchainquery/v1/messages.pulsar.go delete mode 100644 api/stride/interchainquery/v1/messages_grpc.pb.go delete mode 100644 api/stride/interchainquery/v1/query.pulsar.go delete mode 100644 api/stride/interchainquery/v1/query_grpc.pb.go delete mode 100644 api/stride/records/callbacks.pulsar.go delete mode 100644 api/stride/records/genesis.pulsar.go delete mode 100644 api/stride/records/params.pulsar.go delete mode 100644 api/stride/records/query.pulsar.go delete mode 100644 api/stride/records/query_grpc.pb.go delete mode 100644 api/stride/records/records.pulsar.go delete mode 100644 api/stride/stakeibc/address_unbonding.pulsar.go delete mode 100644 api/stride/stakeibc/callbacks.pulsar.go delete mode 100644 api/stride/stakeibc/epoch_tracker.pulsar.go delete mode 100644 api/stride/stakeibc/genesis.pulsar.go delete mode 100644 api/stride/stakeibc/host_zone.pulsar.go delete mode 100644 api/stride/stakeibc/ica_account.pulsar.go delete mode 100644 api/stride/stakeibc/packet.pulsar.go delete mode 100644 api/stride/stakeibc/params.pulsar.go delete mode 100644 api/stride/stakeibc/query.pulsar.go delete mode 100644 api/stride/stakeibc/query_grpc.pb.go delete mode 100644 api/stride/stakeibc/trade_route.pulsar.go delete mode 100644 api/stride/stakeibc/tx.pulsar.go delete mode 100644 api/stride/stakeibc/tx_grpc.pb.go delete mode 100644 api/stride/stakeibc/validator.pulsar.go delete mode 100755 proto/stride/epochs/genesis.proto delete mode 100644 proto/stride/epochs/query.proto delete mode 100755 proto/stride/icacallbacks/callback_data.proto delete mode 100755 proto/stride/icacallbacks/genesis.proto delete mode 100755 proto/stride/icacallbacks/packet.proto delete mode 100755 proto/stride/icacallbacks/params.proto delete mode 100644 proto/stride/icacallbacks/query.proto delete mode 100755 proto/stride/icacallbacks/tx.proto delete mode 100644 proto/stride/interchainquery/v1/genesis.proto delete mode 100755 proto/stride/interchainquery/v1/messages.proto delete mode 100644 proto/stride/interchainquery/v1/query.proto delete mode 100644 proto/stride/records/callbacks.proto delete mode 100644 proto/stride/records/genesis.proto delete mode 100644 proto/stride/records/params.proto delete mode 100644 proto/stride/records/query.proto delete mode 100644 proto/stride/records/records.proto delete mode 100755 proto/stride/stakeibc/README.md delete mode 100644 proto/stride/stakeibc/address_unbonding.proto delete mode 100644 proto/stride/stakeibc/callbacks.proto delete mode 100755 proto/stride/stakeibc/epoch_tracker.proto delete mode 100644 proto/stride/stakeibc/genesis.proto delete mode 100644 proto/stride/stakeibc/host_zone.proto delete mode 100644 proto/stride/stakeibc/ica_account.proto delete mode 100755 proto/stride/stakeibc/packet.proto delete mode 100755 proto/stride/stakeibc/params.proto delete mode 100644 proto/stride/stakeibc/query.proto delete mode 100644 proto/stride/stakeibc/trade_route.proto delete mode 100644 proto/stride/stakeibc/tx.proto delete mode 100644 proto/stride/stakeibc/validator.proto delete mode 100644 x/epochs/LICENSE delete mode 100644 x/epochs/README.md delete mode 100644 x/epochs/client/cli/query.go delete mode 100644 x/epochs/genesis.go delete mode 100644 x/epochs/keeper/abci.go delete mode 100644 x/epochs/keeper/epoch.go delete mode 100644 x/epochs/keeper/grpc_query.go delete mode 100644 x/epochs/keeper/hooks.go delete mode 100644 x/epochs/keeper/keeper.go delete mode 100644 x/epochs/module.go delete mode 100644 x/epochs/simulation/genesis.go delete mode 100644 x/epochs/testutil/hooks_mocks.go delete mode 100644 x/epochs/types/codec.go delete mode 100644 x/epochs/types/events.go delete mode 100644 x/epochs/types/genesis.go delete mode 100644 x/epochs/types/genesis.pb.go delete mode 100644 x/epochs/types/hooks.go delete mode 100644 x/epochs/types/identifier.go delete mode 100644 x/epochs/types/keys.go delete mode 100644 x/epochs/types/query.pb.go delete mode 100644 x/epochs/types/query.pb.gw.go delete mode 100644 x/icacallbacks/README.md delete mode 100644 x/icacallbacks/client/cli/query.go delete mode 100644 x/icacallbacks/client/cli/query_callback_data.go delete mode 100644 x/icacallbacks/client/cli/query_params.go delete mode 100644 x/icacallbacks/client/cli/tx.go delete mode 100644 x/icacallbacks/genesis.go delete mode 100644 x/icacallbacks/ibc_module.go delete mode 100644 x/icacallbacks/icacallbacks.go delete mode 100644 x/icacallbacks/keeper/callback_data.go delete mode 100644 x/icacallbacks/keeper/grpc_query.go delete mode 100644 x/icacallbacks/keeper/grpc_query_callback_data.go delete mode 100644 x/icacallbacks/keeper/grpc_query_params.go delete mode 100644 x/icacallbacks/keeper/keeper.go delete mode 100644 x/icacallbacks/keeper/msg_server.go delete mode 100644 x/icacallbacks/keeper/params.go delete mode 100644 x/icacallbacks/module.go delete mode 100644 x/icacallbacks/module_simulation.go delete mode 100644 x/icacallbacks/simulation/simap.go delete mode 100644 x/icacallbacks/testutil/expected_keepers_mocks.go delete mode 100644 x/icacallbacks/types/acknowledgement_response.go delete mode 100644 x/icacallbacks/types/callback_data.pb.go delete mode 100644 x/icacallbacks/types/callbacks.go delete mode 100644 x/icacallbacks/types/codec.go delete mode 100644 x/icacallbacks/types/errors.go delete mode 100644 x/icacallbacks/types/events_ibc.go delete mode 100644 x/icacallbacks/types/expected_keepers.go delete mode 100644 x/icacallbacks/types/genesis.go delete mode 100644 x/icacallbacks/types/genesis.pb.go delete mode 100644 x/icacallbacks/types/key_callback_data.go delete mode 100644 x/icacallbacks/types/keys.go delete mode 100644 x/icacallbacks/types/packet.pb.go delete mode 100644 x/icacallbacks/types/params.go delete mode 100644 x/icacallbacks/types/params.pb.go delete mode 100644 x/icacallbacks/types/query.pb.go delete mode 100644 x/icacallbacks/types/query.pb.gw.go delete mode 100644 x/icacallbacks/types/tx.pb.go delete mode 100644 x/icacallbacks/types/types.go delete mode 100644 x/interchainquery/LICENSE delete mode 100644 x/interchainquery/README.md delete mode 100644 x/interchainquery/client/cli/query.go delete mode 100644 x/interchainquery/genesis.go delete mode 100644 x/interchainquery/keeper/abci.go delete mode 100644 x/interchainquery/keeper/grpc_query.go delete mode 100644 x/interchainquery/keeper/keeper.go delete mode 100644 x/interchainquery/keeper/msg_server.go delete mode 100644 x/interchainquery/keeper/queries.go delete mode 100644 x/interchainquery/module.go delete mode 100644 x/interchainquery/types/callbacks.go delete mode 100644 x/interchainquery/types/codec.go delete mode 100644 x/interchainquery/types/error.go delete mode 100644 x/interchainquery/types/events.go delete mode 100644 x/interchainquery/types/genesis.go delete mode 100644 x/interchainquery/types/genesis.pb.go delete mode 100644 x/interchainquery/types/keys.go delete mode 100644 x/interchainquery/types/messages.pb.go delete mode 100644 x/interchainquery/types/messages.pb.gw.go delete mode 100644 x/interchainquery/types/msgs.go delete mode 100644 x/interchainquery/types/query.go delete mode 100644 x/interchainquery/types/query.pb.go delete mode 100644 x/interchainquery/types/query.pb.gw.go delete mode 100644 x/records/README.md delete mode 100644 x/records/client/cli/query.go delete mode 100644 x/records/client/cli/query_deposit_record.go delete mode 100644 x/records/client/cli/query_epoch_unbonding_record.go delete mode 100644 x/records/client/cli/query_lsm_deposits.go delete mode 100644 x/records/client/cli/query_params.go delete mode 100644 x/records/client/cli/query_user_redemption_record.go delete mode 100644 x/records/client/cli/tx.go delete mode 100644 x/records/genesis.go delete mode 100644 x/records/keeper/callback_lsm_transfer.go delete mode 100644 x/records/keeper/callback_native_transfer.go delete mode 100644 x/records/keeper/callbacks.go delete mode 100644 x/records/keeper/deposit_record.go delete mode 100644 x/records/keeper/epoch_unbonding_record.go delete mode 100644 x/records/keeper/grpc_query.go delete mode 100644 x/records/keeper/grpc_query_deposit_record.go delete mode 100644 x/records/keeper/grpc_query_epoch_unbonding_record.go delete mode 100644 x/records/keeper/grpc_query_lsm_deposits.go delete mode 100644 x/records/keeper/grpc_query_params.go delete mode 100644 x/records/keeper/grpc_query_user_redemption_record.go delete mode 100644 x/records/keeper/grpc_query_user_redemption_record_for_user.go delete mode 100644 x/records/keeper/ibc.go delete mode 100644 x/records/keeper/keeper.go delete mode 100644 x/records/keeper/lsm_token_deposit.go delete mode 100644 x/records/keeper/params.go delete mode 100644 x/records/keeper/transfer.go delete mode 100644 x/records/keeper/user_redemption_record.go delete mode 100644 x/records/module.go delete mode 100644 x/records/module_ibc.go delete mode 100644 x/records/simulation/simap.go delete mode 100644 x/records/testutil/expected_keepers_mocks.go delete mode 100644 x/records/types/callbacks.pb.go delete mode 100644 x/records/types/codec.go delete mode 100644 x/records/types/errors.go delete mode 100644 x/records/types/events_ibc.go delete mode 100644 x/records/types/expected_keepers.go delete mode 100644 x/records/types/genesis.go delete mode 100644 x/records/types/genesis.pb.go delete mode 100644 x/records/types/keys.go delete mode 100644 x/records/types/params.go delete mode 100644 x/records/types/params.pb.go delete mode 100644 x/records/types/query.pb.go delete mode 100644 x/records/types/query.pb.gw.go delete mode 100644 x/records/types/records.go delete mode 100644 x/records/types/records.pb.go delete mode 100644 x/records/types/types.go delete mode 100644 x/stakeibc/README.md delete mode 100644 x/stakeibc/client/cli/query.go delete mode 100644 x/stakeibc/client/cli/query_epoch_tracker.go delete mode 100644 x/stakeibc/client/cli/query_host_zone.go delete mode 100644 x/stakeibc/client/cli/query_module_address.go delete mode 100644 x/stakeibc/client/cli/query_next_packet_sequence.go delete mode 100644 x/stakeibc/client/cli/query_params.go delete mode 100644 x/stakeibc/client/cli/query_register_ica.go delete mode 100644 x/stakeibc/client/cli/query_trade_routes.go delete mode 100644 x/stakeibc/client/cli/query_validator.go delete mode 100644 x/stakeibc/client/cli/tx.go delete mode 100644 x/stakeibc/client/cli/tx_add_validators.go delete mode 100644 x/stakeibc/client/cli/tx_calibrate_delegation.go delete mode 100644 x/stakeibc/client/cli/tx_change_validator_weight.go delete mode 100644 x/stakeibc/client/cli/tx_claim_undelegated_tokens.go delete mode 100644 x/stakeibc/client/cli/tx_clear_balance.go delete mode 100644 x/stakeibc/client/cli/tx_delete_validator.go delete mode 100644 x/stakeibc/client/cli/tx_liquid_stake.go delete mode 100644 x/stakeibc/client/cli/tx_lsm_liquid_stake.go delete mode 100644 x/stakeibc/client/cli/tx_rebalance_validators.go delete mode 100644 x/stakeibc/client/cli/tx_redeem_stake.go delete mode 100644 x/stakeibc/client/cli/tx_register_host_zone.go delete mode 100644 x/stakeibc/client/cli/tx_restore_interchain_account.go delete mode 100644 x/stakeibc/client/cli/tx_resume_host_zone.go delete mode 100644 x/stakeibc/client/cli/tx_set_community_pool_rebate.go delete mode 100644 x/stakeibc/client/cli/tx_toggle_trade_controller.go delete mode 100644 x/stakeibc/client/cli/tx_update_delegation.go delete mode 100644 x/stakeibc/client/cli/tx_update_inner_redemption_rate_bounds.go delete mode 100644 x/stakeibc/genesis.go delete mode 100644 x/stakeibc/ibc_middleware.go delete mode 100644 x/stakeibc/keeper/abci.go delete mode 100644 x/stakeibc/keeper/claim.go delete mode 100644 x/stakeibc/keeper/community_pool.go delete mode 100644 x/stakeibc/keeper/consumer.go delete mode 100644 x/stakeibc/keeper/delegation.go delete mode 100644 x/stakeibc/keeper/epoch_tracker.go delete mode 100644 x/stakeibc/keeper/events.go delete mode 100644 x/stakeibc/keeper/grpc_query.go delete mode 100644 x/stakeibc/keeper/hooks.go delete mode 100644 x/stakeibc/keeper/host_zone.go delete mode 100644 x/stakeibc/keeper/ibc.go delete mode 100644 x/stakeibc/keeper/icacallbacks.go delete mode 100644 x/stakeibc/keeper/icacallbacks_claim.go delete mode 100644 x/stakeibc/keeper/icacallbacks_delegate.go delete mode 100644 x/stakeibc/keeper/icacallbacks_detokenize.go delete mode 100644 x/stakeibc/keeper/icacallbacks_rebalance.go delete mode 100644 x/stakeibc/keeper/icacallbacks_redemption.go delete mode 100644 x/stakeibc/keeper/icacallbacks_reinvest.go delete mode 100644 x/stakeibc/keeper/icacallbacks_undelegate.go delete mode 100644 x/stakeibc/keeper/icqcallbacks.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_callibrate_delegation.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_community_pool_ica_balance.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_delegator_shares.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_fee_balance.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_pool_price.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_trade_converted_balance.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_trade_reward_balance.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_validator_exchange_rate.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_withdrawal_host_balance.go delete mode 100644 x/stakeibc/keeper/icqcallbacks_withdrawal_reward_balance.go delete mode 100644 x/stakeibc/keeper/interchainaccounts.go delete mode 100644 x/stakeibc/keeper/interchainqueries.go delete mode 100644 x/stakeibc/keeper/invariants.go delete mode 100644 x/stakeibc/keeper/keeper.go delete mode 100644 x/stakeibc/keeper/lsm.go delete mode 100644 x/stakeibc/keeper/msg_server.go delete mode 100644 x/stakeibc/keeper/params.go delete mode 100644 x/stakeibc/keeper/rebalance.go delete mode 100644 x/stakeibc/keeper/records.go delete mode 100644 x/stakeibc/keeper/redemption_rate.go delete mode 100644 x/stakeibc/keeper/redemption_sweep.go delete mode 100644 x/stakeibc/keeper/reward_allocation.go delete mode 100644 x/stakeibc/keeper/reward_converter.go delete mode 100644 x/stakeibc/keeper/trade_route.go delete mode 100644 x/stakeibc/keeper/transfer.go delete mode 100644 x/stakeibc/keeper/unbonding.go delete mode 100644 x/stakeibc/keeper/validator.go delete mode 100644 x/stakeibc/module.go delete mode 100644 x/stakeibc/move/bcs.go delete mode 100644 x/stakeibc/move/connector.go delete mode 100644 x/stakeibc/move/denom.go delete mode 100644 x/stakeibc/move/keys.go delete mode 100644 x/stakeibc/move/serialize.go delete mode 100644 x/stakeibc/move/types.go delete mode 100644 x/stakeibc/simulation/add_validator.go delete mode 100644 x/stakeibc/simulation/change_validator_weight.go delete mode 100644 x/stakeibc/simulation/claim_undelegated_tokens.go delete mode 100644 x/stakeibc/simulation/delete_validator.go delete mode 100644 x/stakeibc/simulation/liquid_stake.go delete mode 100644 x/stakeibc/simulation/rebalance_validators.go delete mode 100644 x/stakeibc/simulation/restore_interchain_account.go delete mode 100644 x/stakeibc/simulation/simap.go delete mode 100644 x/stakeibc/simulation/update_delegation.go delete mode 100644 x/stakeibc/testutil/hooks_mocks.go delete mode 100644 x/stakeibc/types/address_unbonding.pb.go delete mode 100644 x/stakeibc/types/callbacks.pb.go delete mode 100644 x/stakeibc/types/codec.go delete mode 100644 x/stakeibc/types/epoch_tracker.pb.go delete mode 100644 x/stakeibc/types/errors.go delete mode 100644 x/stakeibc/types/events.go delete mode 100644 x/stakeibc/types/expected_keepers.go delete mode 100644 x/stakeibc/types/genesis.go delete mode 100644 x/stakeibc/types/genesis.pb.go delete mode 100644 x/stakeibc/types/hooks.go delete mode 100644 x/stakeibc/types/host_zone.go delete mode 100644 x/stakeibc/types/host_zone.pb.go delete mode 100644 x/stakeibc/types/ica_account.go delete mode 100644 x/stakeibc/types/ica_account.pb.go delete mode 100644 x/stakeibc/types/interchainqueries.go delete mode 100644 x/stakeibc/types/keys.go delete mode 100644 x/stakeibc/types/lsm_msgs.go delete mode 100644 x/stakeibc/types/lsm_tx.pb.go delete mode 100644 x/stakeibc/types/message_add_validators.go delete mode 100644 x/stakeibc/types/message_calibrate_delegation.go delete mode 100644 x/stakeibc/types/message_change_validator_weight.go delete mode 100644 x/stakeibc/types/message_claim_undelegated_tokens.go delete mode 100644 x/stakeibc/types/message_clear_balance.go delete mode 100644 x/stakeibc/types/message_create_trade_route.go delete mode 100644 x/stakeibc/types/message_delete_trade_route.go delete mode 100644 x/stakeibc/types/message_delete_validator.go delete mode 100644 x/stakeibc/types/message_liquid_stake.go delete mode 100644 x/stakeibc/types/message_lsm_liquid_stake.go delete mode 100644 x/stakeibc/types/message_rebalance_validators.go delete mode 100644 x/stakeibc/types/message_redeem_stake.go delete mode 100644 x/stakeibc/types/message_register_host_zone.go delete mode 100644 x/stakeibc/types/message_restore_interchain_account.go delete mode 100644 x/stakeibc/types/message_resume_host_zone.go delete mode 100644 x/stakeibc/types/message_set_community_pool_rebate.go delete mode 100644 x/stakeibc/types/message_toggle_trade_controller.go delete mode 100644 x/stakeibc/types/message_update_delegation.go delete mode 100644 x/stakeibc/types/message_update_host_zone_params.go delete mode 100644 x/stakeibc/types/message_update_inner_redemption_rate_bounds.go delete mode 100644 x/stakeibc/types/message_update_trade_route.go delete mode 100644 x/stakeibc/types/osmosis.pb.go delete mode 100644 x/stakeibc/types/packet.pb.go delete mode 100644 x/stakeibc/types/params.go delete mode 100644 x/stakeibc/types/params.pb.go delete mode 100644 x/stakeibc/types/query.pb.go delete mode 100644 x/stakeibc/types/query.pb.gw.go delete mode 100644 x/stakeibc/types/query_register_ica.go delete mode 100644 x/stakeibc/types/trade_route.go delete mode 100644 x/stakeibc/types/trade_route.pb.go delete mode 100644 x/stakeibc/types/tx.pb.go delete mode 100644 x/stakeibc/types/validator.pb.go diff --git a/.golangci.yml b/.golangci.yml index 4eb893332..b469c8644 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -30,11 +30,6 @@ issues: max-same-issues: 10000 exclude-dirs: - "app/ibc-hooks/*" - - "x/epochs/*" - - "x/interchainquery/*" - - "x/icacallbacks/*" - - "x/stakeibc/*" - - "x/records/*" - "x/tokenfactory/*" exclude-rules: - text: "The legacy v1beta1 gov types maintained in this file are deprecated and will be removed in a future release" diff --git a/README.md b/README.md index 0ebb88288..e58177878 100644 --- a/README.md +++ b/README.md @@ -29,5 +29,4 @@ MilkyWay is licensed under the [Apache 2.0](LICENSE) license. We also use portions of the codebase from other developers' software to implement some of our features: -- [Cosmos SDK](https://github.com/cosmos/cosmos-sdk), licensed under the [Apache 2.0](https://github.com/cosmos/cosmos-sdk?tab=Apache-2.0-1-ov-file) -- [Stride](https://github.com/stride-labs/stride), licensed under the [Apache 2.0](https://github.com/stride-labs/stride?tab=Apache-2.0-1-ov-file) \ No newline at end of file +- [Cosmos SDK](https://github.com/cosmos/cosmos-sdk), licensed under the [Apache 2.0](https://github.com/cosmos/cosmos-sdk?tab=Apache-2.0-1-ov-file) \ No newline at end of file diff --git a/api/stride/epochs/genesis.pulsar.go b/api/stride/epochs/genesis.pulsar.go deleted file mode 100644 index a98391993..000000000 --- a/api/stride/epochs/genesis.pulsar.go +++ /dev/null @@ -1,1593 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package epochs - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_EpochInfo protoreflect.MessageDescriptor - fd_EpochInfo_identifier protoreflect.FieldDescriptor - fd_EpochInfo_start_time protoreflect.FieldDescriptor - fd_EpochInfo_duration protoreflect.FieldDescriptor - fd_EpochInfo_current_epoch protoreflect.FieldDescriptor - fd_EpochInfo_current_epoch_start_time protoreflect.FieldDescriptor - fd_EpochInfo_epoch_counting_started protoreflect.FieldDescriptor - fd_EpochInfo_current_epoch_start_height protoreflect.FieldDescriptor -) - -func init() { - file_stride_epochs_genesis_proto_init() - md_EpochInfo = File_stride_epochs_genesis_proto.Messages().ByName("EpochInfo") - fd_EpochInfo_identifier = md_EpochInfo.Fields().ByName("identifier") - fd_EpochInfo_start_time = md_EpochInfo.Fields().ByName("start_time") - fd_EpochInfo_duration = md_EpochInfo.Fields().ByName("duration") - fd_EpochInfo_current_epoch = md_EpochInfo.Fields().ByName("current_epoch") - fd_EpochInfo_current_epoch_start_time = md_EpochInfo.Fields().ByName("current_epoch_start_time") - fd_EpochInfo_epoch_counting_started = md_EpochInfo.Fields().ByName("epoch_counting_started") - fd_EpochInfo_current_epoch_start_height = md_EpochInfo.Fields().ByName("current_epoch_start_height") -} - -var _ protoreflect.Message = (*fastReflection_EpochInfo)(nil) - -type fastReflection_EpochInfo EpochInfo - -func (x *EpochInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_EpochInfo)(x) -} - -func (x *EpochInfo) slowProtoReflect() protoreflect.Message { - mi := &file_stride_epochs_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EpochInfo_messageType fastReflection_EpochInfo_messageType -var _ protoreflect.MessageType = fastReflection_EpochInfo_messageType{} - -type fastReflection_EpochInfo_messageType struct{} - -func (x fastReflection_EpochInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_EpochInfo)(nil) -} -func (x fastReflection_EpochInfo_messageType) New() protoreflect.Message { - return new(fastReflection_EpochInfo) -} -func (x fastReflection_EpochInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EpochInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EpochInfo) Descriptor() protoreflect.MessageDescriptor { - return md_EpochInfo -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_EpochInfo) Type() protoreflect.MessageType { - return _fastReflection_EpochInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EpochInfo) New() protoreflect.Message { - return new(fastReflection_EpochInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EpochInfo) Interface() protoreflect.ProtoMessage { - return (*EpochInfo)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_EpochInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Identifier != "" { - value := protoreflect.ValueOfString(x.Identifier) - if !f(fd_EpochInfo_identifier, value) { - return - } - } - if x.StartTime != nil { - value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) - if !f(fd_EpochInfo_start_time, value) { - return - } - } - if x.Duration != nil { - value := protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) - if !f(fd_EpochInfo_duration, value) { - return - } - } - if x.CurrentEpoch != int64(0) { - value := protoreflect.ValueOfInt64(x.CurrentEpoch) - if !f(fd_EpochInfo_current_epoch, value) { - return - } - } - if x.CurrentEpochStartTime != nil { - value := protoreflect.ValueOfMessage(x.CurrentEpochStartTime.ProtoReflect()) - if !f(fd_EpochInfo_current_epoch_start_time, value) { - return - } - } - if x.EpochCountingStarted != false { - value := protoreflect.ValueOfBool(x.EpochCountingStarted) - if !f(fd_EpochInfo_epoch_counting_started, value) { - return - } - } - if x.CurrentEpochStartHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.CurrentEpochStartHeight) - if !f(fd_EpochInfo_current_epoch_start_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EpochInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.epochs.EpochInfo.identifier": - return x.Identifier != "" - case "stride.epochs.EpochInfo.start_time": - return x.StartTime != nil - case "stride.epochs.EpochInfo.duration": - return x.Duration != nil - case "stride.epochs.EpochInfo.current_epoch": - return x.CurrentEpoch != int64(0) - case "stride.epochs.EpochInfo.current_epoch_start_time": - return x.CurrentEpochStartTime != nil - case "stride.epochs.EpochInfo.epoch_counting_started": - return x.EpochCountingStarted != false - case "stride.epochs.EpochInfo.current_epoch_start_height": - return x.CurrentEpochStartHeight != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.EpochInfo")) - } - panic(fmt.Errorf("message stride.epochs.EpochInfo does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.epochs.EpochInfo.identifier": - x.Identifier = "" - case "stride.epochs.EpochInfo.start_time": - x.StartTime = nil - case "stride.epochs.EpochInfo.duration": - x.Duration = nil - case "stride.epochs.EpochInfo.current_epoch": - x.CurrentEpoch = int64(0) - case "stride.epochs.EpochInfo.current_epoch_start_time": - x.CurrentEpochStartTime = nil - case "stride.epochs.EpochInfo.epoch_counting_started": - x.EpochCountingStarted = false - case "stride.epochs.EpochInfo.current_epoch_start_height": - x.CurrentEpochStartHeight = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.EpochInfo")) - } - panic(fmt.Errorf("message stride.epochs.EpochInfo does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_EpochInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.epochs.EpochInfo.identifier": - value := x.Identifier - return protoreflect.ValueOfString(value) - case "stride.epochs.EpochInfo.start_time": - value := x.StartTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.epochs.EpochInfo.duration": - value := x.Duration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.epochs.EpochInfo.current_epoch": - value := x.CurrentEpoch - return protoreflect.ValueOfInt64(value) - case "stride.epochs.EpochInfo.current_epoch_start_time": - value := x.CurrentEpochStartTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.epochs.EpochInfo.epoch_counting_started": - value := x.EpochCountingStarted - return protoreflect.ValueOfBool(value) - case "stride.epochs.EpochInfo.current_epoch_start_height": - value := x.CurrentEpochStartHeight - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.EpochInfo")) - } - panic(fmt.Errorf("message stride.epochs.EpochInfo does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.epochs.EpochInfo.identifier": - x.Identifier = value.Interface().(string) - case "stride.epochs.EpochInfo.start_time": - x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) - case "stride.epochs.EpochInfo.duration": - x.Duration = value.Message().Interface().(*durationpb.Duration) - case "stride.epochs.EpochInfo.current_epoch": - x.CurrentEpoch = value.Int() - case "stride.epochs.EpochInfo.current_epoch_start_time": - x.CurrentEpochStartTime = value.Message().Interface().(*timestamppb.Timestamp) - case "stride.epochs.EpochInfo.epoch_counting_started": - x.EpochCountingStarted = value.Bool() - case "stride.epochs.EpochInfo.current_epoch_start_height": - x.CurrentEpochStartHeight = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.EpochInfo")) - } - panic(fmt.Errorf("message stride.epochs.EpochInfo does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.EpochInfo.start_time": - if x.StartTime == nil { - x.StartTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) - case "stride.epochs.EpochInfo.duration": - if x.Duration == nil { - x.Duration = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) - case "stride.epochs.EpochInfo.current_epoch_start_time": - if x.CurrentEpochStartTime == nil { - x.CurrentEpochStartTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.CurrentEpochStartTime.ProtoReflect()) - case "stride.epochs.EpochInfo.identifier": - panic(fmt.Errorf("field identifier of message stride.epochs.EpochInfo is not mutable")) - case "stride.epochs.EpochInfo.current_epoch": - panic(fmt.Errorf("field current_epoch of message stride.epochs.EpochInfo is not mutable")) - case "stride.epochs.EpochInfo.epoch_counting_started": - panic(fmt.Errorf("field epoch_counting_started of message stride.epochs.EpochInfo is not mutable")) - case "stride.epochs.EpochInfo.current_epoch_start_height": - panic(fmt.Errorf("field current_epoch_start_height of message stride.epochs.EpochInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.EpochInfo")) - } - panic(fmt.Errorf("message stride.epochs.EpochInfo does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_EpochInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.EpochInfo.identifier": - return protoreflect.ValueOfString("") - case "stride.epochs.EpochInfo.start_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.epochs.EpochInfo.duration": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.epochs.EpochInfo.current_epoch": - return protoreflect.ValueOfInt64(int64(0)) - case "stride.epochs.EpochInfo.current_epoch_start_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.epochs.EpochInfo.epoch_counting_started": - return protoreflect.ValueOfBool(false) - case "stride.epochs.EpochInfo.current_epoch_start_height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.EpochInfo")) - } - panic(fmt.Errorf("message stride.epochs.EpochInfo does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_EpochInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.epochs.EpochInfo", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_EpochInfo) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochInfo) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_EpochInfo) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_EpochInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EpochInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Identifier) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartTime != nil { - l = options.Size(x.StartTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Duration != nil { - l = options.Size(x.Duration) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.CurrentEpoch != 0 { - n += 1 + runtime.Sov(uint64(x.CurrentEpoch)) - } - if x.CurrentEpochStartTime != nil { - l = options.Size(x.CurrentEpochStartTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.EpochCountingStarted { - n += 2 - } - if x.CurrentEpochStartHeight != 0 { - n += 1 + runtime.Sov(uint64(x.CurrentEpochStartHeight)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EpochInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.CurrentEpochStartHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CurrentEpochStartHeight)) - i-- - dAtA[i] = 0x38 - } - if x.EpochCountingStarted { - i-- - if x.EpochCountingStarted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if x.CurrentEpochStartTime != nil { - encoded, err := options.Marshal(x.CurrentEpochStartTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.CurrentEpoch != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CurrentEpoch)) - i-- - dAtA[i] = 0x20 - } - if x.Duration != nil { - encoded, err := options.Marshal(x.Duration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.StartTime != nil { - encoded, err := options.Marshal(x.StartTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Identifier) > 0 { - i -= len(x.Identifier) - copy(dAtA[i:], x.Identifier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EpochInfo) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EpochInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EpochInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.StartTime == nil { - x.StartTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Duration == nil { - x.Duration = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Duration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentEpoch", wireType) - } - x.CurrentEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CurrentEpoch |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentEpochStartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.CurrentEpochStartTime == nil { - x.CurrentEpochStartTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CurrentEpochStartTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochCountingStarted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EpochCountingStarted = bool(v != 0) - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentEpochStartHeight", wireType) - } - x.CurrentEpochStartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CurrentEpochStartHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GenesisState_1_list)(nil) - -type _GenesisState_1_list struct { - list *[]*EpochInfo -} - -func (x *_GenesisState_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochInfo) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { - v := new(EpochInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_1_list) NewElement() protoreflect.Value { - v := new(EpochInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_epochs protoreflect.FieldDescriptor -) - -func init() { - file_stride_epochs_genesis_proto_init() - md_GenesisState = File_stride_epochs_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_epochs = md_GenesisState.Fields().ByName("epochs") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_stride_epochs_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Epochs) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Epochs}) - if !f(fd_GenesisState_epochs, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.epochs.GenesisState.epochs": - return len(x.Epochs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.GenesisState")) - } - panic(fmt.Errorf("message stride.epochs.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.epochs.GenesisState.epochs": - x.Epochs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.GenesisState")) - } - panic(fmt.Errorf("message stride.epochs.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.epochs.GenesisState.epochs": - if len(x.Epochs) == 0 { - return protoreflect.ValueOfList(&_GenesisState_1_list{}) - } - listValue := &_GenesisState_1_list{list: &x.Epochs} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.GenesisState")) - } - panic(fmt.Errorf("message stride.epochs.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.epochs.GenesisState.epochs": - lv := value.List() - clv := lv.(*_GenesisState_1_list) - x.Epochs = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.GenesisState")) - } - panic(fmt.Errorf("message stride.epochs.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.GenesisState.epochs": - if x.Epochs == nil { - x.Epochs = []*EpochInfo{} - } - value := &_GenesisState_1_list{list: &x.Epochs} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.GenesisState")) - } - panic(fmt.Errorf("message stride.epochs.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.GenesisState.epochs": - list := []*EpochInfo{} - return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.GenesisState")) - } - panic(fmt.Errorf("message stride.epochs.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.epochs.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Epochs) > 0 { - for _, e := range x.Epochs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Epochs) > 0 { - for iNdEx := len(x.Epochs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Epochs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Epochs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Epochs = append(x.Epochs, &EpochInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Epochs[len(x.Epochs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/epochs/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type EpochInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - Duration *durationpb.Duration `protobuf:"bytes,3,opt,name=duration,proto3" json:"duration,omitempty"` - CurrentEpoch int64 `protobuf:"varint,4,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` - CurrentEpochStartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=current_epoch_start_time,json=currentEpochStartTime,proto3" json:"current_epoch_start_time,omitempty"` - EpochCountingStarted bool `protobuf:"varint,6,opt,name=epoch_counting_started,json=epochCountingStarted,proto3" json:"epoch_counting_started,omitempty"` - CurrentEpochStartHeight int64 `protobuf:"varint,7,opt,name=current_epoch_start_height,json=currentEpochStartHeight,proto3" json:"current_epoch_start_height,omitempty"` -} - -func (x *EpochInfo) Reset() { - *x = EpochInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_epochs_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EpochInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EpochInfo) ProtoMessage() {} - -// Deprecated: Use EpochInfo.ProtoReflect.Descriptor instead. -func (*EpochInfo) Descriptor() ([]byte, []int) { - return file_stride_epochs_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *EpochInfo) GetIdentifier() string { - if x != nil { - return x.Identifier - } - return "" -} - -func (x *EpochInfo) GetStartTime() *timestamppb.Timestamp { - if x != nil { - return x.StartTime - } - return nil -} - -func (x *EpochInfo) GetDuration() *durationpb.Duration { - if x != nil { - return x.Duration - } - return nil -} - -func (x *EpochInfo) GetCurrentEpoch() int64 { - if x != nil { - return x.CurrentEpoch - } - return 0 -} - -func (x *EpochInfo) GetCurrentEpochStartTime() *timestamppb.Timestamp { - if x != nil { - return x.CurrentEpochStartTime - } - return nil -} - -func (x *EpochInfo) GetEpochCountingStarted() bool { - if x != nil { - return x.EpochCountingStarted - } - return false -} - -func (x *EpochInfo) GetCurrentEpochStartHeight() int64 { - if x != nil { - return x.CurrentEpochStartHeight - } - return 0 -} - -// GenesisState defines the epochs module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Epochs []*EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_epochs_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_stride_epochs_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *GenesisState) GetEpochs() []*EpochInfo { - if x != nil { - return x.Epochs - } - return nil -} - -var File_stride_epochs_genesis_proto protoreflect.FileDescriptor - -var file_stride_epochs_genesis_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, - 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x04, 0x0a, 0x09, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x58, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x11, 0x79, 0x61, 0x6d, 0x6c, 0x3a, - 0x22, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x90, 0xdf, 0x1f, 0x01, - 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x68, 0x0a, 0x08, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, - 0x1f, 0x12, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, - 0x6d, 0x70, 0x74, 0x79, 0xf2, 0xde, 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x08, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x80, 0x01, 0x0a, 0x18, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, - 0xde, 0x1f, 0x1f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x22, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x15, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, - 0x16, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x17, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x22, 0x46, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x36, 0x0a, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, - 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x42, 0xab, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x42, 0x0c, - 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, - 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x45, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0xca, 0x02, 0x0d, 0x53, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x5c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0xe2, 0x02, 0x19, 0x53, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x5c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_epochs_genesis_proto_rawDescOnce sync.Once - file_stride_epochs_genesis_proto_rawDescData = file_stride_epochs_genesis_proto_rawDesc -) - -func file_stride_epochs_genesis_proto_rawDescGZIP() []byte { - file_stride_epochs_genesis_proto_rawDescOnce.Do(func() { - file_stride_epochs_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_epochs_genesis_proto_rawDescData) - }) - return file_stride_epochs_genesis_proto_rawDescData -} - -var file_stride_epochs_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_stride_epochs_genesis_proto_goTypes = []interface{}{ - (*EpochInfo)(nil), // 0: stride.epochs.EpochInfo - (*GenesisState)(nil), // 1: stride.epochs.GenesisState - (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 3: google.protobuf.Duration -} -var file_stride_epochs_genesis_proto_depIdxs = []int32{ - 2, // 0: stride.epochs.EpochInfo.start_time:type_name -> google.protobuf.Timestamp - 3, // 1: stride.epochs.EpochInfo.duration:type_name -> google.protobuf.Duration - 2, // 2: stride.epochs.EpochInfo.current_epoch_start_time:type_name -> google.protobuf.Timestamp - 0, // 3: stride.epochs.GenesisState.epochs:type_name -> stride.epochs.EpochInfo - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_stride_epochs_genesis_proto_init() } -func file_stride_epochs_genesis_proto_init() { - if File_stride_epochs_genesis_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_epochs_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_epochs_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_epochs_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_epochs_genesis_proto_goTypes, - DependencyIndexes: file_stride_epochs_genesis_proto_depIdxs, - MessageInfos: file_stride_epochs_genesis_proto_msgTypes, - }.Build() - File_stride_epochs_genesis_proto = out.File - file_stride_epochs_genesis_proto_rawDesc = nil - file_stride_epochs_genesis_proto_goTypes = nil - file_stride_epochs_genesis_proto_depIdxs = nil -} diff --git a/api/stride/epochs/query.pulsar.go b/api/stride/epochs/query.pulsar.go deleted file mode 100644 index 77f055a53..000000000 --- a/api/stride/epochs/query.pulsar.go +++ /dev/null @@ -1,3162 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package epochs - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryEpochsInfoRequest protoreflect.MessageDescriptor - fd_QueryEpochsInfoRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_epochs_query_proto_init() - md_QueryEpochsInfoRequest = File_stride_epochs_query_proto.Messages().ByName("QueryEpochsInfoRequest") - fd_QueryEpochsInfoRequest_pagination = md_QueryEpochsInfoRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryEpochsInfoRequest)(nil) - -type fastReflection_QueryEpochsInfoRequest QueryEpochsInfoRequest - -func (x *QueryEpochsInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryEpochsInfoRequest)(x) -} - -func (x *QueryEpochsInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_epochs_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryEpochsInfoRequest_messageType fastReflection_QueryEpochsInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryEpochsInfoRequest_messageType{} - -type fastReflection_QueryEpochsInfoRequest_messageType struct{} - -func (x fastReflection_QueryEpochsInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryEpochsInfoRequest)(nil) -} -func (x fastReflection_QueryEpochsInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryEpochsInfoRequest) -} -func (x fastReflection_QueryEpochsInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEpochsInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryEpochsInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEpochsInfoRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryEpochsInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryEpochsInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryEpochsInfoRequest) New() protoreflect.Message { - return new(fastReflection_QueryEpochsInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryEpochsInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QueryEpochsInfoRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryEpochsInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryEpochsInfoRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryEpochsInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochsInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryEpochsInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.epochs.QueryEpochsInfoRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochsInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochsInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryEpochsInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryEpochsInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.epochs.QueryEpochsInfoRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryEpochsInfoRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochsInfoRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryEpochsInfoRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryEpochsInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryEpochsInfoRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryEpochsInfoRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryEpochsInfoRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochsInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochsInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryEpochsInfoResponse_1_list)(nil) - -type _QueryEpochsInfoResponse_1_list struct { - list *[]*EpochInfo -} - -func (x *_QueryEpochsInfoResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryEpochsInfoResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryEpochsInfoResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochInfo) - (*x.list)[i] = concreteValue -} - -func (x *_QueryEpochsInfoResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryEpochsInfoResponse_1_list) AppendMutable() protoreflect.Value { - v := new(EpochInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryEpochsInfoResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryEpochsInfoResponse_1_list) NewElement() protoreflect.Value { - v := new(EpochInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryEpochsInfoResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryEpochsInfoResponse protoreflect.MessageDescriptor - fd_QueryEpochsInfoResponse_epochs protoreflect.FieldDescriptor - fd_QueryEpochsInfoResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_epochs_query_proto_init() - md_QueryEpochsInfoResponse = File_stride_epochs_query_proto.Messages().ByName("QueryEpochsInfoResponse") - fd_QueryEpochsInfoResponse_epochs = md_QueryEpochsInfoResponse.Fields().ByName("epochs") - fd_QueryEpochsInfoResponse_pagination = md_QueryEpochsInfoResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryEpochsInfoResponse)(nil) - -type fastReflection_QueryEpochsInfoResponse QueryEpochsInfoResponse - -func (x *QueryEpochsInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryEpochsInfoResponse)(x) -} - -func (x *QueryEpochsInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_epochs_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryEpochsInfoResponse_messageType fastReflection_QueryEpochsInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryEpochsInfoResponse_messageType{} - -type fastReflection_QueryEpochsInfoResponse_messageType struct{} - -func (x fastReflection_QueryEpochsInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryEpochsInfoResponse)(nil) -} -func (x fastReflection_QueryEpochsInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryEpochsInfoResponse) -} -func (x fastReflection_QueryEpochsInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEpochsInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryEpochsInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEpochsInfoResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryEpochsInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryEpochsInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryEpochsInfoResponse) New() protoreflect.Message { - return new(fastReflection_QueryEpochsInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryEpochsInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QueryEpochsInfoResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryEpochsInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Epochs) != 0 { - value := protoreflect.ValueOfList(&_QueryEpochsInfoResponse_1_list{list: &x.Epochs}) - if !f(fd_QueryEpochsInfoResponse_epochs, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryEpochsInfoResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryEpochsInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoResponse.epochs": - return len(x.Epochs) != 0 - case "stride.epochs.QueryEpochsInfoResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochsInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoResponse.epochs": - x.Epochs = nil - case "stride.epochs.QueryEpochsInfoResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryEpochsInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.epochs.QueryEpochsInfoResponse.epochs": - if len(x.Epochs) == 0 { - return protoreflect.ValueOfList(&_QueryEpochsInfoResponse_1_list{}) - } - listValue := &_QueryEpochsInfoResponse_1_list{list: &x.Epochs} - return protoreflect.ValueOfList(listValue) - case "stride.epochs.QueryEpochsInfoResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochsInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoResponse.epochs": - lv := value.List() - clv := lv.(*_QueryEpochsInfoResponse_1_list) - x.Epochs = *clv.list - case "stride.epochs.QueryEpochsInfoResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochsInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoResponse.epochs": - if x.Epochs == nil { - x.Epochs = []*EpochInfo{} - } - value := &_QueryEpochsInfoResponse_1_list{list: &x.Epochs} - return protoreflect.ValueOfList(value) - case "stride.epochs.QueryEpochsInfoResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryEpochsInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryEpochsInfoResponse.epochs": - list := []*EpochInfo{} - return protoreflect.ValueOfList(&_QueryEpochsInfoResponse_1_list{list: &list}) - case "stride.epochs.QueryEpochsInfoResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochsInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochsInfoResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryEpochsInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.epochs.QueryEpochsInfoResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryEpochsInfoResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochsInfoResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryEpochsInfoResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryEpochsInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryEpochsInfoResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Epochs) > 0 { - for _, e := range x.Epochs { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryEpochsInfoResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Epochs) > 0 { - for iNdEx := len(x.Epochs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Epochs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryEpochsInfoResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochsInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochsInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Epochs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Epochs = append(x.Epochs, &EpochInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Epochs[len(x.Epochs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryCurrentEpochRequest protoreflect.MessageDescriptor - fd_QueryCurrentEpochRequest_identifier protoreflect.FieldDescriptor -) - -func init() { - file_stride_epochs_query_proto_init() - md_QueryCurrentEpochRequest = File_stride_epochs_query_proto.Messages().ByName("QueryCurrentEpochRequest") - fd_QueryCurrentEpochRequest_identifier = md_QueryCurrentEpochRequest.Fields().ByName("identifier") -} - -var _ protoreflect.Message = (*fastReflection_QueryCurrentEpochRequest)(nil) - -type fastReflection_QueryCurrentEpochRequest QueryCurrentEpochRequest - -func (x *QueryCurrentEpochRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCurrentEpochRequest)(x) -} - -func (x *QueryCurrentEpochRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_epochs_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryCurrentEpochRequest_messageType fastReflection_QueryCurrentEpochRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryCurrentEpochRequest_messageType{} - -type fastReflection_QueryCurrentEpochRequest_messageType struct{} - -func (x fastReflection_QueryCurrentEpochRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCurrentEpochRequest)(nil) -} -func (x fastReflection_QueryCurrentEpochRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCurrentEpochRequest) -} -func (x fastReflection_QueryCurrentEpochRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCurrentEpochRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryCurrentEpochRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCurrentEpochRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryCurrentEpochRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryCurrentEpochRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCurrentEpochRequest) New() protoreflect.Message { - return new(fastReflection_QueryCurrentEpochRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryCurrentEpochRequest) Interface() protoreflect.ProtoMessage { - return (*QueryCurrentEpochRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryCurrentEpochRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Identifier != "" { - value := protoreflect.ValueOfString(x.Identifier) - if !f(fd_QueryCurrentEpochRequest_identifier, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryCurrentEpochRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochRequest.identifier": - return x.Identifier != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCurrentEpochRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochRequest.identifier": - x.Identifier = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryCurrentEpochRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.epochs.QueryCurrentEpochRequest.identifier": - value := x.Identifier - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCurrentEpochRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochRequest.identifier": - x.Identifier = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCurrentEpochRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochRequest.identifier": - panic(fmt.Errorf("field identifier of message stride.epochs.QueryCurrentEpochRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryCurrentEpochRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochRequest.identifier": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryCurrentEpochRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.epochs.QueryCurrentEpochRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryCurrentEpochRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCurrentEpochRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryCurrentEpochRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryCurrentEpochRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCurrentEpochRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Identifier) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCurrentEpochRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Identifier) > 0 { - i -= len(x.Identifier) - copy(dAtA[i:], x.Identifier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryCurrentEpochRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentEpochRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentEpochRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryCurrentEpochResponse protoreflect.MessageDescriptor - fd_QueryCurrentEpochResponse_current_epoch protoreflect.FieldDescriptor -) - -func init() { - file_stride_epochs_query_proto_init() - md_QueryCurrentEpochResponse = File_stride_epochs_query_proto.Messages().ByName("QueryCurrentEpochResponse") - fd_QueryCurrentEpochResponse_current_epoch = md_QueryCurrentEpochResponse.Fields().ByName("current_epoch") -} - -var _ protoreflect.Message = (*fastReflection_QueryCurrentEpochResponse)(nil) - -type fastReflection_QueryCurrentEpochResponse QueryCurrentEpochResponse - -func (x *QueryCurrentEpochResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCurrentEpochResponse)(x) -} - -func (x *QueryCurrentEpochResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_epochs_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryCurrentEpochResponse_messageType fastReflection_QueryCurrentEpochResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryCurrentEpochResponse_messageType{} - -type fastReflection_QueryCurrentEpochResponse_messageType struct{} - -func (x fastReflection_QueryCurrentEpochResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCurrentEpochResponse)(nil) -} -func (x fastReflection_QueryCurrentEpochResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCurrentEpochResponse) -} -func (x fastReflection_QueryCurrentEpochResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCurrentEpochResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryCurrentEpochResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCurrentEpochResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryCurrentEpochResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryCurrentEpochResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCurrentEpochResponse) New() protoreflect.Message { - return new(fastReflection_QueryCurrentEpochResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryCurrentEpochResponse) Interface() protoreflect.ProtoMessage { - return (*QueryCurrentEpochResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryCurrentEpochResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CurrentEpoch != int64(0) { - value := protoreflect.ValueOfInt64(x.CurrentEpoch) - if !f(fd_QueryCurrentEpochResponse_current_epoch, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryCurrentEpochResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochResponse.current_epoch": - return x.CurrentEpoch != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCurrentEpochResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochResponse.current_epoch": - x.CurrentEpoch = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryCurrentEpochResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.epochs.QueryCurrentEpochResponse.current_epoch": - value := x.CurrentEpoch - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCurrentEpochResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochResponse.current_epoch": - x.CurrentEpoch = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCurrentEpochResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochResponse.current_epoch": - panic(fmt.Errorf("field current_epoch of message stride.epochs.QueryCurrentEpochResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryCurrentEpochResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryCurrentEpochResponse.current_epoch": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryCurrentEpochResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryCurrentEpochResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryCurrentEpochResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.epochs.QueryCurrentEpochResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryCurrentEpochResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCurrentEpochResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryCurrentEpochResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryCurrentEpochResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCurrentEpochResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.CurrentEpoch != 0 { - n += 1 + runtime.Sov(uint64(x.CurrentEpoch)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCurrentEpochResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.CurrentEpoch != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CurrentEpoch)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryCurrentEpochResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentEpochResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCurrentEpochResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrentEpoch", wireType) - } - x.CurrentEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CurrentEpoch |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryEpochInfoRequest protoreflect.MessageDescriptor - fd_QueryEpochInfoRequest_identifier protoreflect.FieldDescriptor -) - -func init() { - file_stride_epochs_query_proto_init() - md_QueryEpochInfoRequest = File_stride_epochs_query_proto.Messages().ByName("QueryEpochInfoRequest") - fd_QueryEpochInfoRequest_identifier = md_QueryEpochInfoRequest.Fields().ByName("identifier") -} - -var _ protoreflect.Message = (*fastReflection_QueryEpochInfoRequest)(nil) - -type fastReflection_QueryEpochInfoRequest QueryEpochInfoRequest - -func (x *QueryEpochInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryEpochInfoRequest)(x) -} - -func (x *QueryEpochInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_epochs_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryEpochInfoRequest_messageType fastReflection_QueryEpochInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryEpochInfoRequest_messageType{} - -type fastReflection_QueryEpochInfoRequest_messageType struct{} - -func (x fastReflection_QueryEpochInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryEpochInfoRequest)(nil) -} -func (x fastReflection_QueryEpochInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryEpochInfoRequest) -} -func (x fastReflection_QueryEpochInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEpochInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryEpochInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEpochInfoRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryEpochInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryEpochInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryEpochInfoRequest) New() protoreflect.Message { - return new(fastReflection_QueryEpochInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryEpochInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QueryEpochInfoRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryEpochInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Identifier != "" { - value := protoreflect.ValueOfString(x.Identifier) - if !f(fd_QueryEpochInfoRequest_identifier, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryEpochInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoRequest.identifier": - return x.Identifier != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoRequest.identifier": - x.Identifier = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryEpochInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.epochs.QueryEpochInfoRequest.identifier": - value := x.Identifier - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoRequest.identifier": - x.Identifier = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoRequest.identifier": - panic(fmt.Errorf("field identifier of message stride.epochs.QueryEpochInfoRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryEpochInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoRequest.identifier": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoRequest")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryEpochInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.epochs.QueryEpochInfoRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryEpochInfoRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochInfoRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryEpochInfoRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryEpochInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryEpochInfoRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Identifier) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryEpochInfoRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Identifier) > 0 { - i -= len(x.Identifier) - copy(dAtA[i:], x.Identifier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryEpochInfoRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryEpochInfoResponse protoreflect.MessageDescriptor - fd_QueryEpochInfoResponse_epoch protoreflect.FieldDescriptor -) - -func init() { - file_stride_epochs_query_proto_init() - md_QueryEpochInfoResponse = File_stride_epochs_query_proto.Messages().ByName("QueryEpochInfoResponse") - fd_QueryEpochInfoResponse_epoch = md_QueryEpochInfoResponse.Fields().ByName("epoch") -} - -var _ protoreflect.Message = (*fastReflection_QueryEpochInfoResponse)(nil) - -type fastReflection_QueryEpochInfoResponse QueryEpochInfoResponse - -func (x *QueryEpochInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryEpochInfoResponse)(x) -} - -func (x *QueryEpochInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_epochs_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryEpochInfoResponse_messageType fastReflection_QueryEpochInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryEpochInfoResponse_messageType{} - -type fastReflection_QueryEpochInfoResponse_messageType struct{} - -func (x fastReflection_QueryEpochInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryEpochInfoResponse)(nil) -} -func (x fastReflection_QueryEpochInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryEpochInfoResponse) -} -func (x fastReflection_QueryEpochInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEpochInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryEpochInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryEpochInfoResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryEpochInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryEpochInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryEpochInfoResponse) New() protoreflect.Message { - return new(fastReflection_QueryEpochInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryEpochInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QueryEpochInfoResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryEpochInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Epoch != nil { - value := protoreflect.ValueOfMessage(x.Epoch.ProtoReflect()) - if !f(fd_QueryEpochInfoResponse_epoch, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryEpochInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoResponse.epoch": - return x.Epoch != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoResponse.epoch": - x.Epoch = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryEpochInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.epochs.QueryEpochInfoResponse.epoch": - value := x.Epoch - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoResponse.epoch": - x.Epoch = value.Message().Interface().(*EpochInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoResponse.epoch": - if x.Epoch == nil { - x.Epoch = new(EpochInfo) - } - return protoreflect.ValueOfMessage(x.Epoch.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryEpochInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.epochs.QueryEpochInfoResponse.epoch": - m := new(EpochInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.epochs.QueryEpochInfoResponse")) - } - panic(fmt.Errorf("message stride.epochs.QueryEpochInfoResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryEpochInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.epochs.QueryEpochInfoResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryEpochInfoResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryEpochInfoResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryEpochInfoResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryEpochInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryEpochInfoResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Epoch != nil { - l = options.Size(x.Epoch) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryEpochInfoResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Epoch != nil { - encoded, err := options.Marshal(x.Epoch) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryEpochInfoResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryEpochInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Epoch == nil { - x.Epoch = &EpochInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Epoch); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/epochs/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type QueryEpochsInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryEpochsInfoRequest) Reset() { - *x = QueryEpochsInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_epochs_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryEpochsInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryEpochsInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryEpochsInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryEpochsInfoRequest) Descriptor() ([]byte, []int) { - return file_stride_epochs_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryEpochsInfoRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryEpochsInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Epochs []*EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryEpochsInfoResponse) Reset() { - *x = QueryEpochsInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_epochs_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryEpochsInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryEpochsInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryEpochsInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryEpochsInfoResponse) Descriptor() ([]byte, []int) { - return file_stride_epochs_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryEpochsInfoResponse) GetEpochs() []*EpochInfo { - if x != nil { - return x.Epochs - } - return nil -} - -func (x *QueryEpochsInfoResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryCurrentEpochRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` -} - -func (x *QueryCurrentEpochRequest) Reset() { - *x = QueryCurrentEpochRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_epochs_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryCurrentEpochRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryCurrentEpochRequest) ProtoMessage() {} - -// Deprecated: Use QueryCurrentEpochRequest.ProtoReflect.Descriptor instead. -func (*QueryCurrentEpochRequest) Descriptor() ([]byte, []int) { - return file_stride_epochs_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryCurrentEpochRequest) GetIdentifier() string { - if x != nil { - return x.Identifier - } - return "" -} - -type QueryCurrentEpochResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CurrentEpoch int64 `protobuf:"varint,1,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` -} - -func (x *QueryCurrentEpochResponse) Reset() { - *x = QueryCurrentEpochResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_epochs_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryCurrentEpochResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryCurrentEpochResponse) ProtoMessage() {} - -// Deprecated: Use QueryCurrentEpochResponse.ProtoReflect.Descriptor instead. -func (*QueryCurrentEpochResponse) Descriptor() ([]byte, []int) { - return file_stride_epochs_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryCurrentEpochResponse) GetCurrentEpoch() int64 { - if x != nil { - return x.CurrentEpoch - } - return 0 -} - -type QueryEpochInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` -} - -func (x *QueryEpochInfoRequest) Reset() { - *x = QueryEpochInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_epochs_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryEpochInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryEpochInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryEpochInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryEpochInfoRequest) Descriptor() ([]byte, []int) { - return file_stride_epochs_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryEpochInfoRequest) GetIdentifier() string { - if x != nil { - return x.Identifier - } - return "" -} - -type QueryEpochInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Epoch *EpochInfo `protobuf:"bytes,1,opt,name=epoch,proto3" json:"epoch,omitempty"` -} - -func (x *QueryEpochInfoResponse) Reset() { - *x = QueryEpochInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_epochs_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryEpochInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryEpochInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryEpochInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryEpochInfoResponse) Descriptor() ([]byte, []int) { - return file_stride_epochs_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryEpochInfoResponse) GetEpoch() *EpochInfo { - if x != nil { - return x.Epoch - } - return nil -} - -var File_stride_epochs_query_proto protoreflect.FileDescriptor - -var file_stride_epochs_query_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9a, 0x01, 0x0a, 0x17, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x12, 0x47, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x22, 0x40, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x22, 0x37, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, 0x0a, - 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x4e, 0x0a, - 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x32, 0xa5, 0x03, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x7e, 0x0a, 0x0a, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x49, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x25, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x12, 0x92, 0x01, 0x0a, 0x0c, 0x43, 0x75, 0x72, 0x72, - 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x27, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, - 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x63, - 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x86, 0x01, 0x0a, - 0x09, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, - 0x24, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x42, 0x0a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0xa2, 0x02, - 0x03, 0x53, 0x45, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x73, 0xca, 0x02, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x73, 0xe2, 0x02, 0x19, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_epochs_query_proto_rawDescOnce sync.Once - file_stride_epochs_query_proto_rawDescData = file_stride_epochs_query_proto_rawDesc -) - -func file_stride_epochs_query_proto_rawDescGZIP() []byte { - file_stride_epochs_query_proto_rawDescOnce.Do(func() { - file_stride_epochs_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_epochs_query_proto_rawDescData) - }) - return file_stride_epochs_query_proto_rawDescData -} - -var file_stride_epochs_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_stride_epochs_query_proto_goTypes = []interface{}{ - (*QueryEpochsInfoRequest)(nil), // 0: stride.epochs.QueryEpochsInfoRequest - (*QueryEpochsInfoResponse)(nil), // 1: stride.epochs.QueryEpochsInfoResponse - (*QueryCurrentEpochRequest)(nil), // 2: stride.epochs.QueryCurrentEpochRequest - (*QueryCurrentEpochResponse)(nil), // 3: stride.epochs.QueryCurrentEpochResponse - (*QueryEpochInfoRequest)(nil), // 4: stride.epochs.QueryEpochInfoRequest - (*QueryEpochInfoResponse)(nil), // 5: stride.epochs.QueryEpochInfoResponse - (*v1beta1.PageRequest)(nil), // 6: cosmos.base.query.v1beta1.PageRequest - (*EpochInfo)(nil), // 7: stride.epochs.EpochInfo - (*v1beta1.PageResponse)(nil), // 8: cosmos.base.query.v1beta1.PageResponse -} -var file_stride_epochs_query_proto_depIdxs = []int32{ - 6, // 0: stride.epochs.QueryEpochsInfoRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 7, // 1: stride.epochs.QueryEpochsInfoResponse.epochs:type_name -> stride.epochs.EpochInfo - 8, // 2: stride.epochs.QueryEpochsInfoResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 7, // 3: stride.epochs.QueryEpochInfoResponse.epoch:type_name -> stride.epochs.EpochInfo - 0, // 4: stride.epochs.Query.EpochInfos:input_type -> stride.epochs.QueryEpochsInfoRequest - 2, // 5: stride.epochs.Query.CurrentEpoch:input_type -> stride.epochs.QueryCurrentEpochRequest - 4, // 6: stride.epochs.Query.EpochInfo:input_type -> stride.epochs.QueryEpochInfoRequest - 1, // 7: stride.epochs.Query.EpochInfos:output_type -> stride.epochs.QueryEpochsInfoResponse - 3, // 8: stride.epochs.Query.CurrentEpoch:output_type -> stride.epochs.QueryCurrentEpochResponse - 5, // 9: stride.epochs.Query.EpochInfo:output_type -> stride.epochs.QueryEpochInfoResponse - 7, // [7:10] is the sub-list for method output_type - 4, // [4:7] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_stride_epochs_query_proto_init() } -func file_stride_epochs_query_proto_init() { - if File_stride_epochs_query_proto != nil { - return - } - file_stride_epochs_genesis_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_epochs_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryEpochsInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_epochs_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryEpochsInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_epochs_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCurrentEpochRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_epochs_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCurrentEpochResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_epochs_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryEpochInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_epochs_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryEpochInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_epochs_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_stride_epochs_query_proto_goTypes, - DependencyIndexes: file_stride_epochs_query_proto_depIdxs, - MessageInfos: file_stride_epochs_query_proto_msgTypes, - }.Build() - File_stride_epochs_query_proto = out.File - file_stride_epochs_query_proto_rawDesc = nil - file_stride_epochs_query_proto_goTypes = nil - file_stride_epochs_query_proto_depIdxs = nil -} diff --git a/api/stride/epochs/query_grpc.pb.go b/api/stride/epochs/query_grpc.pb.go deleted file mode 100644 index 6d0d0f2c7..000000000 --- a/api/stride/epochs/query_grpc.pb.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: stride/epochs/query.proto - -package epochs - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Query_EpochInfos_FullMethodName = "/stride.epochs.Query/EpochInfos" - Query_CurrentEpoch_FullMethodName = "/stride.epochs.Query/CurrentEpoch" - Query_EpochInfo_FullMethodName = "/stride.epochs.Query/EpochInfo" -) - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Query defines the gRPC querier service. -type QueryClient interface { - // EpochInfos provide running epochInfos - EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) - // CurrentEpoch provide current epoch of specified identifier - CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) - // CurrentEpoch provide current epoch of specified identifier - EpochInfo(ctx context.Context, in *QueryEpochInfoRequest, opts ...grpc.CallOption) (*QueryEpochInfoResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryEpochsInfoResponse) - err := c.cc.Invoke(ctx, Query_EpochInfos_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryCurrentEpochResponse) - err := c.cc.Invoke(ctx, Query_CurrentEpoch_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochInfo(ctx context.Context, in *QueryEpochInfoRequest, opts ...grpc.CallOption) (*QueryEpochInfoResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryEpochInfoResponse) - err := c.cc.Invoke(ctx, Query_EpochInfo_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility. -// -// Query defines the gRPC querier service. -type QueryServer interface { - // EpochInfos provide running epochInfos - EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) - // CurrentEpoch provide current epoch of specified identifier - CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) - // CurrentEpoch provide current epoch of specified identifier - EpochInfo(context.Context, *QueryEpochInfoRequest) (*QueryEpochInfoResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedQueryServer struct{} - -func (UnimplementedQueryServer) EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochInfos not implemented") -} -func (UnimplementedQueryServer) CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrentEpoch not implemented") -} -func (UnimplementedQueryServer) EpochInfo(context.Context, *QueryEpochInfoRequest) (*QueryEpochInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochInfo not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} -func (UnimplementedQueryServer) testEmbeddedByValue() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - // If the following call pancis, it indicates UnimplementedQueryServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_EpochInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEpochsInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochInfos(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_EpochInfos_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochInfos(ctx, req.(*QueryEpochsInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CurrentEpoch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCurrentEpochRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CurrentEpoch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_CurrentEpoch_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CurrentEpoch(ctx, req.(*QueryCurrentEpochRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEpochInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_EpochInfo_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochInfo(ctx, req.(*QueryEpochInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "stride.epochs.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "EpochInfos", - Handler: _Query_EpochInfos_Handler, - }, - { - MethodName: "CurrentEpoch", - Handler: _Query_CurrentEpoch_Handler, - }, - { - MethodName: "EpochInfo", - Handler: _Query_EpochInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/epochs/query.proto", -} diff --git a/api/stride/icacallbacks/callback_data.pulsar.go b/api/stride/icacallbacks/callback_data.pulsar.go deleted file mode 100644 index 246763625..000000000 --- a/api/stride/icacallbacks/callback_data.pulsar.go +++ /dev/null @@ -1,926 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package icacallbacks - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_CallbackData protoreflect.MessageDescriptor - fd_CallbackData_callback_key protoreflect.FieldDescriptor - fd_CallbackData_port_id protoreflect.FieldDescriptor - fd_CallbackData_channel_id protoreflect.FieldDescriptor - fd_CallbackData_sequence protoreflect.FieldDescriptor - fd_CallbackData_callback_id protoreflect.FieldDescriptor - fd_CallbackData_callback_args protoreflect.FieldDescriptor -) - -func init() { - file_stride_icacallbacks_callback_data_proto_init() - md_CallbackData = File_stride_icacallbacks_callback_data_proto.Messages().ByName("CallbackData") - fd_CallbackData_callback_key = md_CallbackData.Fields().ByName("callback_key") - fd_CallbackData_port_id = md_CallbackData.Fields().ByName("port_id") - fd_CallbackData_channel_id = md_CallbackData.Fields().ByName("channel_id") - fd_CallbackData_sequence = md_CallbackData.Fields().ByName("sequence") - fd_CallbackData_callback_id = md_CallbackData.Fields().ByName("callback_id") - fd_CallbackData_callback_args = md_CallbackData.Fields().ByName("callback_args") -} - -var _ protoreflect.Message = (*fastReflection_CallbackData)(nil) - -type fastReflection_CallbackData CallbackData - -func (x *CallbackData) ProtoReflect() protoreflect.Message { - return (*fastReflection_CallbackData)(x) -} - -func (x *CallbackData) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_callback_data_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CallbackData_messageType fastReflection_CallbackData_messageType -var _ protoreflect.MessageType = fastReflection_CallbackData_messageType{} - -type fastReflection_CallbackData_messageType struct{} - -func (x fastReflection_CallbackData_messageType) Zero() protoreflect.Message { - return (*fastReflection_CallbackData)(nil) -} -func (x fastReflection_CallbackData_messageType) New() protoreflect.Message { - return new(fastReflection_CallbackData) -} -func (x fastReflection_CallbackData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CallbackData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CallbackData) Descriptor() protoreflect.MessageDescriptor { - return md_CallbackData -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_CallbackData) Type() protoreflect.MessageType { - return _fastReflection_CallbackData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CallbackData) New() protoreflect.Message { - return new(fastReflection_CallbackData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CallbackData) Interface() protoreflect.ProtoMessage { - return (*CallbackData)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_CallbackData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CallbackKey != "" { - value := protoreflect.ValueOfString(x.CallbackKey) - if !f(fd_CallbackData_callback_key, value) { - return - } - } - if x.PortId != "" { - value := protoreflect.ValueOfString(x.PortId) - if !f(fd_CallbackData_port_id, value) { - return - } - } - if x.ChannelId != "" { - value := protoreflect.ValueOfString(x.ChannelId) - if !f(fd_CallbackData_channel_id, value) { - return - } - } - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_CallbackData_sequence, value) { - return - } - } - if x.CallbackId != "" { - value := protoreflect.ValueOfString(x.CallbackId) - if !f(fd_CallbackData_callback_id, value) { - return - } - } - if len(x.CallbackArgs) != 0 { - value := protoreflect.ValueOfBytes(x.CallbackArgs) - if !f(fd_CallbackData_callback_args, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_CallbackData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.icacallbacks.CallbackData.callback_key": - return x.CallbackKey != "" - case "stride.icacallbacks.CallbackData.port_id": - return x.PortId != "" - case "stride.icacallbacks.CallbackData.channel_id": - return x.ChannelId != "" - case "stride.icacallbacks.CallbackData.sequence": - return x.Sequence != uint64(0) - case "stride.icacallbacks.CallbackData.callback_id": - return x.CallbackId != "" - case "stride.icacallbacks.CallbackData.callback_args": - return len(x.CallbackArgs) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.CallbackData")) - } - panic(fmt.Errorf("message stride.icacallbacks.CallbackData does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CallbackData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.icacallbacks.CallbackData.callback_key": - x.CallbackKey = "" - case "stride.icacallbacks.CallbackData.port_id": - x.PortId = "" - case "stride.icacallbacks.CallbackData.channel_id": - x.ChannelId = "" - case "stride.icacallbacks.CallbackData.sequence": - x.Sequence = uint64(0) - case "stride.icacallbacks.CallbackData.callback_id": - x.CallbackId = "" - case "stride.icacallbacks.CallbackData.callback_args": - x.CallbackArgs = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.CallbackData")) - } - panic(fmt.Errorf("message stride.icacallbacks.CallbackData does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_CallbackData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.icacallbacks.CallbackData.callback_key": - value := x.CallbackKey - return protoreflect.ValueOfString(value) - case "stride.icacallbacks.CallbackData.port_id": - value := x.PortId - return protoreflect.ValueOfString(value) - case "stride.icacallbacks.CallbackData.channel_id": - value := x.ChannelId - return protoreflect.ValueOfString(value) - case "stride.icacallbacks.CallbackData.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - case "stride.icacallbacks.CallbackData.callback_id": - value := x.CallbackId - return protoreflect.ValueOfString(value) - case "stride.icacallbacks.CallbackData.callback_args": - value := x.CallbackArgs - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.CallbackData")) - } - panic(fmt.Errorf("message stride.icacallbacks.CallbackData does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CallbackData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.icacallbacks.CallbackData.callback_key": - x.CallbackKey = value.Interface().(string) - case "stride.icacallbacks.CallbackData.port_id": - x.PortId = value.Interface().(string) - case "stride.icacallbacks.CallbackData.channel_id": - x.ChannelId = value.Interface().(string) - case "stride.icacallbacks.CallbackData.sequence": - x.Sequence = value.Uint() - case "stride.icacallbacks.CallbackData.callback_id": - x.CallbackId = value.Interface().(string) - case "stride.icacallbacks.CallbackData.callback_args": - x.CallbackArgs = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.CallbackData")) - } - panic(fmt.Errorf("message stride.icacallbacks.CallbackData does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CallbackData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.CallbackData.callback_key": - panic(fmt.Errorf("field callback_key of message stride.icacallbacks.CallbackData is not mutable")) - case "stride.icacallbacks.CallbackData.port_id": - panic(fmt.Errorf("field port_id of message stride.icacallbacks.CallbackData is not mutable")) - case "stride.icacallbacks.CallbackData.channel_id": - panic(fmt.Errorf("field channel_id of message stride.icacallbacks.CallbackData is not mutable")) - case "stride.icacallbacks.CallbackData.sequence": - panic(fmt.Errorf("field sequence of message stride.icacallbacks.CallbackData is not mutable")) - case "stride.icacallbacks.CallbackData.callback_id": - panic(fmt.Errorf("field callback_id of message stride.icacallbacks.CallbackData is not mutable")) - case "stride.icacallbacks.CallbackData.callback_args": - panic(fmt.Errorf("field callback_args of message stride.icacallbacks.CallbackData is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.CallbackData")) - } - panic(fmt.Errorf("message stride.icacallbacks.CallbackData does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_CallbackData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.CallbackData.callback_key": - return protoreflect.ValueOfString("") - case "stride.icacallbacks.CallbackData.port_id": - return protoreflect.ValueOfString("") - case "stride.icacallbacks.CallbackData.channel_id": - return protoreflect.ValueOfString("") - case "stride.icacallbacks.CallbackData.sequence": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.icacallbacks.CallbackData.callback_id": - return protoreflect.ValueOfString("") - case "stride.icacallbacks.CallbackData.callback_args": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.CallbackData")) - } - panic(fmt.Errorf("message stride.icacallbacks.CallbackData does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_CallbackData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.CallbackData", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_CallbackData) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CallbackData) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_CallbackData) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_CallbackData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CallbackData) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.CallbackKey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PortId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - l = len(x.CallbackId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CallbackArgs) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CallbackData) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.CallbackArgs) > 0 { - i -= len(x.CallbackArgs) - copy(dAtA[i:], x.CallbackArgs) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CallbackArgs))) - i-- - dAtA[i] = 0x32 - } - if len(x.CallbackId) > 0 { - i -= len(x.CallbackId) - copy(dAtA[i:], x.CallbackId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CallbackId))) - i-- - dAtA[i] = 0x2a - } - if x.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) - i-- - dAtA[i] = 0x20 - } - if len(x.ChannelId) > 0 { - i -= len(x.ChannelId) - copy(dAtA[i:], x.ChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelId))) - i-- - dAtA[i] = 0x1a - } - if len(x.PortId) > 0 { - i -= len(x.PortId) - copy(dAtA[i:], x.PortId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PortId))) - i-- - dAtA[i] = 0x12 - } - if len(x.CallbackKey) > 0 { - i -= len(x.CallbackKey) - copy(dAtA[i:], x.CallbackKey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CallbackKey))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*CallbackData) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CallbackData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CallbackData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CallbackKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CallbackId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackArgs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CallbackArgs = append(x.CallbackArgs[:0], dAtA[iNdEx:postIndex]...) - if x.CallbackArgs == nil { - x.CallbackArgs = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/icacallbacks/callback_data.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type CallbackData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CallbackKey string `protobuf:"bytes,1,opt,name=callback_key,json=callbackKey,proto3" json:"callback_key,omitempty"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - CallbackId string `protobuf:"bytes,5,opt,name=callback_id,json=callbackId,proto3" json:"callback_id,omitempty"` - CallbackArgs []byte `protobuf:"bytes,6,opt,name=callback_args,json=callbackArgs,proto3" json:"callback_args,omitempty"` -} - -func (x *CallbackData) Reset() { - *x = CallbackData{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_callback_data_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CallbackData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CallbackData) ProtoMessage() {} - -// Deprecated: Use CallbackData.ProtoReflect.Descriptor instead. -func (*CallbackData) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_callback_data_proto_rawDescGZIP(), []int{0} -} - -func (x *CallbackData) GetCallbackKey() string { - if x != nil { - return x.CallbackKey - } - return "" -} - -func (x *CallbackData) GetPortId() string { - if x != nil { - return x.PortId - } - return "" -} - -func (x *CallbackData) GetChannelId() string { - if x != nil { - return x.ChannelId - } - return "" -} - -func (x *CallbackData) GetSequence() uint64 { - if x != nil { - return x.Sequence - } - return 0 -} - -func (x *CallbackData) GetCallbackId() string { - if x != nil { - return x.CallbackId - } - return "" -} - -func (x *CallbackData) GetCallbackArgs() []byte { - if x != nil { - return x.CallbackArgs - } - return nil -} - -var File_stride_icacallbacks_callback_data_proto protoreflect.FileDescriptor - -var file_stride_icacallbacks_callback_data_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x22, 0xcb, - 0x01, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x4b, - 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x5f, 0x61, 0x72, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, - 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x41, 0x72, 0x67, 0x73, 0x42, 0xd4, 0x01, 0x0a, - 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x11, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, - 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x49, 0x58, 0xaa, 0x02, - 0x13, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x73, 0xca, 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x63, - 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xe2, 0x02, 0x1f, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x5c, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_icacallbacks_callback_data_proto_rawDescOnce sync.Once - file_stride_icacallbacks_callback_data_proto_rawDescData = file_stride_icacallbacks_callback_data_proto_rawDesc -) - -func file_stride_icacallbacks_callback_data_proto_rawDescGZIP() []byte { - file_stride_icacallbacks_callback_data_proto_rawDescOnce.Do(func() { - file_stride_icacallbacks_callback_data_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_icacallbacks_callback_data_proto_rawDescData) - }) - return file_stride_icacallbacks_callback_data_proto_rawDescData -} - -var file_stride_icacallbacks_callback_data_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_icacallbacks_callback_data_proto_goTypes = []interface{}{ - (*CallbackData)(nil), // 0: stride.icacallbacks.CallbackData -} -var file_stride_icacallbacks_callback_data_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_stride_icacallbacks_callback_data_proto_init() } -func file_stride_icacallbacks_callback_data_proto_init() { - if File_stride_icacallbacks_callback_data_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_icacallbacks_callback_data_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CallbackData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_icacallbacks_callback_data_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_icacallbacks_callback_data_proto_goTypes, - DependencyIndexes: file_stride_icacallbacks_callback_data_proto_depIdxs, - MessageInfos: file_stride_icacallbacks_callback_data_proto_msgTypes, - }.Build() - File_stride_icacallbacks_callback_data_proto = out.File - file_stride_icacallbacks_callback_data_proto_rawDesc = nil - file_stride_icacallbacks_callback_data_proto_goTypes = nil - file_stride_icacallbacks_callback_data_proto_depIdxs = nil -} diff --git a/api/stride/icacallbacks/genesis.pulsar.go b/api/stride/icacallbacks/genesis.pulsar.go deleted file mode 100644 index 8143181c5..000000000 --- a/api/stride/icacallbacks/genesis.pulsar.go +++ /dev/null @@ -1,825 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package icacallbacks - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_3_list)(nil) - -type _GenesisState_3_list struct { - list *[]*CallbackData -} - -func (x *_GenesisState_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*CallbackData) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*CallbackData) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(CallbackData) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(CallbackData) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_port_id protoreflect.FieldDescriptor - fd_GenesisState_callback_data_list protoreflect.FieldDescriptor -) - -func init() { - file_stride_icacallbacks_genesis_proto_init() - md_GenesisState = File_stride_icacallbacks_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_port_id = md_GenesisState.Fields().ByName("port_id") - fd_GenesisState_callback_data_list = md_GenesisState.Fields().ByName("callback_data_list") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } - if x.PortId != "" { - value := protoreflect.ValueOfString(x.PortId) - if !f(fd_GenesisState_port_id, value) { - return - } - } - if len(x.CallbackDataList) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.CallbackDataList}) - if !f(fd_GenesisState_callback_data_list, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.icacallbacks.GenesisState.params": - return x.Params != nil - case "stride.icacallbacks.GenesisState.port_id": - return x.PortId != "" - case "stride.icacallbacks.GenesisState.callback_data_list": - return len(x.CallbackDataList) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.GenesisState")) - } - panic(fmt.Errorf("message stride.icacallbacks.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.icacallbacks.GenesisState.params": - x.Params = nil - case "stride.icacallbacks.GenesisState.port_id": - x.PortId = "" - case "stride.icacallbacks.GenesisState.callback_data_list": - x.CallbackDataList = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.GenesisState")) - } - panic(fmt.Errorf("message stride.icacallbacks.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.icacallbacks.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.icacallbacks.GenesisState.port_id": - value := x.PortId - return protoreflect.ValueOfString(value) - case "stride.icacallbacks.GenesisState.callback_data_list": - if len(x.CallbackDataList) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) - } - listValue := &_GenesisState_3_list{list: &x.CallbackDataList} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.GenesisState")) - } - panic(fmt.Errorf("message stride.icacallbacks.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.icacallbacks.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - case "stride.icacallbacks.GenesisState.port_id": - x.PortId = value.Interface().(string) - case "stride.icacallbacks.GenesisState.callback_data_list": - lv := value.List() - clv := lv.(*_GenesisState_3_list) - x.CallbackDataList = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.GenesisState")) - } - panic(fmt.Errorf("message stride.icacallbacks.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "stride.icacallbacks.GenesisState.callback_data_list": - if x.CallbackDataList == nil { - x.CallbackDataList = []*CallbackData{} - } - value := &_GenesisState_3_list{list: &x.CallbackDataList} - return protoreflect.ValueOfList(value) - case "stride.icacallbacks.GenesisState.port_id": - panic(fmt.Errorf("field port_id of message stride.icacallbacks.GenesisState is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.GenesisState")) - } - panic(fmt.Errorf("message stride.icacallbacks.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.icacallbacks.GenesisState.port_id": - return protoreflect.ValueOfString("") - case "stride.icacallbacks.GenesisState.callback_data_list": - list := []*CallbackData{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.GenesisState")) - } - panic(fmt.Errorf("message stride.icacallbacks.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PortId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.CallbackDataList) > 0 { - for _, e := range x.CallbackDataList { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.CallbackDataList) > 0 { - for iNdEx := len(x.CallbackDataList) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.CallbackDataList[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.PortId) > 0 { - i -= len(x.PortId) - copy(dAtA[i:], x.PortId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PortId))) - i-- - dAtA[i] = 0x12 - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackDataList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CallbackDataList = append(x.CallbackDataList, &CallbackData{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CallbackDataList[len(x.CallbackDataList)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/icacallbacks/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the icacallbacks module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - CallbackDataList []*CallbackData `protobuf:"bytes,3,rep,name=callback_data_list,json=callbackDataList,proto3" json:"callback_data_list,omitempty"` // this line is used by starport scaffolding # genesis/proto/state -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -func (x *GenesisState) GetPortId() string { - if x != nil { - return x.PortId - } - return "" -} - -func (x *GenesisState) GetCallbackDataList() []*CallbackData { - if x != nil { - return x.CallbackDataList - } - return nil -} - -var File_stride_icacallbacks_genesis_proto protoreflect.FileDescriptor - -var file_stride_icacallbacks_genesis_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x27, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x55, - 0x0a, 0x12, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, - 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x10, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, - 0x61, 0x4c, 0x69, 0x73, 0x74, 0x42, 0xcf, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, - 0x73, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, - 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, - 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xa2, 0x02, 0x03, 0x53, - 0x49, 0x58, 0xaa, 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x49, 0x63, 0x61, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xca, 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x5c, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xe2, 0x02, - 0x1f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x14, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x49, 0x63, 0x61, 0x63, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_icacallbacks_genesis_proto_rawDescOnce sync.Once - file_stride_icacallbacks_genesis_proto_rawDescData = file_stride_icacallbacks_genesis_proto_rawDesc -) - -func file_stride_icacallbacks_genesis_proto_rawDescGZIP() []byte { - file_stride_icacallbacks_genesis_proto_rawDescOnce.Do(func() { - file_stride_icacallbacks_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_icacallbacks_genesis_proto_rawDescData) - }) - return file_stride_icacallbacks_genesis_proto_rawDescData -} - -var file_stride_icacallbacks_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_icacallbacks_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: stride.icacallbacks.GenesisState - (*Params)(nil), // 1: stride.icacallbacks.Params - (*CallbackData)(nil), // 2: stride.icacallbacks.CallbackData -} -var file_stride_icacallbacks_genesis_proto_depIdxs = []int32{ - 1, // 0: stride.icacallbacks.GenesisState.params:type_name -> stride.icacallbacks.Params - 2, // 1: stride.icacallbacks.GenesisState.callback_data_list:type_name -> stride.icacallbacks.CallbackData - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_stride_icacallbacks_genesis_proto_init() } -func file_stride_icacallbacks_genesis_proto_init() { - if File_stride_icacallbacks_genesis_proto != nil { - return - } - file_stride_icacallbacks_params_proto_init() - file_stride_icacallbacks_callback_data_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_icacallbacks_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_icacallbacks_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_icacallbacks_genesis_proto_goTypes, - DependencyIndexes: file_stride_icacallbacks_genesis_proto_depIdxs, - MessageInfos: file_stride_icacallbacks_genesis_proto_msgTypes, - }.Build() - File_stride_icacallbacks_genesis_proto = out.File - file_stride_icacallbacks_genesis_proto_rawDesc = nil - file_stride_icacallbacks_genesis_proto_goTypes = nil - file_stride_icacallbacks_genesis_proto_depIdxs = nil -} diff --git a/api/stride/icacallbacks/packet.pulsar.go b/api/stride/icacallbacks/packet.pulsar.go deleted file mode 100644 index dc77eb267..000000000 --- a/api/stride/icacallbacks/packet.pulsar.go +++ /dev/null @@ -1,1046 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package icacallbacks - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_IcacallbacksPacketData protoreflect.MessageDescriptor - fd_IcacallbacksPacketData_no_data protoreflect.FieldDescriptor -) - -func init() { - file_stride_icacallbacks_packet_proto_init() - md_IcacallbacksPacketData = File_stride_icacallbacks_packet_proto.Messages().ByName("IcacallbacksPacketData") - fd_IcacallbacksPacketData_no_data = md_IcacallbacksPacketData.Fields().ByName("no_data") -} - -var _ protoreflect.Message = (*fastReflection_IcacallbacksPacketData)(nil) - -type fastReflection_IcacallbacksPacketData IcacallbacksPacketData - -func (x *IcacallbacksPacketData) ProtoReflect() protoreflect.Message { - return (*fastReflection_IcacallbacksPacketData)(x) -} - -func (x *IcacallbacksPacketData) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_packet_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_IcacallbacksPacketData_messageType fastReflection_IcacallbacksPacketData_messageType -var _ protoreflect.MessageType = fastReflection_IcacallbacksPacketData_messageType{} - -type fastReflection_IcacallbacksPacketData_messageType struct{} - -func (x fastReflection_IcacallbacksPacketData_messageType) Zero() protoreflect.Message { - return (*fastReflection_IcacallbacksPacketData)(nil) -} -func (x fastReflection_IcacallbacksPacketData_messageType) New() protoreflect.Message { - return new(fastReflection_IcacallbacksPacketData) -} -func (x fastReflection_IcacallbacksPacketData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_IcacallbacksPacketData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_IcacallbacksPacketData) Descriptor() protoreflect.MessageDescriptor { - return md_IcacallbacksPacketData -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_IcacallbacksPacketData) Type() protoreflect.MessageType { - return _fastReflection_IcacallbacksPacketData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_IcacallbacksPacketData) New() protoreflect.Message { - return new(fastReflection_IcacallbacksPacketData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_IcacallbacksPacketData) Interface() protoreflect.ProtoMessage { - return (*IcacallbacksPacketData)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_IcacallbacksPacketData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Packet != nil { - switch o := x.Packet.(type) { - case *IcacallbacksPacketData_NoData: - v := o.NoData - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_IcacallbacksPacketData_no_data, value) { - return - } - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_IcacallbacksPacketData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.icacallbacks.IcacallbacksPacketData.no_data": - if x.Packet == nil { - return false - } else if _, ok := x.Packet.(*IcacallbacksPacketData_NoData); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.IcacallbacksPacketData")) - } - panic(fmt.Errorf("message stride.icacallbacks.IcacallbacksPacketData does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_IcacallbacksPacketData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.icacallbacks.IcacallbacksPacketData.no_data": - x.Packet = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.IcacallbacksPacketData")) - } - panic(fmt.Errorf("message stride.icacallbacks.IcacallbacksPacketData does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_IcacallbacksPacketData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.icacallbacks.IcacallbacksPacketData.no_data": - if x.Packet == nil { - return protoreflect.ValueOfMessage((*NoData)(nil).ProtoReflect()) - } else if v, ok := x.Packet.(*IcacallbacksPacketData_NoData); ok { - return protoreflect.ValueOfMessage(v.NoData.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*NoData)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.IcacallbacksPacketData")) - } - panic(fmt.Errorf("message stride.icacallbacks.IcacallbacksPacketData does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_IcacallbacksPacketData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.icacallbacks.IcacallbacksPacketData.no_data": - cv := value.Message().Interface().(*NoData) - x.Packet = &IcacallbacksPacketData_NoData{NoData: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.IcacallbacksPacketData")) - } - panic(fmt.Errorf("message stride.icacallbacks.IcacallbacksPacketData does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_IcacallbacksPacketData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.IcacallbacksPacketData.no_data": - if x.Packet == nil { - value := &NoData{} - oneofValue := &IcacallbacksPacketData_NoData{NoData: value} - x.Packet = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Packet.(type) { - case *IcacallbacksPacketData_NoData: - return protoreflect.ValueOfMessage(m.NoData.ProtoReflect()) - default: - value := &NoData{} - oneofValue := &IcacallbacksPacketData_NoData{NoData: value} - x.Packet = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.IcacallbacksPacketData")) - } - panic(fmt.Errorf("message stride.icacallbacks.IcacallbacksPacketData does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_IcacallbacksPacketData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.IcacallbacksPacketData.no_data": - value := &NoData{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.IcacallbacksPacketData")) - } - panic(fmt.Errorf("message stride.icacallbacks.IcacallbacksPacketData does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_IcacallbacksPacketData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "stride.icacallbacks.IcacallbacksPacketData.packet": - if x.Packet == nil { - return nil - } - switch x.Packet.(type) { - case *IcacallbacksPacketData_NoData: - return x.Descriptor().Fields().ByName("no_data") - } - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.IcacallbacksPacketData", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_IcacallbacksPacketData) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_IcacallbacksPacketData) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_IcacallbacksPacketData) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_IcacallbacksPacketData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*IcacallbacksPacketData) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Packet.(type) { - case *IcacallbacksPacketData_NoData: - if x == nil { - break - } - l = options.Size(x.NoData) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*IcacallbacksPacketData) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - switch x := x.Packet.(type) { - case *IcacallbacksPacketData_NoData: - encoded, err := options.Marshal(x.NoData) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*IcacallbacksPacketData) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IcacallbacksPacketData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: IcacallbacksPacketData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NoData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v := &NoData{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Packet = &IcacallbacksPacketData_NoData{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_NoData protoreflect.MessageDescriptor -) - -func init() { - file_stride_icacallbacks_packet_proto_init() - md_NoData = File_stride_icacallbacks_packet_proto.Messages().ByName("NoData") -} - -var _ protoreflect.Message = (*fastReflection_NoData)(nil) - -type fastReflection_NoData NoData - -func (x *NoData) ProtoReflect() protoreflect.Message { - return (*fastReflection_NoData)(x) -} - -func (x *NoData) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_packet_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_NoData_messageType fastReflection_NoData_messageType -var _ protoreflect.MessageType = fastReflection_NoData_messageType{} - -type fastReflection_NoData_messageType struct{} - -func (x fastReflection_NoData_messageType) Zero() protoreflect.Message { - return (*fastReflection_NoData)(nil) -} -func (x fastReflection_NoData_messageType) New() protoreflect.Message { - return new(fastReflection_NoData) -} -func (x fastReflection_NoData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_NoData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_NoData) Descriptor() protoreflect.MessageDescriptor { - return md_NoData -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_NoData) Type() protoreflect.MessageType { - return _fastReflection_NoData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_NoData) New() protoreflect.Message { - return new(fastReflection_NoData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_NoData) Interface() protoreflect.ProtoMessage { - return (*NoData)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_NoData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_NoData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.NoData")) - } - panic(fmt.Errorf("message stride.icacallbacks.NoData does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.NoData")) - } - panic(fmt.Errorf("message stride.icacallbacks.NoData does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_NoData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.NoData")) - } - panic(fmt.Errorf("message stride.icacallbacks.NoData does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.NoData")) - } - panic(fmt.Errorf("message stride.icacallbacks.NoData does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.NoData")) - } - panic(fmt.Errorf("message stride.icacallbacks.NoData does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_NoData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.NoData")) - } - panic(fmt.Errorf("message stride.icacallbacks.NoData does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_NoData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.NoData", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_NoData) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoData) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_NoData) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_NoData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*NoData) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*NoData) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*NoData) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NoData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NoData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/icacallbacks/packet.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type IcacallbacksPacketData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Packet: - // - // *IcacallbacksPacketData_NoData - Packet isIcacallbacksPacketData_Packet `protobuf_oneof:"packet"` -} - -func (x *IcacallbacksPacketData) Reset() { - *x = IcacallbacksPacketData{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_packet_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IcacallbacksPacketData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IcacallbacksPacketData) ProtoMessage() {} - -// Deprecated: Use IcacallbacksPacketData.ProtoReflect.Descriptor instead. -func (*IcacallbacksPacketData) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_packet_proto_rawDescGZIP(), []int{0} -} - -func (x *IcacallbacksPacketData) GetPacket() isIcacallbacksPacketData_Packet { - if x != nil { - return x.Packet - } - return nil -} - -func (x *IcacallbacksPacketData) GetNoData() *NoData { - if x, ok := x.GetPacket().(*IcacallbacksPacketData_NoData); ok { - return x.NoData - } - return nil -} - -type isIcacallbacksPacketData_Packet interface { - isIcacallbacksPacketData_Packet() -} - -type IcacallbacksPacketData_NoData struct { - NoData *NoData `protobuf:"bytes,1,opt,name=no_data,json=noData,proto3,oneof"` // this line is used by starport scaffolding # ibc/packet/proto/field -} - -func (*IcacallbacksPacketData_NoData) isIcacallbacksPacketData_Packet() {} - -type NoData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *NoData) Reset() { - *x = NoData{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_packet_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NoData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NoData) ProtoMessage() {} - -// Deprecated: Use NoData.ProtoReflect.Descriptor instead. -func (*NoData) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_packet_proto_rawDescGZIP(), []int{1} -} - -var File_stride_icacallbacks_packet_proto protoreflect.FileDescriptor - -var file_stride_icacallbacks_packet_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x22, 0x5a, 0x0a, 0x16, 0x49, 0x63, 0x61, 0x63, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x36, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x48, - 0x00, 0x52, 0x06, 0x6e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x22, 0x08, 0x0a, 0x06, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x42, 0xce, 0x01, - 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, - 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x0b, 0x50, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, - 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x49, 0x58, 0xaa, 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xca, - 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x73, 0xe2, 0x02, 0x1f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, - 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x3a, 0x3a, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_icacallbacks_packet_proto_rawDescOnce sync.Once - file_stride_icacallbacks_packet_proto_rawDescData = file_stride_icacallbacks_packet_proto_rawDesc -) - -func file_stride_icacallbacks_packet_proto_rawDescGZIP() []byte { - file_stride_icacallbacks_packet_proto_rawDescOnce.Do(func() { - file_stride_icacallbacks_packet_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_icacallbacks_packet_proto_rawDescData) - }) - return file_stride_icacallbacks_packet_proto_rawDescData -} - -var file_stride_icacallbacks_packet_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_stride_icacallbacks_packet_proto_goTypes = []interface{}{ - (*IcacallbacksPacketData)(nil), // 0: stride.icacallbacks.IcacallbacksPacketData - (*NoData)(nil), // 1: stride.icacallbacks.NoData -} -var file_stride_icacallbacks_packet_proto_depIdxs = []int32{ - 1, // 0: stride.icacallbacks.IcacallbacksPacketData.no_data:type_name -> stride.icacallbacks.NoData - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_stride_icacallbacks_packet_proto_init() } -func file_stride_icacallbacks_packet_proto_init() { - if File_stride_icacallbacks_packet_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_icacallbacks_packet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*IcacallbacksPacketData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_icacallbacks_packet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_stride_icacallbacks_packet_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*IcacallbacksPacketData_NoData)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_icacallbacks_packet_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_icacallbacks_packet_proto_goTypes, - DependencyIndexes: file_stride_icacallbacks_packet_proto_depIdxs, - MessageInfos: file_stride_icacallbacks_packet_proto_msgTypes, - }.Build() - File_stride_icacallbacks_packet_proto = out.File - file_stride_icacallbacks_packet_proto_rawDesc = nil - file_stride_icacallbacks_packet_proto_goTypes = nil - file_stride_icacallbacks_packet_proto_depIdxs = nil -} diff --git a/api/stride/icacallbacks/params.pulsar.go b/api/stride/icacallbacks/params.pulsar.go deleted file mode 100644 index e542245b7..000000000 --- a/api/stride/icacallbacks/params.pulsar.go +++ /dev/null @@ -1,498 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package icacallbacks - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Params protoreflect.MessageDescriptor -) - -func init() { - file_stride_icacallbacks_params_proto_init() - md_Params = File_stride_icacallbacks_params_proto.Messages().ByName("Params") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_params_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.Params")) - } - panic(fmt.Errorf("message stride.icacallbacks.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.Params")) - } - panic(fmt.Errorf("message stride.icacallbacks.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.Params")) - } - panic(fmt.Errorf("message stride.icacallbacks.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.Params")) - } - panic(fmt.Errorf("message stride.icacallbacks.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.Params")) - } - panic(fmt.Errorf("message stride.icacallbacks.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.Params")) - } - panic(fmt.Errorf("message stride.icacallbacks.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/icacallbacks/params.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Params defines the parameters for the module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_params_proto_rawDescGZIP(), []int{0} -} - -var File_stride_icacallbacks_params_proto protoreflect.FileDescriptor - -var file_stride_icacallbacks_params_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x13, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0e, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, 0x42, 0xce, 0x01, - 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, - 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, - 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x49, 0x58, 0xaa, 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xca, - 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x73, 0xe2, 0x02, 0x1f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, - 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x3a, 0x3a, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_icacallbacks_params_proto_rawDescOnce sync.Once - file_stride_icacallbacks_params_proto_rawDescData = file_stride_icacallbacks_params_proto_rawDesc -) - -func file_stride_icacallbacks_params_proto_rawDescGZIP() []byte { - file_stride_icacallbacks_params_proto_rawDescOnce.Do(func() { - file_stride_icacallbacks_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_icacallbacks_params_proto_rawDescData) - }) - return file_stride_icacallbacks_params_proto_rawDescData -} - -var file_stride_icacallbacks_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_icacallbacks_params_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: stride.icacallbacks.Params -} -var file_stride_icacallbacks_params_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_stride_icacallbacks_params_proto_init() } -func file_stride_icacallbacks_params_proto_init() { - if File_stride_icacallbacks_params_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_icacallbacks_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_icacallbacks_params_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_icacallbacks_params_proto_goTypes, - DependencyIndexes: file_stride_icacallbacks_params_proto_depIdxs, - MessageInfos: file_stride_icacallbacks_params_proto_msgTypes, - }.Build() - File_stride_icacallbacks_params_proto = out.File - file_stride_icacallbacks_params_proto_rawDesc = nil - file_stride_icacallbacks_params_proto_goTypes = nil - file_stride_icacallbacks_params_proto_depIdxs = nil -} diff --git a/api/stride/icacallbacks/query.pulsar.go b/api/stride/icacallbacks/query.pulsar.go deleted file mode 100644 index 7e5f369d8..000000000 --- a/api/stride/icacallbacks/query.pulsar.go +++ /dev/null @@ -1,3141 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package icacallbacks - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_stride_icacallbacks_query_proto_init() - md_QueryParamsRequest = File_stride_icacallbacks_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.QueryParamsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor -) - -func init() { - file_stride_icacallbacks_query_proto_init() - md_QueryParamsResponse = File_stride_icacallbacks_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) - -type fastReflection_QueryParamsResponse QueryParamsResponse - -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) -} - -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} - -type fastReflection_QueryParamsResponse_messageType struct{} - -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) -} -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.icacallbacks.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.icacallbacks.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.icacallbacks.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.icacallbacks.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.QueryParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetCallbackDataRequest protoreflect.MessageDescriptor - fd_QueryGetCallbackDataRequest_callback_key protoreflect.FieldDescriptor -) - -func init() { - file_stride_icacallbacks_query_proto_init() - md_QueryGetCallbackDataRequest = File_stride_icacallbacks_query_proto.Messages().ByName("QueryGetCallbackDataRequest") - fd_QueryGetCallbackDataRequest_callback_key = md_QueryGetCallbackDataRequest.Fields().ByName("callback_key") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetCallbackDataRequest)(nil) - -type fastReflection_QueryGetCallbackDataRequest QueryGetCallbackDataRequest - -func (x *QueryGetCallbackDataRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetCallbackDataRequest)(x) -} - -func (x *QueryGetCallbackDataRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetCallbackDataRequest_messageType fastReflection_QueryGetCallbackDataRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetCallbackDataRequest_messageType{} - -type fastReflection_QueryGetCallbackDataRequest_messageType struct{} - -func (x fastReflection_QueryGetCallbackDataRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetCallbackDataRequest)(nil) -} -func (x fastReflection_QueryGetCallbackDataRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetCallbackDataRequest) -} -func (x fastReflection_QueryGetCallbackDataRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetCallbackDataRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetCallbackDataRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetCallbackDataRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetCallbackDataRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetCallbackDataRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetCallbackDataRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetCallbackDataRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetCallbackDataRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetCallbackDataRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetCallbackDataRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CallbackKey != "" { - value := protoreflect.ValueOfString(x.CallbackKey) - if !f(fd_QueryGetCallbackDataRequest_callback_key, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetCallbackDataRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataRequest.callback_key": - return x.CallbackKey != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetCallbackDataRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataRequest.callback_key": - x.CallbackKey = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetCallbackDataRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataRequest.callback_key": - value := x.CallbackKey - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetCallbackDataRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataRequest.callback_key": - x.CallbackKey = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetCallbackDataRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataRequest.callback_key": - panic(fmt.Errorf("field callback_key of message stride.icacallbacks.QueryGetCallbackDataRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetCallbackDataRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataRequest.callback_key": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetCallbackDataRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.QueryGetCallbackDataRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetCallbackDataRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetCallbackDataRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetCallbackDataRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetCallbackDataRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetCallbackDataRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.CallbackKey) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetCallbackDataRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.CallbackKey) > 0 { - i -= len(x.CallbackKey) - copy(dAtA[i:], x.CallbackKey) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CallbackKey))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetCallbackDataRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCallbackDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCallbackDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CallbackKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetCallbackDataResponse protoreflect.MessageDescriptor - fd_QueryGetCallbackDataResponse_callback_data protoreflect.FieldDescriptor -) - -func init() { - file_stride_icacallbacks_query_proto_init() - md_QueryGetCallbackDataResponse = File_stride_icacallbacks_query_proto.Messages().ByName("QueryGetCallbackDataResponse") - fd_QueryGetCallbackDataResponse_callback_data = md_QueryGetCallbackDataResponse.Fields().ByName("callback_data") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetCallbackDataResponse)(nil) - -type fastReflection_QueryGetCallbackDataResponse QueryGetCallbackDataResponse - -func (x *QueryGetCallbackDataResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetCallbackDataResponse)(x) -} - -func (x *QueryGetCallbackDataResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetCallbackDataResponse_messageType fastReflection_QueryGetCallbackDataResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetCallbackDataResponse_messageType{} - -type fastReflection_QueryGetCallbackDataResponse_messageType struct{} - -func (x fastReflection_QueryGetCallbackDataResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetCallbackDataResponse)(nil) -} -func (x fastReflection_QueryGetCallbackDataResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetCallbackDataResponse) -} -func (x fastReflection_QueryGetCallbackDataResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetCallbackDataResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetCallbackDataResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetCallbackDataResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetCallbackDataResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetCallbackDataResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetCallbackDataResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetCallbackDataResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetCallbackDataResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetCallbackDataResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetCallbackDataResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CallbackData != nil { - value := protoreflect.ValueOfMessage(x.CallbackData.ProtoReflect()) - if !f(fd_QueryGetCallbackDataResponse_callback_data, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetCallbackDataResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataResponse.callback_data": - return x.CallbackData != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetCallbackDataResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataResponse.callback_data": - x.CallbackData = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetCallbackDataResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataResponse.callback_data": - value := x.CallbackData - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetCallbackDataResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataResponse.callback_data": - x.CallbackData = value.Message().Interface().(*CallbackData) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetCallbackDataResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataResponse.callback_data": - if x.CallbackData == nil { - x.CallbackData = new(CallbackData) - } - return protoreflect.ValueOfMessage(x.CallbackData.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetCallbackDataResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryGetCallbackDataResponse.callback_data": - m := new(CallbackData) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryGetCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryGetCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetCallbackDataResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.QueryGetCallbackDataResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetCallbackDataResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetCallbackDataResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetCallbackDataResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetCallbackDataResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetCallbackDataResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.CallbackData != nil { - l = options.Size(x.CallbackData) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetCallbackDataResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.CallbackData != nil { - encoded, err := options.Marshal(x.CallbackData) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetCallbackDataResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCallbackDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCallbackDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.CallbackData == nil { - x.CallbackData = &CallbackData{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CallbackData); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllCallbackDataRequest protoreflect.MessageDescriptor - fd_QueryAllCallbackDataRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_icacallbacks_query_proto_init() - md_QueryAllCallbackDataRequest = File_stride_icacallbacks_query_proto.Messages().ByName("QueryAllCallbackDataRequest") - fd_QueryAllCallbackDataRequest_pagination = md_QueryAllCallbackDataRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllCallbackDataRequest)(nil) - -type fastReflection_QueryAllCallbackDataRequest QueryAllCallbackDataRequest - -func (x *QueryAllCallbackDataRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllCallbackDataRequest)(x) -} - -func (x *QueryAllCallbackDataRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllCallbackDataRequest_messageType fastReflection_QueryAllCallbackDataRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllCallbackDataRequest_messageType{} - -type fastReflection_QueryAllCallbackDataRequest_messageType struct{} - -func (x fastReflection_QueryAllCallbackDataRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllCallbackDataRequest)(nil) -} -func (x fastReflection_QueryAllCallbackDataRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllCallbackDataRequest) -} -func (x fastReflection_QueryAllCallbackDataRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllCallbackDataRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllCallbackDataRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllCallbackDataRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllCallbackDataRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllCallbackDataRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllCallbackDataRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllCallbackDataRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllCallbackDataRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllCallbackDataRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllCallbackDataRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllCallbackDataRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllCallbackDataRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllCallbackDataRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllCallbackDataRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllCallbackDataRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllCallbackDataRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllCallbackDataRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataRequest")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllCallbackDataRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.QueryAllCallbackDataRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllCallbackDataRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllCallbackDataRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllCallbackDataRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllCallbackDataRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllCallbackDataRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllCallbackDataRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllCallbackDataRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllCallbackDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllCallbackDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllCallbackDataResponse_1_list)(nil) - -type _QueryAllCallbackDataResponse_1_list struct { - list *[]*CallbackData -} - -func (x *_QueryAllCallbackDataResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllCallbackDataResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllCallbackDataResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*CallbackData) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllCallbackDataResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*CallbackData) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllCallbackDataResponse_1_list) AppendMutable() protoreflect.Value { - v := new(CallbackData) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllCallbackDataResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllCallbackDataResponse_1_list) NewElement() protoreflect.Value { - v := new(CallbackData) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllCallbackDataResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllCallbackDataResponse protoreflect.MessageDescriptor - fd_QueryAllCallbackDataResponse_callback_data protoreflect.FieldDescriptor - fd_QueryAllCallbackDataResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_icacallbacks_query_proto_init() - md_QueryAllCallbackDataResponse = File_stride_icacallbacks_query_proto.Messages().ByName("QueryAllCallbackDataResponse") - fd_QueryAllCallbackDataResponse_callback_data = md_QueryAllCallbackDataResponse.Fields().ByName("callback_data") - fd_QueryAllCallbackDataResponse_pagination = md_QueryAllCallbackDataResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllCallbackDataResponse)(nil) - -type fastReflection_QueryAllCallbackDataResponse QueryAllCallbackDataResponse - -func (x *QueryAllCallbackDataResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllCallbackDataResponse)(x) -} - -func (x *QueryAllCallbackDataResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_icacallbacks_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllCallbackDataResponse_messageType fastReflection_QueryAllCallbackDataResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllCallbackDataResponse_messageType{} - -type fastReflection_QueryAllCallbackDataResponse_messageType struct{} - -func (x fastReflection_QueryAllCallbackDataResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllCallbackDataResponse)(nil) -} -func (x fastReflection_QueryAllCallbackDataResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllCallbackDataResponse) -} -func (x fastReflection_QueryAllCallbackDataResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllCallbackDataResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllCallbackDataResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllCallbackDataResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllCallbackDataResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllCallbackDataResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllCallbackDataResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllCallbackDataResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllCallbackDataResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllCallbackDataResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllCallbackDataResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.CallbackData) != 0 { - value := protoreflect.ValueOfList(&_QueryAllCallbackDataResponse_1_list{list: &x.CallbackData}) - if !f(fd_QueryAllCallbackDataResponse_callback_data, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllCallbackDataResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllCallbackDataResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataResponse.callback_data": - return len(x.CallbackData) != 0 - case "stride.icacallbacks.QueryAllCallbackDataResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllCallbackDataResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataResponse.callback_data": - x.CallbackData = nil - case "stride.icacallbacks.QueryAllCallbackDataResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllCallbackDataResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataResponse.callback_data": - if len(x.CallbackData) == 0 { - return protoreflect.ValueOfList(&_QueryAllCallbackDataResponse_1_list{}) - } - listValue := &_QueryAllCallbackDataResponse_1_list{list: &x.CallbackData} - return protoreflect.ValueOfList(listValue) - case "stride.icacallbacks.QueryAllCallbackDataResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllCallbackDataResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataResponse.callback_data": - lv := value.List() - clv := lv.(*_QueryAllCallbackDataResponse_1_list) - x.CallbackData = *clv.list - case "stride.icacallbacks.QueryAllCallbackDataResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllCallbackDataResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataResponse.callback_data": - if x.CallbackData == nil { - x.CallbackData = []*CallbackData{} - } - value := &_QueryAllCallbackDataResponse_1_list{list: &x.CallbackData} - return protoreflect.ValueOfList(value) - case "stride.icacallbacks.QueryAllCallbackDataResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllCallbackDataResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.icacallbacks.QueryAllCallbackDataResponse.callback_data": - list := []*CallbackData{} - return protoreflect.ValueOfList(&_QueryAllCallbackDataResponse_1_list{list: &list}) - case "stride.icacallbacks.QueryAllCallbackDataResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.icacallbacks.QueryAllCallbackDataResponse")) - } - panic(fmt.Errorf("message stride.icacallbacks.QueryAllCallbackDataResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllCallbackDataResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.icacallbacks.QueryAllCallbackDataResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllCallbackDataResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllCallbackDataResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllCallbackDataResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllCallbackDataResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllCallbackDataResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.CallbackData) > 0 { - for _, e := range x.CallbackData { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllCallbackDataResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.CallbackData) > 0 { - for iNdEx := len(x.CallbackData) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.CallbackData[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllCallbackDataResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllCallbackDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllCallbackDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CallbackData = append(x.CallbackData, &CallbackData{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CallbackData[len(x.CallbackData)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/icacallbacks/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_query_proto_rawDescGZIP(), []int{0} -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params holds all the parameters of this module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -type QueryGetCallbackDataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CallbackKey string `protobuf:"bytes,1,opt,name=callback_key,json=callbackKey,proto3" json:"callback_key,omitempty"` -} - -func (x *QueryGetCallbackDataRequest) Reset() { - *x = QueryGetCallbackDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetCallbackDataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetCallbackDataRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetCallbackDataRequest.ProtoReflect.Descriptor instead. -func (*QueryGetCallbackDataRequest) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryGetCallbackDataRequest) GetCallbackKey() string { - if x != nil { - return x.CallbackKey - } - return "" -} - -type QueryGetCallbackDataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CallbackData *CallbackData `protobuf:"bytes,1,opt,name=callback_data,json=callbackData,proto3" json:"callback_data,omitempty"` -} - -func (x *QueryGetCallbackDataResponse) Reset() { - *x = QueryGetCallbackDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetCallbackDataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetCallbackDataResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetCallbackDataResponse.ProtoReflect.Descriptor instead. -func (*QueryGetCallbackDataResponse) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryGetCallbackDataResponse) GetCallbackData() *CallbackData { - if x != nil { - return x.CallbackData - } - return nil -} - -type QueryAllCallbackDataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllCallbackDataRequest) Reset() { - *x = QueryAllCallbackDataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllCallbackDataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllCallbackDataRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllCallbackDataRequest.ProtoReflect.Descriptor instead. -func (*QueryAllCallbackDataRequest) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryAllCallbackDataRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryAllCallbackDataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CallbackData []*CallbackData `protobuf:"bytes,1,rep,name=callback_data,json=callbackData,proto3" json:"callback_data,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllCallbackDataResponse) Reset() { - *x = QueryAllCallbackDataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_icacallbacks_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllCallbackDataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllCallbackDataResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllCallbackDataResponse.ProtoReflect.Descriptor instead. -func (*QueryAllCallbackDataResponse) Descriptor() ([]byte, []int) { - return file_stride_icacallbacks_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryAllCallbackDataResponse) GetCallbackData() []*CallbackData { - if x != nil { - return x.CallbackData - } - return nil -} - -func (x *QueryAllCallbackDataResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -var File_stride_icacallbacks_query_proto protoreflect.FileDescriptor - -var file_stride_icacallbacks_query_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x13, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, - 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x63, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x40, 0x0a, 0x1b, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x4b, 0x65, 0x79, 0x22, 0x6c, 0x0a, 0x1c, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, - 0x6b, 0x44, 0x61, 0x74, 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x63, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x22, 0x65, 0x0a, 0x1b, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xb5, 0x01, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x43, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x0c, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, - 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x84, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x8c, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x27, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, - 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0xba, 0x01, 0x0a, 0x0c, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x30, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, - 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x65, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, - 0x3d, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, - 0x73, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2f, - 0x7b, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0xae, - 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x41, - 0x6c, 0x6c, 0x12, 0x30, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, - 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, - 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x6c, 0x6c, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, - 0x2e, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, - 0x73, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x42, - 0xcd, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, - 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x0a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x49, 0x58, 0xaa, 0x02, 0x13, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, - 0xca, 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xe2, 0x02, 0x1f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, - 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x3a, 0x3a, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_icacallbacks_query_proto_rawDescOnce sync.Once - file_stride_icacallbacks_query_proto_rawDescData = file_stride_icacallbacks_query_proto_rawDesc -) - -func file_stride_icacallbacks_query_proto_rawDescGZIP() []byte { - file_stride_icacallbacks_query_proto_rawDescOnce.Do(func() { - file_stride_icacallbacks_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_icacallbacks_query_proto_rawDescData) - }) - return file_stride_icacallbacks_query_proto_rawDescData -} - -var file_stride_icacallbacks_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_stride_icacallbacks_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: stride.icacallbacks.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: stride.icacallbacks.QueryParamsResponse - (*QueryGetCallbackDataRequest)(nil), // 2: stride.icacallbacks.QueryGetCallbackDataRequest - (*QueryGetCallbackDataResponse)(nil), // 3: stride.icacallbacks.QueryGetCallbackDataResponse - (*QueryAllCallbackDataRequest)(nil), // 4: stride.icacallbacks.QueryAllCallbackDataRequest - (*QueryAllCallbackDataResponse)(nil), // 5: stride.icacallbacks.QueryAllCallbackDataResponse - (*Params)(nil), // 6: stride.icacallbacks.Params - (*CallbackData)(nil), // 7: stride.icacallbacks.CallbackData - (*v1beta1.PageRequest)(nil), // 8: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 9: cosmos.base.query.v1beta1.PageResponse -} -var file_stride_icacallbacks_query_proto_depIdxs = []int32{ - 6, // 0: stride.icacallbacks.QueryParamsResponse.params:type_name -> stride.icacallbacks.Params - 7, // 1: stride.icacallbacks.QueryGetCallbackDataResponse.callback_data:type_name -> stride.icacallbacks.CallbackData - 8, // 2: stride.icacallbacks.QueryAllCallbackDataRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 7, // 3: stride.icacallbacks.QueryAllCallbackDataResponse.callback_data:type_name -> stride.icacallbacks.CallbackData - 9, // 4: stride.icacallbacks.QueryAllCallbackDataResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 0, // 5: stride.icacallbacks.Query.Params:input_type -> stride.icacallbacks.QueryParamsRequest - 2, // 6: stride.icacallbacks.Query.CallbackData:input_type -> stride.icacallbacks.QueryGetCallbackDataRequest - 4, // 7: stride.icacallbacks.Query.CallbackDataAll:input_type -> stride.icacallbacks.QueryAllCallbackDataRequest - 1, // 8: stride.icacallbacks.Query.Params:output_type -> stride.icacallbacks.QueryParamsResponse - 3, // 9: stride.icacallbacks.Query.CallbackData:output_type -> stride.icacallbacks.QueryGetCallbackDataResponse - 5, // 10: stride.icacallbacks.Query.CallbackDataAll:output_type -> stride.icacallbacks.QueryAllCallbackDataResponse - 8, // [8:11] is the sub-list for method output_type - 5, // [5:8] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_stride_icacallbacks_query_proto_init() } -func file_stride_icacallbacks_query_proto_init() { - if File_stride_icacallbacks_query_proto != nil { - return - } - file_stride_icacallbacks_params_proto_init() - file_stride_icacallbacks_callback_data_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_icacallbacks_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_icacallbacks_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_icacallbacks_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetCallbackDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_icacallbacks_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetCallbackDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_icacallbacks_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllCallbackDataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_icacallbacks_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllCallbackDataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_icacallbacks_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 6, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_stride_icacallbacks_query_proto_goTypes, - DependencyIndexes: file_stride_icacallbacks_query_proto_depIdxs, - MessageInfos: file_stride_icacallbacks_query_proto_msgTypes, - }.Build() - File_stride_icacallbacks_query_proto = out.File - file_stride_icacallbacks_query_proto_rawDesc = nil - file_stride_icacallbacks_query_proto_goTypes = nil - file_stride_icacallbacks_query_proto_depIdxs = nil -} diff --git a/api/stride/icacallbacks/query_grpc.pb.go b/api/stride/icacallbacks/query_grpc.pb.go deleted file mode 100644 index 32a8daab6..000000000 --- a/api/stride/icacallbacks/query_grpc.pb.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: stride/icacallbacks/query.proto - -package icacallbacks - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Query_Params_FullMethodName = "/stride.icacallbacks.Query/Params" - Query_CallbackData_FullMethodName = "/stride.icacallbacks.Query/CallbackData" - Query_CallbackDataAll_FullMethodName = "/stride.icacallbacks.Query/CallbackDataAll" -) - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Query defines the gRPC querier service. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Queries a CallbackData by index. - CallbackData(ctx context.Context, in *QueryGetCallbackDataRequest, opts ...grpc.CallOption) (*QueryGetCallbackDataResponse, error) - // Queries a list of CallbackData items. - CallbackDataAll(ctx context.Context, in *QueryAllCallbackDataRequest, opts ...grpc.CallOption) (*QueryAllCallbackDataResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CallbackData(ctx context.Context, in *QueryGetCallbackDataRequest, opts ...grpc.CallOption) (*QueryGetCallbackDataResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryGetCallbackDataResponse) - err := c.cc.Invoke(ctx, Query_CallbackData_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CallbackDataAll(ctx context.Context, in *QueryAllCallbackDataRequest, opts ...grpc.CallOption) (*QueryAllCallbackDataResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAllCallbackDataResponse) - err := c.cc.Invoke(ctx, Query_CallbackDataAll_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility. -// -// Query defines the gRPC querier service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Queries a CallbackData by index. - CallbackData(context.Context, *QueryGetCallbackDataRequest) (*QueryGetCallbackDataResponse, error) - // Queries a list of CallbackData items. - CallbackDataAll(context.Context, *QueryAllCallbackDataRequest) (*QueryAllCallbackDataResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedQueryServer struct{} - -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) CallbackData(context.Context, *QueryGetCallbackDataRequest) (*QueryGetCallbackDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallbackData not implemented") -} -func (UnimplementedQueryServer) CallbackDataAll(context.Context, *QueryAllCallbackDataRequest) (*QueryAllCallbackDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallbackDataAll not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} -func (UnimplementedQueryServer) testEmbeddedByValue() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - // If the following call pancis, it indicates UnimplementedQueryServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Params_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CallbackData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetCallbackDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CallbackData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_CallbackData_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CallbackData(ctx, req.(*QueryGetCallbackDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CallbackDataAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllCallbackDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CallbackDataAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_CallbackDataAll_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CallbackDataAll(ctx, req.(*QueryAllCallbackDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "stride.icacallbacks.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "CallbackData", - Handler: _Query_CallbackData_Handler, - }, - { - MethodName: "CallbackDataAll", - Handler: _Query_CallbackDataAll_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/icacallbacks/query.proto", -} diff --git a/api/stride/icacallbacks/tx.pulsar.go b/api/stride/icacallbacks/tx.pulsar.go deleted file mode 100644 index 532e52e67..000000000 --- a/api/stride/icacallbacks/tx.pulsar.go +++ /dev/null @@ -1,79 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package icacallbacks - -import ( - _ "cosmossdk.io/api/cosmos/msg/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/icacallbacks/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_stride_icacallbacks_tx_proto protoreflect.FileDescriptor - -var file_stride_icacallbacks_tx_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x73, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x0c, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xca, 0x01, 0x0a, 0x17, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, - 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, - 0x69, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xa2, 0x02, 0x03, 0x53, - 0x49, 0x58, 0xaa, 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x49, 0x63, 0x61, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xca, 0x02, 0x13, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x5c, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0xe2, 0x02, - 0x1f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x63, 0x61, 0x63, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x14, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x49, 0x63, 0x61, 0x63, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_stride_icacallbacks_tx_proto_goTypes = []interface{}{} -var file_stride_icacallbacks_tx_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_stride_icacallbacks_tx_proto_init() } -func file_stride_icacallbacks_tx_proto_init() { - if File_stride_icacallbacks_tx_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_icacallbacks_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_stride_icacallbacks_tx_proto_goTypes, - DependencyIndexes: file_stride_icacallbacks_tx_proto_depIdxs, - }.Build() - File_stride_icacallbacks_tx_proto = out.File - file_stride_icacallbacks_tx_proto_rawDesc = nil - file_stride_icacallbacks_tx_proto_goTypes = nil - file_stride_icacallbacks_tx_proto_depIdxs = nil -} diff --git a/api/stride/icacallbacks/tx_grpc.pb.go b/api/stride/icacallbacks/tx_grpc.pb.go deleted file mode 100644 index 0a441d207..000000000 --- a/api/stride/icacallbacks/tx_grpc.pb.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: stride/icacallbacks/tx.proto - -package icacallbacks - -import ( - grpc "google.golang.org/grpc" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Msg defines the Msg service. -type MsgClient interface { -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility. -// -// Msg defines the Msg service. -type MsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMsgServer struct{} - -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} -func (UnimplementedMsgServer) testEmbeddedByValue() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - // If the following call pancis, it indicates UnimplementedMsgServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Msg_ServiceDesc, srv) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "stride.icacallbacks.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/icacallbacks/tx.proto", -} diff --git a/api/stride/interchainquery/v1/genesis.pulsar.go b/api/stride/interchainquery/v1/genesis.pulsar.go deleted file mode 100644 index 092b7a51d..000000000 --- a/api/stride/interchainquery/v1/genesis.pulsar.go +++ /dev/null @@ -1,2751 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package interchainqueryv1 - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Query protoreflect.MessageDescriptor - fd_Query_id protoreflect.FieldDescriptor - fd_Query_connection_id protoreflect.FieldDescriptor - fd_Query_chain_id protoreflect.FieldDescriptor - fd_Query_query_type protoreflect.FieldDescriptor - fd_Query_request_data protoreflect.FieldDescriptor - fd_Query_callback_module protoreflect.FieldDescriptor - fd_Query_callback_id protoreflect.FieldDescriptor - fd_Query_callback_data protoreflect.FieldDescriptor - fd_Query_timeout_policy protoreflect.FieldDescriptor - fd_Query_timeout_duration protoreflect.FieldDescriptor - fd_Query_timeout_timestamp protoreflect.FieldDescriptor - fd_Query_request_sent protoreflect.FieldDescriptor - fd_Query_submission_height protoreflect.FieldDescriptor -) - -func init() { - file_stride_interchainquery_v1_genesis_proto_init() - md_Query = File_stride_interchainquery_v1_genesis_proto.Messages().ByName("Query") - fd_Query_id = md_Query.Fields().ByName("id") - fd_Query_connection_id = md_Query.Fields().ByName("connection_id") - fd_Query_chain_id = md_Query.Fields().ByName("chain_id") - fd_Query_query_type = md_Query.Fields().ByName("query_type") - fd_Query_request_data = md_Query.Fields().ByName("request_data") - fd_Query_callback_module = md_Query.Fields().ByName("callback_module") - fd_Query_callback_id = md_Query.Fields().ByName("callback_id") - fd_Query_callback_data = md_Query.Fields().ByName("callback_data") - fd_Query_timeout_policy = md_Query.Fields().ByName("timeout_policy") - fd_Query_timeout_duration = md_Query.Fields().ByName("timeout_duration") - fd_Query_timeout_timestamp = md_Query.Fields().ByName("timeout_timestamp") - fd_Query_request_sent = md_Query.Fields().ByName("request_sent") - fd_Query_submission_height = md_Query.Fields().ByName("submission_height") -} - -var _ protoreflect.Message = (*fastReflection_Query)(nil) - -type fastReflection_Query Query - -func (x *Query) ProtoReflect() protoreflect.Message { - return (*fastReflection_Query)(x) -} - -func (x *Query) slowProtoReflect() protoreflect.Message { - mi := &file_stride_interchainquery_v1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Query_messageType fastReflection_Query_messageType -var _ protoreflect.MessageType = fastReflection_Query_messageType{} - -type fastReflection_Query_messageType struct{} - -func (x fastReflection_Query_messageType) Zero() protoreflect.Message { - return (*fastReflection_Query)(nil) -} -func (x fastReflection_Query_messageType) New() protoreflect.Message { - return new(fastReflection_Query) -} -func (x fastReflection_Query_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Query -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Query) Descriptor() protoreflect.MessageDescriptor { - return md_Query -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Query) Type() protoreflect.MessageType { - return _fastReflection_Query_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Query) New() protoreflect.Message { - return new(fastReflection_Query) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Query) Interface() protoreflect.ProtoMessage { - return (*Query)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Query) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Query_id, value) { - return - } - } - if x.ConnectionId != "" { - value := protoreflect.ValueOfString(x.ConnectionId) - if !f(fd_Query_connection_id, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_Query_chain_id, value) { - return - } - } - if x.QueryType != "" { - value := protoreflect.ValueOfString(x.QueryType) - if !f(fd_Query_query_type, value) { - return - } - } - if len(x.RequestData) != 0 { - value := protoreflect.ValueOfBytes(x.RequestData) - if !f(fd_Query_request_data, value) { - return - } - } - if x.CallbackModule != "" { - value := protoreflect.ValueOfString(x.CallbackModule) - if !f(fd_Query_callback_module, value) { - return - } - } - if x.CallbackId != "" { - value := protoreflect.ValueOfString(x.CallbackId) - if !f(fd_Query_callback_id, value) { - return - } - } - if len(x.CallbackData) != 0 { - value := protoreflect.ValueOfBytes(x.CallbackData) - if !f(fd_Query_callback_data, value) { - return - } - } - if x.TimeoutPolicy != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.TimeoutPolicy)) - if !f(fd_Query_timeout_policy, value) { - return - } - } - if x.TimeoutDuration != nil { - value := protoreflect.ValueOfMessage(x.TimeoutDuration.ProtoReflect()) - if !f(fd_Query_timeout_duration, value) { - return - } - } - if x.TimeoutTimestamp != uint64(0) { - value := protoreflect.ValueOfUint64(x.TimeoutTimestamp) - if !f(fd_Query_timeout_timestamp, value) { - return - } - } - if x.RequestSent != false { - value := protoreflect.ValueOfBool(x.RequestSent) - if !f(fd_Query_request_sent, value) { - return - } - } - if x.SubmissionHeight != uint64(0) { - value := protoreflect.ValueOfUint64(x.SubmissionHeight) - if !f(fd_Query_submission_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Query) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.interchainquery.v1.Query.id": - return x.Id != "" - case "stride.interchainquery.v1.Query.connection_id": - return x.ConnectionId != "" - case "stride.interchainquery.v1.Query.chain_id": - return x.ChainId != "" - case "stride.interchainquery.v1.Query.query_type": - return x.QueryType != "" - case "stride.interchainquery.v1.Query.request_data": - return len(x.RequestData) != 0 - case "stride.interchainquery.v1.Query.callback_module": - return x.CallbackModule != "" - case "stride.interchainquery.v1.Query.callback_id": - return x.CallbackId != "" - case "stride.interchainquery.v1.Query.callback_data": - return len(x.CallbackData) != 0 - case "stride.interchainquery.v1.Query.timeout_policy": - return x.TimeoutPolicy != 0 - case "stride.interchainquery.v1.Query.timeout_duration": - return x.TimeoutDuration != nil - case "stride.interchainquery.v1.Query.timeout_timestamp": - return x.TimeoutTimestamp != uint64(0) - case "stride.interchainquery.v1.Query.request_sent": - return x.RequestSent != false - case "stride.interchainquery.v1.Query.submission_height": - return x.SubmissionHeight != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.Query")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.Query does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Query) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.interchainquery.v1.Query.id": - x.Id = "" - case "stride.interchainquery.v1.Query.connection_id": - x.ConnectionId = "" - case "stride.interchainquery.v1.Query.chain_id": - x.ChainId = "" - case "stride.interchainquery.v1.Query.query_type": - x.QueryType = "" - case "stride.interchainquery.v1.Query.request_data": - x.RequestData = nil - case "stride.interchainquery.v1.Query.callback_module": - x.CallbackModule = "" - case "stride.interchainquery.v1.Query.callback_id": - x.CallbackId = "" - case "stride.interchainquery.v1.Query.callback_data": - x.CallbackData = nil - case "stride.interchainquery.v1.Query.timeout_policy": - x.TimeoutPolicy = 0 - case "stride.interchainquery.v1.Query.timeout_duration": - x.TimeoutDuration = nil - case "stride.interchainquery.v1.Query.timeout_timestamp": - x.TimeoutTimestamp = uint64(0) - case "stride.interchainquery.v1.Query.request_sent": - x.RequestSent = false - case "stride.interchainquery.v1.Query.submission_height": - x.SubmissionHeight = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.Query")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.Query does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Query) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.interchainquery.v1.Query.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.Query.connection_id": - value := x.ConnectionId - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.Query.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.Query.query_type": - value := x.QueryType - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.Query.request_data": - value := x.RequestData - return protoreflect.ValueOfBytes(value) - case "stride.interchainquery.v1.Query.callback_module": - value := x.CallbackModule - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.Query.callback_id": - value := x.CallbackId - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.Query.callback_data": - value := x.CallbackData - return protoreflect.ValueOfBytes(value) - case "stride.interchainquery.v1.Query.timeout_policy": - value := x.TimeoutPolicy - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "stride.interchainquery.v1.Query.timeout_duration": - value := x.TimeoutDuration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.interchainquery.v1.Query.timeout_timestamp": - value := x.TimeoutTimestamp - return protoreflect.ValueOfUint64(value) - case "stride.interchainquery.v1.Query.request_sent": - value := x.RequestSent - return protoreflect.ValueOfBool(value) - case "stride.interchainquery.v1.Query.submission_height": - value := x.SubmissionHeight - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.Query")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.Query does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Query) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.interchainquery.v1.Query.id": - x.Id = value.Interface().(string) - case "stride.interchainquery.v1.Query.connection_id": - x.ConnectionId = value.Interface().(string) - case "stride.interchainquery.v1.Query.chain_id": - x.ChainId = value.Interface().(string) - case "stride.interchainquery.v1.Query.query_type": - x.QueryType = value.Interface().(string) - case "stride.interchainquery.v1.Query.request_data": - x.RequestData = value.Bytes() - case "stride.interchainquery.v1.Query.callback_module": - x.CallbackModule = value.Interface().(string) - case "stride.interchainquery.v1.Query.callback_id": - x.CallbackId = value.Interface().(string) - case "stride.interchainquery.v1.Query.callback_data": - x.CallbackData = value.Bytes() - case "stride.interchainquery.v1.Query.timeout_policy": - x.TimeoutPolicy = (TimeoutPolicy)(value.Enum()) - case "stride.interchainquery.v1.Query.timeout_duration": - x.TimeoutDuration = value.Message().Interface().(*durationpb.Duration) - case "stride.interchainquery.v1.Query.timeout_timestamp": - x.TimeoutTimestamp = value.Uint() - case "stride.interchainquery.v1.Query.request_sent": - x.RequestSent = value.Bool() - case "stride.interchainquery.v1.Query.submission_height": - x.SubmissionHeight = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.Query")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.Query does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Query) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.Query.timeout_duration": - if x.TimeoutDuration == nil { - x.TimeoutDuration = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.TimeoutDuration.ProtoReflect()) - case "stride.interchainquery.v1.Query.id": - panic(fmt.Errorf("field id of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.connection_id": - panic(fmt.Errorf("field connection_id of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.chain_id": - panic(fmt.Errorf("field chain_id of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.query_type": - panic(fmt.Errorf("field query_type of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.request_data": - panic(fmt.Errorf("field request_data of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.callback_module": - panic(fmt.Errorf("field callback_module of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.callback_id": - panic(fmt.Errorf("field callback_id of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.callback_data": - panic(fmt.Errorf("field callback_data of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.timeout_policy": - panic(fmt.Errorf("field timeout_policy of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.timeout_timestamp": - panic(fmt.Errorf("field timeout_timestamp of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.request_sent": - panic(fmt.Errorf("field request_sent of message stride.interchainquery.v1.Query is not mutable")) - case "stride.interchainquery.v1.Query.submission_height": - panic(fmt.Errorf("field submission_height of message stride.interchainquery.v1.Query is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.Query")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.Query does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Query) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.Query.id": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.Query.connection_id": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.Query.chain_id": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.Query.query_type": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.Query.request_data": - return protoreflect.ValueOfBytes(nil) - case "stride.interchainquery.v1.Query.callback_module": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.Query.callback_id": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.Query.callback_data": - return protoreflect.ValueOfBytes(nil) - case "stride.interchainquery.v1.Query.timeout_policy": - return protoreflect.ValueOfEnum(0) - case "stride.interchainquery.v1.Query.timeout_duration": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.interchainquery.v1.Query.timeout_timestamp": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.interchainquery.v1.Query.request_sent": - return protoreflect.ValueOfBool(false) - case "stride.interchainquery.v1.Query.submission_height": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.Query")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.Query does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Query) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.interchainquery.v1.Query", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Query) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Query) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Query) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Query) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Query) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ConnectionId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.QueryType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RequestData) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CallbackModule) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CallbackId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CallbackData) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TimeoutPolicy != 0 { - n += 1 + runtime.Sov(uint64(x.TimeoutPolicy)) - } - if x.TimeoutDuration != nil { - l = options.Size(x.TimeoutDuration) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TimeoutTimestamp != 0 { - n += 1 + runtime.Sov(uint64(x.TimeoutTimestamp)) - } - if x.RequestSent { - n += 2 - } - if x.SubmissionHeight != 0 { - n += 2 + runtime.Sov(uint64(x.SubmissionHeight)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Query) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.SubmissionHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.SubmissionHeight)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if x.TimeoutPolicy != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TimeoutPolicy)) - i-- - dAtA[i] = 0x78 - } - if x.TimeoutDuration != nil { - encoded, err := options.Marshal(x.TimeoutDuration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x72 - } - if len(x.CallbackModule) > 0 { - i -= len(x.CallbackModule) - copy(dAtA[i:], x.CallbackModule) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CallbackModule))) - i-- - dAtA[i] = 0x6a - } - if len(x.CallbackData) > 0 { - i -= len(x.CallbackData) - copy(dAtA[i:], x.CallbackData) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CallbackData))) - i-- - dAtA[i] = 0x62 - } - if x.RequestSent { - i-- - if x.RequestSent { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if x.TimeoutTimestamp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.TimeoutTimestamp)) - i-- - dAtA[i] = 0x48 - } - if len(x.CallbackId) > 0 { - i -= len(x.CallbackId) - copy(dAtA[i:], x.CallbackId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CallbackId))) - i-- - dAtA[i] = 0x42 - } - if len(x.RequestData) > 0 { - i -= len(x.RequestData) - copy(dAtA[i:], x.RequestData) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RequestData))) - i-- - dAtA[i] = 0x2a - } - if len(x.QueryType) > 0 { - i -= len(x.QueryType) - copy(dAtA[i:], x.QueryType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryType))) - i-- - dAtA[i] = 0x22 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x1a - } - if len(x.ConnectionId) > 0 { - i -= len(x.ConnectionId) - copy(dAtA[i:], x.ConnectionId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConnectionId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Query) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Query: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.QueryType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RequestData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RequestData = append(x.RequestData[:0], dAtA[iNdEx:postIndex]...) - if x.RequestData == nil { - x.RequestData = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackModule", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CallbackModule = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CallbackId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CallbackData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CallbackData = append(x.CallbackData[:0], dAtA[iNdEx:postIndex]...) - if x.CallbackData == nil { - x.CallbackData = []byte{} - } - iNdEx = postIndex - case 15: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TimeoutPolicy", wireType) - } - x.TimeoutPolicy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TimeoutPolicy |= TimeoutPolicy(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TimeoutDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.TimeoutDuration == nil { - x.TimeoutDuration = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TimeoutDuration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) - } - x.TimeoutTimestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.TimeoutTimestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RequestSent", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.RequestSent = bool(v != 0) - case 16: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubmissionHeight", wireType) - } - x.SubmissionHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.SubmissionHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DataPoint protoreflect.MessageDescriptor - fd_DataPoint_id protoreflect.FieldDescriptor - fd_DataPoint_remote_height protoreflect.FieldDescriptor - fd_DataPoint_local_height protoreflect.FieldDescriptor - fd_DataPoint_value protoreflect.FieldDescriptor -) - -func init() { - file_stride_interchainquery_v1_genesis_proto_init() - md_DataPoint = File_stride_interchainquery_v1_genesis_proto.Messages().ByName("DataPoint") - fd_DataPoint_id = md_DataPoint.Fields().ByName("id") - fd_DataPoint_remote_height = md_DataPoint.Fields().ByName("remote_height") - fd_DataPoint_local_height = md_DataPoint.Fields().ByName("local_height") - fd_DataPoint_value = md_DataPoint.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_DataPoint)(nil) - -type fastReflection_DataPoint DataPoint - -func (x *DataPoint) ProtoReflect() protoreflect.Message { - return (*fastReflection_DataPoint)(x) -} - -func (x *DataPoint) slowProtoReflect() protoreflect.Message { - mi := &file_stride_interchainquery_v1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DataPoint_messageType fastReflection_DataPoint_messageType -var _ protoreflect.MessageType = fastReflection_DataPoint_messageType{} - -type fastReflection_DataPoint_messageType struct{} - -func (x fastReflection_DataPoint_messageType) Zero() protoreflect.Message { - return (*fastReflection_DataPoint)(nil) -} -func (x fastReflection_DataPoint_messageType) New() protoreflect.Message { - return new(fastReflection_DataPoint) -} -func (x fastReflection_DataPoint_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DataPoint -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DataPoint) Descriptor() protoreflect.MessageDescriptor { - return md_DataPoint -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_DataPoint) Type() protoreflect.MessageType { - return _fastReflection_DataPoint_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DataPoint) New() protoreflect.Message { - return new(fastReflection_DataPoint) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DataPoint) Interface() protoreflect.ProtoMessage { - return (*DataPoint)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_DataPoint) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_DataPoint_id, value) { - return - } - } - if x.RemoteHeight != "" { - value := protoreflect.ValueOfString(x.RemoteHeight) - if !f(fd_DataPoint_remote_height, value) { - return - } - } - if x.LocalHeight != "" { - value := protoreflect.ValueOfString(x.LocalHeight) - if !f(fd_DataPoint_local_height, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_DataPoint_value, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DataPoint) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.interchainquery.v1.DataPoint.id": - return x.Id != "" - case "stride.interchainquery.v1.DataPoint.remote_height": - return x.RemoteHeight != "" - case "stride.interchainquery.v1.DataPoint.local_height": - return x.LocalHeight != "" - case "stride.interchainquery.v1.DataPoint.value": - return len(x.Value) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.DataPoint")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.DataPoint does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DataPoint) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.interchainquery.v1.DataPoint.id": - x.Id = "" - case "stride.interchainquery.v1.DataPoint.remote_height": - x.RemoteHeight = "" - case "stride.interchainquery.v1.DataPoint.local_height": - x.LocalHeight = "" - case "stride.interchainquery.v1.DataPoint.value": - x.Value = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.DataPoint")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.DataPoint does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_DataPoint) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.interchainquery.v1.DataPoint.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.DataPoint.remote_height": - value := x.RemoteHeight - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.DataPoint.local_height": - value := x.LocalHeight - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.DataPoint.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.DataPoint")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.DataPoint does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DataPoint) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.interchainquery.v1.DataPoint.id": - x.Id = value.Interface().(string) - case "stride.interchainquery.v1.DataPoint.remote_height": - x.RemoteHeight = value.Interface().(string) - case "stride.interchainquery.v1.DataPoint.local_height": - x.LocalHeight = value.Interface().(string) - case "stride.interchainquery.v1.DataPoint.value": - x.Value = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.DataPoint")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.DataPoint does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DataPoint) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.DataPoint.id": - panic(fmt.Errorf("field id of message stride.interchainquery.v1.DataPoint is not mutable")) - case "stride.interchainquery.v1.DataPoint.remote_height": - panic(fmt.Errorf("field remote_height of message stride.interchainquery.v1.DataPoint is not mutable")) - case "stride.interchainquery.v1.DataPoint.local_height": - panic(fmt.Errorf("field local_height of message stride.interchainquery.v1.DataPoint is not mutable")) - case "stride.interchainquery.v1.DataPoint.value": - panic(fmt.Errorf("field value of message stride.interchainquery.v1.DataPoint is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.DataPoint")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.DataPoint does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_DataPoint) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.DataPoint.id": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.DataPoint.remote_height": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.DataPoint.local_height": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.DataPoint.value": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.DataPoint")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.DataPoint does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_DataPoint) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.interchainquery.v1.DataPoint", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_DataPoint) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DataPoint) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_DataPoint) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_DataPoint) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DataPoint) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RemoteHeight) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LocalHeight) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DataPoint) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x22 - } - if len(x.LocalHeight) > 0 { - i -= len(x.LocalHeight) - copy(dAtA[i:], x.LocalHeight) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LocalHeight))) - i-- - dAtA[i] = 0x1a - } - if len(x.RemoteHeight) > 0 { - i -= len(x.RemoteHeight) - copy(dAtA[i:], x.RemoteHeight) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RemoteHeight))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DataPoint) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RemoteHeight", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RemoteHeight = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LocalHeight", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LocalHeight = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_GenesisState_1_list)(nil) - -type _GenesisState_1_list struct { - list *[]*Query -} - -func (x *_GenesisState_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Query) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Query) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_1_list) AppendMutable() protoreflect.Value { - v := new(Query) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_1_list) NewElement() protoreflect.Value { - v := new(Query) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_queries protoreflect.FieldDescriptor -) - -func init() { - file_stride_interchainquery_v1_genesis_proto_init() - md_GenesisState = File_stride_interchainquery_v1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_queries = md_GenesisState.Fields().ByName("queries") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_stride_interchainquery_v1_genesis_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Queries) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_1_list{list: &x.Queries}) - if !f(fd_GenesisState_queries, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.interchainquery.v1.GenesisState.queries": - return len(x.Queries) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.GenesisState")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.interchainquery.v1.GenesisState.queries": - x.Queries = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.GenesisState")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.interchainquery.v1.GenesisState.queries": - if len(x.Queries) == 0 { - return protoreflect.ValueOfList(&_GenesisState_1_list{}) - } - listValue := &_GenesisState_1_list{list: &x.Queries} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.GenesisState")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.interchainquery.v1.GenesisState.queries": - lv := value.List() - clv := lv.(*_GenesisState_1_list) - x.Queries = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.GenesisState")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.GenesisState.queries": - if x.Queries == nil { - x.Queries = []*Query{} - } - value := &_GenesisState_1_list{list: &x.Queries} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.GenesisState")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.GenesisState.queries": - list := []*Query{} - return protoreflect.ValueOfList(&_GenesisState_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.GenesisState")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.interchainquery.v1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Queries) > 0 { - for _, e := range x.Queries { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Queries) > 0 { - for iNdEx := len(x.Queries) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Queries[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Queries = append(x.Queries, &Query{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Queries[len(x.Queries)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/interchainquery/v1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TimeoutPolicy int32 - -const ( - TimeoutPolicy_REJECT_QUERY_RESPONSE TimeoutPolicy = 0 - TimeoutPolicy_RETRY_QUERY_REQUEST TimeoutPolicy = 1 - TimeoutPolicy_EXECUTE_QUERY_CALLBACK TimeoutPolicy = 2 -) - -// Enum value maps for TimeoutPolicy. -var ( - TimeoutPolicy_name = map[int32]string{ - 0: "REJECT_QUERY_RESPONSE", - 1: "RETRY_QUERY_REQUEST", - 2: "EXECUTE_QUERY_CALLBACK", - } - TimeoutPolicy_value = map[string]int32{ - "REJECT_QUERY_RESPONSE": 0, - "RETRY_QUERY_REQUEST": 1, - "EXECUTE_QUERY_CALLBACK": 2, - } -) - -func (x TimeoutPolicy) Enum() *TimeoutPolicy { - p := new(TimeoutPolicy) - *p = x - return p -} - -func (x TimeoutPolicy) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TimeoutPolicy) Descriptor() protoreflect.EnumDescriptor { - return file_stride_interchainquery_v1_genesis_proto_enumTypes[0].Descriptor() -} - -func (TimeoutPolicy) Type() protoreflect.EnumType { - return &file_stride_interchainquery_v1_genesis_proto_enumTypes[0] -} - -func (x TimeoutPolicy) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TimeoutPolicy.Descriptor instead. -func (TimeoutPolicy) EnumDescriptor() ([]byte, []int) { - return file_stride_interchainquery_v1_genesis_proto_rawDescGZIP(), []int{0} -} - -type Query struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - QueryType string `protobuf:"bytes,4,opt,name=query_type,json=queryType,proto3" json:"query_type,omitempty"` - RequestData []byte `protobuf:"bytes,5,opt,name=request_data,json=requestData,proto3" json:"request_data,omitempty"` - CallbackModule string `protobuf:"bytes,13,opt,name=callback_module,json=callbackModule,proto3" json:"callback_module,omitempty"` - CallbackId string `protobuf:"bytes,8,opt,name=callback_id,json=callbackId,proto3" json:"callback_id,omitempty"` - CallbackData []byte `protobuf:"bytes,12,opt,name=callback_data,json=callbackData,proto3" json:"callback_data,omitempty"` - TimeoutPolicy TimeoutPolicy `protobuf:"varint,15,opt,name=timeout_policy,json=timeoutPolicy,proto3,enum=stride.interchainquery.v1.TimeoutPolicy" json:"timeout_policy,omitempty"` - TimeoutDuration *durationpb.Duration `protobuf:"bytes,14,opt,name=timeout_duration,json=timeoutDuration,proto3" json:"timeout_duration,omitempty"` - TimeoutTimestamp uint64 `protobuf:"varint,9,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - RequestSent bool `protobuf:"varint,11,opt,name=request_sent,json=requestSent,proto3" json:"request_sent,omitempty"` - SubmissionHeight uint64 `protobuf:"varint,16,opt,name=submission_height,json=submissionHeight,proto3" json:"submission_height,omitempty"` -} - -func (x *Query) Reset() { - *x = Query{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_interchainquery_v1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Query) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Query) ProtoMessage() {} - -// Deprecated: Use Query.ProtoReflect.Descriptor instead. -func (*Query) Descriptor() ([]byte, []int) { - return file_stride_interchainquery_v1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *Query) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Query) GetConnectionId() string { - if x != nil { - return x.ConnectionId - } - return "" -} - -func (x *Query) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *Query) GetQueryType() string { - if x != nil { - return x.QueryType - } - return "" -} - -func (x *Query) GetRequestData() []byte { - if x != nil { - return x.RequestData - } - return nil -} - -func (x *Query) GetCallbackModule() string { - if x != nil { - return x.CallbackModule - } - return "" -} - -func (x *Query) GetCallbackId() string { - if x != nil { - return x.CallbackId - } - return "" -} - -func (x *Query) GetCallbackData() []byte { - if x != nil { - return x.CallbackData - } - return nil -} - -func (x *Query) GetTimeoutPolicy() TimeoutPolicy { - if x != nil { - return x.TimeoutPolicy - } - return TimeoutPolicy_REJECT_QUERY_RESPONSE -} - -func (x *Query) GetTimeoutDuration() *durationpb.Duration { - if x != nil { - return x.TimeoutDuration - } - return nil -} - -func (x *Query) GetTimeoutTimestamp() uint64 { - if x != nil { - return x.TimeoutTimestamp - } - return 0 -} - -func (x *Query) GetRequestSent() bool { - if x != nil { - return x.RequestSent - } - return false -} - -func (x *Query) GetSubmissionHeight() uint64 { - if x != nil { - return x.SubmissionHeight - } - return 0 -} - -type DataPoint struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - RemoteHeight string `protobuf:"bytes,2,opt,name=remote_height,json=remoteHeight,proto3" json:"remote_height,omitempty"` - LocalHeight string `protobuf:"bytes,3,opt,name=local_height,json=localHeight,proto3" json:"local_height,omitempty"` - Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *DataPoint) Reset() { - *x = DataPoint{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_interchainquery_v1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DataPoint) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DataPoint) ProtoMessage() {} - -// Deprecated: Use DataPoint.ProtoReflect.Descriptor instead. -func (*DataPoint) Descriptor() ([]byte, []int) { - return file_stride_interchainquery_v1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *DataPoint) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *DataPoint) GetRemoteHeight() string { - if x != nil { - return x.RemoteHeight - } - return "" -} - -func (x *DataPoint) GetLocalHeight() string { - if x != nil { - return x.LocalHeight - } - return "" -} - -func (x *DataPoint) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -// GenesisState defines the epochs module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Queries []*Query `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_interchainquery_v1_genesis_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_stride_interchainquery_v1_genesis_proto_rawDescGZIP(), []int{2} -} - -func (x *GenesisState) GetQueries() []*Query { - if x != nil { - return x.Queries - } - return nil -} - -var File_stride_interchainquery_v1_genesis_proto protoreflect.FileDescriptor - -var file_stride_interchainquery_v1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x71, 0x75, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x61, 0x6c, 0x6c, - 0x62, 0x61, 0x63, 0x6b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x4f, 0x0a, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 0x12, 0x4e, 0x0a, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, - 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x21, - 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x53, 0x65, 0x6e, - 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x73, 0x75, - 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xe9, - 0x01, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x50, 0x0a, 0x0d, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, - 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, - 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x4e, - 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, - 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, - 0x74, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2a, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x14, 0xea, - 0xde, 0x1f, 0x10, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, - 0x70, 0x74, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x50, 0x0a, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x71, 0x75, - 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x2a, 0x5f, 0x0a, 0x0d, - 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x19, 0x0a, - 0x15, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x52, 0x45, - 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x54, 0x52, - 0x59, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, - 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x5f, 0x51, 0x55, 0x45, - 0x52, 0x59, 0x5f, 0x43, 0x41, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x42, 0x86, 0x02, - 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, - 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x51, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, - 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, - 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, - 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x49, 0x58, 0xaa, 0x02, 0x19, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x25, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x3a, 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_interchainquery_v1_genesis_proto_rawDescOnce sync.Once - file_stride_interchainquery_v1_genesis_proto_rawDescData = file_stride_interchainquery_v1_genesis_proto_rawDesc -) - -func file_stride_interchainquery_v1_genesis_proto_rawDescGZIP() []byte { - file_stride_interchainquery_v1_genesis_proto_rawDescOnce.Do(func() { - file_stride_interchainquery_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_interchainquery_v1_genesis_proto_rawDescData) - }) - return file_stride_interchainquery_v1_genesis_proto_rawDescData -} - -var file_stride_interchainquery_v1_genesis_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_stride_interchainquery_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_stride_interchainquery_v1_genesis_proto_goTypes = []interface{}{ - (TimeoutPolicy)(0), // 0: stride.interchainquery.v1.TimeoutPolicy - (*Query)(nil), // 1: stride.interchainquery.v1.Query - (*DataPoint)(nil), // 2: stride.interchainquery.v1.DataPoint - (*GenesisState)(nil), // 3: stride.interchainquery.v1.GenesisState - (*durationpb.Duration)(nil), // 4: google.protobuf.Duration -} -var file_stride_interchainquery_v1_genesis_proto_depIdxs = []int32{ - 0, // 0: stride.interchainquery.v1.Query.timeout_policy:type_name -> stride.interchainquery.v1.TimeoutPolicy - 4, // 1: stride.interchainquery.v1.Query.timeout_duration:type_name -> google.protobuf.Duration - 1, // 2: stride.interchainquery.v1.GenesisState.queries:type_name -> stride.interchainquery.v1.Query - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_stride_interchainquery_v1_genesis_proto_init() } -func file_stride_interchainquery_v1_genesis_proto_init() { - if File_stride_interchainquery_v1_genesis_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_interchainquery_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Query); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_interchainquery_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DataPoint); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_interchainquery_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_interchainquery_v1_genesis_proto_rawDesc, - NumEnums: 1, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_interchainquery_v1_genesis_proto_goTypes, - DependencyIndexes: file_stride_interchainquery_v1_genesis_proto_depIdxs, - EnumInfos: file_stride_interchainquery_v1_genesis_proto_enumTypes, - MessageInfos: file_stride_interchainquery_v1_genesis_proto_msgTypes, - }.Build() - File_stride_interchainquery_v1_genesis_proto = out.File - file_stride_interchainquery_v1_genesis_proto_rawDesc = nil - file_stride_interchainquery_v1_genesis_proto_goTypes = nil - file_stride_interchainquery_v1_genesis_proto_depIdxs = nil -} diff --git a/api/stride/interchainquery/v1/messages.pulsar.go b/api/stride/interchainquery/v1/messages.pulsar.go deleted file mode 100644 index 3ba0b9a9b..000000000 --- a/api/stride/interchainquery/v1/messages.pulsar.go +++ /dev/null @@ -1,1391 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package interchainqueryv1 - -import ( - _ "cosmossdk.io/api/amino" - _ "cosmossdk.io/api/cosmos/msg/v1" - crypto "cosmossdk.io/api/tendermint/crypto" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgSubmitQueryResponse protoreflect.MessageDescriptor - fd_MsgSubmitQueryResponse_chain_id protoreflect.FieldDescriptor - fd_MsgSubmitQueryResponse_query_id protoreflect.FieldDescriptor - fd_MsgSubmitQueryResponse_result protoreflect.FieldDescriptor - fd_MsgSubmitQueryResponse_proof_ops protoreflect.FieldDescriptor - fd_MsgSubmitQueryResponse_height protoreflect.FieldDescriptor - fd_MsgSubmitQueryResponse_from_address protoreflect.FieldDescriptor -) - -func init() { - file_stride_interchainquery_v1_messages_proto_init() - md_MsgSubmitQueryResponse = File_stride_interchainquery_v1_messages_proto.Messages().ByName("MsgSubmitQueryResponse") - fd_MsgSubmitQueryResponse_chain_id = md_MsgSubmitQueryResponse.Fields().ByName("chain_id") - fd_MsgSubmitQueryResponse_query_id = md_MsgSubmitQueryResponse.Fields().ByName("query_id") - fd_MsgSubmitQueryResponse_result = md_MsgSubmitQueryResponse.Fields().ByName("result") - fd_MsgSubmitQueryResponse_proof_ops = md_MsgSubmitQueryResponse.Fields().ByName("proof_ops") - fd_MsgSubmitQueryResponse_height = md_MsgSubmitQueryResponse.Fields().ByName("height") - fd_MsgSubmitQueryResponse_from_address = md_MsgSubmitQueryResponse.Fields().ByName("from_address") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitQueryResponse)(nil) - -type fastReflection_MsgSubmitQueryResponse MsgSubmitQueryResponse - -func (x *MsgSubmitQueryResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitQueryResponse)(x) -} - -func (x *MsgSubmitQueryResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_interchainquery_v1_messages_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitQueryResponse_messageType fastReflection_MsgSubmitQueryResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitQueryResponse_messageType{} - -type fastReflection_MsgSubmitQueryResponse_messageType struct{} - -func (x fastReflection_MsgSubmitQueryResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitQueryResponse)(nil) -} -func (x fastReflection_MsgSubmitQueryResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitQueryResponse) -} -func (x fastReflection_MsgSubmitQueryResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitQueryResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitQueryResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitQueryResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSubmitQueryResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitQueryResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitQueryResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitQueryResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitQueryResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitQueryResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSubmitQueryResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgSubmitQueryResponse_chain_id, value) { - return - } - } - if x.QueryId != "" { - value := protoreflect.ValueOfString(x.QueryId) - if !f(fd_MsgSubmitQueryResponse_query_id, value) { - return - } - } - if len(x.Result) != 0 { - value := protoreflect.ValueOfBytes(x.Result) - if !f(fd_MsgSubmitQueryResponse_result, value) { - return - } - } - if x.ProofOps != nil { - value := protoreflect.ValueOfMessage(x.ProofOps.ProtoReflect()) - if !f(fd_MsgSubmitQueryResponse_proof_ops, value) { - return - } - } - if x.Height != int64(0) { - value := protoreflect.ValueOfInt64(x.Height) - if !f(fd_MsgSubmitQueryResponse_height, value) { - return - } - } - if x.FromAddress != "" { - value := protoreflect.ValueOfString(x.FromAddress) - if !f(fd_MsgSubmitQueryResponse_from_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSubmitQueryResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.interchainquery.v1.MsgSubmitQueryResponse.chain_id": - return x.ChainId != "" - case "stride.interchainquery.v1.MsgSubmitQueryResponse.query_id": - return x.QueryId != "" - case "stride.interchainquery.v1.MsgSubmitQueryResponse.result": - return len(x.Result) != 0 - case "stride.interchainquery.v1.MsgSubmitQueryResponse.proof_ops": - return x.ProofOps != nil - case "stride.interchainquery.v1.MsgSubmitQueryResponse.height": - return x.Height != int64(0) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.from_address": - return x.FromAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitQueryResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.interchainquery.v1.MsgSubmitQueryResponse.chain_id": - x.ChainId = "" - case "stride.interchainquery.v1.MsgSubmitQueryResponse.query_id": - x.QueryId = "" - case "stride.interchainquery.v1.MsgSubmitQueryResponse.result": - x.Result = nil - case "stride.interchainquery.v1.MsgSubmitQueryResponse.proof_ops": - x.ProofOps = nil - case "stride.interchainquery.v1.MsgSubmitQueryResponse.height": - x.Height = int64(0) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.from_address": - x.FromAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSubmitQueryResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.interchainquery.v1.MsgSubmitQueryResponse.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.query_id": - value := x.QueryId - return protoreflect.ValueOfString(value) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.result": - value := x.Result - return protoreflect.ValueOfBytes(value) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.proof_ops": - value := x.ProofOps - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.height": - value := x.Height - return protoreflect.ValueOfInt64(value) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.from_address": - value := x.FromAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitQueryResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.interchainquery.v1.MsgSubmitQueryResponse.chain_id": - x.ChainId = value.Interface().(string) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.query_id": - x.QueryId = value.Interface().(string) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.result": - x.Result = value.Bytes() - case "stride.interchainquery.v1.MsgSubmitQueryResponse.proof_ops": - x.ProofOps = value.Message().Interface().(*crypto.ProofOps) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.height": - x.Height = value.Int() - case "stride.interchainquery.v1.MsgSubmitQueryResponse.from_address": - x.FromAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitQueryResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.MsgSubmitQueryResponse.proof_ops": - if x.ProofOps == nil { - x.ProofOps = new(crypto.ProofOps) - } - return protoreflect.ValueOfMessage(x.ProofOps.ProtoReflect()) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.chain_id": - panic(fmt.Errorf("field chain_id of message stride.interchainquery.v1.MsgSubmitQueryResponse is not mutable")) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.query_id": - panic(fmt.Errorf("field query_id of message stride.interchainquery.v1.MsgSubmitQueryResponse is not mutable")) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.result": - panic(fmt.Errorf("field result of message stride.interchainquery.v1.MsgSubmitQueryResponse is not mutable")) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.height": - panic(fmt.Errorf("field height of message stride.interchainquery.v1.MsgSubmitQueryResponse is not mutable")) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.from_address": - panic(fmt.Errorf("field from_address of message stride.interchainquery.v1.MsgSubmitQueryResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSubmitQueryResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.MsgSubmitQueryResponse.chain_id": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.MsgSubmitQueryResponse.query_id": - return protoreflect.ValueOfString("") - case "stride.interchainquery.v1.MsgSubmitQueryResponse.result": - return protoreflect.ValueOfBytes(nil) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.proof_ops": - m := new(crypto.ProofOps) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.height": - return protoreflect.ValueOfInt64(int64(0)) - case "stride.interchainquery.v1.MsgSubmitQueryResponse.from_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSubmitQueryResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.interchainquery.v1.MsgSubmitQueryResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSubmitQueryResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitQueryResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSubmitQueryResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitQueryResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitQueryResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.QueryId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Result) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ProofOps != nil { - l = options.Size(x.ProofOps) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Height != 0 { - n += 1 + runtime.Sov(uint64(x.Height)) - } - l = len(x.FromAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitQueryResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.FromAddress) > 0 { - i -= len(x.FromAddress) - copy(dAtA[i:], x.FromAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FromAddress))) - i-- - dAtA[i] = 0x32 - } - if x.Height != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Height)) - i-- - dAtA[i] = 0x28 - } - if x.ProofOps != nil { - encoded, err := options.Marshal(x.ProofOps) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.Result) > 0 { - i -= len(x.Result) - copy(dAtA[i:], x.Result) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Result))) - i-- - dAtA[i] = 0x1a - } - if len(x.QueryId) > 0 { - i -= len(x.QueryId) - copy(dAtA[i:], x.QueryId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.QueryId))) - i-- - dAtA[i] = 0x12 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitQueryResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitQueryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.QueryId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Result = append(x.Result[:0], dAtA[iNdEx:postIndex]...) - if x.Result == nil { - x.Result = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ProofOps == nil { - x.ProofOps = &crypto.ProofOps{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ProofOps); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - x.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.FromAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSubmitQueryResponseResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_interchainquery_v1_messages_proto_init() - md_MsgSubmitQueryResponseResponse = File_stride_interchainquery_v1_messages_proto.Messages().ByName("MsgSubmitQueryResponseResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgSubmitQueryResponseResponse)(nil) - -type fastReflection_MsgSubmitQueryResponseResponse MsgSubmitQueryResponseResponse - -func (x *MsgSubmitQueryResponseResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSubmitQueryResponseResponse)(x) -} - -func (x *MsgSubmitQueryResponseResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_interchainquery_v1_messages_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSubmitQueryResponseResponse_messageType fastReflection_MsgSubmitQueryResponseResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSubmitQueryResponseResponse_messageType{} - -type fastReflection_MsgSubmitQueryResponseResponse_messageType struct{} - -func (x fastReflection_MsgSubmitQueryResponseResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSubmitQueryResponseResponse)(nil) -} -func (x fastReflection_MsgSubmitQueryResponseResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSubmitQueryResponseResponse) -} -func (x fastReflection_MsgSubmitQueryResponseResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitQueryResponseResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSubmitQueryResponseResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSubmitQueryResponseResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSubmitQueryResponseResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSubmitQueryResponseResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSubmitQueryResponseResponse) New() protoreflect.Message { - return new(fastReflection_MsgSubmitQueryResponseResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSubmitQueryResponseResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSubmitQueryResponseResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSubmitQueryResponseResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSubmitQueryResponseResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponseResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponseResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitQueryResponseResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponseResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponseResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSubmitQueryResponseResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponseResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponseResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitQueryResponseResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponseResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponseResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitQueryResponseResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponseResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponseResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSubmitQueryResponseResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.MsgSubmitQueryResponseResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.MsgSubmitQueryResponseResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSubmitQueryResponseResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.interchainquery.v1.MsgSubmitQueryResponseResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSubmitQueryResponseResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSubmitQueryResponseResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSubmitQueryResponseResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSubmitQueryResponseResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSubmitQueryResponseResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitQueryResponseResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSubmitQueryResponseResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitQueryResponseResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSubmitQueryResponseResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/interchainquery/v1/messages.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgSubmitQueryResponse represents a message type to fulfil a query request. -type MsgSubmitQueryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - QueryId string `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` - Result []byte `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"` - ProofOps *crypto.ProofOps `protobuf:"bytes,4,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty"` - Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` - FromAddress string `protobuf:"bytes,6,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` -} - -func (x *MsgSubmitQueryResponse) Reset() { - *x = MsgSubmitQueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_interchainquery_v1_messages_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitQueryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitQueryResponse) ProtoMessage() {} - -// Deprecated: Use MsgSubmitQueryResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitQueryResponse) Descriptor() ([]byte, []int) { - return file_stride_interchainquery_v1_messages_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgSubmitQueryResponse) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *MsgSubmitQueryResponse) GetQueryId() string { - if x != nil { - return x.QueryId - } - return "" -} - -func (x *MsgSubmitQueryResponse) GetResult() []byte { - if x != nil { - return x.Result - } - return nil -} - -func (x *MsgSubmitQueryResponse) GetProofOps() *crypto.ProofOps { - if x != nil { - return x.ProofOps - } - return nil -} - -func (x *MsgSubmitQueryResponse) GetHeight() int64 { - if x != nil { - return x.Height - } - return 0 -} - -func (x *MsgSubmitQueryResponse) GetFromAddress() string { - if x != nil { - return x.FromAddress - } - return "" -} - -// MsgSubmitQueryResponseResponse defines the MsgSubmitQueryResponse response -// type. -type MsgSubmitQueryResponseResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgSubmitQueryResponseResponse) Reset() { - *x = MsgSubmitQueryResponseResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_interchainquery_v1_messages_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSubmitQueryResponseResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSubmitQueryResponseResponse) ProtoMessage() {} - -// Deprecated: Use MsgSubmitQueryResponseResponse.ProtoReflect.Descriptor instead. -func (*MsgSubmitQueryResponseResponse) Descriptor() ([]byte, []int) { - return file_stride_interchainquery_v1_messages_proto_rawDescGZIP(), []int{1} -} - -var File_stride_interchainquery_v1_messages_proto protoreflect.FileDescriptor - -var file_stride_interchainquery_v1_messages_proto_rawDesc = []byte{ - 0x0a, 0x28, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, - 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x74, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2f, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, - 0x2f, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, - 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xae, 0x03, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0xf2, 0xde, - 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, - 0x22, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x08, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x13, 0xf2, 0xde, - 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x64, - 0x22, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, - 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4e, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x6f, - 0x70, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x6f, - 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, - 0x22, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x5f, 0x6f, 0x70, 0x73, 0x22, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x4f, 0x70, 0x73, 0x12, 0x29, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, - 0x22, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x3b, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x51, 0x88, - 0xa0, 0x1f, 0x00, 0x98, 0xa0, 0x1f, 0x01, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x0c, - 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xc6, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0xb7, 0x01, 0x0a, 0x13, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x31, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x39, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x01, 0x2a, 0x22, 0x27, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x74, 0x78, - 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x87, 0x02, 0x0a, 0x1d, - 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, - 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x3b, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x53, 0x49, 0x58, 0xaa, 0x02, 0x19, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x25, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x3a, 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_interchainquery_v1_messages_proto_rawDescOnce sync.Once - file_stride_interchainquery_v1_messages_proto_rawDescData = file_stride_interchainquery_v1_messages_proto_rawDesc -) - -func file_stride_interchainquery_v1_messages_proto_rawDescGZIP() []byte { - file_stride_interchainquery_v1_messages_proto_rawDescOnce.Do(func() { - file_stride_interchainquery_v1_messages_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_interchainquery_v1_messages_proto_rawDescData) - }) - return file_stride_interchainquery_v1_messages_proto_rawDescData -} - -var file_stride_interchainquery_v1_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_stride_interchainquery_v1_messages_proto_goTypes = []interface{}{ - (*MsgSubmitQueryResponse)(nil), // 0: stride.interchainquery.v1.MsgSubmitQueryResponse - (*MsgSubmitQueryResponseResponse)(nil), // 1: stride.interchainquery.v1.MsgSubmitQueryResponseResponse - (*crypto.ProofOps)(nil), // 2: tendermint.crypto.ProofOps -} -var file_stride_interchainquery_v1_messages_proto_depIdxs = []int32{ - 2, // 0: stride.interchainquery.v1.MsgSubmitQueryResponse.proof_ops:type_name -> tendermint.crypto.ProofOps - 0, // 1: stride.interchainquery.v1.Msg.SubmitQueryResponse:input_type -> stride.interchainquery.v1.MsgSubmitQueryResponse - 1, // 2: stride.interchainquery.v1.Msg.SubmitQueryResponse:output_type -> stride.interchainquery.v1.MsgSubmitQueryResponseResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_stride_interchainquery_v1_messages_proto_init() } -func file_stride_interchainquery_v1_messages_proto_init() { - if File_stride_interchainquery_v1_messages_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_interchainquery_v1_messages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitQueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_interchainquery_v1_messages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSubmitQueryResponseResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_interchainquery_v1_messages_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_stride_interchainquery_v1_messages_proto_goTypes, - DependencyIndexes: file_stride_interchainquery_v1_messages_proto_depIdxs, - MessageInfos: file_stride_interchainquery_v1_messages_proto_msgTypes, - }.Build() - File_stride_interchainquery_v1_messages_proto = out.File - file_stride_interchainquery_v1_messages_proto_rawDesc = nil - file_stride_interchainquery_v1_messages_proto_goTypes = nil - file_stride_interchainquery_v1_messages_proto_depIdxs = nil -} diff --git a/api/stride/interchainquery/v1/messages_grpc.pb.go b/api/stride/interchainquery/v1/messages_grpc.pb.go deleted file mode 100644 index 56995b63f..000000000 --- a/api/stride/interchainquery/v1/messages_grpc.pb.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: stride/interchainquery/v1/messages.proto - -package interchainqueryv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Msg_SubmitQueryResponse_FullMethodName = "/stride.interchainquery.v1.Msg/SubmitQueryResponse" -) - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Msg defines the interchainquery Msg service. -type MsgClient interface { - // SubmitQueryResponse defines a method for submit query responses. - SubmitQueryResponse(ctx context.Context, in *MsgSubmitQueryResponse, opts ...grpc.CallOption) (*MsgSubmitQueryResponseResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) SubmitQueryResponse(ctx context.Context, in *MsgSubmitQueryResponse, opts ...grpc.CallOption) (*MsgSubmitQueryResponseResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgSubmitQueryResponseResponse) - err := c.cc.Invoke(ctx, Msg_SubmitQueryResponse_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility. -// -// Msg defines the interchainquery Msg service. -type MsgServer interface { - // SubmitQueryResponse defines a method for submit query responses. - SubmitQueryResponse(context.Context, *MsgSubmitQueryResponse) (*MsgSubmitQueryResponseResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMsgServer struct{} - -func (UnimplementedMsgServer) SubmitQueryResponse(context.Context, *MsgSubmitQueryResponse) (*MsgSubmitQueryResponseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitQueryResponse not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} -func (UnimplementedMsgServer) testEmbeddedByValue() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - // If the following call pancis, it indicates UnimplementedMsgServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_SubmitQueryResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitQueryResponse) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitQueryResponse(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_SubmitQueryResponse_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitQueryResponse(ctx, req.(*MsgSubmitQueryResponse)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "stride.interchainquery.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitQueryResponse", - Handler: _Msg_SubmitQueryResponse_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/interchainquery/v1/messages.proto", -} diff --git a/api/stride/interchainquery/v1/query.pulsar.go b/api/stride/interchainquery/v1/query.pulsar.go deleted file mode 100644 index 094c70795..000000000 --- a/api/stride/interchainquery/v1/query.pulsar.go +++ /dev/null @@ -1,1074 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package interchainqueryv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryPendingQueriesRequest protoreflect.MessageDescriptor -) - -func init() { - file_stride_interchainquery_v1_query_proto_init() - md_QueryPendingQueriesRequest = File_stride_interchainquery_v1_query_proto.Messages().ByName("QueryPendingQueriesRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryPendingQueriesRequest)(nil) - -type fastReflection_QueryPendingQueriesRequest QueryPendingQueriesRequest - -func (x *QueryPendingQueriesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryPendingQueriesRequest)(x) -} - -func (x *QueryPendingQueriesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_interchainquery_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryPendingQueriesRequest_messageType fastReflection_QueryPendingQueriesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryPendingQueriesRequest_messageType{} - -type fastReflection_QueryPendingQueriesRequest_messageType struct{} - -func (x fastReflection_QueryPendingQueriesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryPendingQueriesRequest)(nil) -} -func (x fastReflection_QueryPendingQueriesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryPendingQueriesRequest) -} -func (x fastReflection_QueryPendingQueriesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingQueriesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryPendingQueriesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingQueriesRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryPendingQueriesRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryPendingQueriesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryPendingQueriesRequest) New() protoreflect.Message { - return new(fastReflection_QueryPendingQueriesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryPendingQueriesRequest) Interface() protoreflect.ProtoMessage { - return (*QueryPendingQueriesRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryPendingQueriesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryPendingQueriesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesRequest")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingQueriesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesRequest")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryPendingQueriesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesRequest")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingQueriesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesRequest")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingQueriesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesRequest")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryPendingQueriesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesRequest")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryPendingQueriesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.interchainquery.v1.QueryPendingQueriesRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryPendingQueriesRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingQueriesRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryPendingQueriesRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryPendingQueriesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryPendingQueriesRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingQueriesRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingQueriesRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingQueriesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingQueriesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryPendingQueriesResponse_1_list)(nil) - -type _QueryPendingQueriesResponse_1_list struct { - list *[]*Query -} - -func (x *_QueryPendingQueriesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryPendingQueriesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryPendingQueriesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Query) - (*x.list)[i] = concreteValue -} - -func (x *_QueryPendingQueriesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Query) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryPendingQueriesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Query) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryPendingQueriesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryPendingQueriesResponse_1_list) NewElement() protoreflect.Value { - v := new(Query) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryPendingQueriesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryPendingQueriesResponse protoreflect.MessageDescriptor - fd_QueryPendingQueriesResponse_pending_queries protoreflect.FieldDescriptor -) - -func init() { - file_stride_interchainquery_v1_query_proto_init() - md_QueryPendingQueriesResponse = File_stride_interchainquery_v1_query_proto.Messages().ByName("QueryPendingQueriesResponse") - fd_QueryPendingQueriesResponse_pending_queries = md_QueryPendingQueriesResponse.Fields().ByName("pending_queries") -} - -var _ protoreflect.Message = (*fastReflection_QueryPendingQueriesResponse)(nil) - -type fastReflection_QueryPendingQueriesResponse QueryPendingQueriesResponse - -func (x *QueryPendingQueriesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryPendingQueriesResponse)(x) -} - -func (x *QueryPendingQueriesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_interchainquery_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryPendingQueriesResponse_messageType fastReflection_QueryPendingQueriesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryPendingQueriesResponse_messageType{} - -type fastReflection_QueryPendingQueriesResponse_messageType struct{} - -func (x fastReflection_QueryPendingQueriesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryPendingQueriesResponse)(nil) -} -func (x fastReflection_QueryPendingQueriesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryPendingQueriesResponse) -} -func (x fastReflection_QueryPendingQueriesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingQueriesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryPendingQueriesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingQueriesResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryPendingQueriesResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryPendingQueriesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryPendingQueriesResponse) New() protoreflect.Message { - return new(fastReflection_QueryPendingQueriesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryPendingQueriesResponse) Interface() protoreflect.ProtoMessage { - return (*QueryPendingQueriesResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryPendingQueriesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.PendingQueries) != 0 { - value := protoreflect.ValueOfList(&_QueryPendingQueriesResponse_1_list{list: &x.PendingQueries}) - if !f(fd_QueryPendingQueriesResponse_pending_queries, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryPendingQueriesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.interchainquery.v1.QueryPendingQueriesResponse.pending_queries": - return len(x.PendingQueries) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingQueriesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.interchainquery.v1.QueryPendingQueriesResponse.pending_queries": - x.PendingQueries = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryPendingQueriesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.interchainquery.v1.QueryPendingQueriesResponse.pending_queries": - if len(x.PendingQueries) == 0 { - return protoreflect.ValueOfList(&_QueryPendingQueriesResponse_1_list{}) - } - listValue := &_QueryPendingQueriesResponse_1_list{list: &x.PendingQueries} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingQueriesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.interchainquery.v1.QueryPendingQueriesResponse.pending_queries": - lv := value.List() - clv := lv.(*_QueryPendingQueriesResponse_1_list) - x.PendingQueries = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingQueriesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.QueryPendingQueriesResponse.pending_queries": - if x.PendingQueries == nil { - x.PendingQueries = []*Query{} - } - value := &_QueryPendingQueriesResponse_1_list{list: &x.PendingQueries} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryPendingQueriesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.interchainquery.v1.QueryPendingQueriesResponse.pending_queries": - list := []*Query{} - return protoreflect.ValueOfList(&_QueryPendingQueriesResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.interchainquery.v1.QueryPendingQueriesResponse")) - } - panic(fmt.Errorf("message stride.interchainquery.v1.QueryPendingQueriesResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryPendingQueriesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.interchainquery.v1.QueryPendingQueriesResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryPendingQueriesResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingQueriesResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryPendingQueriesResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryPendingQueriesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryPendingQueriesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.PendingQueries) > 0 { - for _, e := range x.PendingQueries { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingQueriesResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.PendingQueries) > 0 { - for iNdEx := len(x.PendingQueries) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.PendingQueries[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingQueriesResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingQueriesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingQueriesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PendingQueries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PendingQueries = append(x.PendingQueries, &Query{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PendingQueries[len(x.PendingQueries)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/interchainquery/v1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type QueryPendingQueriesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryPendingQueriesRequest) Reset() { - *x = QueryPendingQueriesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_interchainquery_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryPendingQueriesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryPendingQueriesRequest) ProtoMessage() {} - -// Deprecated: Use QueryPendingQueriesRequest.ProtoReflect.Descriptor instead. -func (*QueryPendingQueriesRequest) Descriptor() ([]byte, []int) { - return file_stride_interchainquery_v1_query_proto_rawDescGZIP(), []int{0} -} - -type QueryPendingQueriesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PendingQueries []*Query `protobuf:"bytes,1,rep,name=pending_queries,json=pendingQueries,proto3" json:"pending_queries,omitempty"` -} - -func (x *QueryPendingQueriesResponse) Reset() { - *x = QueryPendingQueriesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_interchainquery_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryPendingQueriesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryPendingQueriesResponse) ProtoMessage() {} - -// Deprecated: Use QueryPendingQueriesResponse.ProtoReflect.Descriptor instead. -func (*QueryPendingQueriesResponse) Descriptor() ([]byte, []int) { - return file_stride_interchainquery_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryPendingQueriesResponse) GetPendingQueries() []*Query { - if x != nil { - return x.PendingQueries - } - return nil -} - -var File_stride_interchainquery_v1_query_proto protoreflect.FileDescriptor - -var file_stride_interchainquery_v1_query_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x1a, 0x27, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x51, - 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x6e, 0x0a, - 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x51, 0x75, 0x65, - 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0f, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0e, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x32, 0xcd, 0x01, - 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xbc, - 0x01, 0x0a, 0x0e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x12, 0x35, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x70, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x42, 0x84, 0x02, - 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x42, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x51, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, - 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x3b, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x53, 0x49, 0x58, 0xaa, 0x02, 0x19, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x19, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x25, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, - 0x3a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_interchainquery_v1_query_proto_rawDescOnce sync.Once - file_stride_interchainquery_v1_query_proto_rawDescData = file_stride_interchainquery_v1_query_proto_rawDesc -) - -func file_stride_interchainquery_v1_query_proto_rawDescGZIP() []byte { - file_stride_interchainquery_v1_query_proto_rawDescOnce.Do(func() { - file_stride_interchainquery_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_interchainquery_v1_query_proto_rawDescData) - }) - return file_stride_interchainquery_v1_query_proto_rawDescData -} - -var file_stride_interchainquery_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_stride_interchainquery_v1_query_proto_goTypes = []interface{}{ - (*QueryPendingQueriesRequest)(nil), // 0: stride.interchainquery.v1.QueryPendingQueriesRequest - (*QueryPendingQueriesResponse)(nil), // 1: stride.interchainquery.v1.QueryPendingQueriesResponse - (*Query)(nil), // 2: stride.interchainquery.v1.Query -} -var file_stride_interchainquery_v1_query_proto_depIdxs = []int32{ - 2, // 0: stride.interchainquery.v1.QueryPendingQueriesResponse.pending_queries:type_name -> stride.interchainquery.v1.Query - 0, // 1: stride.interchainquery.v1.QueryService.PendingQueries:input_type -> stride.interchainquery.v1.QueryPendingQueriesRequest - 1, // 2: stride.interchainquery.v1.QueryService.PendingQueries:output_type -> stride.interchainquery.v1.QueryPendingQueriesResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_stride_interchainquery_v1_query_proto_init() } -func file_stride_interchainquery_v1_query_proto_init() { - if File_stride_interchainquery_v1_query_proto != nil { - return - } - file_stride_interchainquery_v1_genesis_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_interchainquery_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryPendingQueriesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_interchainquery_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryPendingQueriesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_interchainquery_v1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_stride_interchainquery_v1_query_proto_goTypes, - DependencyIndexes: file_stride_interchainquery_v1_query_proto_depIdxs, - MessageInfos: file_stride_interchainquery_v1_query_proto_msgTypes, - }.Build() - File_stride_interchainquery_v1_query_proto = out.File - file_stride_interchainquery_v1_query_proto_rawDesc = nil - file_stride_interchainquery_v1_query_proto_goTypes = nil - file_stride_interchainquery_v1_query_proto_depIdxs = nil -} diff --git a/api/stride/interchainquery/v1/query_grpc.pb.go b/api/stride/interchainquery/v1/query_grpc.pb.go deleted file mode 100644 index 8e535e460..000000000 --- a/api/stride/interchainquery/v1/query_grpc.pb.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: stride/interchainquery/v1/query.proto - -package interchainqueryv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - QueryService_PendingQueries_FullMethodName = "/stride.interchainquery.v1.QueryService/PendingQueries" -) - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryServiceClient interface { - PendingQueries(ctx context.Context, in *QueryPendingQueriesRequest, opts ...grpc.CallOption) (*QueryPendingQueriesResponse, error) -} - -type queryServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryServiceClient(cc grpc.ClientConnInterface) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) PendingQueries(ctx context.Context, in *QueryPendingQueriesRequest, opts ...grpc.CallOption) (*QueryPendingQueriesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryPendingQueriesResponse) - err := c.cc.Invoke(ctx, QueryService_PendingQueries_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServiceServer is the server API for QueryService service. -// All implementations must embed UnimplementedQueryServiceServer -// for forward compatibility. -type QueryServiceServer interface { - PendingQueries(context.Context, *QueryPendingQueriesRequest) (*QueryPendingQueriesResponse, error) - mustEmbedUnimplementedQueryServiceServer() -} - -// UnimplementedQueryServiceServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedQueryServiceServer struct{} - -func (UnimplementedQueryServiceServer) PendingQueries(context.Context, *QueryPendingQueriesRequest) (*QueryPendingQueriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PendingQueries not implemented") -} -func (UnimplementedQueryServiceServer) mustEmbedUnimplementedQueryServiceServer() {} -func (UnimplementedQueryServiceServer) testEmbeddedByValue() {} - -// UnsafeQueryServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServiceServer will -// result in compilation errors. -type UnsafeQueryServiceServer interface { - mustEmbedUnimplementedQueryServiceServer() -} - -func RegisterQueryServiceServer(s grpc.ServiceRegistrar, srv QueryServiceServer) { - // If the following call pancis, it indicates UnimplementedQueryServiceServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&QueryService_ServiceDesc, srv) -} - -func _QueryService_PendingQueries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryPendingQueriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).PendingQueries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: QueryService_PendingQueries_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).PendingQueries(ctx, req.(*QueryPendingQueriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// QueryService_ServiceDesc is the grpc.ServiceDesc for QueryService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var QueryService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "stride.interchainquery.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PendingQueries", - Handler: _QueryService_PendingQueries_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/interchainquery/v1/query.proto", -} diff --git a/api/stride/records/callbacks.pulsar.go b/api/stride/records/callbacks.pulsar.go deleted file mode 100644 index 691cff99b..000000000 --- a/api/stride/records/callbacks.pulsar.go +++ /dev/null @@ -1,1046 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package records - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_TransferCallback protoreflect.MessageDescriptor - fd_TransferCallback_deposit_record_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_callbacks_proto_init() - md_TransferCallback = File_stride_records_callbacks_proto.Messages().ByName("TransferCallback") - fd_TransferCallback_deposit_record_id = md_TransferCallback.Fields().ByName("deposit_record_id") -} - -var _ protoreflect.Message = (*fastReflection_TransferCallback)(nil) - -type fastReflection_TransferCallback TransferCallback - -func (x *TransferCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_TransferCallback)(x) -} - -func (x *TransferCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_callbacks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TransferCallback_messageType fastReflection_TransferCallback_messageType -var _ protoreflect.MessageType = fastReflection_TransferCallback_messageType{} - -type fastReflection_TransferCallback_messageType struct{} - -func (x fastReflection_TransferCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_TransferCallback)(nil) -} -func (x fastReflection_TransferCallback_messageType) New() protoreflect.Message { - return new(fastReflection_TransferCallback) -} -func (x fastReflection_TransferCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TransferCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TransferCallback) Descriptor() protoreflect.MessageDescriptor { - return md_TransferCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_TransferCallback) Type() protoreflect.MessageType { - return _fastReflection_TransferCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TransferCallback) New() protoreflect.Message { - return new(fastReflection_TransferCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TransferCallback) Interface() protoreflect.ProtoMessage { - return (*TransferCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_TransferCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DepositRecordId != uint64(0) { - value := protoreflect.ValueOfUint64(x.DepositRecordId) - if !f(fd_TransferCallback_deposit_record_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_TransferCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.TransferCallback.deposit_record_id": - return x.DepositRecordId != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferCallback")) - } - panic(fmt.Errorf("message stride.records.TransferCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TransferCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.TransferCallback.deposit_record_id": - x.DepositRecordId = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferCallback")) - } - panic(fmt.Errorf("message stride.records.TransferCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_TransferCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.TransferCallback.deposit_record_id": - value := x.DepositRecordId - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferCallback")) - } - panic(fmt.Errorf("message stride.records.TransferCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TransferCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.TransferCallback.deposit_record_id": - x.DepositRecordId = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferCallback")) - } - panic(fmt.Errorf("message stride.records.TransferCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TransferCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.TransferCallback.deposit_record_id": - panic(fmt.Errorf("field deposit_record_id of message stride.records.TransferCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferCallback")) - } - panic(fmt.Errorf("message stride.records.TransferCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_TransferCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.TransferCallback.deposit_record_id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferCallback")) - } - panic(fmt.Errorf("message stride.records.TransferCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_TransferCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.TransferCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_TransferCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TransferCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_TransferCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_TransferCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TransferCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.DepositRecordId != 0 { - n += 1 + runtime.Sov(uint64(x.DepositRecordId)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TransferCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.DepositRecordId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DepositRecordId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TransferCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TransferCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TransferCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositRecordId", wireType) - } - x.DepositRecordId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DepositRecordId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TransferLSMTokenCallback protoreflect.MessageDescriptor - fd_TransferLSMTokenCallback_deposit protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_callbacks_proto_init() - md_TransferLSMTokenCallback = File_stride_records_callbacks_proto.Messages().ByName("TransferLSMTokenCallback") - fd_TransferLSMTokenCallback_deposit = md_TransferLSMTokenCallback.Fields().ByName("deposit") -} - -var _ protoreflect.Message = (*fastReflection_TransferLSMTokenCallback)(nil) - -type fastReflection_TransferLSMTokenCallback TransferLSMTokenCallback - -func (x *TransferLSMTokenCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_TransferLSMTokenCallback)(x) -} - -func (x *TransferLSMTokenCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_callbacks_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TransferLSMTokenCallback_messageType fastReflection_TransferLSMTokenCallback_messageType -var _ protoreflect.MessageType = fastReflection_TransferLSMTokenCallback_messageType{} - -type fastReflection_TransferLSMTokenCallback_messageType struct{} - -func (x fastReflection_TransferLSMTokenCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_TransferLSMTokenCallback)(nil) -} -func (x fastReflection_TransferLSMTokenCallback_messageType) New() protoreflect.Message { - return new(fastReflection_TransferLSMTokenCallback) -} -func (x fastReflection_TransferLSMTokenCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TransferLSMTokenCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TransferLSMTokenCallback) Descriptor() protoreflect.MessageDescriptor { - return md_TransferLSMTokenCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_TransferLSMTokenCallback) Type() protoreflect.MessageType { - return _fastReflection_TransferLSMTokenCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TransferLSMTokenCallback) New() protoreflect.Message { - return new(fastReflection_TransferLSMTokenCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TransferLSMTokenCallback) Interface() protoreflect.ProtoMessage { - return (*TransferLSMTokenCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_TransferLSMTokenCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Deposit != nil { - value := protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - if !f(fd_TransferLSMTokenCallback_deposit, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_TransferLSMTokenCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.TransferLSMTokenCallback.deposit": - return x.Deposit != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferLSMTokenCallback")) - } - panic(fmt.Errorf("message stride.records.TransferLSMTokenCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TransferLSMTokenCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.TransferLSMTokenCallback.deposit": - x.Deposit = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferLSMTokenCallback")) - } - panic(fmt.Errorf("message stride.records.TransferLSMTokenCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_TransferLSMTokenCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.TransferLSMTokenCallback.deposit": - value := x.Deposit - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferLSMTokenCallback")) - } - panic(fmt.Errorf("message stride.records.TransferLSMTokenCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TransferLSMTokenCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.TransferLSMTokenCallback.deposit": - x.Deposit = value.Message().Interface().(*LSMTokenDeposit) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferLSMTokenCallback")) - } - panic(fmt.Errorf("message stride.records.TransferLSMTokenCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TransferLSMTokenCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.TransferLSMTokenCallback.deposit": - if x.Deposit == nil { - x.Deposit = new(LSMTokenDeposit) - } - return protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferLSMTokenCallback")) - } - panic(fmt.Errorf("message stride.records.TransferLSMTokenCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_TransferLSMTokenCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.TransferLSMTokenCallback.deposit": - m := new(LSMTokenDeposit) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.TransferLSMTokenCallback")) - } - panic(fmt.Errorf("message stride.records.TransferLSMTokenCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_TransferLSMTokenCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.TransferLSMTokenCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_TransferLSMTokenCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TransferLSMTokenCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_TransferLSMTokenCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_TransferLSMTokenCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TransferLSMTokenCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Deposit != nil { - l = options.Size(x.Deposit) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TransferLSMTokenCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Deposit != nil { - encoded, err := options.Marshal(x.Deposit) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TransferLSMTokenCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TransferLSMTokenCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TransferLSMTokenCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Deposit == nil { - x.Deposit = &LSMTokenDeposit{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposit); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/records/callbacks.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TransferCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DepositRecordId uint64 `protobuf:"varint,1,opt,name=deposit_record_id,json=depositRecordId,proto3" json:"deposit_record_id,omitempty"` -} - -func (x *TransferCallback) Reset() { - *x = TransferCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_callbacks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransferCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransferCallback) ProtoMessage() {} - -// Deprecated: Use TransferCallback.ProtoReflect.Descriptor instead. -func (*TransferCallback) Descriptor() ([]byte, []int) { - return file_stride_records_callbacks_proto_rawDescGZIP(), []int{0} -} - -func (x *TransferCallback) GetDepositRecordId() uint64 { - if x != nil { - return x.DepositRecordId - } - return 0 -} - -type TransferLSMTokenCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Deposit *LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` -} - -func (x *TransferLSMTokenCallback) Reset() { - *x = TransferLSMTokenCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_callbacks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TransferLSMTokenCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TransferLSMTokenCallback) ProtoMessage() {} - -// Deprecated: Use TransferLSMTokenCallback.ProtoReflect.Descriptor instead. -func (*TransferLSMTokenCallback) Descriptor() ([]byte, []int) { - return file_stride_records_callbacks_proto_rawDescGZIP(), []int{1} -} - -func (x *TransferLSMTokenCallback) GetDeposit() *LSMTokenDeposit { - if x != nil { - return x.Deposit - } - return nil -} - -var File_stride_records_callbacks_proto protoreflect.FileDescriptor - -var file_stride_records_callbacks_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x1a, 0x1c, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, - 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x22, 0x55, - 0x0a, 0x18, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4c, 0x53, 0x4d, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x39, 0x0a, 0x07, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x4c, 0x53, 0x4d, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0xb3, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x42, 0x0e, 0x43, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, - 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x52, 0x58, 0xaa, 0x02, 0x0e, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0xca, 0x02, 0x0e, 0x53, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0xe2, 0x02, 0x1a, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x3a, 0x3a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_stride_records_callbacks_proto_rawDescOnce sync.Once - file_stride_records_callbacks_proto_rawDescData = file_stride_records_callbacks_proto_rawDesc -) - -func file_stride_records_callbacks_proto_rawDescGZIP() []byte { - file_stride_records_callbacks_proto_rawDescOnce.Do(func() { - file_stride_records_callbacks_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_records_callbacks_proto_rawDescData) - }) - return file_stride_records_callbacks_proto_rawDescData -} - -var file_stride_records_callbacks_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_stride_records_callbacks_proto_goTypes = []interface{}{ - (*TransferCallback)(nil), // 0: stride.records.TransferCallback - (*TransferLSMTokenCallback)(nil), // 1: stride.records.TransferLSMTokenCallback - (*LSMTokenDeposit)(nil), // 2: stride.records.LSMTokenDeposit -} -var file_stride_records_callbacks_proto_depIdxs = []int32{ - 2, // 0: stride.records.TransferLSMTokenCallback.deposit:type_name -> stride.records.LSMTokenDeposit - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_stride_records_callbacks_proto_init() } -func file_stride_records_callbacks_proto_init() { - if File_stride_records_callbacks_proto != nil { - return - } - file_stride_records_records_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_records_callbacks_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_callbacks_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransferLSMTokenCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_records_callbacks_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_records_callbacks_proto_goTypes, - DependencyIndexes: file_stride_records_callbacks_proto_depIdxs, - MessageInfos: file_stride_records_callbacks_proto_msgTypes, - }.Build() - File_stride_records_callbacks_proto = out.File - file_stride_records_callbacks_proto_rawDesc = nil - file_stride_records_callbacks_proto_goTypes = nil - file_stride_records_callbacks_proto_depIdxs = nil -} diff --git a/api/stride/records/genesis.pulsar.go b/api/stride/records/genesis.pulsar.go deleted file mode 100644 index a34e9b821..000000000 --- a/api/stride/records/genesis.pulsar.go +++ /dev/null @@ -1,1404 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package records - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_3_list)(nil) - -type _GenesisState_3_list struct { - list *[]*UserRedemptionRecord -} - -func (x *_GenesisState_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserRedemptionRecord) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserRedemptionRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(UserRedemptionRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(UserRedemptionRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_5_list)(nil) - -type _GenesisState_5_list struct { - list *[]*EpochUnbondingRecord -} - -func (x *_GenesisState_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochUnbondingRecord) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochUnbondingRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { - v := new(EpochUnbondingRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_5_list) NewElement() protoreflect.Value { - v := new(EpochUnbondingRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_7_list)(nil) - -type _GenesisState_7_list struct { - list *[]*DepositRecord -} - -func (x *_GenesisState_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DepositRecord) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DepositRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_7_list) AppendMutable() protoreflect.Value { - v := new(DepositRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_7_list) NewElement() protoreflect.Value { - v := new(DepositRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_9_list)(nil) - -type _GenesisState_9_list struct { - list *[]*LSMTokenDeposit -} - -func (x *_GenesisState_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*LSMTokenDeposit) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*LSMTokenDeposit) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_9_list) AppendMutable() protoreflect.Value { - v := new(LSMTokenDeposit) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_9_list) NewElement() protoreflect.Value { - v := new(LSMTokenDeposit) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_9_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_port_id protoreflect.FieldDescriptor - fd_GenesisState_user_redemption_record_list protoreflect.FieldDescriptor - fd_GenesisState_user_redemption_record_count protoreflect.FieldDescriptor - fd_GenesisState_epoch_unbonding_record_list protoreflect.FieldDescriptor - fd_GenesisState_deposit_record_list protoreflect.FieldDescriptor - fd_GenesisState_deposit_record_count protoreflect.FieldDescriptor - fd_GenesisState_lsm_token_deposit_list protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_genesis_proto_init() - md_GenesisState = File_stride_records_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_port_id = md_GenesisState.Fields().ByName("port_id") - fd_GenesisState_user_redemption_record_list = md_GenesisState.Fields().ByName("user_redemption_record_list") - fd_GenesisState_user_redemption_record_count = md_GenesisState.Fields().ByName("user_redemption_record_count") - fd_GenesisState_epoch_unbonding_record_list = md_GenesisState.Fields().ByName("epoch_unbonding_record_list") - fd_GenesisState_deposit_record_list = md_GenesisState.Fields().ByName("deposit_record_list") - fd_GenesisState_deposit_record_count = md_GenesisState.Fields().ByName("deposit_record_count") - fd_GenesisState_lsm_token_deposit_list = md_GenesisState.Fields().ByName("lsm_token_deposit_list") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } - if x.PortId != "" { - value := protoreflect.ValueOfString(x.PortId) - if !f(fd_GenesisState_port_id, value) { - return - } - } - if len(x.UserRedemptionRecordList) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.UserRedemptionRecordList}) - if !f(fd_GenesisState_user_redemption_record_list, value) { - return - } - } - if x.UserRedemptionRecordCount != uint64(0) { - value := protoreflect.ValueOfUint64(x.UserRedemptionRecordCount) - if !f(fd_GenesisState_user_redemption_record_count, value) { - return - } - } - if len(x.EpochUnbondingRecordList) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.EpochUnbondingRecordList}) - if !f(fd_GenesisState_epoch_unbonding_record_list, value) { - return - } - } - if len(x.DepositRecordList) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_7_list{list: &x.DepositRecordList}) - if !f(fd_GenesisState_deposit_record_list, value) { - return - } - } - if x.DepositRecordCount != uint64(0) { - value := protoreflect.ValueOfUint64(x.DepositRecordCount) - if !f(fd_GenesisState_deposit_record_count, value) { - return - } - } - if len(x.LsmTokenDepositList) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_9_list{list: &x.LsmTokenDepositList}) - if !f(fd_GenesisState_lsm_token_deposit_list, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.GenesisState.params": - return x.Params != nil - case "stride.records.GenesisState.port_id": - return x.PortId != "" - case "stride.records.GenesisState.user_redemption_record_list": - return len(x.UserRedemptionRecordList) != 0 - case "stride.records.GenesisState.user_redemption_record_count": - return x.UserRedemptionRecordCount != uint64(0) - case "stride.records.GenesisState.epoch_unbonding_record_list": - return len(x.EpochUnbondingRecordList) != 0 - case "stride.records.GenesisState.deposit_record_list": - return len(x.DepositRecordList) != 0 - case "stride.records.GenesisState.deposit_record_count": - return x.DepositRecordCount != uint64(0) - case "stride.records.GenesisState.lsm_token_deposit_list": - return len(x.LsmTokenDepositList) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.GenesisState")) - } - panic(fmt.Errorf("message stride.records.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.GenesisState.params": - x.Params = nil - case "stride.records.GenesisState.port_id": - x.PortId = "" - case "stride.records.GenesisState.user_redemption_record_list": - x.UserRedemptionRecordList = nil - case "stride.records.GenesisState.user_redemption_record_count": - x.UserRedemptionRecordCount = uint64(0) - case "stride.records.GenesisState.epoch_unbonding_record_list": - x.EpochUnbondingRecordList = nil - case "stride.records.GenesisState.deposit_record_list": - x.DepositRecordList = nil - case "stride.records.GenesisState.deposit_record_count": - x.DepositRecordCount = uint64(0) - case "stride.records.GenesisState.lsm_token_deposit_list": - x.LsmTokenDepositList = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.GenesisState")) - } - panic(fmt.Errorf("message stride.records.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.records.GenesisState.port_id": - value := x.PortId - return protoreflect.ValueOfString(value) - case "stride.records.GenesisState.user_redemption_record_list": - if len(x.UserRedemptionRecordList) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) - } - listValue := &_GenesisState_3_list{list: &x.UserRedemptionRecordList} - return protoreflect.ValueOfList(listValue) - case "stride.records.GenesisState.user_redemption_record_count": - value := x.UserRedemptionRecordCount - return protoreflect.ValueOfUint64(value) - case "stride.records.GenesisState.epoch_unbonding_record_list": - if len(x.EpochUnbondingRecordList) == 0 { - return protoreflect.ValueOfList(&_GenesisState_5_list{}) - } - listValue := &_GenesisState_5_list{list: &x.EpochUnbondingRecordList} - return protoreflect.ValueOfList(listValue) - case "stride.records.GenesisState.deposit_record_list": - if len(x.DepositRecordList) == 0 { - return protoreflect.ValueOfList(&_GenesisState_7_list{}) - } - listValue := &_GenesisState_7_list{list: &x.DepositRecordList} - return protoreflect.ValueOfList(listValue) - case "stride.records.GenesisState.deposit_record_count": - value := x.DepositRecordCount - return protoreflect.ValueOfUint64(value) - case "stride.records.GenesisState.lsm_token_deposit_list": - if len(x.LsmTokenDepositList) == 0 { - return protoreflect.ValueOfList(&_GenesisState_9_list{}) - } - listValue := &_GenesisState_9_list{list: &x.LsmTokenDepositList} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.GenesisState")) - } - panic(fmt.Errorf("message stride.records.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - case "stride.records.GenesisState.port_id": - x.PortId = value.Interface().(string) - case "stride.records.GenesisState.user_redemption_record_list": - lv := value.List() - clv := lv.(*_GenesisState_3_list) - x.UserRedemptionRecordList = *clv.list - case "stride.records.GenesisState.user_redemption_record_count": - x.UserRedemptionRecordCount = value.Uint() - case "stride.records.GenesisState.epoch_unbonding_record_list": - lv := value.List() - clv := lv.(*_GenesisState_5_list) - x.EpochUnbondingRecordList = *clv.list - case "stride.records.GenesisState.deposit_record_list": - lv := value.List() - clv := lv.(*_GenesisState_7_list) - x.DepositRecordList = *clv.list - case "stride.records.GenesisState.deposit_record_count": - x.DepositRecordCount = value.Uint() - case "stride.records.GenesisState.lsm_token_deposit_list": - lv := value.List() - clv := lv.(*_GenesisState_9_list) - x.LsmTokenDepositList = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.GenesisState")) - } - panic(fmt.Errorf("message stride.records.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "stride.records.GenesisState.user_redemption_record_list": - if x.UserRedemptionRecordList == nil { - x.UserRedemptionRecordList = []*UserRedemptionRecord{} - } - value := &_GenesisState_3_list{list: &x.UserRedemptionRecordList} - return protoreflect.ValueOfList(value) - case "stride.records.GenesisState.epoch_unbonding_record_list": - if x.EpochUnbondingRecordList == nil { - x.EpochUnbondingRecordList = []*EpochUnbondingRecord{} - } - value := &_GenesisState_5_list{list: &x.EpochUnbondingRecordList} - return protoreflect.ValueOfList(value) - case "stride.records.GenesisState.deposit_record_list": - if x.DepositRecordList == nil { - x.DepositRecordList = []*DepositRecord{} - } - value := &_GenesisState_7_list{list: &x.DepositRecordList} - return protoreflect.ValueOfList(value) - case "stride.records.GenesisState.lsm_token_deposit_list": - if x.LsmTokenDepositList == nil { - x.LsmTokenDepositList = []*LSMTokenDeposit{} - } - value := &_GenesisState_9_list{list: &x.LsmTokenDepositList} - return protoreflect.ValueOfList(value) - case "stride.records.GenesisState.port_id": - panic(fmt.Errorf("field port_id of message stride.records.GenesisState is not mutable")) - case "stride.records.GenesisState.user_redemption_record_count": - panic(fmt.Errorf("field user_redemption_record_count of message stride.records.GenesisState is not mutable")) - case "stride.records.GenesisState.deposit_record_count": - panic(fmt.Errorf("field deposit_record_count of message stride.records.GenesisState is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.GenesisState")) - } - panic(fmt.Errorf("message stride.records.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.records.GenesisState.port_id": - return protoreflect.ValueOfString("") - case "stride.records.GenesisState.user_redemption_record_list": - list := []*UserRedemptionRecord{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) - case "stride.records.GenesisState.user_redemption_record_count": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.records.GenesisState.epoch_unbonding_record_list": - list := []*EpochUnbondingRecord{} - return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) - case "stride.records.GenesisState.deposit_record_list": - list := []*DepositRecord{} - return protoreflect.ValueOfList(&_GenesisState_7_list{list: &list}) - case "stride.records.GenesisState.deposit_record_count": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.records.GenesisState.lsm_token_deposit_list": - list := []*LSMTokenDeposit{} - return protoreflect.ValueOfList(&_GenesisState_9_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.GenesisState")) - } - panic(fmt.Errorf("message stride.records.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PortId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.UserRedemptionRecordList) > 0 { - for _, e := range x.UserRedemptionRecordList { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.UserRedemptionRecordCount != 0 { - n += 1 + runtime.Sov(uint64(x.UserRedemptionRecordCount)) - } - if len(x.EpochUnbondingRecordList) > 0 { - for _, e := range x.EpochUnbondingRecordList { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.DepositRecordList) > 0 { - for _, e := range x.DepositRecordList { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.DepositRecordCount != 0 { - n += 1 + runtime.Sov(uint64(x.DepositRecordCount)) - } - if len(x.LsmTokenDepositList) > 0 { - for _, e := range x.LsmTokenDepositList { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.LsmTokenDepositList) > 0 { - for iNdEx := len(x.LsmTokenDepositList) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.LsmTokenDepositList[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if x.DepositRecordCount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DepositRecordCount)) - i-- - dAtA[i] = 0x40 - } - if len(x.DepositRecordList) > 0 { - for iNdEx := len(x.DepositRecordList) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DepositRecordList[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.EpochUnbondingRecordList) > 0 { - for iNdEx := len(x.EpochUnbondingRecordList) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.EpochUnbondingRecordList[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if x.UserRedemptionRecordCount != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.UserRedemptionRecordCount)) - i-- - dAtA[i] = 0x20 - } - if len(x.UserRedemptionRecordList) > 0 { - for iNdEx := len(x.UserRedemptionRecordList) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.UserRedemptionRecordList[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.PortId) > 0 { - i -= len(x.PortId) - copy(dAtA[i:], x.PortId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PortId))) - i-- - dAtA[i] = 0x12 - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecordList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UserRedemptionRecordList = append(x.UserRedemptionRecordList, &UserRedemptionRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserRedemptionRecordList[len(x.UserRedemptionRecordList)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecordCount", wireType) - } - x.UserRedemptionRecordCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.UserRedemptionRecordCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecordList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.EpochUnbondingRecordList = append(x.EpochUnbondingRecordList, &EpochUnbondingRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EpochUnbondingRecordList[len(x.EpochUnbondingRecordList)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositRecordList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DepositRecordList = append(x.DepositRecordList, &DepositRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositRecordList[len(x.DepositRecordList)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositRecordCount", wireType) - } - x.DepositRecordCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DepositRecordCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LsmTokenDepositList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LsmTokenDepositList = append(x.LsmTokenDepositList, &LSMTokenDeposit{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LsmTokenDepositList[len(x.LsmTokenDepositList)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/records/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the records module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - UserRedemptionRecordList []*UserRedemptionRecord `protobuf:"bytes,3,rep,name=user_redemption_record_list,json=userRedemptionRecordList,proto3" json:"user_redemption_record_list,omitempty"` - UserRedemptionRecordCount uint64 `protobuf:"varint,4,opt,name=user_redemption_record_count,json=userRedemptionRecordCount,proto3" json:"user_redemption_record_count,omitempty"` - EpochUnbondingRecordList []*EpochUnbondingRecord `protobuf:"bytes,5,rep,name=epoch_unbonding_record_list,json=epochUnbondingRecordList,proto3" json:"epoch_unbonding_record_list,omitempty"` - DepositRecordList []*DepositRecord `protobuf:"bytes,7,rep,name=deposit_record_list,json=depositRecordList,proto3" json:"deposit_record_list,omitempty"` - DepositRecordCount uint64 `protobuf:"varint,8,opt,name=deposit_record_count,json=depositRecordCount,proto3" json:"deposit_record_count,omitempty"` - LsmTokenDepositList []*LSMTokenDeposit `protobuf:"bytes,9,rep,name=lsm_token_deposit_list,json=lsmTokenDepositList,proto3" json:"lsm_token_deposit_list,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_stride_records_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -func (x *GenesisState) GetPortId() string { - if x != nil { - return x.PortId - } - return "" -} - -func (x *GenesisState) GetUserRedemptionRecordList() []*UserRedemptionRecord { - if x != nil { - return x.UserRedemptionRecordList - } - return nil -} - -func (x *GenesisState) GetUserRedemptionRecordCount() uint64 { - if x != nil { - return x.UserRedemptionRecordCount - } - return 0 -} - -func (x *GenesisState) GetEpochUnbondingRecordList() []*EpochUnbondingRecord { - if x != nil { - return x.EpochUnbondingRecordList - } - return nil -} - -func (x *GenesisState) GetDepositRecordList() []*DepositRecord { - if x != nil { - return x.DepositRecordList - } - return nil -} - -func (x *GenesisState) GetDepositRecordCount() uint64 { - if x != nil { - return x.DepositRecordCount - } - return 0 -} - -func (x *GenesisState) GetLsmTokenDepositList() []*LSMTokenDeposit { - if x != nil { - return x.LsmTokenDepositList - } - return nil -} - -var File_stride_records_genesis_proto protoreflect.FileDescriptor - -var file_stride_records_genesis_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x1a, 0x1b, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xd7, 0x04, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, - 0x69, 0x0a, 0x1b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x18, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, 0x0a, 0x1c, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x19, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x69, 0x0a, 0x1b, 0x65, - 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x18, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x53, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x5a, 0x0a, - 0x16, 0x6c, 0x73, 0x6d, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x4c, - 0x53, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x13, 0x6c, 0x73, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x42, 0xb1, 0x01, 0x0a, 0x12, 0x63, 0x6f, - 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, - 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x52, 0x58, 0xaa, 0x02, 0x0e, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0xca, 0x02, 0x0e, - 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0xe2, 0x02, - 0x1a, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x53, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_records_genesis_proto_rawDescOnce sync.Once - file_stride_records_genesis_proto_rawDescData = file_stride_records_genesis_proto_rawDesc -) - -func file_stride_records_genesis_proto_rawDescGZIP() []byte { - file_stride_records_genesis_proto_rawDescOnce.Do(func() { - file_stride_records_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_records_genesis_proto_rawDescData) - }) - return file_stride_records_genesis_proto_rawDescData -} - -var file_stride_records_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_records_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: stride.records.GenesisState - (*Params)(nil), // 1: stride.records.Params - (*UserRedemptionRecord)(nil), // 2: stride.records.UserRedemptionRecord - (*EpochUnbondingRecord)(nil), // 3: stride.records.EpochUnbondingRecord - (*DepositRecord)(nil), // 4: stride.records.DepositRecord - (*LSMTokenDeposit)(nil), // 5: stride.records.LSMTokenDeposit -} -var file_stride_records_genesis_proto_depIdxs = []int32{ - 1, // 0: stride.records.GenesisState.params:type_name -> stride.records.Params - 2, // 1: stride.records.GenesisState.user_redemption_record_list:type_name -> stride.records.UserRedemptionRecord - 3, // 2: stride.records.GenesisState.epoch_unbonding_record_list:type_name -> stride.records.EpochUnbondingRecord - 4, // 3: stride.records.GenesisState.deposit_record_list:type_name -> stride.records.DepositRecord - 5, // 4: stride.records.GenesisState.lsm_token_deposit_list:type_name -> stride.records.LSMTokenDeposit - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_stride_records_genesis_proto_init() } -func file_stride_records_genesis_proto_init() { - if File_stride_records_genesis_proto != nil { - return - } - file_stride_records_params_proto_init() - file_stride_records_records_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_records_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_records_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_records_genesis_proto_goTypes, - DependencyIndexes: file_stride_records_genesis_proto_depIdxs, - MessageInfos: file_stride_records_genesis_proto_msgTypes, - }.Build() - File_stride_records_genesis_proto = out.File - file_stride_records_genesis_proto_rawDesc = nil - file_stride_records_genesis_proto_goTypes = nil - file_stride_records_genesis_proto_depIdxs = nil -} diff --git a/api/stride/records/params.pulsar.go b/api/stride/records/params.pulsar.go deleted file mode 100644 index 47d1a72a1..000000000 --- a/api/stride/records/params.pulsar.go +++ /dev/null @@ -1,493 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package records - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Params protoreflect.MessageDescriptor -) - -func init() { - file_stride_records_params_proto_init() - md_Params = File_stride_records_params_proto.Messages().ByName("Params") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_params_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.Params")) - } - panic(fmt.Errorf("message stride.records.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.Params")) - } - panic(fmt.Errorf("message stride.records.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.Params")) - } - panic(fmt.Errorf("message stride.records.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.Params")) - } - panic(fmt.Errorf("message stride.records.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.Params")) - } - panic(fmt.Errorf("message stride.records.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.Params")) - } - panic(fmt.Errorf("message stride.records.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/records/params.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Params defines the parameters for the module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_stride_records_params_proto_rawDescGZIP(), []int{0} -} - -var File_stride_records_params_proto protoreflect.FileDescriptor - -var file_stride_records_params_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x08, 0x0a, - 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xb0, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x42, 0x0b, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, - 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x52, 0x58, 0xaa, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0xca, 0x02, 0x0e, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0xe2, 0x02, 0x1a, 0x53, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x3a, 0x3a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_stride_records_params_proto_rawDescOnce sync.Once - file_stride_records_params_proto_rawDescData = file_stride_records_params_proto_rawDesc -) - -func file_stride_records_params_proto_rawDescGZIP() []byte { - file_stride_records_params_proto_rawDescOnce.Do(func() { - file_stride_records_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_records_params_proto_rawDescData) - }) - return file_stride_records_params_proto_rawDescData -} - -var file_stride_records_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_records_params_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: stride.records.Params -} -var file_stride_records_params_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_stride_records_params_proto_init() } -func file_stride_records_params_proto_init() { - if File_stride_records_params_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_records_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_records_params_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_records_params_proto_goTypes, - DependencyIndexes: file_stride_records_params_proto_depIdxs, - MessageInfos: file_stride_records_params_proto_msgTypes, - }.Build() - File_stride_records_params_proto = out.File - file_stride_records_params_proto_rawDesc = nil - file_stride_records_params_proto_goTypes = nil - file_stride_records_params_proto_depIdxs = nil -} diff --git a/api/stride/records/query.pulsar.go b/api/stride/records/query.pulsar.go deleted file mode 100644 index 76ab4571d..000000000 --- a/api/stride/records/query.pulsar.go +++ /dev/null @@ -1,12042 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package records - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryParamsRequest = File_stride_records_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryParamsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryParamsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryParamsResponse = File_stride_records_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) - -type fastReflection_QueryParamsResponse QueryParamsResponse - -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) -} - -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} - -type fastReflection_QueryParamsResponse_messageType struct{} - -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) -} -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetDepositRecordRequest protoreflect.MessageDescriptor - fd_QueryGetDepositRecordRequest_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryGetDepositRecordRequest = File_stride_records_query_proto.Messages().ByName("QueryGetDepositRecordRequest") - fd_QueryGetDepositRecordRequest_id = md_QueryGetDepositRecordRequest.Fields().ByName("id") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetDepositRecordRequest)(nil) - -type fastReflection_QueryGetDepositRecordRequest QueryGetDepositRecordRequest - -func (x *QueryGetDepositRecordRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetDepositRecordRequest)(x) -} - -func (x *QueryGetDepositRecordRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetDepositRecordRequest_messageType fastReflection_QueryGetDepositRecordRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetDepositRecordRequest_messageType{} - -type fastReflection_QueryGetDepositRecordRequest_messageType struct{} - -func (x fastReflection_QueryGetDepositRecordRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetDepositRecordRequest)(nil) -} -func (x fastReflection_QueryGetDepositRecordRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetDepositRecordRequest) -} -func (x fastReflection_QueryGetDepositRecordRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetDepositRecordRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetDepositRecordRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetDepositRecordRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetDepositRecordRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetDepositRecordRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetDepositRecordRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetDepositRecordRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetDepositRecordRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetDepositRecordRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetDepositRecordRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_QueryGetDepositRecordRequest_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetDepositRecordRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordRequest.id": - return x.Id != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetDepositRecordRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordRequest.id": - x.Id = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetDepositRecordRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryGetDepositRecordRequest.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetDepositRecordRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordRequest.id": - x.Id = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetDepositRecordRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordRequest.id": - panic(fmt.Errorf("field id of message stride.records.QueryGetDepositRecordRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetDepositRecordRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordRequest.id": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetDepositRecordRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryGetDepositRecordRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetDepositRecordRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetDepositRecordRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetDepositRecordRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetDepositRecordRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetDepositRecordRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetDepositRecordRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetDepositRecordRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetDepositRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetDepositRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetDepositRecordResponse protoreflect.MessageDescriptor - fd_QueryGetDepositRecordResponse_deposit_record protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryGetDepositRecordResponse = File_stride_records_query_proto.Messages().ByName("QueryGetDepositRecordResponse") - fd_QueryGetDepositRecordResponse_deposit_record = md_QueryGetDepositRecordResponse.Fields().ByName("deposit_record") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetDepositRecordResponse)(nil) - -type fastReflection_QueryGetDepositRecordResponse QueryGetDepositRecordResponse - -func (x *QueryGetDepositRecordResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetDepositRecordResponse)(x) -} - -func (x *QueryGetDepositRecordResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetDepositRecordResponse_messageType fastReflection_QueryGetDepositRecordResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetDepositRecordResponse_messageType{} - -type fastReflection_QueryGetDepositRecordResponse_messageType struct{} - -func (x fastReflection_QueryGetDepositRecordResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetDepositRecordResponse)(nil) -} -func (x fastReflection_QueryGetDepositRecordResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetDepositRecordResponse) -} -func (x fastReflection_QueryGetDepositRecordResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetDepositRecordResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetDepositRecordResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetDepositRecordResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetDepositRecordResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetDepositRecordResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetDepositRecordResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetDepositRecordResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetDepositRecordResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetDepositRecordResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetDepositRecordResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DepositRecord != nil { - value := protoreflect.ValueOfMessage(x.DepositRecord.ProtoReflect()) - if !f(fd_QueryGetDepositRecordResponse_deposit_record, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetDepositRecordResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordResponse.deposit_record": - return x.DepositRecord != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetDepositRecordResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordResponse.deposit_record": - x.DepositRecord = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetDepositRecordResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryGetDepositRecordResponse.deposit_record": - value := x.DepositRecord - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetDepositRecordResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordResponse.deposit_record": - x.DepositRecord = value.Message().Interface().(*DepositRecord) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetDepositRecordResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordResponse.deposit_record": - if x.DepositRecord == nil { - x.DepositRecord = new(DepositRecord) - } - return protoreflect.ValueOfMessage(x.DepositRecord.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetDepositRecordResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetDepositRecordResponse.deposit_record": - m := new(DepositRecord) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetDepositRecordResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryGetDepositRecordResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetDepositRecordResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetDepositRecordResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetDepositRecordResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetDepositRecordResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetDepositRecordResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.DepositRecord != nil { - l = options.Size(x.DepositRecord) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetDepositRecordResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.DepositRecord != nil { - encoded, err := options.Marshal(x.DepositRecord) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetDepositRecordResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetDepositRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetDepositRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.DepositRecord == nil { - x.DepositRecord = &DepositRecord{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositRecord); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllDepositRecordRequest protoreflect.MessageDescriptor - fd_QueryAllDepositRecordRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryAllDepositRecordRequest = File_stride_records_query_proto.Messages().ByName("QueryAllDepositRecordRequest") - fd_QueryAllDepositRecordRequest_pagination = md_QueryAllDepositRecordRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllDepositRecordRequest)(nil) - -type fastReflection_QueryAllDepositRecordRequest QueryAllDepositRecordRequest - -func (x *QueryAllDepositRecordRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllDepositRecordRequest)(x) -} - -func (x *QueryAllDepositRecordRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllDepositRecordRequest_messageType fastReflection_QueryAllDepositRecordRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllDepositRecordRequest_messageType{} - -type fastReflection_QueryAllDepositRecordRequest_messageType struct{} - -func (x fastReflection_QueryAllDepositRecordRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllDepositRecordRequest)(nil) -} -func (x fastReflection_QueryAllDepositRecordRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllDepositRecordRequest) -} -func (x fastReflection_QueryAllDepositRecordRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllDepositRecordRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllDepositRecordRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllDepositRecordRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllDepositRecordRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllDepositRecordRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllDepositRecordRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllDepositRecordRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllDepositRecordRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllDepositRecordRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllDepositRecordRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllDepositRecordRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllDepositRecordRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllDepositRecordRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllDepositRecordRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryAllDepositRecordRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllDepositRecordRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllDepositRecordRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllDepositRecordRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllDepositRecordRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryAllDepositRecordRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllDepositRecordRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllDepositRecordRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllDepositRecordRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllDepositRecordRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllDepositRecordRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllDepositRecordRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllDepositRecordRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllDepositRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllDepositRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllDepositRecordResponse_1_list)(nil) - -type _QueryAllDepositRecordResponse_1_list struct { - list *[]*DepositRecord -} - -func (x *_QueryAllDepositRecordResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllDepositRecordResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllDepositRecordResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DepositRecord) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllDepositRecordResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DepositRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllDepositRecordResponse_1_list) AppendMutable() protoreflect.Value { - v := new(DepositRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllDepositRecordResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllDepositRecordResponse_1_list) NewElement() protoreflect.Value { - v := new(DepositRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllDepositRecordResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllDepositRecordResponse protoreflect.MessageDescriptor - fd_QueryAllDepositRecordResponse_deposit_record protoreflect.FieldDescriptor - fd_QueryAllDepositRecordResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryAllDepositRecordResponse = File_stride_records_query_proto.Messages().ByName("QueryAllDepositRecordResponse") - fd_QueryAllDepositRecordResponse_deposit_record = md_QueryAllDepositRecordResponse.Fields().ByName("deposit_record") - fd_QueryAllDepositRecordResponse_pagination = md_QueryAllDepositRecordResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllDepositRecordResponse)(nil) - -type fastReflection_QueryAllDepositRecordResponse QueryAllDepositRecordResponse - -func (x *QueryAllDepositRecordResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllDepositRecordResponse)(x) -} - -func (x *QueryAllDepositRecordResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllDepositRecordResponse_messageType fastReflection_QueryAllDepositRecordResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllDepositRecordResponse_messageType{} - -type fastReflection_QueryAllDepositRecordResponse_messageType struct{} - -func (x fastReflection_QueryAllDepositRecordResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllDepositRecordResponse)(nil) -} -func (x fastReflection_QueryAllDepositRecordResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllDepositRecordResponse) -} -func (x fastReflection_QueryAllDepositRecordResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllDepositRecordResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllDepositRecordResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllDepositRecordResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllDepositRecordResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllDepositRecordResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllDepositRecordResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllDepositRecordResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllDepositRecordResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllDepositRecordResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllDepositRecordResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.DepositRecord) != 0 { - value := protoreflect.ValueOfList(&_QueryAllDepositRecordResponse_1_list{list: &x.DepositRecord}) - if !f(fd_QueryAllDepositRecordResponse_deposit_record, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllDepositRecordResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllDepositRecordResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordResponse.deposit_record": - return len(x.DepositRecord) != 0 - case "stride.records.QueryAllDepositRecordResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllDepositRecordResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordResponse.deposit_record": - x.DepositRecord = nil - case "stride.records.QueryAllDepositRecordResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllDepositRecordResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryAllDepositRecordResponse.deposit_record": - if len(x.DepositRecord) == 0 { - return protoreflect.ValueOfList(&_QueryAllDepositRecordResponse_1_list{}) - } - listValue := &_QueryAllDepositRecordResponse_1_list{list: &x.DepositRecord} - return protoreflect.ValueOfList(listValue) - case "stride.records.QueryAllDepositRecordResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllDepositRecordResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordResponse.deposit_record": - lv := value.List() - clv := lv.(*_QueryAllDepositRecordResponse_1_list) - x.DepositRecord = *clv.list - case "stride.records.QueryAllDepositRecordResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllDepositRecordResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordResponse.deposit_record": - if x.DepositRecord == nil { - x.DepositRecord = []*DepositRecord{} - } - value := &_QueryAllDepositRecordResponse_1_list{list: &x.DepositRecord} - return protoreflect.ValueOfList(value) - case "stride.records.QueryAllDepositRecordResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllDepositRecordResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllDepositRecordResponse.deposit_record": - list := []*DepositRecord{} - return protoreflect.ValueOfList(&_QueryAllDepositRecordResponse_1_list{list: &list}) - case "stride.records.QueryAllDepositRecordResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllDepositRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllDepositRecordResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllDepositRecordResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryAllDepositRecordResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllDepositRecordResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllDepositRecordResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllDepositRecordResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllDepositRecordResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllDepositRecordResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.DepositRecord) > 0 { - for _, e := range x.DepositRecord { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllDepositRecordResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.DepositRecord) > 0 { - for iNdEx := len(x.DepositRecord) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DepositRecord[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllDepositRecordResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllDepositRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllDepositRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DepositRecord = append(x.DepositRecord, &DepositRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositRecord[len(x.DepositRecord)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryDepositRecordByHostRequest protoreflect.MessageDescriptor - fd_QueryDepositRecordByHostRequest_host_zone_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryDepositRecordByHostRequest = File_stride_records_query_proto.Messages().ByName("QueryDepositRecordByHostRequest") - fd_QueryDepositRecordByHostRequest_host_zone_id = md_QueryDepositRecordByHostRequest.Fields().ByName("host_zone_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositRecordByHostRequest)(nil) - -type fastReflection_QueryDepositRecordByHostRequest QueryDepositRecordByHostRequest - -func (x *QueryDepositRecordByHostRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositRecordByHostRequest)(x) -} - -func (x *QueryDepositRecordByHostRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositRecordByHostRequest_messageType fastReflection_QueryDepositRecordByHostRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositRecordByHostRequest_messageType{} - -type fastReflection_QueryDepositRecordByHostRequest_messageType struct{} - -func (x fastReflection_QueryDepositRecordByHostRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositRecordByHostRequest)(nil) -} -func (x fastReflection_QueryDepositRecordByHostRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositRecordByHostRequest) -} -func (x fastReflection_QueryDepositRecordByHostRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositRecordByHostRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositRecordByHostRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositRecordByHostRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryDepositRecordByHostRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositRecordByHostRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositRecordByHostRequest) New() protoreflect.Message { - return new(fastReflection_QueryDepositRecordByHostRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositRecordByHostRequest) Interface() protoreflect.ProtoMessage { - return (*QueryDepositRecordByHostRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryDepositRecordByHostRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_QueryDepositRecordByHostRequest_host_zone_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDepositRecordByHostRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostRequest.host_zone_id": - return x.HostZoneId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostRequest")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDepositRecordByHostRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostRequest.host_zone_id": - x.HostZoneId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostRequest")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryDepositRecordByHostRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryDepositRecordByHostRequest.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostRequest")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDepositRecordByHostRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostRequest.host_zone_id": - x.HostZoneId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostRequest")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDepositRecordByHostRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostRequest.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.records.QueryDepositRecordByHostRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostRequest")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryDepositRecordByHostRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostRequest.host_zone_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostRequest")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryDepositRecordByHostRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryDepositRecordByHostRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryDepositRecordByHostRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDepositRecordByHostRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryDepositRecordByHostRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryDepositRecordByHostRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositRecordByHostRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositRecordByHostRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositRecordByHostRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositRecordByHostRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositRecordByHostRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryDepositRecordByHostResponse_1_list)(nil) - -type _QueryDepositRecordByHostResponse_1_list struct { - list *[]*DepositRecord -} - -func (x *_QueryDepositRecordByHostResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryDepositRecordByHostResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryDepositRecordByHostResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DepositRecord) - (*x.list)[i] = concreteValue -} - -func (x *_QueryDepositRecordByHostResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*DepositRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryDepositRecordByHostResponse_1_list) AppendMutable() protoreflect.Value { - v := new(DepositRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDepositRecordByHostResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryDepositRecordByHostResponse_1_list) NewElement() protoreflect.Value { - v := new(DepositRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryDepositRecordByHostResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryDepositRecordByHostResponse protoreflect.MessageDescriptor - fd_QueryDepositRecordByHostResponse_deposit_record protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryDepositRecordByHostResponse = File_stride_records_query_proto.Messages().ByName("QueryDepositRecordByHostResponse") - fd_QueryDepositRecordByHostResponse_deposit_record = md_QueryDepositRecordByHostResponse.Fields().ByName("deposit_record") -} - -var _ protoreflect.Message = (*fastReflection_QueryDepositRecordByHostResponse)(nil) - -type fastReflection_QueryDepositRecordByHostResponse QueryDepositRecordByHostResponse - -func (x *QueryDepositRecordByHostResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryDepositRecordByHostResponse)(x) -} - -func (x *QueryDepositRecordByHostResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryDepositRecordByHostResponse_messageType fastReflection_QueryDepositRecordByHostResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryDepositRecordByHostResponse_messageType{} - -type fastReflection_QueryDepositRecordByHostResponse_messageType struct{} - -func (x fastReflection_QueryDepositRecordByHostResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryDepositRecordByHostResponse)(nil) -} -func (x fastReflection_QueryDepositRecordByHostResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryDepositRecordByHostResponse) -} -func (x fastReflection_QueryDepositRecordByHostResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositRecordByHostResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryDepositRecordByHostResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryDepositRecordByHostResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryDepositRecordByHostResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryDepositRecordByHostResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryDepositRecordByHostResponse) New() protoreflect.Message { - return new(fastReflection_QueryDepositRecordByHostResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryDepositRecordByHostResponse) Interface() protoreflect.ProtoMessage { - return (*QueryDepositRecordByHostResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryDepositRecordByHostResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.DepositRecord) != 0 { - value := protoreflect.ValueOfList(&_QueryDepositRecordByHostResponse_1_list{list: &x.DepositRecord}) - if !f(fd_QueryDepositRecordByHostResponse_deposit_record, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryDepositRecordByHostResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostResponse.deposit_record": - return len(x.DepositRecord) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostResponse")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDepositRecordByHostResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostResponse.deposit_record": - x.DepositRecord = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostResponse")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryDepositRecordByHostResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryDepositRecordByHostResponse.deposit_record": - if len(x.DepositRecord) == 0 { - return protoreflect.ValueOfList(&_QueryDepositRecordByHostResponse_1_list{}) - } - listValue := &_QueryDepositRecordByHostResponse_1_list{list: &x.DepositRecord} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostResponse")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDepositRecordByHostResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostResponse.deposit_record": - lv := value.List() - clv := lv.(*_QueryDepositRecordByHostResponse_1_list) - x.DepositRecord = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostResponse")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDepositRecordByHostResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostResponse.deposit_record": - if x.DepositRecord == nil { - x.DepositRecord = []*DepositRecord{} - } - value := &_QueryDepositRecordByHostResponse_1_list{list: &x.DepositRecord} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostResponse")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryDepositRecordByHostResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryDepositRecordByHostResponse.deposit_record": - list := []*DepositRecord{} - return protoreflect.ValueOfList(&_QueryDepositRecordByHostResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryDepositRecordByHostResponse")) - } - panic(fmt.Errorf("message stride.records.QueryDepositRecordByHostResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryDepositRecordByHostResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryDepositRecordByHostResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryDepositRecordByHostResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryDepositRecordByHostResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryDepositRecordByHostResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryDepositRecordByHostResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryDepositRecordByHostResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.DepositRecord) > 0 { - for _, e := range x.DepositRecord { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositRecordByHostResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.DepositRecord) > 0 { - for iNdEx := len(x.DepositRecord) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DepositRecord[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryDepositRecordByHostResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositRecordByHostResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryDepositRecordByHostResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DepositRecord = append(x.DepositRecord, &DepositRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DepositRecord[len(x.DepositRecord)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetUserRedemptionRecordRequest protoreflect.MessageDescriptor - fd_QueryGetUserRedemptionRecordRequest_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryGetUserRedemptionRecordRequest = File_stride_records_query_proto.Messages().ByName("QueryGetUserRedemptionRecordRequest") - fd_QueryGetUserRedemptionRecordRequest_id = md_QueryGetUserRedemptionRecordRequest.Fields().ByName("id") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetUserRedemptionRecordRequest)(nil) - -type fastReflection_QueryGetUserRedemptionRecordRequest QueryGetUserRedemptionRecordRequest - -func (x *QueryGetUserRedemptionRecordRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetUserRedemptionRecordRequest)(x) -} - -func (x *QueryGetUserRedemptionRecordRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetUserRedemptionRecordRequest_messageType fastReflection_QueryGetUserRedemptionRecordRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetUserRedemptionRecordRequest_messageType{} - -type fastReflection_QueryGetUserRedemptionRecordRequest_messageType struct{} - -func (x fastReflection_QueryGetUserRedemptionRecordRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetUserRedemptionRecordRequest)(nil) -} -func (x fastReflection_QueryGetUserRedemptionRecordRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetUserRedemptionRecordRequest) -} -func (x fastReflection_QueryGetUserRedemptionRecordRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetUserRedemptionRecordRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetUserRedemptionRecordRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetUserRedemptionRecordRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetUserRedemptionRecordRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetUserRedemptionRecordRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_QueryGetUserRedemptionRecordRequest_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordRequest.id": - return x.Id != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordRequest.id": - x.Id = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryGetUserRedemptionRecordRequest.id": - value := x.Id - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordRequest.id": - x.Id = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordRequest.id": - panic(fmt.Errorf("field id of message stride.records.QueryGetUserRedemptionRecordRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordRequest.id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryGetUserRedemptionRecordRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetUserRedemptionRecordRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetUserRedemptionRecordRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetUserRedemptionRecordRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetUserRedemptionRecordRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetUserRedemptionRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetUserRedemptionRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetUserRedemptionRecordResponse protoreflect.MessageDescriptor - fd_QueryGetUserRedemptionRecordResponse_user_redemption_record protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryGetUserRedemptionRecordResponse = File_stride_records_query_proto.Messages().ByName("QueryGetUserRedemptionRecordResponse") - fd_QueryGetUserRedemptionRecordResponse_user_redemption_record = md_QueryGetUserRedemptionRecordResponse.Fields().ByName("user_redemption_record") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetUserRedemptionRecordResponse)(nil) - -type fastReflection_QueryGetUserRedemptionRecordResponse QueryGetUserRedemptionRecordResponse - -func (x *QueryGetUserRedemptionRecordResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetUserRedemptionRecordResponse)(x) -} - -func (x *QueryGetUserRedemptionRecordResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetUserRedemptionRecordResponse_messageType fastReflection_QueryGetUserRedemptionRecordResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetUserRedemptionRecordResponse_messageType{} - -type fastReflection_QueryGetUserRedemptionRecordResponse_messageType struct{} - -func (x fastReflection_QueryGetUserRedemptionRecordResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetUserRedemptionRecordResponse)(nil) -} -func (x fastReflection_QueryGetUserRedemptionRecordResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetUserRedemptionRecordResponse) -} -func (x fastReflection_QueryGetUserRedemptionRecordResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetUserRedemptionRecordResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetUserRedemptionRecordResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetUserRedemptionRecordResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetUserRedemptionRecordResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetUserRedemptionRecordResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.UserRedemptionRecord != nil { - value := protoreflect.ValueOfMessage(x.UserRedemptionRecord.ProtoReflect()) - if !f(fd_QueryGetUserRedemptionRecordResponse_user_redemption_record, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordResponse.user_redemption_record": - return x.UserRedemptionRecord != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordResponse.user_redemption_record": - x.UserRedemptionRecord = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryGetUserRedemptionRecordResponse.user_redemption_record": - value := x.UserRedemptionRecord - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordResponse.user_redemption_record": - x.UserRedemptionRecord = value.Message().Interface().(*UserRedemptionRecord) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordResponse.user_redemption_record": - if x.UserRedemptionRecord == nil { - x.UserRedemptionRecord = new(UserRedemptionRecord) - } - return protoreflect.ValueOfMessage(x.UserRedemptionRecord.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetUserRedemptionRecordResponse.user_redemption_record": - m := new(UserRedemptionRecord) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryGetUserRedemptionRecordResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetUserRedemptionRecordResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetUserRedemptionRecordResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.UserRedemptionRecord != nil { - l = options.Size(x.UserRedemptionRecord) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetUserRedemptionRecordResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.UserRedemptionRecord != nil { - encoded, err := options.Marshal(x.UserRedemptionRecord) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetUserRedemptionRecordResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetUserRedemptionRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetUserRedemptionRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.UserRedemptionRecord == nil { - x.UserRedemptionRecord = &UserRedemptionRecord{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserRedemptionRecord); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllUserRedemptionRecordRequest protoreflect.MessageDescriptor - fd_QueryAllUserRedemptionRecordRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryAllUserRedemptionRecordRequest = File_stride_records_query_proto.Messages().ByName("QueryAllUserRedemptionRecordRequest") - fd_QueryAllUserRedemptionRecordRequest_pagination = md_QueryAllUserRedemptionRecordRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllUserRedemptionRecordRequest)(nil) - -type fastReflection_QueryAllUserRedemptionRecordRequest QueryAllUserRedemptionRecordRequest - -func (x *QueryAllUserRedemptionRecordRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllUserRedemptionRecordRequest)(x) -} - -func (x *QueryAllUserRedemptionRecordRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllUserRedemptionRecordRequest_messageType fastReflection_QueryAllUserRedemptionRecordRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllUserRedemptionRecordRequest_messageType{} - -type fastReflection_QueryAllUserRedemptionRecordRequest_messageType struct{} - -func (x fastReflection_QueryAllUserRedemptionRecordRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllUserRedemptionRecordRequest)(nil) -} -func (x fastReflection_QueryAllUserRedemptionRecordRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllUserRedemptionRecordRequest) -} -func (x fastReflection_QueryAllUserRedemptionRecordRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllUserRedemptionRecordRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllUserRedemptionRecordRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllUserRedemptionRecordRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllUserRedemptionRecordRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllUserRedemptionRecordRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllUserRedemptionRecordRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryAllUserRedemptionRecordRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryAllUserRedemptionRecordRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllUserRedemptionRecordRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllUserRedemptionRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllUserRedemptionRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllUserRedemptionRecordResponse_1_list)(nil) - -type _QueryAllUserRedemptionRecordResponse_1_list struct { - list *[]*UserRedemptionRecord -} - -func (x *_QueryAllUserRedemptionRecordResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllUserRedemptionRecordResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllUserRedemptionRecordResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserRedemptionRecord) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllUserRedemptionRecordResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserRedemptionRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllUserRedemptionRecordResponse_1_list) AppendMutable() protoreflect.Value { - v := new(UserRedemptionRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllUserRedemptionRecordResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllUserRedemptionRecordResponse_1_list) NewElement() protoreflect.Value { - v := new(UserRedemptionRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllUserRedemptionRecordResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllUserRedemptionRecordResponse protoreflect.MessageDescriptor - fd_QueryAllUserRedemptionRecordResponse_user_redemption_record protoreflect.FieldDescriptor - fd_QueryAllUserRedemptionRecordResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryAllUserRedemptionRecordResponse = File_stride_records_query_proto.Messages().ByName("QueryAllUserRedemptionRecordResponse") - fd_QueryAllUserRedemptionRecordResponse_user_redemption_record = md_QueryAllUserRedemptionRecordResponse.Fields().ByName("user_redemption_record") - fd_QueryAllUserRedemptionRecordResponse_pagination = md_QueryAllUserRedemptionRecordResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllUserRedemptionRecordResponse)(nil) - -type fastReflection_QueryAllUserRedemptionRecordResponse QueryAllUserRedemptionRecordResponse - -func (x *QueryAllUserRedemptionRecordResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllUserRedemptionRecordResponse)(x) -} - -func (x *QueryAllUserRedemptionRecordResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllUserRedemptionRecordResponse_messageType fastReflection_QueryAllUserRedemptionRecordResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllUserRedemptionRecordResponse_messageType{} - -type fastReflection_QueryAllUserRedemptionRecordResponse_messageType struct{} - -func (x fastReflection_QueryAllUserRedemptionRecordResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllUserRedemptionRecordResponse)(nil) -} -func (x fastReflection_QueryAllUserRedemptionRecordResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllUserRedemptionRecordResponse) -} -func (x fastReflection_QueryAllUserRedemptionRecordResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllUserRedemptionRecordResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllUserRedemptionRecordResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllUserRedemptionRecordResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllUserRedemptionRecordResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllUserRedemptionRecordResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.UserRedemptionRecord) != 0 { - value := protoreflect.ValueOfList(&_QueryAllUserRedemptionRecordResponse_1_list{list: &x.UserRedemptionRecord}) - if !f(fd_QueryAllUserRedemptionRecordResponse_user_redemption_record, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllUserRedemptionRecordResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordResponse.user_redemption_record": - return len(x.UserRedemptionRecord) != 0 - case "stride.records.QueryAllUserRedemptionRecordResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordResponse.user_redemption_record": - x.UserRedemptionRecord = nil - case "stride.records.QueryAllUserRedemptionRecordResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryAllUserRedemptionRecordResponse.user_redemption_record": - if len(x.UserRedemptionRecord) == 0 { - return protoreflect.ValueOfList(&_QueryAllUserRedemptionRecordResponse_1_list{}) - } - listValue := &_QueryAllUserRedemptionRecordResponse_1_list{list: &x.UserRedemptionRecord} - return protoreflect.ValueOfList(listValue) - case "stride.records.QueryAllUserRedemptionRecordResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordResponse.user_redemption_record": - lv := value.List() - clv := lv.(*_QueryAllUserRedemptionRecordResponse_1_list) - x.UserRedemptionRecord = *clv.list - case "stride.records.QueryAllUserRedemptionRecordResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordResponse.user_redemption_record": - if x.UserRedemptionRecord == nil { - x.UserRedemptionRecord = []*UserRedemptionRecord{} - } - value := &_QueryAllUserRedemptionRecordResponse_1_list{list: &x.UserRedemptionRecord} - return protoreflect.ValueOfList(value) - case "stride.records.QueryAllUserRedemptionRecordResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordResponse.user_redemption_record": - list := []*UserRedemptionRecord{} - return protoreflect.ValueOfList(&_QueryAllUserRedemptionRecordResponse_1_list{list: &list}) - case "stride.records.QueryAllUserRedemptionRecordResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryAllUserRedemptionRecordResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllUserRedemptionRecordResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.UserRedemptionRecord) > 0 { - for _, e := range x.UserRedemptionRecord { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.UserRedemptionRecord) > 0 { - for iNdEx := len(x.UserRedemptionRecord) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.UserRedemptionRecord[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllUserRedemptionRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllUserRedemptionRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UserRedemptionRecord = append(x.UserRedemptionRecord, &UserRedemptionRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserRedemptionRecord[len(x.UserRedemptionRecord)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllUserRedemptionRecordForUserRequest protoreflect.MessageDescriptor - fd_QueryAllUserRedemptionRecordForUserRequest_chain_id protoreflect.FieldDescriptor - fd_QueryAllUserRedemptionRecordForUserRequest_day protoreflect.FieldDescriptor - fd_QueryAllUserRedemptionRecordForUserRequest_address protoreflect.FieldDescriptor - fd_QueryAllUserRedemptionRecordForUserRequest_limit protoreflect.FieldDescriptor - fd_QueryAllUserRedemptionRecordForUserRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryAllUserRedemptionRecordForUserRequest = File_stride_records_query_proto.Messages().ByName("QueryAllUserRedemptionRecordForUserRequest") - fd_QueryAllUserRedemptionRecordForUserRequest_chain_id = md_QueryAllUserRedemptionRecordForUserRequest.Fields().ByName("chain_id") - fd_QueryAllUserRedemptionRecordForUserRequest_day = md_QueryAllUserRedemptionRecordForUserRequest.Fields().ByName("day") - fd_QueryAllUserRedemptionRecordForUserRequest_address = md_QueryAllUserRedemptionRecordForUserRequest.Fields().ByName("address") - fd_QueryAllUserRedemptionRecordForUserRequest_limit = md_QueryAllUserRedemptionRecordForUserRequest.Fields().ByName("limit") - fd_QueryAllUserRedemptionRecordForUserRequest_pagination = md_QueryAllUserRedemptionRecordForUserRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllUserRedemptionRecordForUserRequest)(nil) - -type fastReflection_QueryAllUserRedemptionRecordForUserRequest QueryAllUserRedemptionRecordForUserRequest - -func (x *QueryAllUserRedemptionRecordForUserRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllUserRedemptionRecordForUserRequest)(x) -} - -func (x *QueryAllUserRedemptionRecordForUserRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllUserRedemptionRecordForUserRequest_messageType fastReflection_QueryAllUserRedemptionRecordForUserRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllUserRedemptionRecordForUserRequest_messageType{} - -type fastReflection_QueryAllUserRedemptionRecordForUserRequest_messageType struct{} - -func (x fastReflection_QueryAllUserRedemptionRecordForUserRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllUserRedemptionRecordForUserRequest)(nil) -} -func (x fastReflection_QueryAllUserRedemptionRecordForUserRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllUserRedemptionRecordForUserRequest) -} -func (x fastReflection_QueryAllUserRedemptionRecordForUserRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllUserRedemptionRecordForUserRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllUserRedemptionRecordForUserRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllUserRedemptionRecordForUserRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllUserRedemptionRecordForUserRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllUserRedemptionRecordForUserRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_QueryAllUserRedemptionRecordForUserRequest_chain_id, value) { - return - } - } - if x.Day != uint64(0) { - value := protoreflect.ValueOfUint64(x.Day) - if !f(fd_QueryAllUserRedemptionRecordForUserRequest_day, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryAllUserRedemptionRecordForUserRequest_address, value) { - return - } - } - if x.Limit != uint64(0) { - value := protoreflect.ValueOfUint64(x.Limit) - if !f(fd_QueryAllUserRedemptionRecordForUserRequest_limit, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllUserRedemptionRecordForUserRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.chain_id": - return x.ChainId != "" - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.day": - return x.Day != uint64(0) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.address": - return x.Address != "" - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.limit": - return x.Limit != uint64(0) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.chain_id": - x.ChainId = "" - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.day": - x.Day = uint64(0) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.address": - x.Address = "" - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.limit": - x.Limit = uint64(0) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.day": - value := x.Day - return protoreflect.ValueOfUint64(value) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.limit": - value := x.Limit - return protoreflect.ValueOfUint64(value) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.chain_id": - x.ChainId = value.Interface().(string) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.day": - x.Day = value.Uint() - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.address": - x.Address = value.Interface().(string) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.limit": - x.Limit = value.Uint() - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.chain_id": - panic(fmt.Errorf("field chain_id of message stride.records.QueryAllUserRedemptionRecordForUserRequest is not mutable")) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.day": - panic(fmt.Errorf("field day of message stride.records.QueryAllUserRedemptionRecordForUserRequest is not mutable")) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.address": - panic(fmt.Errorf("field address of message stride.records.QueryAllUserRedemptionRecordForUserRequest is not mutable")) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.limit": - panic(fmt.Errorf("field limit of message stride.records.QueryAllUserRedemptionRecordForUserRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.chain_id": - return protoreflect.ValueOfString("") - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.day": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.address": - return protoreflect.ValueOfString("") - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.limit": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.records.QueryAllUserRedemptionRecordForUserRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryAllUserRedemptionRecordForUserRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordForUserRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Day != 0 { - n += 1 + runtime.Sov(uint64(x.Day)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Limit != 0 { - n += 1 + runtime.Sov(uint64(x.Limit)) - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordForUserRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.Limit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Limit)) - i-- - dAtA[i] = 0x20 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x1a - } - if x.Day != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Day)) - i-- - dAtA[i] = 0x10 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordForUserRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllUserRedemptionRecordForUserRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllUserRedemptionRecordForUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Day", wireType) - } - x.Day = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Day |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - x.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Limit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllUserRedemptionRecordForUserResponse_1_list)(nil) - -type _QueryAllUserRedemptionRecordForUserResponse_1_list struct { - list *[]*UserRedemptionRecord -} - -func (x *_QueryAllUserRedemptionRecordForUserResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllUserRedemptionRecordForUserResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllUserRedemptionRecordForUserResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserRedemptionRecord) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllUserRedemptionRecordForUserResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserRedemptionRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllUserRedemptionRecordForUserResponse_1_list) AppendMutable() protoreflect.Value { - v := new(UserRedemptionRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllUserRedemptionRecordForUserResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllUserRedemptionRecordForUserResponse_1_list) NewElement() protoreflect.Value { - v := new(UserRedemptionRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllUserRedemptionRecordForUserResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllUserRedemptionRecordForUserResponse protoreflect.MessageDescriptor - fd_QueryAllUserRedemptionRecordForUserResponse_user_redemption_record protoreflect.FieldDescriptor - fd_QueryAllUserRedemptionRecordForUserResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryAllUserRedemptionRecordForUserResponse = File_stride_records_query_proto.Messages().ByName("QueryAllUserRedemptionRecordForUserResponse") - fd_QueryAllUserRedemptionRecordForUserResponse_user_redemption_record = md_QueryAllUserRedemptionRecordForUserResponse.Fields().ByName("user_redemption_record") - fd_QueryAllUserRedemptionRecordForUserResponse_pagination = md_QueryAllUserRedemptionRecordForUserResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllUserRedemptionRecordForUserResponse)(nil) - -type fastReflection_QueryAllUserRedemptionRecordForUserResponse QueryAllUserRedemptionRecordForUserResponse - -func (x *QueryAllUserRedemptionRecordForUserResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllUserRedemptionRecordForUserResponse)(x) -} - -func (x *QueryAllUserRedemptionRecordForUserResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllUserRedemptionRecordForUserResponse_messageType fastReflection_QueryAllUserRedemptionRecordForUserResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllUserRedemptionRecordForUserResponse_messageType{} - -type fastReflection_QueryAllUserRedemptionRecordForUserResponse_messageType struct{} - -func (x fastReflection_QueryAllUserRedemptionRecordForUserResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllUserRedemptionRecordForUserResponse)(nil) -} -func (x fastReflection_QueryAllUserRedemptionRecordForUserResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllUserRedemptionRecordForUserResponse) -} -func (x fastReflection_QueryAllUserRedemptionRecordForUserResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllUserRedemptionRecordForUserResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllUserRedemptionRecordForUserResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllUserRedemptionRecordForUserResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllUserRedemptionRecordForUserResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllUserRedemptionRecordForUserResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.UserRedemptionRecord) != 0 { - value := protoreflect.ValueOfList(&_QueryAllUserRedemptionRecordForUserResponse_1_list{list: &x.UserRedemptionRecord}) - if !f(fd_QueryAllUserRedemptionRecordForUserResponse_user_redemption_record, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllUserRedemptionRecordForUserResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.user_redemption_record": - return len(x.UserRedemptionRecord) != 0 - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.user_redemption_record": - x.UserRedemptionRecord = nil - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.user_redemption_record": - if len(x.UserRedemptionRecord) == 0 { - return protoreflect.ValueOfList(&_QueryAllUserRedemptionRecordForUserResponse_1_list{}) - } - listValue := &_QueryAllUserRedemptionRecordForUserResponse_1_list{list: &x.UserRedemptionRecord} - return protoreflect.ValueOfList(listValue) - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.user_redemption_record": - lv := value.List() - clv := lv.(*_QueryAllUserRedemptionRecordForUserResponse_1_list) - x.UserRedemptionRecord = *clv.list - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.user_redemption_record": - if x.UserRedemptionRecord == nil { - x.UserRedemptionRecord = []*UserRedemptionRecord{} - } - value := &_QueryAllUserRedemptionRecordForUserResponse_1_list{list: &x.UserRedemptionRecord} - return protoreflect.ValueOfList(value) - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.user_redemption_record": - list := []*UserRedemptionRecord{} - return protoreflect.ValueOfList(&_QueryAllUserRedemptionRecordForUserResponse_1_list{list: &list}) - case "stride.records.QueryAllUserRedemptionRecordForUserResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllUserRedemptionRecordForUserResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllUserRedemptionRecordForUserResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryAllUserRedemptionRecordForUserResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllUserRedemptionRecordForUserResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordForUserResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.UserRedemptionRecord) > 0 { - for _, e := range x.UserRedemptionRecord { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordForUserResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.UserRedemptionRecord) > 0 { - for iNdEx := len(x.UserRedemptionRecord) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.UserRedemptionRecord[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllUserRedemptionRecordForUserResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllUserRedemptionRecordForUserResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllUserRedemptionRecordForUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UserRedemptionRecord = append(x.UserRedemptionRecord, &UserRedemptionRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserRedemptionRecord[len(x.UserRedemptionRecord)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetEpochUnbondingRecordRequest protoreflect.MessageDescriptor - fd_QueryGetEpochUnbondingRecordRequest_epoch_number protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryGetEpochUnbondingRecordRequest = File_stride_records_query_proto.Messages().ByName("QueryGetEpochUnbondingRecordRequest") - fd_QueryGetEpochUnbondingRecordRequest_epoch_number = md_QueryGetEpochUnbondingRecordRequest.Fields().ByName("epoch_number") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetEpochUnbondingRecordRequest)(nil) - -type fastReflection_QueryGetEpochUnbondingRecordRequest QueryGetEpochUnbondingRecordRequest - -func (x *QueryGetEpochUnbondingRecordRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetEpochUnbondingRecordRequest)(x) -} - -func (x *QueryGetEpochUnbondingRecordRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetEpochUnbondingRecordRequest_messageType fastReflection_QueryGetEpochUnbondingRecordRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetEpochUnbondingRecordRequest_messageType{} - -type fastReflection_QueryGetEpochUnbondingRecordRequest_messageType struct{} - -func (x fastReflection_QueryGetEpochUnbondingRecordRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetEpochUnbondingRecordRequest)(nil) -} -func (x fastReflection_QueryGetEpochUnbondingRecordRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetEpochUnbondingRecordRequest) -} -func (x fastReflection_QueryGetEpochUnbondingRecordRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetEpochUnbondingRecordRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetEpochUnbondingRecordRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetEpochUnbondingRecordRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetEpochUnbondingRecordRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetEpochUnbondingRecordRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.EpochNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.EpochNumber) - if !f(fd_QueryGetEpochUnbondingRecordRequest_epoch_number, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordRequest.epoch_number": - return x.EpochNumber != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordRequest.epoch_number": - x.EpochNumber = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordRequest.epoch_number": - value := x.EpochNumber - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordRequest.epoch_number": - x.EpochNumber = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordRequest.epoch_number": - panic(fmt.Errorf("field epoch_number of message stride.records.QueryGetEpochUnbondingRecordRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordRequest.epoch_number": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryGetEpochUnbondingRecordRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetEpochUnbondingRecordRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetEpochUnbondingRecordRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.EpochNumber != 0 { - n += 1 + runtime.Sov(uint64(x.EpochNumber)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetEpochUnbondingRecordRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.EpochNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EpochNumber)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetEpochUnbondingRecordRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetEpochUnbondingRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetEpochUnbondingRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - x.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetEpochUnbondingRecordResponse protoreflect.MessageDescriptor - fd_QueryGetEpochUnbondingRecordResponse_epoch_unbonding_record protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryGetEpochUnbondingRecordResponse = File_stride_records_query_proto.Messages().ByName("QueryGetEpochUnbondingRecordResponse") - fd_QueryGetEpochUnbondingRecordResponse_epoch_unbonding_record = md_QueryGetEpochUnbondingRecordResponse.Fields().ByName("epoch_unbonding_record") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetEpochUnbondingRecordResponse)(nil) - -type fastReflection_QueryGetEpochUnbondingRecordResponse QueryGetEpochUnbondingRecordResponse - -func (x *QueryGetEpochUnbondingRecordResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetEpochUnbondingRecordResponse)(x) -} - -func (x *QueryGetEpochUnbondingRecordResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetEpochUnbondingRecordResponse_messageType fastReflection_QueryGetEpochUnbondingRecordResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetEpochUnbondingRecordResponse_messageType{} - -type fastReflection_QueryGetEpochUnbondingRecordResponse_messageType struct{} - -func (x fastReflection_QueryGetEpochUnbondingRecordResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetEpochUnbondingRecordResponse)(nil) -} -func (x fastReflection_QueryGetEpochUnbondingRecordResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetEpochUnbondingRecordResponse) -} -func (x fastReflection_QueryGetEpochUnbondingRecordResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetEpochUnbondingRecordResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetEpochUnbondingRecordResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetEpochUnbondingRecordResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetEpochUnbondingRecordResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetEpochUnbondingRecordResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.EpochUnbondingRecord != nil { - value := protoreflect.ValueOfMessage(x.EpochUnbondingRecord.ProtoReflect()) - if !f(fd_QueryGetEpochUnbondingRecordResponse_epoch_unbonding_record, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordResponse.epoch_unbonding_record": - return x.EpochUnbondingRecord != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordResponse.epoch_unbonding_record": - x.EpochUnbondingRecord = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordResponse.epoch_unbonding_record": - value := x.EpochUnbondingRecord - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordResponse.epoch_unbonding_record": - x.EpochUnbondingRecord = value.Message().Interface().(*EpochUnbondingRecord) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordResponse.epoch_unbonding_record": - if x.EpochUnbondingRecord == nil { - x.EpochUnbondingRecord = new(EpochUnbondingRecord) - } - return protoreflect.ValueOfMessage(x.EpochUnbondingRecord.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryGetEpochUnbondingRecordResponse.epoch_unbonding_record": - m := new(EpochUnbondingRecord) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryGetEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryGetEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryGetEpochUnbondingRecordResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetEpochUnbondingRecordResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetEpochUnbondingRecordResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.EpochUnbondingRecord != nil { - l = options.Size(x.EpochUnbondingRecord) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetEpochUnbondingRecordResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.EpochUnbondingRecord != nil { - encoded, err := options.Marshal(x.EpochUnbondingRecord) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetEpochUnbondingRecordResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetEpochUnbondingRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetEpochUnbondingRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.EpochUnbondingRecord == nil { - x.EpochUnbondingRecord = &EpochUnbondingRecord{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EpochUnbondingRecord); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllEpochUnbondingRecordRequest protoreflect.MessageDescriptor - fd_QueryAllEpochUnbondingRecordRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryAllEpochUnbondingRecordRequest = File_stride_records_query_proto.Messages().ByName("QueryAllEpochUnbondingRecordRequest") - fd_QueryAllEpochUnbondingRecordRequest_pagination = md_QueryAllEpochUnbondingRecordRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllEpochUnbondingRecordRequest)(nil) - -type fastReflection_QueryAllEpochUnbondingRecordRequest QueryAllEpochUnbondingRecordRequest - -func (x *QueryAllEpochUnbondingRecordRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllEpochUnbondingRecordRequest)(x) -} - -func (x *QueryAllEpochUnbondingRecordRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllEpochUnbondingRecordRequest_messageType fastReflection_QueryAllEpochUnbondingRecordRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllEpochUnbondingRecordRequest_messageType{} - -type fastReflection_QueryAllEpochUnbondingRecordRequest_messageType struct{} - -func (x fastReflection_QueryAllEpochUnbondingRecordRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllEpochUnbondingRecordRequest)(nil) -} -func (x fastReflection_QueryAllEpochUnbondingRecordRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllEpochUnbondingRecordRequest) -} -func (x fastReflection_QueryAllEpochUnbondingRecordRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEpochUnbondingRecordRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEpochUnbondingRecordRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllEpochUnbondingRecordRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllEpochUnbondingRecordRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllEpochUnbondingRecordRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllEpochUnbondingRecordRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordRequest")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryAllEpochUnbondingRecordRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllEpochUnbondingRecordRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllEpochUnbondingRecordRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllEpochUnbondingRecordRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllEpochUnbondingRecordRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEpochUnbondingRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEpochUnbondingRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllEpochUnbondingRecordResponse_1_list)(nil) - -type _QueryAllEpochUnbondingRecordResponse_1_list struct { - list *[]*EpochUnbondingRecord -} - -func (x *_QueryAllEpochUnbondingRecordResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllEpochUnbondingRecordResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllEpochUnbondingRecordResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochUnbondingRecord) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllEpochUnbondingRecordResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochUnbondingRecord) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllEpochUnbondingRecordResponse_1_list) AppendMutable() protoreflect.Value { - v := new(EpochUnbondingRecord) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllEpochUnbondingRecordResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllEpochUnbondingRecordResponse_1_list) NewElement() protoreflect.Value { - v := new(EpochUnbondingRecord) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllEpochUnbondingRecordResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllEpochUnbondingRecordResponse protoreflect.MessageDescriptor - fd_QueryAllEpochUnbondingRecordResponse_epoch_unbonding_record protoreflect.FieldDescriptor - fd_QueryAllEpochUnbondingRecordResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryAllEpochUnbondingRecordResponse = File_stride_records_query_proto.Messages().ByName("QueryAllEpochUnbondingRecordResponse") - fd_QueryAllEpochUnbondingRecordResponse_epoch_unbonding_record = md_QueryAllEpochUnbondingRecordResponse.Fields().ByName("epoch_unbonding_record") - fd_QueryAllEpochUnbondingRecordResponse_pagination = md_QueryAllEpochUnbondingRecordResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllEpochUnbondingRecordResponse)(nil) - -type fastReflection_QueryAllEpochUnbondingRecordResponse QueryAllEpochUnbondingRecordResponse - -func (x *QueryAllEpochUnbondingRecordResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllEpochUnbondingRecordResponse)(x) -} - -func (x *QueryAllEpochUnbondingRecordResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllEpochUnbondingRecordResponse_messageType fastReflection_QueryAllEpochUnbondingRecordResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllEpochUnbondingRecordResponse_messageType{} - -type fastReflection_QueryAllEpochUnbondingRecordResponse_messageType struct{} - -func (x fastReflection_QueryAllEpochUnbondingRecordResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllEpochUnbondingRecordResponse)(nil) -} -func (x fastReflection_QueryAllEpochUnbondingRecordResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllEpochUnbondingRecordResponse) -} -func (x fastReflection_QueryAllEpochUnbondingRecordResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEpochUnbondingRecordResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEpochUnbondingRecordResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllEpochUnbondingRecordResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllEpochUnbondingRecordResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllEpochUnbondingRecordResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.EpochUnbondingRecord) != 0 { - value := protoreflect.ValueOfList(&_QueryAllEpochUnbondingRecordResponse_1_list{list: &x.EpochUnbondingRecord}) - if !f(fd_QueryAllEpochUnbondingRecordResponse_epoch_unbonding_record, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllEpochUnbondingRecordResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordResponse.epoch_unbonding_record": - return len(x.EpochUnbondingRecord) != 0 - case "stride.records.QueryAllEpochUnbondingRecordResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordResponse.epoch_unbonding_record": - x.EpochUnbondingRecord = nil - case "stride.records.QueryAllEpochUnbondingRecordResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordResponse.epoch_unbonding_record": - if len(x.EpochUnbondingRecord) == 0 { - return protoreflect.ValueOfList(&_QueryAllEpochUnbondingRecordResponse_1_list{}) - } - listValue := &_QueryAllEpochUnbondingRecordResponse_1_list{list: &x.EpochUnbondingRecord} - return protoreflect.ValueOfList(listValue) - case "stride.records.QueryAllEpochUnbondingRecordResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordResponse.epoch_unbonding_record": - lv := value.List() - clv := lv.(*_QueryAllEpochUnbondingRecordResponse_1_list) - x.EpochUnbondingRecord = *clv.list - case "stride.records.QueryAllEpochUnbondingRecordResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordResponse.epoch_unbonding_record": - if x.EpochUnbondingRecord == nil { - x.EpochUnbondingRecord = []*EpochUnbondingRecord{} - } - value := &_QueryAllEpochUnbondingRecordResponse_1_list{list: &x.EpochUnbondingRecord} - return protoreflect.ValueOfList(value) - case "stride.records.QueryAllEpochUnbondingRecordResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryAllEpochUnbondingRecordResponse.epoch_unbonding_record": - list := []*EpochUnbondingRecord{} - return protoreflect.ValueOfList(&_QueryAllEpochUnbondingRecordResponse_1_list{list: &list}) - case "stride.records.QueryAllEpochUnbondingRecordResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryAllEpochUnbondingRecordResponse")) - } - panic(fmt.Errorf("message stride.records.QueryAllEpochUnbondingRecordResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryAllEpochUnbondingRecordResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllEpochUnbondingRecordResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllEpochUnbondingRecordResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.EpochUnbondingRecord) > 0 { - for _, e := range x.EpochUnbondingRecord { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllEpochUnbondingRecordResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.EpochUnbondingRecord) > 0 { - for iNdEx := len(x.EpochUnbondingRecord) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.EpochUnbondingRecord[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllEpochUnbondingRecordResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEpochUnbondingRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEpochUnbondingRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.EpochUnbondingRecord = append(x.EpochUnbondingRecord, &EpochUnbondingRecord{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EpochUnbondingRecord[len(x.EpochUnbondingRecord)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryLSMDepositRequest protoreflect.MessageDescriptor - fd_QueryLSMDepositRequest_chain_id protoreflect.FieldDescriptor - fd_QueryLSMDepositRequest_denom protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryLSMDepositRequest = File_stride_records_query_proto.Messages().ByName("QueryLSMDepositRequest") - fd_QueryLSMDepositRequest_chain_id = md_QueryLSMDepositRequest.Fields().ByName("chain_id") - fd_QueryLSMDepositRequest_denom = md_QueryLSMDepositRequest.Fields().ByName("denom") -} - -var _ protoreflect.Message = (*fastReflection_QueryLSMDepositRequest)(nil) - -type fastReflection_QueryLSMDepositRequest QueryLSMDepositRequest - -func (x *QueryLSMDepositRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLSMDepositRequest)(x) -} - -func (x *QueryLSMDepositRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryLSMDepositRequest_messageType fastReflection_QueryLSMDepositRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryLSMDepositRequest_messageType{} - -type fastReflection_QueryLSMDepositRequest_messageType struct{} - -func (x fastReflection_QueryLSMDepositRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLSMDepositRequest)(nil) -} -func (x fastReflection_QueryLSMDepositRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLSMDepositRequest) -} -func (x fastReflection_QueryLSMDepositRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLSMDepositRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLSMDepositRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLSMDepositRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryLSMDepositRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryLSMDepositRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLSMDepositRequest) New() protoreflect.Message { - return new(fastReflection_QueryLSMDepositRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLSMDepositRequest) Interface() protoreflect.ProtoMessage { - return (*QueryLSMDepositRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryLSMDepositRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_QueryLSMDepositRequest_chain_id, value) { - return - } - } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_QueryLSMDepositRequest_denom, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryLSMDepositRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryLSMDepositRequest.chain_id": - return x.ChainId != "" - case "stride.records.QueryLSMDepositRequest.denom": - return x.Denom != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryLSMDepositRequest.chain_id": - x.ChainId = "" - case "stride.records.QueryLSMDepositRequest.denom": - x.Denom = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryLSMDepositRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryLSMDepositRequest.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.records.QueryLSMDepositRequest.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryLSMDepositRequest.chain_id": - x.ChainId = value.Interface().(string) - case "stride.records.QueryLSMDepositRequest.denom": - x.Denom = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryLSMDepositRequest.chain_id": - panic(fmt.Errorf("field chain_id of message stride.records.QueryLSMDepositRequest is not mutable")) - case "stride.records.QueryLSMDepositRequest.denom": - panic(fmt.Errorf("field denom of message stride.records.QueryLSMDepositRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryLSMDepositRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryLSMDepositRequest.chain_id": - return protoreflect.ValueOfString("") - case "stride.records.QueryLSMDepositRequest.denom": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryLSMDepositRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryLSMDepositRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryLSMDepositRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryLSMDepositRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLSMDepositRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLSMDepositRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLSMDepositRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLSMDepositRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLSMDepositRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLSMDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryLSMDepositResponse protoreflect.MessageDescriptor - fd_QueryLSMDepositResponse_deposit protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryLSMDepositResponse = File_stride_records_query_proto.Messages().ByName("QueryLSMDepositResponse") - fd_QueryLSMDepositResponse_deposit = md_QueryLSMDepositResponse.Fields().ByName("deposit") -} - -var _ protoreflect.Message = (*fastReflection_QueryLSMDepositResponse)(nil) - -type fastReflection_QueryLSMDepositResponse QueryLSMDepositResponse - -func (x *QueryLSMDepositResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLSMDepositResponse)(x) -} - -func (x *QueryLSMDepositResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryLSMDepositResponse_messageType fastReflection_QueryLSMDepositResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryLSMDepositResponse_messageType{} - -type fastReflection_QueryLSMDepositResponse_messageType struct{} - -func (x fastReflection_QueryLSMDepositResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLSMDepositResponse)(nil) -} -func (x fastReflection_QueryLSMDepositResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLSMDepositResponse) -} -func (x fastReflection_QueryLSMDepositResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLSMDepositResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLSMDepositResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLSMDepositResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryLSMDepositResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryLSMDepositResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLSMDepositResponse) New() protoreflect.Message { - return new(fastReflection_QueryLSMDepositResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLSMDepositResponse) Interface() protoreflect.ProtoMessage { - return (*QueryLSMDepositResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryLSMDepositResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Deposit != nil { - value := protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - if !f(fd_QueryLSMDepositResponse_deposit, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryLSMDepositResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryLSMDepositResponse.deposit": - return x.Deposit != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryLSMDepositResponse.deposit": - x.Deposit = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryLSMDepositResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryLSMDepositResponse.deposit": - value := x.Deposit - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryLSMDepositResponse.deposit": - x.Deposit = value.Message().Interface().(*LSMTokenDeposit) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryLSMDepositResponse.deposit": - if x.Deposit == nil { - x.Deposit = new(LSMTokenDeposit) - } - return protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryLSMDepositResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryLSMDepositResponse.deposit": - m := new(LSMTokenDeposit) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryLSMDepositResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryLSMDepositResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryLSMDepositResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryLSMDepositResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLSMDepositResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLSMDepositResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Deposit != nil { - l = options.Size(x.Deposit) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLSMDepositResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Deposit != nil { - encoded, err := options.Marshal(x.Deposit) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLSMDepositResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLSMDepositResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLSMDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Deposit == nil { - x.Deposit = &LSMTokenDeposit{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposit); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryLSMDepositsRequest protoreflect.MessageDescriptor - fd_QueryLSMDepositsRequest_chain_id protoreflect.FieldDescriptor - fd_QueryLSMDepositsRequest_validator_address protoreflect.FieldDescriptor - fd_QueryLSMDepositsRequest_status protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryLSMDepositsRequest = File_stride_records_query_proto.Messages().ByName("QueryLSMDepositsRequest") - fd_QueryLSMDepositsRequest_chain_id = md_QueryLSMDepositsRequest.Fields().ByName("chain_id") - fd_QueryLSMDepositsRequest_validator_address = md_QueryLSMDepositsRequest.Fields().ByName("validator_address") - fd_QueryLSMDepositsRequest_status = md_QueryLSMDepositsRequest.Fields().ByName("status") -} - -var _ protoreflect.Message = (*fastReflection_QueryLSMDepositsRequest)(nil) - -type fastReflection_QueryLSMDepositsRequest QueryLSMDepositsRequest - -func (x *QueryLSMDepositsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLSMDepositsRequest)(x) -} - -func (x *QueryLSMDepositsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryLSMDepositsRequest_messageType fastReflection_QueryLSMDepositsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryLSMDepositsRequest_messageType{} - -type fastReflection_QueryLSMDepositsRequest_messageType struct{} - -func (x fastReflection_QueryLSMDepositsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLSMDepositsRequest)(nil) -} -func (x fastReflection_QueryLSMDepositsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLSMDepositsRequest) -} -func (x fastReflection_QueryLSMDepositsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLSMDepositsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLSMDepositsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLSMDepositsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryLSMDepositsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryLSMDepositsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLSMDepositsRequest) New() protoreflect.Message { - return new(fastReflection_QueryLSMDepositsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLSMDepositsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryLSMDepositsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryLSMDepositsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_QueryLSMDepositsRequest_chain_id, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_QueryLSMDepositsRequest_validator_address, value) { - return - } - } - if x.Status != "" { - value := protoreflect.ValueOfString(x.Status) - if !f(fd_QueryLSMDepositsRequest_status, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryLSMDepositsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsRequest.chain_id": - return x.ChainId != "" - case "stride.records.QueryLSMDepositsRequest.validator_address": - return x.ValidatorAddress != "" - case "stride.records.QueryLSMDepositsRequest.status": - return x.Status != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsRequest.chain_id": - x.ChainId = "" - case "stride.records.QueryLSMDepositsRequest.validator_address": - x.ValidatorAddress = "" - case "stride.records.QueryLSMDepositsRequest.status": - x.Status = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryLSMDepositsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryLSMDepositsRequest.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.records.QueryLSMDepositsRequest.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "stride.records.QueryLSMDepositsRequest.status": - value := x.Status - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsRequest.chain_id": - x.ChainId = value.Interface().(string) - case "stride.records.QueryLSMDepositsRequest.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "stride.records.QueryLSMDepositsRequest.status": - x.Status = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsRequest.chain_id": - panic(fmt.Errorf("field chain_id of message stride.records.QueryLSMDepositsRequest is not mutable")) - case "stride.records.QueryLSMDepositsRequest.validator_address": - panic(fmt.Errorf("field validator_address of message stride.records.QueryLSMDepositsRequest is not mutable")) - case "stride.records.QueryLSMDepositsRequest.status": - panic(fmt.Errorf("field status of message stride.records.QueryLSMDepositsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryLSMDepositsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsRequest.chain_id": - return protoreflect.ValueOfString("") - case "stride.records.QueryLSMDepositsRequest.validator_address": - return protoreflect.ValueOfString("") - case "stride.records.QueryLSMDepositsRequest.status": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsRequest")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryLSMDepositsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryLSMDepositsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryLSMDepositsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryLSMDepositsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLSMDepositsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLSMDepositsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Status) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLSMDepositsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Status) > 0 { - i -= len(x.Status) - copy(dAtA[i:], x.Status) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Status))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLSMDepositsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLSMDepositsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLSMDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Status = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryLSMDepositsResponse_1_list)(nil) - -type _QueryLSMDepositsResponse_1_list struct { - list *[]*LSMTokenDeposit -} - -func (x *_QueryLSMDepositsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryLSMDepositsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryLSMDepositsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*LSMTokenDeposit) - (*x.list)[i] = concreteValue -} - -func (x *_QueryLSMDepositsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*LSMTokenDeposit) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryLSMDepositsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(LSMTokenDeposit) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLSMDepositsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryLSMDepositsResponse_1_list) NewElement() protoreflect.Value { - v := new(LSMTokenDeposit) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLSMDepositsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryLSMDepositsResponse protoreflect.MessageDescriptor - fd_QueryLSMDepositsResponse_deposits protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_query_proto_init() - md_QueryLSMDepositsResponse = File_stride_records_query_proto.Messages().ByName("QueryLSMDepositsResponse") - fd_QueryLSMDepositsResponse_deposits = md_QueryLSMDepositsResponse.Fields().ByName("deposits") -} - -var _ protoreflect.Message = (*fastReflection_QueryLSMDepositsResponse)(nil) - -type fastReflection_QueryLSMDepositsResponse QueryLSMDepositsResponse - -func (x *QueryLSMDepositsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLSMDepositsResponse)(x) -} - -func (x *QueryLSMDepositsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_query_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryLSMDepositsResponse_messageType fastReflection_QueryLSMDepositsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryLSMDepositsResponse_messageType{} - -type fastReflection_QueryLSMDepositsResponse_messageType struct{} - -func (x fastReflection_QueryLSMDepositsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLSMDepositsResponse)(nil) -} -func (x fastReflection_QueryLSMDepositsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLSMDepositsResponse) -} -func (x fastReflection_QueryLSMDepositsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLSMDepositsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLSMDepositsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLSMDepositsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryLSMDepositsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryLSMDepositsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLSMDepositsResponse) New() protoreflect.Message { - return new(fastReflection_QueryLSMDepositsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLSMDepositsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryLSMDepositsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryLSMDepositsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Deposits) != 0 { - value := protoreflect.ValueOfList(&_QueryLSMDepositsResponse_1_list{list: &x.Deposits}) - if !f(fd_QueryLSMDepositsResponse_deposits, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryLSMDepositsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsResponse.deposits": - return len(x.Deposits) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsResponse.deposits": - x.Deposits = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryLSMDepositsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.QueryLSMDepositsResponse.deposits": - if len(x.Deposits) == 0 { - return protoreflect.ValueOfList(&_QueryLSMDepositsResponse_1_list{}) - } - listValue := &_QueryLSMDepositsResponse_1_list{list: &x.Deposits} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsResponse.deposits": - lv := value.List() - clv := lv.(*_QueryLSMDepositsResponse_1_list) - x.Deposits = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsResponse.deposits": - if x.Deposits == nil { - x.Deposits = []*LSMTokenDeposit{} - } - value := &_QueryLSMDepositsResponse_1_list{list: &x.Deposits} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryLSMDepositsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.QueryLSMDepositsResponse.deposits": - list := []*LSMTokenDeposit{} - return protoreflect.ValueOfList(&_QueryLSMDepositsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.QueryLSMDepositsResponse")) - } - panic(fmt.Errorf("message stride.records.QueryLSMDepositsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryLSMDepositsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.QueryLSMDepositsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryLSMDepositsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLSMDepositsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryLSMDepositsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLSMDepositsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLSMDepositsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Deposits) > 0 { - for _, e := range x.Deposits { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLSMDepositsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Deposits) > 0 { - for iNdEx := len(x.Deposits) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Deposits[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLSMDepositsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLSMDepositsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLSMDepositsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Deposits = append(x.Deposits, &LSMTokenDeposit{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposits[len(x.Deposits)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/records/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{0} -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params holds all the parameters of this module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -type QueryGetDepositRecordRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *QueryGetDepositRecordRequest) Reset() { - *x = QueryGetDepositRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetDepositRecordRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetDepositRecordRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetDepositRecordRequest.ProtoReflect.Descriptor instead. -func (*QueryGetDepositRecordRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryGetDepositRecordRequest) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -type QueryGetDepositRecordResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DepositRecord *DepositRecord `protobuf:"bytes,1,opt,name=deposit_record,json=depositRecord,proto3" json:"deposit_record,omitempty"` -} - -func (x *QueryGetDepositRecordResponse) Reset() { - *x = QueryGetDepositRecordResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetDepositRecordResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetDepositRecordResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetDepositRecordResponse.ProtoReflect.Descriptor instead. -func (*QueryGetDepositRecordResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryGetDepositRecordResponse) GetDepositRecord() *DepositRecord { - if x != nil { - return x.DepositRecord - } - return nil -} - -type QueryAllDepositRecordRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllDepositRecordRequest) Reset() { - *x = QueryAllDepositRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllDepositRecordRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllDepositRecordRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllDepositRecordRequest.ProtoReflect.Descriptor instead. -func (*QueryAllDepositRecordRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryAllDepositRecordRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryAllDepositRecordResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DepositRecord []*DepositRecord `protobuf:"bytes,1,rep,name=deposit_record,json=depositRecord,proto3" json:"deposit_record,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllDepositRecordResponse) Reset() { - *x = QueryAllDepositRecordResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllDepositRecordResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllDepositRecordResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllDepositRecordResponse.ProtoReflect.Descriptor instead. -func (*QueryAllDepositRecordResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryAllDepositRecordResponse) GetDepositRecord() []*DepositRecord { - if x != nil { - return x.DepositRecord - } - return nil -} - -func (x *QueryAllDepositRecordResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryDepositRecordByHostRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` -} - -func (x *QueryDepositRecordByHostRequest) Reset() { - *x = QueryDepositRecordByHostRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositRecordByHostRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositRecordByHostRequest) ProtoMessage() {} - -// Deprecated: Use QueryDepositRecordByHostRequest.ProtoReflect.Descriptor instead. -func (*QueryDepositRecordByHostRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryDepositRecordByHostRequest) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -type QueryDepositRecordByHostResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DepositRecord []*DepositRecord `protobuf:"bytes,1,rep,name=deposit_record,json=depositRecord,proto3" json:"deposit_record,omitempty"` -} - -func (x *QueryDepositRecordByHostResponse) Reset() { - *x = QueryDepositRecordByHostResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryDepositRecordByHostResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryDepositRecordByHostResponse) ProtoMessage() {} - -// Deprecated: Use QueryDepositRecordByHostResponse.ProtoReflect.Descriptor instead. -func (*QueryDepositRecordByHostResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryDepositRecordByHostResponse) GetDepositRecord() []*DepositRecord { - if x != nil { - return x.DepositRecord - } - return nil -} - -type QueryGetUserRedemptionRecordRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *QueryGetUserRedemptionRecordRequest) Reset() { - *x = QueryGetUserRedemptionRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetUserRedemptionRecordRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetUserRedemptionRecordRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetUserRedemptionRecordRequest.ProtoReflect.Descriptor instead. -func (*QueryGetUserRedemptionRecordRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryGetUserRedemptionRecordRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type QueryGetUserRedemptionRecordResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserRedemptionRecord *UserRedemptionRecord `protobuf:"bytes,1,opt,name=user_redemption_record,json=userRedemptionRecord,proto3" json:"user_redemption_record,omitempty"` -} - -func (x *QueryGetUserRedemptionRecordResponse) Reset() { - *x = QueryGetUserRedemptionRecordResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetUserRedemptionRecordResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetUserRedemptionRecordResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetUserRedemptionRecordResponse.ProtoReflect.Descriptor instead. -func (*QueryGetUserRedemptionRecordResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryGetUserRedemptionRecordResponse) GetUserRedemptionRecord() *UserRedemptionRecord { - if x != nil { - return x.UserRedemptionRecord - } - return nil -} - -type QueryAllUserRedemptionRecordRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllUserRedemptionRecordRequest) Reset() { - *x = QueryAllUserRedemptionRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllUserRedemptionRecordRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllUserRedemptionRecordRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllUserRedemptionRecordRequest.ProtoReflect.Descriptor instead. -func (*QueryAllUserRedemptionRecordRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{10} -} - -func (x *QueryAllUserRedemptionRecordRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryAllUserRedemptionRecordResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserRedemptionRecord []*UserRedemptionRecord `protobuf:"bytes,1,rep,name=user_redemption_record,json=userRedemptionRecord,proto3" json:"user_redemption_record,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllUserRedemptionRecordResponse) Reset() { - *x = QueryAllUserRedemptionRecordResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllUserRedemptionRecordResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllUserRedemptionRecordResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllUserRedemptionRecordResponse.ProtoReflect.Descriptor instead. -func (*QueryAllUserRedemptionRecordResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryAllUserRedemptionRecordResponse) GetUserRedemptionRecord() []*UserRedemptionRecord { - if x != nil { - return x.UserRedemptionRecord - } - return nil -} - -func (x *QueryAllUserRedemptionRecordResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -// Query UserRedemptionRecords by chainId / userId pair -type QueryAllUserRedemptionRecordForUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Day uint64 `protobuf:"varint,2,opt,name=day,proto3" json:"day,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - Pagination *v1beta1.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllUserRedemptionRecordForUserRequest) Reset() { - *x = QueryAllUserRedemptionRecordForUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllUserRedemptionRecordForUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllUserRedemptionRecordForUserRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllUserRedemptionRecordForUserRequest.ProtoReflect.Descriptor instead. -func (*QueryAllUserRedemptionRecordForUserRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{12} -} - -func (x *QueryAllUserRedemptionRecordForUserRequest) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *QueryAllUserRedemptionRecordForUserRequest) GetDay() uint64 { - if x != nil { - return x.Day - } - return 0 -} - -func (x *QueryAllUserRedemptionRecordForUserRequest) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *QueryAllUserRedemptionRecordForUserRequest) GetLimit() uint64 { - if x != nil { - return x.Limit - } - return 0 -} - -func (x *QueryAllUserRedemptionRecordForUserRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryAllUserRedemptionRecordForUserResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserRedemptionRecord []*UserRedemptionRecord `protobuf:"bytes,1,rep,name=user_redemption_record,json=userRedemptionRecord,proto3" json:"user_redemption_record,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllUserRedemptionRecordForUserResponse) Reset() { - *x = QueryAllUserRedemptionRecordForUserResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllUserRedemptionRecordForUserResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllUserRedemptionRecordForUserResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllUserRedemptionRecordForUserResponse.ProtoReflect.Descriptor instead. -func (*QueryAllUserRedemptionRecordForUserResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{13} -} - -func (x *QueryAllUserRedemptionRecordForUserResponse) GetUserRedemptionRecord() []*UserRedemptionRecord { - if x != nil { - return x.UserRedemptionRecord - } - return nil -} - -func (x *QueryAllUserRedemptionRecordForUserResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryGetEpochUnbondingRecordRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` -} - -func (x *QueryGetEpochUnbondingRecordRequest) Reset() { - *x = QueryGetEpochUnbondingRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetEpochUnbondingRecordRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetEpochUnbondingRecordRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetEpochUnbondingRecordRequest.ProtoReflect.Descriptor instead. -func (*QueryGetEpochUnbondingRecordRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{14} -} - -func (x *QueryGetEpochUnbondingRecordRequest) GetEpochNumber() uint64 { - if x != nil { - return x.EpochNumber - } - return 0 -} - -type QueryGetEpochUnbondingRecordResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EpochUnbondingRecord *EpochUnbondingRecord `protobuf:"bytes,1,opt,name=epoch_unbonding_record,json=epochUnbondingRecord,proto3" json:"epoch_unbonding_record,omitempty"` -} - -func (x *QueryGetEpochUnbondingRecordResponse) Reset() { - *x = QueryGetEpochUnbondingRecordResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetEpochUnbondingRecordResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetEpochUnbondingRecordResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetEpochUnbondingRecordResponse.ProtoReflect.Descriptor instead. -func (*QueryGetEpochUnbondingRecordResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{15} -} - -func (x *QueryGetEpochUnbondingRecordResponse) GetEpochUnbondingRecord() *EpochUnbondingRecord { - if x != nil { - return x.EpochUnbondingRecord - } - return nil -} - -type QueryAllEpochUnbondingRecordRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllEpochUnbondingRecordRequest) Reset() { - *x = QueryAllEpochUnbondingRecordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllEpochUnbondingRecordRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllEpochUnbondingRecordRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllEpochUnbondingRecordRequest.ProtoReflect.Descriptor instead. -func (*QueryAllEpochUnbondingRecordRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{16} -} - -func (x *QueryAllEpochUnbondingRecordRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryAllEpochUnbondingRecordResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EpochUnbondingRecord []*EpochUnbondingRecord `protobuf:"bytes,1,rep,name=epoch_unbonding_record,json=epochUnbondingRecord,proto3" json:"epoch_unbonding_record,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllEpochUnbondingRecordResponse) Reset() { - *x = QueryAllEpochUnbondingRecordResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllEpochUnbondingRecordResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllEpochUnbondingRecordResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllEpochUnbondingRecordResponse.ProtoReflect.Descriptor instead. -func (*QueryAllEpochUnbondingRecordResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{17} -} - -func (x *QueryAllEpochUnbondingRecordResponse) GetEpochUnbondingRecord() []*EpochUnbondingRecord { - if x != nil { - return x.EpochUnbondingRecord - } - return nil -} - -func (x *QueryAllEpochUnbondingRecordResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryLSMDepositRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (x *QueryLSMDepositRequest) Reset() { - *x = QueryLSMDepositRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLSMDepositRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLSMDepositRequest) ProtoMessage() {} - -// Deprecated: Use QueryLSMDepositRequest.ProtoReflect.Descriptor instead. -func (*QueryLSMDepositRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{18} -} - -func (x *QueryLSMDepositRequest) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *QueryLSMDepositRequest) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -type QueryLSMDepositResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Deposit *LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` -} - -func (x *QueryLSMDepositResponse) Reset() { - *x = QueryLSMDepositResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLSMDepositResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLSMDepositResponse) ProtoMessage() {} - -// Deprecated: Use QueryLSMDepositResponse.ProtoReflect.Descriptor instead. -func (*QueryLSMDepositResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{19} -} - -func (x *QueryLSMDepositResponse) GetDeposit() *LSMTokenDeposit { - if x != nil { - return x.Deposit - } - return nil -} - -type QueryLSMDepositsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` -} - -func (x *QueryLSMDepositsRequest) Reset() { - *x = QueryLSMDepositsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLSMDepositsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLSMDepositsRequest) ProtoMessage() {} - -// Deprecated: Use QueryLSMDepositsRequest.ProtoReflect.Descriptor instead. -func (*QueryLSMDepositsRequest) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{20} -} - -func (x *QueryLSMDepositsRequest) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *QueryLSMDepositsRequest) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *QueryLSMDepositsRequest) GetStatus() string { - if x != nil { - return x.Status - } - return "" -} - -type QueryLSMDepositsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Deposits []*LSMTokenDeposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits,omitempty"` -} - -func (x *QueryLSMDepositsResponse) Reset() { - *x = QueryLSMDepositsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_query_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLSMDepositsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLSMDepositsResponse) ProtoMessage() {} - -// Deprecated: Use QueryLSMDepositsResponse.ProtoReflect.Descriptor instead. -func (*QueryLSMDepositsResponse) Descriptor() ([]byte, []int) { - return file_stride_records_query_proto_rawDescGZIP(), []int{21} -} - -func (x *QueryLSMDepositsResponse) GetDeposits() []*LSMTokenDeposit { - if x != nil { - return x.Deposits - } - return nil -} - -var File_stride_records_query_proto protoreflect.FileDescriptor - -var file_stride_records_query_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x1a, 0x1c, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, - 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x2e, 0x0a, 0x1c, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6b, 0x0a, 0x1d, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x66, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0xb4, 0x01, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4a, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x47, 0x0a, - 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x1f, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x79, 0x48, 0x6f, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x6e, 0x0a, 0x20, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x42, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4a, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x35, 0x0a, 0x23, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x88, 0x01, 0x0a, 0x24, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x75, - 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x14, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, - 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x6d, 0x0a, - 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, - 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd1, 0x01, 0x0a, - 0x24, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, - 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, - 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x14, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xd1, 0x01, 0x0a, 0x2a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x46, 0x0a, 0x0a, - 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x01, 0x0a, 0x2b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, - 0x6c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x64, - 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x14, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x48, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x88, 0x01, 0x0a, 0x24, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x75, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x14, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x22, 0x6d, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, - 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, - 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0xd1, 0x01, 0x0a, 0x24, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x14, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x55, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x47, - 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x49, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4c, 0x53, 0x4d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x22, 0x5a, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x53, 0x4d, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, - 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, - 0x4c, 0x53, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, - 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x22, 0x79, - 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x53, 0x4d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x5d, 0x0a, 0x18, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4c, 0x53, 0x4d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x4c, 0x53, 0x4d, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x32, 0xf4, 0x0f, 0x0a, 0x05, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x12, 0x7c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, - 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0xc2, 0x01, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, - 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, - 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xc0, 0x01, 0x0a, 0x17, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x41, 0x6c, - 0x6c, 0x12, 0x33, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x52, - 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, - 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0xfe, 0x01, 0x0a, 0x1b, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x3a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, - 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x46, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x66, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x60, 0x12, 0x5e, 0x2f, 0x53, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x64, 0x65, - 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x66, 0x6f, - 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, - 0x7d, 0x2f, 0x7b, 0x64, 0x61, 0x79, 0x7d, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x7d, 0x2f, 0x7b, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x7d, 0x12, 0xcc, 0x01, 0x0a, 0x14, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x12, 0x33, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, - 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, - 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x43, 0x12, 0x41, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, - 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x7b, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x7d, 0x12, 0xc0, 0x01, 0x0a, 0x17, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x41, 0x6c, 0x6c, 0x12, 0x33, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x6c, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0xa5, 0x01, 0x0a, 0x0d, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x2c, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, - 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x41, 0x6c, 0x6c, 0x12, 0x2c, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, - 0x6c, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, - 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0xc8, 0x01, 0x0a, 0x13, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x79, 0x48, 0x6f, 0x73, - 0x74, 0x12, 0x2f, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, 0x46, 0x2f, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x62, 0x79, 0x5f, 0x68, 0x6f, 0x73, 0x74, - 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x2f, 0x7b, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, - 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa2, 0x01, 0x0a, 0x0a, 0x4c, 0x53, 0x4d, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x12, 0x26, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x53, 0x4d, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x4c, 0x53, 0x4d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x6c, 0x73, 0x6d, 0x5f, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, - 0x7d, 0x2f, 0x7b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0b, 0x4c, 0x53, - 0x4d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4c, 0x53, 0x4d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x53, 0x4d, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x2b, 0x12, 0x29, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, - 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x2f, 0x6c, 0x73, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x42, - 0xaf, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, - 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0xa2, 0x02, 0x03, 0x53, 0x52, 0x58, - 0xaa, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0xca, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x73, 0xe2, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_records_query_proto_rawDescOnce sync.Once - file_stride_records_query_proto_rawDescData = file_stride_records_query_proto_rawDesc -) - -func file_stride_records_query_proto_rawDescGZIP() []byte { - file_stride_records_query_proto_rawDescOnce.Do(func() { - file_stride_records_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_records_query_proto_rawDescData) - }) - return file_stride_records_query_proto_rawDescData -} - -var file_stride_records_query_proto_msgTypes = make([]protoimpl.MessageInfo, 22) -var file_stride_records_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: stride.records.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: stride.records.QueryParamsResponse - (*QueryGetDepositRecordRequest)(nil), // 2: stride.records.QueryGetDepositRecordRequest - (*QueryGetDepositRecordResponse)(nil), // 3: stride.records.QueryGetDepositRecordResponse - (*QueryAllDepositRecordRequest)(nil), // 4: stride.records.QueryAllDepositRecordRequest - (*QueryAllDepositRecordResponse)(nil), // 5: stride.records.QueryAllDepositRecordResponse - (*QueryDepositRecordByHostRequest)(nil), // 6: stride.records.QueryDepositRecordByHostRequest - (*QueryDepositRecordByHostResponse)(nil), // 7: stride.records.QueryDepositRecordByHostResponse - (*QueryGetUserRedemptionRecordRequest)(nil), // 8: stride.records.QueryGetUserRedemptionRecordRequest - (*QueryGetUserRedemptionRecordResponse)(nil), // 9: stride.records.QueryGetUserRedemptionRecordResponse - (*QueryAllUserRedemptionRecordRequest)(nil), // 10: stride.records.QueryAllUserRedemptionRecordRequest - (*QueryAllUserRedemptionRecordResponse)(nil), // 11: stride.records.QueryAllUserRedemptionRecordResponse - (*QueryAllUserRedemptionRecordForUserRequest)(nil), // 12: stride.records.QueryAllUserRedemptionRecordForUserRequest - (*QueryAllUserRedemptionRecordForUserResponse)(nil), // 13: stride.records.QueryAllUserRedemptionRecordForUserResponse - (*QueryGetEpochUnbondingRecordRequest)(nil), // 14: stride.records.QueryGetEpochUnbondingRecordRequest - (*QueryGetEpochUnbondingRecordResponse)(nil), // 15: stride.records.QueryGetEpochUnbondingRecordResponse - (*QueryAllEpochUnbondingRecordRequest)(nil), // 16: stride.records.QueryAllEpochUnbondingRecordRequest - (*QueryAllEpochUnbondingRecordResponse)(nil), // 17: stride.records.QueryAllEpochUnbondingRecordResponse - (*QueryLSMDepositRequest)(nil), // 18: stride.records.QueryLSMDepositRequest - (*QueryLSMDepositResponse)(nil), // 19: stride.records.QueryLSMDepositResponse - (*QueryLSMDepositsRequest)(nil), // 20: stride.records.QueryLSMDepositsRequest - (*QueryLSMDepositsResponse)(nil), // 21: stride.records.QueryLSMDepositsResponse - (*Params)(nil), // 22: stride.records.Params - (*DepositRecord)(nil), // 23: stride.records.DepositRecord - (*v1beta1.PageRequest)(nil), // 24: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 25: cosmos.base.query.v1beta1.PageResponse - (*UserRedemptionRecord)(nil), // 26: stride.records.UserRedemptionRecord - (*EpochUnbondingRecord)(nil), // 27: stride.records.EpochUnbondingRecord - (*LSMTokenDeposit)(nil), // 28: stride.records.LSMTokenDeposit -} -var file_stride_records_query_proto_depIdxs = []int32{ - 22, // 0: stride.records.QueryParamsResponse.params:type_name -> stride.records.Params - 23, // 1: stride.records.QueryGetDepositRecordResponse.deposit_record:type_name -> stride.records.DepositRecord - 24, // 2: stride.records.QueryAllDepositRecordRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 23, // 3: stride.records.QueryAllDepositRecordResponse.deposit_record:type_name -> stride.records.DepositRecord - 25, // 4: stride.records.QueryAllDepositRecordResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 23, // 5: stride.records.QueryDepositRecordByHostResponse.deposit_record:type_name -> stride.records.DepositRecord - 26, // 6: stride.records.QueryGetUserRedemptionRecordResponse.user_redemption_record:type_name -> stride.records.UserRedemptionRecord - 24, // 7: stride.records.QueryAllUserRedemptionRecordRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 26, // 8: stride.records.QueryAllUserRedemptionRecordResponse.user_redemption_record:type_name -> stride.records.UserRedemptionRecord - 25, // 9: stride.records.QueryAllUserRedemptionRecordResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 24, // 10: stride.records.QueryAllUserRedemptionRecordForUserRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 26, // 11: stride.records.QueryAllUserRedemptionRecordForUserResponse.user_redemption_record:type_name -> stride.records.UserRedemptionRecord - 25, // 12: stride.records.QueryAllUserRedemptionRecordForUserResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 27, // 13: stride.records.QueryGetEpochUnbondingRecordResponse.epoch_unbonding_record:type_name -> stride.records.EpochUnbondingRecord - 24, // 14: stride.records.QueryAllEpochUnbondingRecordRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 27, // 15: stride.records.QueryAllEpochUnbondingRecordResponse.epoch_unbonding_record:type_name -> stride.records.EpochUnbondingRecord - 25, // 16: stride.records.QueryAllEpochUnbondingRecordResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 28, // 17: stride.records.QueryLSMDepositResponse.deposit:type_name -> stride.records.LSMTokenDeposit - 28, // 18: stride.records.QueryLSMDepositsResponse.deposits:type_name -> stride.records.LSMTokenDeposit - 0, // 19: stride.records.Query.Params:input_type -> stride.records.QueryParamsRequest - 8, // 20: stride.records.Query.UserRedemptionRecord:input_type -> stride.records.QueryGetUserRedemptionRecordRequest - 10, // 21: stride.records.Query.UserRedemptionRecordAll:input_type -> stride.records.QueryAllUserRedemptionRecordRequest - 12, // 22: stride.records.Query.UserRedemptionRecordForUser:input_type -> stride.records.QueryAllUserRedemptionRecordForUserRequest - 14, // 23: stride.records.Query.EpochUnbondingRecord:input_type -> stride.records.QueryGetEpochUnbondingRecordRequest - 16, // 24: stride.records.Query.EpochUnbondingRecordAll:input_type -> stride.records.QueryAllEpochUnbondingRecordRequest - 2, // 25: stride.records.Query.DepositRecord:input_type -> stride.records.QueryGetDepositRecordRequest - 4, // 26: stride.records.Query.DepositRecordAll:input_type -> stride.records.QueryAllDepositRecordRequest - 6, // 27: stride.records.Query.DepositRecordByHost:input_type -> stride.records.QueryDepositRecordByHostRequest - 18, // 28: stride.records.Query.LSMDeposit:input_type -> stride.records.QueryLSMDepositRequest - 20, // 29: stride.records.Query.LSMDeposits:input_type -> stride.records.QueryLSMDepositsRequest - 1, // 30: stride.records.Query.Params:output_type -> stride.records.QueryParamsResponse - 9, // 31: stride.records.Query.UserRedemptionRecord:output_type -> stride.records.QueryGetUserRedemptionRecordResponse - 11, // 32: stride.records.Query.UserRedemptionRecordAll:output_type -> stride.records.QueryAllUserRedemptionRecordResponse - 13, // 33: stride.records.Query.UserRedemptionRecordForUser:output_type -> stride.records.QueryAllUserRedemptionRecordForUserResponse - 15, // 34: stride.records.Query.EpochUnbondingRecord:output_type -> stride.records.QueryGetEpochUnbondingRecordResponse - 17, // 35: stride.records.Query.EpochUnbondingRecordAll:output_type -> stride.records.QueryAllEpochUnbondingRecordResponse - 3, // 36: stride.records.Query.DepositRecord:output_type -> stride.records.QueryGetDepositRecordResponse - 5, // 37: stride.records.Query.DepositRecordAll:output_type -> stride.records.QueryAllDepositRecordResponse - 7, // 38: stride.records.Query.DepositRecordByHost:output_type -> stride.records.QueryDepositRecordByHostResponse - 19, // 39: stride.records.Query.LSMDeposit:output_type -> stride.records.QueryLSMDepositResponse - 21, // 40: stride.records.Query.LSMDeposits:output_type -> stride.records.QueryLSMDepositsResponse - 30, // [30:41] is the sub-list for method output_type - 19, // [19:30] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name -} - -func init() { file_stride_records_query_proto_init() } -func file_stride_records_query_proto_init() { - if File_stride_records_query_proto != nil { - return - } - file_stride_records_records_proto_init() - file_stride_records_params_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_records_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetDepositRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetDepositRecordResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllDepositRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllDepositRecordResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositRecordByHostRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryDepositRecordByHostResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetUserRedemptionRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetUserRedemptionRecordResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllUserRedemptionRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllUserRedemptionRecordResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllUserRedemptionRecordForUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllUserRedemptionRecordForUserResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetEpochUnbondingRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetEpochUnbondingRecordResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllEpochUnbondingRecordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllEpochUnbondingRecordResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLSMDepositRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLSMDepositResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLSMDepositsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLSMDepositsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_records_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 22, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_stride_records_query_proto_goTypes, - DependencyIndexes: file_stride_records_query_proto_depIdxs, - MessageInfos: file_stride_records_query_proto_msgTypes, - }.Build() - File_stride_records_query_proto = out.File - file_stride_records_query_proto_rawDesc = nil - file_stride_records_query_proto_goTypes = nil - file_stride_records_query_proto_depIdxs = nil -} diff --git a/api/stride/records/query_grpc.pb.go b/api/stride/records/query_grpc.pb.go deleted file mode 100644 index 5db7bc81a..000000000 --- a/api/stride/records/query_grpc.pb.go +++ /dev/null @@ -1,533 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: stride/records/query.proto - -package records - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Query_Params_FullMethodName = "/stride.records.Query/Params" - Query_UserRedemptionRecord_FullMethodName = "/stride.records.Query/UserRedemptionRecord" - Query_UserRedemptionRecordAll_FullMethodName = "/stride.records.Query/UserRedemptionRecordAll" - Query_UserRedemptionRecordForUser_FullMethodName = "/stride.records.Query/UserRedemptionRecordForUser" - Query_EpochUnbondingRecord_FullMethodName = "/stride.records.Query/EpochUnbondingRecord" - Query_EpochUnbondingRecordAll_FullMethodName = "/stride.records.Query/EpochUnbondingRecordAll" - Query_DepositRecord_FullMethodName = "/stride.records.Query/DepositRecord" - Query_DepositRecordAll_FullMethodName = "/stride.records.Query/DepositRecordAll" - Query_DepositRecordByHost_FullMethodName = "/stride.records.Query/DepositRecordByHost" - Query_LSMDeposit_FullMethodName = "/stride.records.Query/LSMDeposit" - Query_LSMDeposits_FullMethodName = "/stride.records.Query/LSMDeposits" -) - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Query defines the gRPC querier service. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Queries a UserRedemptionRecord by id. - UserRedemptionRecord(ctx context.Context, in *QueryGetUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryGetUserRedemptionRecordResponse, error) - // Queries a list of UserRedemptionRecord items. - UserRedemptionRecordAll(ctx context.Context, in *QueryAllUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordResponse, error) - // Queries a list of UserRedemptionRecord items by chainId / userId pair. - UserRedemptionRecordForUser(ctx context.Context, in *QueryAllUserRedemptionRecordForUserRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordForUserResponse, error) - // Queries a EpochUnbondingRecord by id. - EpochUnbondingRecord(ctx context.Context, in *QueryGetEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryGetEpochUnbondingRecordResponse, error) - // Queries a list of EpochUnbondingRecord items. - EpochUnbondingRecordAll(ctx context.Context, in *QueryAllEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryAllEpochUnbondingRecordResponse, error) - // Queries a DepositRecord by id. - DepositRecord(ctx context.Context, in *QueryGetDepositRecordRequest, opts ...grpc.CallOption) (*QueryGetDepositRecordResponse, error) - // Queries a list of DepositRecord items. - DepositRecordAll(ctx context.Context, in *QueryAllDepositRecordRequest, opts ...grpc.CallOption) (*QueryAllDepositRecordResponse, error) - // Queries a list of DepositRecord items for a given host zone - DepositRecordByHost(ctx context.Context, in *QueryDepositRecordByHostRequest, opts ...grpc.CallOption) (*QueryDepositRecordByHostResponse, error) - // Queries the existing LSMTokenDeposits for one specific deposit - LSMDeposit(ctx context.Context, in *QueryLSMDepositRequest, opts ...grpc.CallOption) (*QueryLSMDepositResponse, error) - // Queries the existing LSMTokenDeposits for all which match filters - // - // intended use: - // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z - LSMDeposits(ctx context.Context, in *QueryLSMDepositsRequest, opts ...grpc.CallOption) (*QueryLSMDepositsResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UserRedemptionRecord(ctx context.Context, in *QueryGetUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryGetUserRedemptionRecordResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryGetUserRedemptionRecordResponse) - err := c.cc.Invoke(ctx, Query_UserRedemptionRecord_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UserRedemptionRecordAll(ctx context.Context, in *QueryAllUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAllUserRedemptionRecordResponse) - err := c.cc.Invoke(ctx, Query_UserRedemptionRecordAll_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UserRedemptionRecordForUser(ctx context.Context, in *QueryAllUserRedemptionRecordForUserRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordForUserResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAllUserRedemptionRecordForUserResponse) - err := c.cc.Invoke(ctx, Query_UserRedemptionRecordForUser_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochUnbondingRecord(ctx context.Context, in *QueryGetEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryGetEpochUnbondingRecordResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryGetEpochUnbondingRecordResponse) - err := c.cc.Invoke(ctx, Query_EpochUnbondingRecord_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochUnbondingRecordAll(ctx context.Context, in *QueryAllEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryAllEpochUnbondingRecordResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAllEpochUnbondingRecordResponse) - err := c.cc.Invoke(ctx, Query_EpochUnbondingRecordAll_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DepositRecord(ctx context.Context, in *QueryGetDepositRecordRequest, opts ...grpc.CallOption) (*QueryGetDepositRecordResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryGetDepositRecordResponse) - err := c.cc.Invoke(ctx, Query_DepositRecord_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DepositRecordAll(ctx context.Context, in *QueryAllDepositRecordRequest, opts ...grpc.CallOption) (*QueryAllDepositRecordResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAllDepositRecordResponse) - err := c.cc.Invoke(ctx, Query_DepositRecordAll_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DepositRecordByHost(ctx context.Context, in *QueryDepositRecordByHostRequest, opts ...grpc.CallOption) (*QueryDepositRecordByHostResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryDepositRecordByHostResponse) - err := c.cc.Invoke(ctx, Query_DepositRecordByHost_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LSMDeposit(ctx context.Context, in *QueryLSMDepositRequest, opts ...grpc.CallOption) (*QueryLSMDepositResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryLSMDepositResponse) - err := c.cc.Invoke(ctx, Query_LSMDeposit_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LSMDeposits(ctx context.Context, in *QueryLSMDepositsRequest, opts ...grpc.CallOption) (*QueryLSMDepositsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryLSMDepositsResponse) - err := c.cc.Invoke(ctx, Query_LSMDeposits_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility. -// -// Query defines the gRPC querier service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Queries a UserRedemptionRecord by id. - UserRedemptionRecord(context.Context, *QueryGetUserRedemptionRecordRequest) (*QueryGetUserRedemptionRecordResponse, error) - // Queries a list of UserRedemptionRecord items. - UserRedemptionRecordAll(context.Context, *QueryAllUserRedemptionRecordRequest) (*QueryAllUserRedemptionRecordResponse, error) - // Queries a list of UserRedemptionRecord items by chainId / userId pair. - UserRedemptionRecordForUser(context.Context, *QueryAllUserRedemptionRecordForUserRequest) (*QueryAllUserRedemptionRecordForUserResponse, error) - // Queries a EpochUnbondingRecord by id. - EpochUnbondingRecord(context.Context, *QueryGetEpochUnbondingRecordRequest) (*QueryGetEpochUnbondingRecordResponse, error) - // Queries a list of EpochUnbondingRecord items. - EpochUnbondingRecordAll(context.Context, *QueryAllEpochUnbondingRecordRequest) (*QueryAllEpochUnbondingRecordResponse, error) - // Queries a DepositRecord by id. - DepositRecord(context.Context, *QueryGetDepositRecordRequest) (*QueryGetDepositRecordResponse, error) - // Queries a list of DepositRecord items. - DepositRecordAll(context.Context, *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) - // Queries a list of DepositRecord items for a given host zone - DepositRecordByHost(context.Context, *QueryDepositRecordByHostRequest) (*QueryDepositRecordByHostResponse, error) - // Queries the existing LSMTokenDeposits for one specific deposit - LSMDeposit(context.Context, *QueryLSMDepositRequest) (*QueryLSMDepositResponse, error) - // Queries the existing LSMTokenDeposits for all which match filters - // - // intended use: - // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z - LSMDeposits(context.Context, *QueryLSMDepositsRequest) (*QueryLSMDepositsResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedQueryServer struct{} - -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) UserRedemptionRecord(context.Context, *QueryGetUserRedemptionRecordRequest) (*QueryGetUserRedemptionRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRedemptionRecord not implemented") -} -func (UnimplementedQueryServer) UserRedemptionRecordAll(context.Context, *QueryAllUserRedemptionRecordRequest) (*QueryAllUserRedemptionRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRedemptionRecordAll not implemented") -} -func (UnimplementedQueryServer) UserRedemptionRecordForUser(context.Context, *QueryAllUserRedemptionRecordForUserRequest) (*QueryAllUserRedemptionRecordForUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRedemptionRecordForUser not implemented") -} -func (UnimplementedQueryServer) EpochUnbondingRecord(context.Context, *QueryGetEpochUnbondingRecordRequest) (*QueryGetEpochUnbondingRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochUnbondingRecord not implemented") -} -func (UnimplementedQueryServer) EpochUnbondingRecordAll(context.Context, *QueryAllEpochUnbondingRecordRequest) (*QueryAllEpochUnbondingRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochUnbondingRecordAll not implemented") -} -func (UnimplementedQueryServer) DepositRecord(context.Context, *QueryGetDepositRecordRequest) (*QueryGetDepositRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositRecord not implemented") -} -func (UnimplementedQueryServer) DepositRecordAll(context.Context, *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositRecordAll not implemented") -} -func (UnimplementedQueryServer) DepositRecordByHost(context.Context, *QueryDepositRecordByHostRequest) (*QueryDepositRecordByHostResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositRecordByHost not implemented") -} -func (UnimplementedQueryServer) LSMDeposit(context.Context, *QueryLSMDepositRequest) (*QueryLSMDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LSMDeposit not implemented") -} -func (UnimplementedQueryServer) LSMDeposits(context.Context, *QueryLSMDepositsRequest) (*QueryLSMDepositsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LSMDeposits not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} -func (UnimplementedQueryServer) testEmbeddedByValue() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - // If the following call pancis, it indicates UnimplementedQueryServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Params_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UserRedemptionRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetUserRedemptionRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UserRedemptionRecord(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_UserRedemptionRecord_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserRedemptionRecord(ctx, req.(*QueryGetUserRedemptionRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UserRedemptionRecordAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllUserRedemptionRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UserRedemptionRecordAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_UserRedemptionRecordAll_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserRedemptionRecordAll(ctx, req.(*QueryAllUserRedemptionRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UserRedemptionRecordForUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllUserRedemptionRecordForUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UserRedemptionRecordForUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_UserRedemptionRecordForUser_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserRedemptionRecordForUser(ctx, req.(*QueryAllUserRedemptionRecordForUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochUnbondingRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetEpochUnbondingRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochUnbondingRecord(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_EpochUnbondingRecord_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochUnbondingRecord(ctx, req.(*QueryGetEpochUnbondingRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochUnbondingRecordAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllEpochUnbondingRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochUnbondingRecordAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_EpochUnbondingRecordAll_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochUnbondingRecordAll(ctx, req.(*QueryAllEpochUnbondingRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DepositRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetDepositRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DepositRecord(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_DepositRecord_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DepositRecord(ctx, req.(*QueryGetDepositRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DepositRecordAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllDepositRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DepositRecordAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_DepositRecordAll_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DepositRecordAll(ctx, req.(*QueryAllDepositRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DepositRecordByHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDepositRecordByHostRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DepositRecordByHost(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_DepositRecordByHost_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DepositRecordByHost(ctx, req.(*QueryDepositRecordByHostRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LSMDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLSMDepositRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LSMDeposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_LSMDeposit_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LSMDeposit(ctx, req.(*QueryLSMDepositRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LSMDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLSMDepositsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LSMDeposits(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_LSMDeposits_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LSMDeposits(ctx, req.(*QueryLSMDepositsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "stride.records.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "UserRedemptionRecord", - Handler: _Query_UserRedemptionRecord_Handler, - }, - { - MethodName: "UserRedemptionRecordAll", - Handler: _Query_UserRedemptionRecordAll_Handler, - }, - { - MethodName: "UserRedemptionRecordForUser", - Handler: _Query_UserRedemptionRecordForUser_Handler, - }, - { - MethodName: "EpochUnbondingRecord", - Handler: _Query_EpochUnbondingRecord_Handler, - }, - { - MethodName: "EpochUnbondingRecordAll", - Handler: _Query_EpochUnbondingRecordAll_Handler, - }, - { - MethodName: "DepositRecord", - Handler: _Query_DepositRecord_Handler, - }, - { - MethodName: "DepositRecordAll", - Handler: _Query_DepositRecordAll_Handler, - }, - { - MethodName: "DepositRecordByHost", - Handler: _Query_DepositRecordByHost_Handler, - }, - { - MethodName: "LSMDeposit", - Handler: _Query_LSMDeposit_Handler, - }, - { - MethodName: "LSMDeposits", - Handler: _Query_LSMDeposits_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/records/query.proto", -} diff --git a/api/stride/records/records.pulsar.go b/api/stride/records/records.pulsar.go deleted file mode 100644 index 20149c17e..000000000 --- a/api/stride/records/records.pulsar.go +++ /dev/null @@ -1,4816 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package records - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_UserRedemptionRecord protoreflect.MessageDescriptor - fd_UserRedemptionRecord_id protoreflect.FieldDescriptor - fd_UserRedemptionRecord_receiver protoreflect.FieldDescriptor - fd_UserRedemptionRecord_native_token_amount protoreflect.FieldDescriptor - fd_UserRedemptionRecord_denom protoreflect.FieldDescriptor - fd_UserRedemptionRecord_host_zone_id protoreflect.FieldDescriptor - fd_UserRedemptionRecord_epoch_number protoreflect.FieldDescriptor - fd_UserRedemptionRecord_claim_is_pending protoreflect.FieldDescriptor - fd_UserRedemptionRecord_st_token_amount protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_records_proto_init() - md_UserRedemptionRecord = File_stride_records_records_proto.Messages().ByName("UserRedemptionRecord") - fd_UserRedemptionRecord_id = md_UserRedemptionRecord.Fields().ByName("id") - fd_UserRedemptionRecord_receiver = md_UserRedemptionRecord.Fields().ByName("receiver") - fd_UserRedemptionRecord_native_token_amount = md_UserRedemptionRecord.Fields().ByName("native_token_amount") - fd_UserRedemptionRecord_denom = md_UserRedemptionRecord.Fields().ByName("denom") - fd_UserRedemptionRecord_host_zone_id = md_UserRedemptionRecord.Fields().ByName("host_zone_id") - fd_UserRedemptionRecord_epoch_number = md_UserRedemptionRecord.Fields().ByName("epoch_number") - fd_UserRedemptionRecord_claim_is_pending = md_UserRedemptionRecord.Fields().ByName("claim_is_pending") - fd_UserRedemptionRecord_st_token_amount = md_UserRedemptionRecord.Fields().ByName("st_token_amount") -} - -var _ protoreflect.Message = (*fastReflection_UserRedemptionRecord)(nil) - -type fastReflection_UserRedemptionRecord UserRedemptionRecord - -func (x *UserRedemptionRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_UserRedemptionRecord)(x) -} - -func (x *UserRedemptionRecord) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_records_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_UserRedemptionRecord_messageType fastReflection_UserRedemptionRecord_messageType -var _ protoreflect.MessageType = fastReflection_UserRedemptionRecord_messageType{} - -type fastReflection_UserRedemptionRecord_messageType struct{} - -func (x fastReflection_UserRedemptionRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_UserRedemptionRecord)(nil) -} -func (x fastReflection_UserRedemptionRecord_messageType) New() protoreflect.Message { - return new(fastReflection_UserRedemptionRecord) -} -func (x fastReflection_UserRedemptionRecord_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_UserRedemptionRecord -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_UserRedemptionRecord) Descriptor() protoreflect.MessageDescriptor { - return md_UserRedemptionRecord -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_UserRedemptionRecord) Type() protoreflect.MessageType { - return _fastReflection_UserRedemptionRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_UserRedemptionRecord) New() protoreflect.Message { - return new(fastReflection_UserRedemptionRecord) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_UserRedemptionRecord) Interface() protoreflect.ProtoMessage { - return (*UserRedemptionRecord)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_UserRedemptionRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_UserRedemptionRecord_id, value) { - return - } - } - if x.Receiver != "" { - value := protoreflect.ValueOfString(x.Receiver) - if !f(fd_UserRedemptionRecord_receiver, value) { - return - } - } - if x.NativeTokenAmount != "" { - value := protoreflect.ValueOfString(x.NativeTokenAmount) - if !f(fd_UserRedemptionRecord_native_token_amount, value) { - return - } - } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_UserRedemptionRecord_denom, value) { - return - } - } - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_UserRedemptionRecord_host_zone_id, value) { - return - } - } - if x.EpochNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.EpochNumber) - if !f(fd_UserRedemptionRecord_epoch_number, value) { - return - } - } - if x.ClaimIsPending != false { - value := protoreflect.ValueOfBool(x.ClaimIsPending) - if !f(fd_UserRedemptionRecord_claim_is_pending, value) { - return - } - } - if x.StTokenAmount != "" { - value := protoreflect.ValueOfString(x.StTokenAmount) - if !f(fd_UserRedemptionRecord_st_token_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_UserRedemptionRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.UserRedemptionRecord.id": - return x.Id != "" - case "stride.records.UserRedemptionRecord.receiver": - return x.Receiver != "" - case "stride.records.UserRedemptionRecord.native_token_amount": - return x.NativeTokenAmount != "" - case "stride.records.UserRedemptionRecord.denom": - return x.Denom != "" - case "stride.records.UserRedemptionRecord.host_zone_id": - return x.HostZoneId != "" - case "stride.records.UserRedemptionRecord.epoch_number": - return x.EpochNumber != uint64(0) - case "stride.records.UserRedemptionRecord.claim_is_pending": - return x.ClaimIsPending != false - case "stride.records.UserRedemptionRecord.st_token_amount": - return x.StTokenAmount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.UserRedemptionRecord")) - } - panic(fmt.Errorf("message stride.records.UserRedemptionRecord does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UserRedemptionRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.UserRedemptionRecord.id": - x.Id = "" - case "stride.records.UserRedemptionRecord.receiver": - x.Receiver = "" - case "stride.records.UserRedemptionRecord.native_token_amount": - x.NativeTokenAmount = "" - case "stride.records.UserRedemptionRecord.denom": - x.Denom = "" - case "stride.records.UserRedemptionRecord.host_zone_id": - x.HostZoneId = "" - case "stride.records.UserRedemptionRecord.epoch_number": - x.EpochNumber = uint64(0) - case "stride.records.UserRedemptionRecord.claim_is_pending": - x.ClaimIsPending = false - case "stride.records.UserRedemptionRecord.st_token_amount": - x.StTokenAmount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.UserRedemptionRecord")) - } - panic(fmt.Errorf("message stride.records.UserRedemptionRecord does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_UserRedemptionRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.UserRedemptionRecord.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "stride.records.UserRedemptionRecord.receiver": - value := x.Receiver - return protoreflect.ValueOfString(value) - case "stride.records.UserRedemptionRecord.native_token_amount": - value := x.NativeTokenAmount - return protoreflect.ValueOfString(value) - case "stride.records.UserRedemptionRecord.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "stride.records.UserRedemptionRecord.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - case "stride.records.UserRedemptionRecord.epoch_number": - value := x.EpochNumber - return protoreflect.ValueOfUint64(value) - case "stride.records.UserRedemptionRecord.claim_is_pending": - value := x.ClaimIsPending - return protoreflect.ValueOfBool(value) - case "stride.records.UserRedemptionRecord.st_token_amount": - value := x.StTokenAmount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.UserRedemptionRecord")) - } - panic(fmt.Errorf("message stride.records.UserRedemptionRecord does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UserRedemptionRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.UserRedemptionRecord.id": - x.Id = value.Interface().(string) - case "stride.records.UserRedemptionRecord.receiver": - x.Receiver = value.Interface().(string) - case "stride.records.UserRedemptionRecord.native_token_amount": - x.NativeTokenAmount = value.Interface().(string) - case "stride.records.UserRedemptionRecord.denom": - x.Denom = value.Interface().(string) - case "stride.records.UserRedemptionRecord.host_zone_id": - x.HostZoneId = value.Interface().(string) - case "stride.records.UserRedemptionRecord.epoch_number": - x.EpochNumber = value.Uint() - case "stride.records.UserRedemptionRecord.claim_is_pending": - x.ClaimIsPending = value.Bool() - case "stride.records.UserRedemptionRecord.st_token_amount": - x.StTokenAmount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.UserRedemptionRecord")) - } - panic(fmt.Errorf("message stride.records.UserRedemptionRecord does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UserRedemptionRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.UserRedemptionRecord.id": - panic(fmt.Errorf("field id of message stride.records.UserRedemptionRecord is not mutable")) - case "stride.records.UserRedemptionRecord.receiver": - panic(fmt.Errorf("field receiver of message stride.records.UserRedemptionRecord is not mutable")) - case "stride.records.UserRedemptionRecord.native_token_amount": - panic(fmt.Errorf("field native_token_amount of message stride.records.UserRedemptionRecord is not mutable")) - case "stride.records.UserRedemptionRecord.denom": - panic(fmt.Errorf("field denom of message stride.records.UserRedemptionRecord is not mutable")) - case "stride.records.UserRedemptionRecord.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.records.UserRedemptionRecord is not mutable")) - case "stride.records.UserRedemptionRecord.epoch_number": - panic(fmt.Errorf("field epoch_number of message stride.records.UserRedemptionRecord is not mutable")) - case "stride.records.UserRedemptionRecord.claim_is_pending": - panic(fmt.Errorf("field claim_is_pending of message stride.records.UserRedemptionRecord is not mutable")) - case "stride.records.UserRedemptionRecord.st_token_amount": - panic(fmt.Errorf("field st_token_amount of message stride.records.UserRedemptionRecord is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.UserRedemptionRecord")) - } - panic(fmt.Errorf("message stride.records.UserRedemptionRecord does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_UserRedemptionRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.UserRedemptionRecord.id": - return protoreflect.ValueOfString("") - case "stride.records.UserRedemptionRecord.receiver": - return protoreflect.ValueOfString("") - case "stride.records.UserRedemptionRecord.native_token_amount": - return protoreflect.ValueOfString("") - case "stride.records.UserRedemptionRecord.denom": - return protoreflect.ValueOfString("") - case "stride.records.UserRedemptionRecord.host_zone_id": - return protoreflect.ValueOfString("") - case "stride.records.UserRedemptionRecord.epoch_number": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.records.UserRedemptionRecord.claim_is_pending": - return protoreflect.ValueOfBool(false) - case "stride.records.UserRedemptionRecord.st_token_amount": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.UserRedemptionRecord")) - } - panic(fmt.Errorf("message stride.records.UserRedemptionRecord does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_UserRedemptionRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.UserRedemptionRecord", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_UserRedemptionRecord) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UserRedemptionRecord) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_UserRedemptionRecord) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_UserRedemptionRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*UserRedemptionRecord) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Receiver) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NativeTokenAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.EpochNumber != 0 { - n += 1 + runtime.Sov(uint64(x.EpochNumber)) - } - if x.ClaimIsPending { - n += 2 - } - l = len(x.StTokenAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*UserRedemptionRecord) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.StTokenAmount) > 0 { - i -= len(x.StTokenAmount) - copy(dAtA[i:], x.StTokenAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StTokenAmount))) - i-- - dAtA[i] = 0x4a - } - if x.ClaimIsPending { - i-- - if x.ClaimIsPending { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if x.EpochNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EpochNumber)) - i-- - dAtA[i] = 0x38 - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0x32 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0x2a - } - if len(x.NativeTokenAmount) > 0 { - i -= len(x.NativeTokenAmount) - copy(dAtA[i:], x.NativeTokenAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NativeTokenAmount))) - i-- - dAtA[i] = 0x22 - } - if len(x.Receiver) > 0 { - i -= len(x.Receiver) - copy(dAtA[i:], x.Receiver) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) - i-- - dAtA[i] = 0x1a - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*UserRedemptionRecord) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserRedemptionRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserRedemptionRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NativeTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NativeTokenAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - x.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClaimIsPending", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.ClaimIsPending = bool(v != 0) - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.StTokenAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DepositRecord protoreflect.MessageDescriptor - fd_DepositRecord_id protoreflect.FieldDescriptor - fd_DepositRecord_amount protoreflect.FieldDescriptor - fd_DepositRecord_denom protoreflect.FieldDescriptor - fd_DepositRecord_host_zone_id protoreflect.FieldDescriptor - fd_DepositRecord_status protoreflect.FieldDescriptor - fd_DepositRecord_deposit_epoch_number protoreflect.FieldDescriptor - fd_DepositRecord_source protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_records_proto_init() - md_DepositRecord = File_stride_records_records_proto.Messages().ByName("DepositRecord") - fd_DepositRecord_id = md_DepositRecord.Fields().ByName("id") - fd_DepositRecord_amount = md_DepositRecord.Fields().ByName("amount") - fd_DepositRecord_denom = md_DepositRecord.Fields().ByName("denom") - fd_DepositRecord_host_zone_id = md_DepositRecord.Fields().ByName("host_zone_id") - fd_DepositRecord_status = md_DepositRecord.Fields().ByName("status") - fd_DepositRecord_deposit_epoch_number = md_DepositRecord.Fields().ByName("deposit_epoch_number") - fd_DepositRecord_source = md_DepositRecord.Fields().ByName("source") -} - -var _ protoreflect.Message = (*fastReflection_DepositRecord)(nil) - -type fastReflection_DepositRecord DepositRecord - -func (x *DepositRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_DepositRecord)(x) -} - -func (x *DepositRecord) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_records_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DepositRecord_messageType fastReflection_DepositRecord_messageType -var _ protoreflect.MessageType = fastReflection_DepositRecord_messageType{} - -type fastReflection_DepositRecord_messageType struct{} - -func (x fastReflection_DepositRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_DepositRecord)(nil) -} -func (x fastReflection_DepositRecord_messageType) New() protoreflect.Message { - return new(fastReflection_DepositRecord) -} -func (x fastReflection_DepositRecord_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DepositRecord -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DepositRecord) Descriptor() protoreflect.MessageDescriptor { - return md_DepositRecord -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_DepositRecord) Type() protoreflect.MessageType { - return _fastReflection_DepositRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DepositRecord) New() protoreflect.Message { - return new(fastReflection_DepositRecord) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DepositRecord) Interface() protoreflect.ProtoMessage { - return (*DepositRecord)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_DepositRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_DepositRecord_id, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_DepositRecord_amount, value) { - return - } - } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_DepositRecord_denom, value) { - return - } - } - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_DepositRecord_host_zone_id, value) { - return - } - } - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_DepositRecord_status, value) { - return - } - } - if x.DepositEpochNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.DepositEpochNumber) - if !f(fd_DepositRecord_deposit_epoch_number, value) { - return - } - } - if x.Source != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Source)) - if !f(fd_DepositRecord_source, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DepositRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.DepositRecord.id": - return x.Id != uint64(0) - case "stride.records.DepositRecord.amount": - return x.Amount != "" - case "stride.records.DepositRecord.denom": - return x.Denom != "" - case "stride.records.DepositRecord.host_zone_id": - return x.HostZoneId != "" - case "stride.records.DepositRecord.status": - return x.Status != 0 - case "stride.records.DepositRecord.deposit_epoch_number": - return x.DepositEpochNumber != uint64(0) - case "stride.records.DepositRecord.source": - return x.Source != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.DepositRecord")) - } - panic(fmt.Errorf("message stride.records.DepositRecord does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DepositRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.DepositRecord.id": - x.Id = uint64(0) - case "stride.records.DepositRecord.amount": - x.Amount = "" - case "stride.records.DepositRecord.denom": - x.Denom = "" - case "stride.records.DepositRecord.host_zone_id": - x.HostZoneId = "" - case "stride.records.DepositRecord.status": - x.Status = 0 - case "stride.records.DepositRecord.deposit_epoch_number": - x.DepositEpochNumber = uint64(0) - case "stride.records.DepositRecord.source": - x.Source = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.DepositRecord")) - } - panic(fmt.Errorf("message stride.records.DepositRecord does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_DepositRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.DepositRecord.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "stride.records.DepositRecord.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "stride.records.DepositRecord.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "stride.records.DepositRecord.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - case "stride.records.DepositRecord.status": - value := x.Status - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "stride.records.DepositRecord.deposit_epoch_number": - value := x.DepositEpochNumber - return protoreflect.ValueOfUint64(value) - case "stride.records.DepositRecord.source": - value := x.Source - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.DepositRecord")) - } - panic(fmt.Errorf("message stride.records.DepositRecord does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DepositRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.DepositRecord.id": - x.Id = value.Uint() - case "stride.records.DepositRecord.amount": - x.Amount = value.Interface().(string) - case "stride.records.DepositRecord.denom": - x.Denom = value.Interface().(string) - case "stride.records.DepositRecord.host_zone_id": - x.HostZoneId = value.Interface().(string) - case "stride.records.DepositRecord.status": - x.Status = (DepositRecord_Status)(value.Enum()) - case "stride.records.DepositRecord.deposit_epoch_number": - x.DepositEpochNumber = value.Uint() - case "stride.records.DepositRecord.source": - x.Source = (DepositRecord_Source)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.DepositRecord")) - } - panic(fmt.Errorf("message stride.records.DepositRecord does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DepositRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.DepositRecord.id": - panic(fmt.Errorf("field id of message stride.records.DepositRecord is not mutable")) - case "stride.records.DepositRecord.amount": - panic(fmt.Errorf("field amount of message stride.records.DepositRecord is not mutable")) - case "stride.records.DepositRecord.denom": - panic(fmt.Errorf("field denom of message stride.records.DepositRecord is not mutable")) - case "stride.records.DepositRecord.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.records.DepositRecord is not mutable")) - case "stride.records.DepositRecord.status": - panic(fmt.Errorf("field status of message stride.records.DepositRecord is not mutable")) - case "stride.records.DepositRecord.deposit_epoch_number": - panic(fmt.Errorf("field deposit_epoch_number of message stride.records.DepositRecord is not mutable")) - case "stride.records.DepositRecord.source": - panic(fmt.Errorf("field source of message stride.records.DepositRecord is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.DepositRecord")) - } - panic(fmt.Errorf("message stride.records.DepositRecord does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_DepositRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.DepositRecord.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.records.DepositRecord.amount": - return protoreflect.ValueOfString("") - case "stride.records.DepositRecord.denom": - return protoreflect.ValueOfString("") - case "stride.records.DepositRecord.host_zone_id": - return protoreflect.ValueOfString("") - case "stride.records.DepositRecord.status": - return protoreflect.ValueOfEnum(0) - case "stride.records.DepositRecord.deposit_epoch_number": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.records.DepositRecord.source": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.DepositRecord")) - } - panic(fmt.Errorf("message stride.records.DepositRecord does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_DepositRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.DepositRecord", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_DepositRecord) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DepositRecord) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_DepositRecord) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_DepositRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DepositRecord) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) - } - if x.DepositEpochNumber != 0 { - n += 1 + runtime.Sov(uint64(x.DepositEpochNumber)) - } - if x.Source != 0 { - n += 1 + runtime.Sov(uint64(x.Source)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DepositRecord) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Source != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Source)) - i-- - dAtA[i] = 0x40 - } - if x.DepositEpochNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DepositEpochNumber)) - i-- - dAtA[i] = 0x38 - } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) - i-- - dAtA[i] = 0x30 - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0x22 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0x1a - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DepositRecord) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DepositRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DepositRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - x.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Status |= DepositRecord_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositEpochNumber", wireType) - } - x.DepositEpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DepositEpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - x.Source = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Source |= DepositRecord_Source(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_HostZoneUnbonding_7_list)(nil) - -type _HostZoneUnbonding_7_list struct { - list *[]string -} - -func (x *_HostZoneUnbonding_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_HostZoneUnbonding_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_HostZoneUnbonding_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_HostZoneUnbonding_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_HostZoneUnbonding_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message HostZoneUnbonding at list field UserRedemptionRecords as it is not of Message kind")) -} - -func (x *_HostZoneUnbonding_7_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_HostZoneUnbonding_7_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_HostZoneUnbonding_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_HostZoneUnbonding protoreflect.MessageDescriptor - fd_HostZoneUnbonding_st_token_amount protoreflect.FieldDescriptor - fd_HostZoneUnbonding_native_token_amount protoreflect.FieldDescriptor - fd_HostZoneUnbonding_denom protoreflect.FieldDescriptor - fd_HostZoneUnbonding_host_zone_id protoreflect.FieldDescriptor - fd_HostZoneUnbonding_unbonding_time protoreflect.FieldDescriptor - fd_HostZoneUnbonding_status protoreflect.FieldDescriptor - fd_HostZoneUnbonding_user_redemption_records protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_records_proto_init() - md_HostZoneUnbonding = File_stride_records_records_proto.Messages().ByName("HostZoneUnbonding") - fd_HostZoneUnbonding_st_token_amount = md_HostZoneUnbonding.Fields().ByName("st_token_amount") - fd_HostZoneUnbonding_native_token_amount = md_HostZoneUnbonding.Fields().ByName("native_token_amount") - fd_HostZoneUnbonding_denom = md_HostZoneUnbonding.Fields().ByName("denom") - fd_HostZoneUnbonding_host_zone_id = md_HostZoneUnbonding.Fields().ByName("host_zone_id") - fd_HostZoneUnbonding_unbonding_time = md_HostZoneUnbonding.Fields().ByName("unbonding_time") - fd_HostZoneUnbonding_status = md_HostZoneUnbonding.Fields().ByName("status") - fd_HostZoneUnbonding_user_redemption_records = md_HostZoneUnbonding.Fields().ByName("user_redemption_records") -} - -var _ protoreflect.Message = (*fastReflection_HostZoneUnbonding)(nil) - -type fastReflection_HostZoneUnbonding HostZoneUnbonding - -func (x *HostZoneUnbonding) ProtoReflect() protoreflect.Message { - return (*fastReflection_HostZoneUnbonding)(x) -} - -func (x *HostZoneUnbonding) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_records_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_HostZoneUnbonding_messageType fastReflection_HostZoneUnbonding_messageType -var _ protoreflect.MessageType = fastReflection_HostZoneUnbonding_messageType{} - -type fastReflection_HostZoneUnbonding_messageType struct{} - -func (x fastReflection_HostZoneUnbonding_messageType) Zero() protoreflect.Message { - return (*fastReflection_HostZoneUnbonding)(nil) -} -func (x fastReflection_HostZoneUnbonding_messageType) New() protoreflect.Message { - return new(fastReflection_HostZoneUnbonding) -} -func (x fastReflection_HostZoneUnbonding_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_HostZoneUnbonding -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_HostZoneUnbonding) Descriptor() protoreflect.MessageDescriptor { - return md_HostZoneUnbonding -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_HostZoneUnbonding) Type() protoreflect.MessageType { - return _fastReflection_HostZoneUnbonding_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_HostZoneUnbonding) New() protoreflect.Message { - return new(fastReflection_HostZoneUnbonding) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_HostZoneUnbonding) Interface() protoreflect.ProtoMessage { - return (*HostZoneUnbonding)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_HostZoneUnbonding) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.StTokenAmount != "" { - value := protoreflect.ValueOfString(x.StTokenAmount) - if !f(fd_HostZoneUnbonding_st_token_amount, value) { - return - } - } - if x.NativeTokenAmount != "" { - value := protoreflect.ValueOfString(x.NativeTokenAmount) - if !f(fd_HostZoneUnbonding_native_token_amount, value) { - return - } - } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_HostZoneUnbonding_denom, value) { - return - } - } - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_HostZoneUnbonding_host_zone_id, value) { - return - } - } - if x.UnbondingTime != uint64(0) { - value := protoreflect.ValueOfUint64(x.UnbondingTime) - if !f(fd_HostZoneUnbonding_unbonding_time, value) { - return - } - } - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_HostZoneUnbonding_status, value) { - return - } - } - if len(x.UserRedemptionRecords) != 0 { - value := protoreflect.ValueOfList(&_HostZoneUnbonding_7_list{list: &x.UserRedemptionRecords}) - if !f(fd_HostZoneUnbonding_user_redemption_records, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_HostZoneUnbonding) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.HostZoneUnbonding.st_token_amount": - return x.StTokenAmount != "" - case "stride.records.HostZoneUnbonding.native_token_amount": - return x.NativeTokenAmount != "" - case "stride.records.HostZoneUnbonding.denom": - return x.Denom != "" - case "stride.records.HostZoneUnbonding.host_zone_id": - return x.HostZoneId != "" - case "stride.records.HostZoneUnbonding.unbonding_time": - return x.UnbondingTime != uint64(0) - case "stride.records.HostZoneUnbonding.status": - return x.Status != 0 - case "stride.records.HostZoneUnbonding.user_redemption_records": - return len(x.UserRedemptionRecords) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.HostZoneUnbonding")) - } - panic(fmt.Errorf("message stride.records.HostZoneUnbonding does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_HostZoneUnbonding) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.HostZoneUnbonding.st_token_amount": - x.StTokenAmount = "" - case "stride.records.HostZoneUnbonding.native_token_amount": - x.NativeTokenAmount = "" - case "stride.records.HostZoneUnbonding.denom": - x.Denom = "" - case "stride.records.HostZoneUnbonding.host_zone_id": - x.HostZoneId = "" - case "stride.records.HostZoneUnbonding.unbonding_time": - x.UnbondingTime = uint64(0) - case "stride.records.HostZoneUnbonding.status": - x.Status = 0 - case "stride.records.HostZoneUnbonding.user_redemption_records": - x.UserRedemptionRecords = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.HostZoneUnbonding")) - } - panic(fmt.Errorf("message stride.records.HostZoneUnbonding does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_HostZoneUnbonding) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.HostZoneUnbonding.st_token_amount": - value := x.StTokenAmount - return protoreflect.ValueOfString(value) - case "stride.records.HostZoneUnbonding.native_token_amount": - value := x.NativeTokenAmount - return protoreflect.ValueOfString(value) - case "stride.records.HostZoneUnbonding.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "stride.records.HostZoneUnbonding.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - case "stride.records.HostZoneUnbonding.unbonding_time": - value := x.UnbondingTime - return protoreflect.ValueOfUint64(value) - case "stride.records.HostZoneUnbonding.status": - value := x.Status - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "stride.records.HostZoneUnbonding.user_redemption_records": - if len(x.UserRedemptionRecords) == 0 { - return protoreflect.ValueOfList(&_HostZoneUnbonding_7_list{}) - } - listValue := &_HostZoneUnbonding_7_list{list: &x.UserRedemptionRecords} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.HostZoneUnbonding")) - } - panic(fmt.Errorf("message stride.records.HostZoneUnbonding does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_HostZoneUnbonding) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.HostZoneUnbonding.st_token_amount": - x.StTokenAmount = value.Interface().(string) - case "stride.records.HostZoneUnbonding.native_token_amount": - x.NativeTokenAmount = value.Interface().(string) - case "stride.records.HostZoneUnbonding.denom": - x.Denom = value.Interface().(string) - case "stride.records.HostZoneUnbonding.host_zone_id": - x.HostZoneId = value.Interface().(string) - case "stride.records.HostZoneUnbonding.unbonding_time": - x.UnbondingTime = value.Uint() - case "stride.records.HostZoneUnbonding.status": - x.Status = (HostZoneUnbonding_Status)(value.Enum()) - case "stride.records.HostZoneUnbonding.user_redemption_records": - lv := value.List() - clv := lv.(*_HostZoneUnbonding_7_list) - x.UserRedemptionRecords = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.HostZoneUnbonding")) - } - panic(fmt.Errorf("message stride.records.HostZoneUnbonding does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_HostZoneUnbonding) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.HostZoneUnbonding.user_redemption_records": - if x.UserRedemptionRecords == nil { - x.UserRedemptionRecords = []string{} - } - value := &_HostZoneUnbonding_7_list{list: &x.UserRedemptionRecords} - return protoreflect.ValueOfList(value) - case "stride.records.HostZoneUnbonding.st_token_amount": - panic(fmt.Errorf("field st_token_amount of message stride.records.HostZoneUnbonding is not mutable")) - case "stride.records.HostZoneUnbonding.native_token_amount": - panic(fmt.Errorf("field native_token_amount of message stride.records.HostZoneUnbonding is not mutable")) - case "stride.records.HostZoneUnbonding.denom": - panic(fmt.Errorf("field denom of message stride.records.HostZoneUnbonding is not mutable")) - case "stride.records.HostZoneUnbonding.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.records.HostZoneUnbonding is not mutable")) - case "stride.records.HostZoneUnbonding.unbonding_time": - panic(fmt.Errorf("field unbonding_time of message stride.records.HostZoneUnbonding is not mutable")) - case "stride.records.HostZoneUnbonding.status": - panic(fmt.Errorf("field status of message stride.records.HostZoneUnbonding is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.HostZoneUnbonding")) - } - panic(fmt.Errorf("message stride.records.HostZoneUnbonding does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_HostZoneUnbonding) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.HostZoneUnbonding.st_token_amount": - return protoreflect.ValueOfString("") - case "stride.records.HostZoneUnbonding.native_token_amount": - return protoreflect.ValueOfString("") - case "stride.records.HostZoneUnbonding.denom": - return protoreflect.ValueOfString("") - case "stride.records.HostZoneUnbonding.host_zone_id": - return protoreflect.ValueOfString("") - case "stride.records.HostZoneUnbonding.unbonding_time": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.records.HostZoneUnbonding.status": - return protoreflect.ValueOfEnum(0) - case "stride.records.HostZoneUnbonding.user_redemption_records": - list := []string{} - return protoreflect.ValueOfList(&_HostZoneUnbonding_7_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.HostZoneUnbonding")) - } - panic(fmt.Errorf("message stride.records.HostZoneUnbonding does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_HostZoneUnbonding) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.HostZoneUnbonding", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_HostZoneUnbonding) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_HostZoneUnbonding) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_HostZoneUnbonding) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_HostZoneUnbonding) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*HostZoneUnbonding) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.StTokenAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.NativeTokenAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.UnbondingTime != 0 { - n += 1 + runtime.Sov(uint64(x.UnbondingTime)) - } - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) - } - if len(x.UserRedemptionRecords) > 0 { - for _, s := range x.UserRedemptionRecords { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*HostZoneUnbonding) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.UserRedemptionRecords) > 0 { - for iNdEx := len(x.UserRedemptionRecords) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.UserRedemptionRecords[iNdEx]) - copy(dAtA[i:], x.UserRedemptionRecords[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UserRedemptionRecords[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) - i-- - dAtA[i] = 0x30 - } - if x.UnbondingTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.UnbondingTime)) - i-- - dAtA[i] = 0x28 - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0x22 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0x1a - } - if len(x.NativeTokenAmount) > 0 { - i -= len(x.NativeTokenAmount) - copy(dAtA[i:], x.NativeTokenAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NativeTokenAmount))) - i-- - dAtA[i] = 0x12 - } - if len(x.StTokenAmount) > 0 { - i -= len(x.StTokenAmount) - copy(dAtA[i:], x.StTokenAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StTokenAmount))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*HostZoneUnbonding) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HostZoneUnbonding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HostZoneUnbonding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.StTokenAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NativeTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.NativeTokenAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) - } - x.UnbondingTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.UnbondingTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - x.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Status |= HostZoneUnbonding_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecords", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UserRedemptionRecords = append(x.UserRedemptionRecords, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_EpochUnbondingRecord_3_list)(nil) - -type _EpochUnbondingRecord_3_list struct { - list *[]*HostZoneUnbonding -} - -func (x *_EpochUnbondingRecord_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_EpochUnbondingRecord_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_EpochUnbondingRecord_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*HostZoneUnbonding) - (*x.list)[i] = concreteValue -} - -func (x *_EpochUnbondingRecord_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*HostZoneUnbonding) - *x.list = append(*x.list, concreteValue) -} - -func (x *_EpochUnbondingRecord_3_list) AppendMutable() protoreflect.Value { - v := new(HostZoneUnbonding) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EpochUnbondingRecord_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_EpochUnbondingRecord_3_list) NewElement() protoreflect.Value { - v := new(HostZoneUnbonding) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EpochUnbondingRecord_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_EpochUnbondingRecord protoreflect.MessageDescriptor - fd_EpochUnbondingRecord_epoch_number protoreflect.FieldDescriptor - fd_EpochUnbondingRecord_host_zone_unbondings protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_records_proto_init() - md_EpochUnbondingRecord = File_stride_records_records_proto.Messages().ByName("EpochUnbondingRecord") - fd_EpochUnbondingRecord_epoch_number = md_EpochUnbondingRecord.Fields().ByName("epoch_number") - fd_EpochUnbondingRecord_host_zone_unbondings = md_EpochUnbondingRecord.Fields().ByName("host_zone_unbondings") -} - -var _ protoreflect.Message = (*fastReflection_EpochUnbondingRecord)(nil) - -type fastReflection_EpochUnbondingRecord EpochUnbondingRecord - -func (x *EpochUnbondingRecord) ProtoReflect() protoreflect.Message { - return (*fastReflection_EpochUnbondingRecord)(x) -} - -func (x *EpochUnbondingRecord) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_records_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EpochUnbondingRecord_messageType fastReflection_EpochUnbondingRecord_messageType -var _ protoreflect.MessageType = fastReflection_EpochUnbondingRecord_messageType{} - -type fastReflection_EpochUnbondingRecord_messageType struct{} - -func (x fastReflection_EpochUnbondingRecord_messageType) Zero() protoreflect.Message { - return (*fastReflection_EpochUnbondingRecord)(nil) -} -func (x fastReflection_EpochUnbondingRecord_messageType) New() protoreflect.Message { - return new(fastReflection_EpochUnbondingRecord) -} -func (x fastReflection_EpochUnbondingRecord_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EpochUnbondingRecord -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EpochUnbondingRecord) Descriptor() protoreflect.MessageDescriptor { - return md_EpochUnbondingRecord -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_EpochUnbondingRecord) Type() protoreflect.MessageType { - return _fastReflection_EpochUnbondingRecord_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EpochUnbondingRecord) New() protoreflect.Message { - return new(fastReflection_EpochUnbondingRecord) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EpochUnbondingRecord) Interface() protoreflect.ProtoMessage { - return (*EpochUnbondingRecord)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_EpochUnbondingRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.EpochNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.EpochNumber) - if !f(fd_EpochUnbondingRecord_epoch_number, value) { - return - } - } - if len(x.HostZoneUnbondings) != 0 { - value := protoreflect.ValueOfList(&_EpochUnbondingRecord_3_list{list: &x.HostZoneUnbondings}) - if !f(fd_EpochUnbondingRecord_host_zone_unbondings, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EpochUnbondingRecord) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.EpochUnbondingRecord.epoch_number": - return x.EpochNumber != uint64(0) - case "stride.records.EpochUnbondingRecord.host_zone_unbondings": - return len(x.HostZoneUnbondings) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.EpochUnbondingRecord")) - } - panic(fmt.Errorf("message stride.records.EpochUnbondingRecord does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochUnbondingRecord) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.EpochUnbondingRecord.epoch_number": - x.EpochNumber = uint64(0) - case "stride.records.EpochUnbondingRecord.host_zone_unbondings": - x.HostZoneUnbondings = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.EpochUnbondingRecord")) - } - panic(fmt.Errorf("message stride.records.EpochUnbondingRecord does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_EpochUnbondingRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.EpochUnbondingRecord.epoch_number": - value := x.EpochNumber - return protoreflect.ValueOfUint64(value) - case "stride.records.EpochUnbondingRecord.host_zone_unbondings": - if len(x.HostZoneUnbondings) == 0 { - return protoreflect.ValueOfList(&_EpochUnbondingRecord_3_list{}) - } - listValue := &_EpochUnbondingRecord_3_list{list: &x.HostZoneUnbondings} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.EpochUnbondingRecord")) - } - panic(fmt.Errorf("message stride.records.EpochUnbondingRecord does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochUnbondingRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.EpochUnbondingRecord.epoch_number": - x.EpochNumber = value.Uint() - case "stride.records.EpochUnbondingRecord.host_zone_unbondings": - lv := value.List() - clv := lv.(*_EpochUnbondingRecord_3_list) - x.HostZoneUnbondings = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.EpochUnbondingRecord")) - } - panic(fmt.Errorf("message stride.records.EpochUnbondingRecord does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochUnbondingRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.EpochUnbondingRecord.host_zone_unbondings": - if x.HostZoneUnbondings == nil { - x.HostZoneUnbondings = []*HostZoneUnbonding{} - } - value := &_EpochUnbondingRecord_3_list{list: &x.HostZoneUnbondings} - return protoreflect.ValueOfList(value) - case "stride.records.EpochUnbondingRecord.epoch_number": - panic(fmt.Errorf("field epoch_number of message stride.records.EpochUnbondingRecord is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.EpochUnbondingRecord")) - } - panic(fmt.Errorf("message stride.records.EpochUnbondingRecord does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_EpochUnbondingRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.EpochUnbondingRecord.epoch_number": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.records.EpochUnbondingRecord.host_zone_unbondings": - list := []*HostZoneUnbonding{} - return protoreflect.ValueOfList(&_EpochUnbondingRecord_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.EpochUnbondingRecord")) - } - panic(fmt.Errorf("message stride.records.EpochUnbondingRecord does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_EpochUnbondingRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.EpochUnbondingRecord", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_EpochUnbondingRecord) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochUnbondingRecord) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_EpochUnbondingRecord) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_EpochUnbondingRecord) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EpochUnbondingRecord) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.EpochNumber != 0 { - n += 1 + runtime.Sov(uint64(x.EpochNumber)) - } - if len(x.HostZoneUnbondings) > 0 { - for _, e := range x.HostZoneUnbondings { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EpochUnbondingRecord) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.HostZoneUnbondings) > 0 { - for iNdEx := len(x.HostZoneUnbondings) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.HostZoneUnbondings[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.EpochNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EpochNumber)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EpochUnbondingRecord) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EpochUnbondingRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EpochUnbondingRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - x.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneUnbondings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneUnbondings = append(x.HostZoneUnbondings, &HostZoneUnbonding{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HostZoneUnbondings[len(x.HostZoneUnbondings)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_LSMTokenDeposit protoreflect.MessageDescriptor - fd_LSMTokenDeposit_deposit_id protoreflect.FieldDescriptor - fd_LSMTokenDeposit_chain_id protoreflect.FieldDescriptor - fd_LSMTokenDeposit_denom protoreflect.FieldDescriptor - fd_LSMTokenDeposit_ibc_denom protoreflect.FieldDescriptor - fd_LSMTokenDeposit_staker_address protoreflect.FieldDescriptor - fd_LSMTokenDeposit_validator_address protoreflect.FieldDescriptor - fd_LSMTokenDeposit_amount protoreflect.FieldDescriptor - fd_LSMTokenDeposit_st_token protoreflect.FieldDescriptor - fd_LSMTokenDeposit_status protoreflect.FieldDescriptor -) - -func init() { - file_stride_records_records_proto_init() - md_LSMTokenDeposit = File_stride_records_records_proto.Messages().ByName("LSMTokenDeposit") - fd_LSMTokenDeposit_deposit_id = md_LSMTokenDeposit.Fields().ByName("deposit_id") - fd_LSMTokenDeposit_chain_id = md_LSMTokenDeposit.Fields().ByName("chain_id") - fd_LSMTokenDeposit_denom = md_LSMTokenDeposit.Fields().ByName("denom") - fd_LSMTokenDeposit_ibc_denom = md_LSMTokenDeposit.Fields().ByName("ibc_denom") - fd_LSMTokenDeposit_staker_address = md_LSMTokenDeposit.Fields().ByName("staker_address") - fd_LSMTokenDeposit_validator_address = md_LSMTokenDeposit.Fields().ByName("validator_address") - fd_LSMTokenDeposit_amount = md_LSMTokenDeposit.Fields().ByName("amount") - fd_LSMTokenDeposit_st_token = md_LSMTokenDeposit.Fields().ByName("st_token") - fd_LSMTokenDeposit_status = md_LSMTokenDeposit.Fields().ByName("status") -} - -var _ protoreflect.Message = (*fastReflection_LSMTokenDeposit)(nil) - -type fastReflection_LSMTokenDeposit LSMTokenDeposit - -func (x *LSMTokenDeposit) ProtoReflect() protoreflect.Message { - return (*fastReflection_LSMTokenDeposit)(x) -} - -func (x *LSMTokenDeposit) slowProtoReflect() protoreflect.Message { - mi := &file_stride_records_records_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_LSMTokenDeposit_messageType fastReflection_LSMTokenDeposit_messageType -var _ protoreflect.MessageType = fastReflection_LSMTokenDeposit_messageType{} - -type fastReflection_LSMTokenDeposit_messageType struct{} - -func (x fastReflection_LSMTokenDeposit_messageType) Zero() protoreflect.Message { - return (*fastReflection_LSMTokenDeposit)(nil) -} -func (x fastReflection_LSMTokenDeposit_messageType) New() protoreflect.Message { - return new(fastReflection_LSMTokenDeposit) -} -func (x fastReflection_LSMTokenDeposit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LSMTokenDeposit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LSMTokenDeposit) Descriptor() protoreflect.MessageDescriptor { - return md_LSMTokenDeposit -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_LSMTokenDeposit) Type() protoreflect.MessageType { - return _fastReflection_LSMTokenDeposit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LSMTokenDeposit) New() protoreflect.Message { - return new(fastReflection_LSMTokenDeposit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LSMTokenDeposit) Interface() protoreflect.ProtoMessage { - return (*LSMTokenDeposit)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_LSMTokenDeposit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DepositId != "" { - value := protoreflect.ValueOfString(x.DepositId) - if !f(fd_LSMTokenDeposit_deposit_id, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_LSMTokenDeposit_chain_id, value) { - return - } - } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_LSMTokenDeposit_denom, value) { - return - } - } - if x.IbcDenom != "" { - value := protoreflect.ValueOfString(x.IbcDenom) - if !f(fd_LSMTokenDeposit_ibc_denom, value) { - return - } - } - if x.StakerAddress != "" { - value := protoreflect.ValueOfString(x.StakerAddress) - if !f(fd_LSMTokenDeposit_staker_address, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_LSMTokenDeposit_validator_address, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_LSMTokenDeposit_amount, value) { - return - } - } - if x.StToken != nil { - value := protoreflect.ValueOfMessage(x.StToken.ProtoReflect()) - if !f(fd_LSMTokenDeposit_st_token, value) { - return - } - } - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_LSMTokenDeposit_status, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_LSMTokenDeposit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.records.LSMTokenDeposit.deposit_id": - return x.DepositId != "" - case "stride.records.LSMTokenDeposit.chain_id": - return x.ChainId != "" - case "stride.records.LSMTokenDeposit.denom": - return x.Denom != "" - case "stride.records.LSMTokenDeposit.ibc_denom": - return x.IbcDenom != "" - case "stride.records.LSMTokenDeposit.staker_address": - return x.StakerAddress != "" - case "stride.records.LSMTokenDeposit.validator_address": - return x.ValidatorAddress != "" - case "stride.records.LSMTokenDeposit.amount": - return x.Amount != "" - case "stride.records.LSMTokenDeposit.st_token": - return x.StToken != nil - case "stride.records.LSMTokenDeposit.status": - return x.Status != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.LSMTokenDeposit")) - } - panic(fmt.Errorf("message stride.records.LSMTokenDeposit does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LSMTokenDeposit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.records.LSMTokenDeposit.deposit_id": - x.DepositId = "" - case "stride.records.LSMTokenDeposit.chain_id": - x.ChainId = "" - case "stride.records.LSMTokenDeposit.denom": - x.Denom = "" - case "stride.records.LSMTokenDeposit.ibc_denom": - x.IbcDenom = "" - case "stride.records.LSMTokenDeposit.staker_address": - x.StakerAddress = "" - case "stride.records.LSMTokenDeposit.validator_address": - x.ValidatorAddress = "" - case "stride.records.LSMTokenDeposit.amount": - x.Amount = "" - case "stride.records.LSMTokenDeposit.st_token": - x.StToken = nil - case "stride.records.LSMTokenDeposit.status": - x.Status = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.LSMTokenDeposit")) - } - panic(fmt.Errorf("message stride.records.LSMTokenDeposit does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_LSMTokenDeposit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.records.LSMTokenDeposit.deposit_id": - value := x.DepositId - return protoreflect.ValueOfString(value) - case "stride.records.LSMTokenDeposit.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.records.LSMTokenDeposit.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "stride.records.LSMTokenDeposit.ibc_denom": - value := x.IbcDenom - return protoreflect.ValueOfString(value) - case "stride.records.LSMTokenDeposit.staker_address": - value := x.StakerAddress - return protoreflect.ValueOfString(value) - case "stride.records.LSMTokenDeposit.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "stride.records.LSMTokenDeposit.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "stride.records.LSMTokenDeposit.st_token": - value := x.StToken - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.records.LSMTokenDeposit.status": - value := x.Status - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.LSMTokenDeposit")) - } - panic(fmt.Errorf("message stride.records.LSMTokenDeposit does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LSMTokenDeposit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.records.LSMTokenDeposit.deposit_id": - x.DepositId = value.Interface().(string) - case "stride.records.LSMTokenDeposit.chain_id": - x.ChainId = value.Interface().(string) - case "stride.records.LSMTokenDeposit.denom": - x.Denom = value.Interface().(string) - case "stride.records.LSMTokenDeposit.ibc_denom": - x.IbcDenom = value.Interface().(string) - case "stride.records.LSMTokenDeposit.staker_address": - x.StakerAddress = value.Interface().(string) - case "stride.records.LSMTokenDeposit.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "stride.records.LSMTokenDeposit.amount": - x.Amount = value.Interface().(string) - case "stride.records.LSMTokenDeposit.st_token": - x.StToken = value.Message().Interface().(*v1beta1.Coin) - case "stride.records.LSMTokenDeposit.status": - x.Status = (LSMTokenDeposit_Status)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.LSMTokenDeposit")) - } - panic(fmt.Errorf("message stride.records.LSMTokenDeposit does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LSMTokenDeposit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.LSMTokenDeposit.st_token": - if x.StToken == nil { - x.StToken = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.StToken.ProtoReflect()) - case "stride.records.LSMTokenDeposit.deposit_id": - panic(fmt.Errorf("field deposit_id of message stride.records.LSMTokenDeposit is not mutable")) - case "stride.records.LSMTokenDeposit.chain_id": - panic(fmt.Errorf("field chain_id of message stride.records.LSMTokenDeposit is not mutable")) - case "stride.records.LSMTokenDeposit.denom": - panic(fmt.Errorf("field denom of message stride.records.LSMTokenDeposit is not mutable")) - case "stride.records.LSMTokenDeposit.ibc_denom": - panic(fmt.Errorf("field ibc_denom of message stride.records.LSMTokenDeposit is not mutable")) - case "stride.records.LSMTokenDeposit.staker_address": - panic(fmt.Errorf("field staker_address of message stride.records.LSMTokenDeposit is not mutable")) - case "stride.records.LSMTokenDeposit.validator_address": - panic(fmt.Errorf("field validator_address of message stride.records.LSMTokenDeposit is not mutable")) - case "stride.records.LSMTokenDeposit.amount": - panic(fmt.Errorf("field amount of message stride.records.LSMTokenDeposit is not mutable")) - case "stride.records.LSMTokenDeposit.status": - panic(fmt.Errorf("field status of message stride.records.LSMTokenDeposit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.LSMTokenDeposit")) - } - panic(fmt.Errorf("message stride.records.LSMTokenDeposit does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_LSMTokenDeposit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.records.LSMTokenDeposit.deposit_id": - return protoreflect.ValueOfString("") - case "stride.records.LSMTokenDeposit.chain_id": - return protoreflect.ValueOfString("") - case "stride.records.LSMTokenDeposit.denom": - return protoreflect.ValueOfString("") - case "stride.records.LSMTokenDeposit.ibc_denom": - return protoreflect.ValueOfString("") - case "stride.records.LSMTokenDeposit.staker_address": - return protoreflect.ValueOfString("") - case "stride.records.LSMTokenDeposit.validator_address": - return protoreflect.ValueOfString("") - case "stride.records.LSMTokenDeposit.amount": - return protoreflect.ValueOfString("") - case "stride.records.LSMTokenDeposit.st_token": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.records.LSMTokenDeposit.status": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.records.LSMTokenDeposit")) - } - panic(fmt.Errorf("message stride.records.LSMTokenDeposit does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_LSMTokenDeposit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.records.LSMTokenDeposit", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_LSMTokenDeposit) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LSMTokenDeposit) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_LSMTokenDeposit) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_LSMTokenDeposit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LSMTokenDeposit) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.DepositId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.IbcDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.StakerAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StToken != nil { - l = options.Size(x.StToken) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*LSMTokenDeposit) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) - i-- - dAtA[i] = 0x48 - } - if x.StToken != nil { - encoded, err := options.Marshal(x.StToken) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x3a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x32 - } - if len(x.StakerAddress) > 0 { - i -= len(x.StakerAddress) - copy(dAtA[i:], x.StakerAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StakerAddress))) - i-- - dAtA[i] = 0x2a - } - if len(x.IbcDenom) > 0 { - i -= len(x.IbcDenom) - copy(dAtA[i:], x.IbcDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcDenom))) - i-- - dAtA[i] = 0x22 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.DepositId) > 0 { - i -= len(x.DepositId) - copy(dAtA[i:], x.DepositId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DepositId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*LSMTokenDeposit) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LSMTokenDeposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LSMTokenDeposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DepositId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.IbcDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StakerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.StakerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StToken", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.StToken == nil { - x.StToken = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StToken); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - x.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Status |= LSMTokenDeposit_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/records/records.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type DepositRecord_Status int32 - -const ( - // in transfer queue to be sent to the delegation ICA - DepositRecord_TRANSFER_QUEUE DepositRecord_Status = 0 - // transfer in progress (IBC packet sent, ack not received) - DepositRecord_TRANSFER_IN_PROGRESS DepositRecord_Status = 2 - // in staking queue on delegation ICA - DepositRecord_DELEGATION_QUEUE DepositRecord_Status = 1 - // staking in progress (ICA packet sent, ack not received) - DepositRecord_DELEGATION_IN_PROGRESS DepositRecord_Status = 3 -) - -// Enum value maps for DepositRecord_Status. -var ( - DepositRecord_Status_name = map[int32]string{ - 0: "TRANSFER_QUEUE", - 2: "TRANSFER_IN_PROGRESS", - 1: "DELEGATION_QUEUE", - 3: "DELEGATION_IN_PROGRESS", - } - DepositRecord_Status_value = map[string]int32{ - "TRANSFER_QUEUE": 0, - "TRANSFER_IN_PROGRESS": 2, - "DELEGATION_QUEUE": 1, - "DELEGATION_IN_PROGRESS": 3, - } -) - -func (x DepositRecord_Status) Enum() *DepositRecord_Status { - p := new(DepositRecord_Status) - *p = x - return p -} - -func (x DepositRecord_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DepositRecord_Status) Descriptor() protoreflect.EnumDescriptor { - return file_stride_records_records_proto_enumTypes[0].Descriptor() -} - -func (DepositRecord_Status) Type() protoreflect.EnumType { - return &file_stride_records_records_proto_enumTypes[0] -} - -func (x DepositRecord_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DepositRecord_Status.Descriptor instead. -func (DepositRecord_Status) EnumDescriptor() ([]byte, []int) { - return file_stride_records_records_proto_rawDescGZIP(), []int{1, 0} -} - -type DepositRecord_Source int32 - -const ( - DepositRecord_STRIDE DepositRecord_Source = 0 - DepositRecord_WITHDRAWAL_ICA DepositRecord_Source = 1 -) - -// Enum value maps for DepositRecord_Source. -var ( - DepositRecord_Source_name = map[int32]string{ - 0: "STRIDE", - 1: "WITHDRAWAL_ICA", - } - DepositRecord_Source_value = map[string]int32{ - "STRIDE": 0, - "WITHDRAWAL_ICA": 1, - } -) - -func (x DepositRecord_Source) Enum() *DepositRecord_Source { - p := new(DepositRecord_Source) - *p = x - return p -} - -func (x DepositRecord_Source) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DepositRecord_Source) Descriptor() protoreflect.EnumDescriptor { - return file_stride_records_records_proto_enumTypes[1].Descriptor() -} - -func (DepositRecord_Source) Type() protoreflect.EnumType { - return &file_stride_records_records_proto_enumTypes[1] -} - -func (x DepositRecord_Source) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DepositRecord_Source.Descriptor instead. -func (DepositRecord_Source) EnumDescriptor() ([]byte, []int) { - return file_stride_records_records_proto_rawDescGZIP(), []int{1, 1} -} - -type HostZoneUnbonding_Status int32 - -const ( - // tokens bonded on delegate account - HostZoneUnbonding_UNBONDING_QUEUE HostZoneUnbonding_Status = 0 - HostZoneUnbonding_UNBONDING_IN_PROGRESS HostZoneUnbonding_Status = 3 - // unbonding completed on delegate account - HostZoneUnbonding_EXIT_TRANSFER_QUEUE HostZoneUnbonding_Status = 1 - HostZoneUnbonding_EXIT_TRANSFER_IN_PROGRESS HostZoneUnbonding_Status = 4 - // transfer success - HostZoneUnbonding_CLAIMABLE HostZoneUnbonding_Status = 2 -) - -// Enum value maps for HostZoneUnbonding_Status. -var ( - HostZoneUnbonding_Status_name = map[int32]string{ - 0: "UNBONDING_QUEUE", - 3: "UNBONDING_IN_PROGRESS", - 1: "EXIT_TRANSFER_QUEUE", - 4: "EXIT_TRANSFER_IN_PROGRESS", - 2: "CLAIMABLE", - } - HostZoneUnbonding_Status_value = map[string]int32{ - "UNBONDING_QUEUE": 0, - "UNBONDING_IN_PROGRESS": 3, - "EXIT_TRANSFER_QUEUE": 1, - "EXIT_TRANSFER_IN_PROGRESS": 4, - "CLAIMABLE": 2, - } -) - -func (x HostZoneUnbonding_Status) Enum() *HostZoneUnbonding_Status { - p := new(HostZoneUnbonding_Status) - *p = x - return p -} - -func (x HostZoneUnbonding_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (HostZoneUnbonding_Status) Descriptor() protoreflect.EnumDescriptor { - return file_stride_records_records_proto_enumTypes[2].Descriptor() -} - -func (HostZoneUnbonding_Status) Type() protoreflect.EnumType { - return &file_stride_records_records_proto_enumTypes[2] -} - -func (x HostZoneUnbonding_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use HostZoneUnbonding_Status.Descriptor instead. -func (HostZoneUnbonding_Status) EnumDescriptor() ([]byte, []int) { - return file_stride_records_records_proto_rawDescGZIP(), []int{2, 0} -} - -type LSMTokenDeposit_Status int32 - -const ( - LSMTokenDeposit_DEPOSIT_PENDING LSMTokenDeposit_Status = 0 - LSMTokenDeposit_TRANSFER_QUEUE LSMTokenDeposit_Status = 1 - LSMTokenDeposit_TRANSFER_IN_PROGRESS LSMTokenDeposit_Status = 2 - LSMTokenDeposit_TRANSFER_FAILED LSMTokenDeposit_Status = 3 - LSMTokenDeposit_DETOKENIZATION_QUEUE LSMTokenDeposit_Status = 4 - LSMTokenDeposit_DETOKENIZATION_IN_PROGRESS LSMTokenDeposit_Status = 5 - LSMTokenDeposit_DETOKENIZATION_FAILED LSMTokenDeposit_Status = 6 -) - -// Enum value maps for LSMTokenDeposit_Status. -var ( - LSMTokenDeposit_Status_name = map[int32]string{ - 0: "DEPOSIT_PENDING", - 1: "TRANSFER_QUEUE", - 2: "TRANSFER_IN_PROGRESS", - 3: "TRANSFER_FAILED", - 4: "DETOKENIZATION_QUEUE", - 5: "DETOKENIZATION_IN_PROGRESS", - 6: "DETOKENIZATION_FAILED", - } - LSMTokenDeposit_Status_value = map[string]int32{ - "DEPOSIT_PENDING": 0, - "TRANSFER_QUEUE": 1, - "TRANSFER_IN_PROGRESS": 2, - "TRANSFER_FAILED": 3, - "DETOKENIZATION_QUEUE": 4, - "DETOKENIZATION_IN_PROGRESS": 5, - "DETOKENIZATION_FAILED": 6, - } -) - -func (x LSMTokenDeposit_Status) Enum() *LSMTokenDeposit_Status { - p := new(LSMTokenDeposit_Status) - *p = x - return p -} - -func (x LSMTokenDeposit_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (LSMTokenDeposit_Status) Descriptor() protoreflect.EnumDescriptor { - return file_stride_records_records_proto_enumTypes[3].Descriptor() -} - -func (LSMTokenDeposit_Status) Type() protoreflect.EnumType { - return &file_stride_records_records_proto_enumTypes[3] -} - -func (x LSMTokenDeposit_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use LSMTokenDeposit_Status.Descriptor instead. -func (LSMTokenDeposit_Status) EnumDescriptor() ([]byte, []int) { - return file_stride_records_records_proto_rawDescGZIP(), []int{4, 0} -} - -type UserRedemptionRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // {chain_id}.{epoch}.{receiver} - Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` - NativeTokenAmount string `protobuf:"bytes,4,opt,name=native_token_amount,json=nativeTokenAmount,proto3" json:"native_token_amount,omitempty"` - Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"` - HostZoneId string `protobuf:"bytes,6,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - EpochNumber uint64 `protobuf:"varint,7,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` - ClaimIsPending bool `protobuf:"varint,8,opt,name=claim_is_pending,json=claimIsPending,proto3" json:"claim_is_pending,omitempty"` - StTokenAmount string `protobuf:"bytes,9,opt,name=st_token_amount,json=stTokenAmount,proto3" json:"st_token_amount,omitempty"` -} - -func (x *UserRedemptionRecord) Reset() { - *x = UserRedemptionRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_records_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UserRedemptionRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UserRedemptionRecord) ProtoMessage() {} - -// Deprecated: Use UserRedemptionRecord.ProtoReflect.Descriptor instead. -func (*UserRedemptionRecord) Descriptor() ([]byte, []int) { - return file_stride_records_records_proto_rawDescGZIP(), []int{0} -} - -func (x *UserRedemptionRecord) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *UserRedemptionRecord) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *UserRedemptionRecord) GetNativeTokenAmount() string { - if x != nil { - return x.NativeTokenAmount - } - return "" -} - -func (x *UserRedemptionRecord) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *UserRedemptionRecord) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -func (x *UserRedemptionRecord) GetEpochNumber() uint64 { - if x != nil { - return x.EpochNumber - } - return 0 -} - -func (x *UserRedemptionRecord) GetClaimIsPending() bool { - if x != nil { - return x.ClaimIsPending - } - return false -} - -func (x *UserRedemptionRecord) GetStTokenAmount() string { - if x != nil { - return x.StTokenAmount - } - return "" -} - -type DepositRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` - HostZoneId string `protobuf:"bytes,4,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - Status DepositRecord_Status `protobuf:"varint,6,opt,name=status,proto3,enum=stride.records.DepositRecord_Status" json:"status,omitempty"` - DepositEpochNumber uint64 `protobuf:"varint,7,opt,name=deposit_epoch_number,json=depositEpochNumber,proto3" json:"deposit_epoch_number,omitempty"` - Source DepositRecord_Source `protobuf:"varint,8,opt,name=source,proto3,enum=stride.records.DepositRecord_Source" json:"source,omitempty"` -} - -func (x *DepositRecord) Reset() { - *x = DepositRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_records_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DepositRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DepositRecord) ProtoMessage() {} - -// Deprecated: Use DepositRecord.ProtoReflect.Descriptor instead. -func (*DepositRecord) Descriptor() ([]byte, []int) { - return file_stride_records_records_proto_rawDescGZIP(), []int{1} -} - -func (x *DepositRecord) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *DepositRecord) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -func (x *DepositRecord) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *DepositRecord) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -func (x *DepositRecord) GetStatus() DepositRecord_Status { - if x != nil { - return x.Status - } - return DepositRecord_TRANSFER_QUEUE -} - -func (x *DepositRecord) GetDepositEpochNumber() uint64 { - if x != nil { - return x.DepositEpochNumber - } - return 0 -} - -func (x *DepositRecord) GetSource() DepositRecord_Source { - if x != nil { - return x.Source - } - return DepositRecord_STRIDE -} - -type HostZoneUnbonding struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StTokenAmount string `protobuf:"bytes,1,opt,name=st_token_amount,json=stTokenAmount,proto3" json:"st_token_amount,omitempty"` - NativeTokenAmount string `protobuf:"bytes,2,opt,name=native_token_amount,json=nativeTokenAmount,proto3" json:"native_token_amount,omitempty"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` - HostZoneId string `protobuf:"bytes,4,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - UnbondingTime uint64 `protobuf:"varint,5,opt,name=unbonding_time,json=unbondingTime,proto3" json:"unbonding_time,omitempty"` - Status HostZoneUnbonding_Status `protobuf:"varint,6,opt,name=status,proto3,enum=stride.records.HostZoneUnbonding_Status" json:"status,omitempty"` - UserRedemptionRecords []string `protobuf:"bytes,7,rep,name=user_redemption_records,json=userRedemptionRecords,proto3" json:"user_redemption_records,omitempty"` -} - -func (x *HostZoneUnbonding) Reset() { - *x = HostZoneUnbonding{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_records_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HostZoneUnbonding) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HostZoneUnbonding) ProtoMessage() {} - -// Deprecated: Use HostZoneUnbonding.ProtoReflect.Descriptor instead. -func (*HostZoneUnbonding) Descriptor() ([]byte, []int) { - return file_stride_records_records_proto_rawDescGZIP(), []int{2} -} - -func (x *HostZoneUnbonding) GetStTokenAmount() string { - if x != nil { - return x.StTokenAmount - } - return "" -} - -func (x *HostZoneUnbonding) GetNativeTokenAmount() string { - if x != nil { - return x.NativeTokenAmount - } - return "" -} - -func (x *HostZoneUnbonding) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *HostZoneUnbonding) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -func (x *HostZoneUnbonding) GetUnbondingTime() uint64 { - if x != nil { - return x.UnbondingTime - } - return 0 -} - -func (x *HostZoneUnbonding) GetStatus() HostZoneUnbonding_Status { - if x != nil { - return x.Status - } - return HostZoneUnbonding_UNBONDING_QUEUE -} - -func (x *HostZoneUnbonding) GetUserRedemptionRecords() []string { - if x != nil { - return x.UserRedemptionRecords - } - return nil -} - -type EpochUnbondingRecord struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` - HostZoneUnbondings []*HostZoneUnbonding `protobuf:"bytes,3,rep,name=host_zone_unbondings,json=hostZoneUnbondings,proto3" json:"host_zone_unbondings,omitempty"` -} - -func (x *EpochUnbondingRecord) Reset() { - *x = EpochUnbondingRecord{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_records_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EpochUnbondingRecord) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EpochUnbondingRecord) ProtoMessage() {} - -// Deprecated: Use EpochUnbondingRecord.ProtoReflect.Descriptor instead. -func (*EpochUnbondingRecord) Descriptor() ([]byte, []int) { - return file_stride_records_records_proto_rawDescGZIP(), []int{3} -} - -func (x *EpochUnbondingRecord) GetEpochNumber() uint64 { - if x != nil { - return x.EpochNumber - } - return 0 -} - -func (x *EpochUnbondingRecord) GetHostZoneUnbondings() []*HostZoneUnbonding { - if x != nil { - return x.HostZoneUnbondings - } - return nil -} - -type LSMTokenDeposit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - DepositId string `protobuf:"bytes,1,opt,name=deposit_id,json=depositId,proto3" json:"deposit_id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` - IbcDenom string `protobuf:"bytes,4,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty"` - StakerAddress string `protobuf:"bytes,5,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Amount string `protobuf:"bytes,7,opt,name=amount,proto3" json:"amount,omitempty"` - StToken *v1beta1.Coin `protobuf:"bytes,8,opt,name=st_token,json=stToken,proto3" json:"st_token,omitempty"` - Status LSMTokenDeposit_Status `protobuf:"varint,9,opt,name=status,proto3,enum=stride.records.LSMTokenDeposit_Status" json:"status,omitempty"` -} - -func (x *LSMTokenDeposit) Reset() { - *x = LSMTokenDeposit{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_records_records_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LSMTokenDeposit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LSMTokenDeposit) ProtoMessage() {} - -// Deprecated: Use LSMTokenDeposit.ProtoReflect.Descriptor instead. -func (*LSMTokenDeposit) Descriptor() ([]byte, []int) { - return file_stride_records_records_proto_rawDescGZIP(), []int{4} -} - -func (x *LSMTokenDeposit) GetDepositId() string { - if x != nil { - return x.DepositId - } - return "" -} - -func (x *LSMTokenDeposit) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *LSMTokenDeposit) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *LSMTokenDeposit) GetIbcDenom() string { - if x != nil { - return x.IbcDenom - } - return "" -} - -func (x *LSMTokenDeposit) GetStakerAddress() string { - if x != nil { - return x.StakerAddress - } - return "" -} - -func (x *LSMTokenDeposit) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *LSMTokenDeposit) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -func (x *LSMTokenDeposit) GetStToken() *v1beta1.Coin { - if x != nil { - return x.StToken - } - return nil -} - -func (x *LSMTokenDeposit) GetStatus() LSMTokenDeposit_Status { - if x != nil { - return x.Status - } - return LSMTokenDeposit_DEPOSIT_PENDING -} - -var File_stride_records_records_proto protoreflect.FileDescriptor - -var file_stride_records_records_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x1a, 0x1e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe3, 0x02, 0x0a, 0x14, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, - 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, - 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x13, 0x6e, 0x61, 0x74, - 0x69, 0x76, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, - 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x11, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x20, - 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x64, - 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x69, 0x73, 0x5f, - 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, - 0x6c, 0x61, 0x69, 0x6d, 0x49, 0x73, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x45, 0x0a, - 0x0f, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, - 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0d, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0xd6, 0x03, 0x0a, 0x0d, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x68, 0x0a, 0x06, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, - 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x46, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, - 0x02, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x45, 0x4c, 0x45, 0x47, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, - 0x53, 0x10, 0x03, 0x22, 0x28, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0a, 0x0a, - 0x06, 0x53, 0x54, 0x52, 0x49, 0x44, 0x45, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x57, 0x49, 0x54, - 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x5f, 0x49, 0x43, 0x41, 0x10, 0x01, 0x4a, 0x04, 0x08, - 0x05, 0x10, 0x06, 0x22, 0x83, 0x04, 0x0a, 0x11, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, - 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x45, 0x0a, 0x0f, 0x73, 0x74, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, - 0x74, 0x52, 0x0d, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x4d, 0x0a, 0x13, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x11, 0x6e, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, - 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x73, - 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x75, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0d, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, - 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, - 0x67, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x36, 0x0a, 0x17, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x15, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x7f, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x42, 0x4f, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, - 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x42, 0x4f, 0x4e, - 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, - 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x58, 0x49, 0x54, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x46, 0x45, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x45, - 0x58, 0x49, 0x54, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x5f, - 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4c, - 0x41, 0x49, 0x4d, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x22, 0x94, 0x01, 0x0a, 0x14, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x53, 0x0a, 0x14, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, - 0x6e, 0x65, 0x5f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x55, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, - 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, - 0x22, 0xbd, 0x04, 0x0a, 0x0f, 0x4c, 0x53, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, - 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x62, 0x63, 0x5f, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x62, 0x63, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x35, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, - 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x08, - 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x07, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x4c, 0x53, 0x4d, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xb5, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x52, 0x41, 0x4e, - 0x53, 0x46, 0x45, 0x52, 0x5f, 0x51, 0x55, 0x45, 0x55, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, - 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, - 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x46, - 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x44, - 0x45, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x51, 0x55, - 0x45, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x45, 0x54, 0x4f, 0x4b, 0x45, 0x4e, - 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, - 0x45, 0x53, 0x53, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x45, 0x54, 0x4f, 0x4b, 0x45, 0x4e, - 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x06, - 0x42, 0xb1, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x42, 0x0c, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0xa2, 0x02, 0x03, - 0x53, 0x52, 0x58, 0xaa, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0xca, 0x02, 0x0e, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x73, 0xe2, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x52, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_records_records_proto_rawDescOnce sync.Once - file_stride_records_records_proto_rawDescData = file_stride_records_records_proto_rawDesc -) - -func file_stride_records_records_proto_rawDescGZIP() []byte { - file_stride_records_records_proto_rawDescOnce.Do(func() { - file_stride_records_records_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_records_records_proto_rawDescData) - }) - return file_stride_records_records_proto_rawDescData -} - -var file_stride_records_records_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_stride_records_records_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_stride_records_records_proto_goTypes = []interface{}{ - (DepositRecord_Status)(0), // 0: stride.records.DepositRecord.Status - (DepositRecord_Source)(0), // 1: stride.records.DepositRecord.Source - (HostZoneUnbonding_Status)(0), // 2: stride.records.HostZoneUnbonding.Status - (LSMTokenDeposit_Status)(0), // 3: stride.records.LSMTokenDeposit.Status - (*UserRedemptionRecord)(nil), // 4: stride.records.UserRedemptionRecord - (*DepositRecord)(nil), // 5: stride.records.DepositRecord - (*HostZoneUnbonding)(nil), // 6: stride.records.HostZoneUnbonding - (*EpochUnbondingRecord)(nil), // 7: stride.records.EpochUnbondingRecord - (*LSMTokenDeposit)(nil), // 8: stride.records.LSMTokenDeposit - (*v1beta1.Coin)(nil), // 9: cosmos.base.v1beta1.Coin -} -var file_stride_records_records_proto_depIdxs = []int32{ - 0, // 0: stride.records.DepositRecord.status:type_name -> stride.records.DepositRecord.Status - 1, // 1: stride.records.DepositRecord.source:type_name -> stride.records.DepositRecord.Source - 2, // 2: stride.records.HostZoneUnbonding.status:type_name -> stride.records.HostZoneUnbonding.Status - 6, // 3: stride.records.EpochUnbondingRecord.host_zone_unbondings:type_name -> stride.records.HostZoneUnbonding - 9, // 4: stride.records.LSMTokenDeposit.st_token:type_name -> cosmos.base.v1beta1.Coin - 3, // 5: stride.records.LSMTokenDeposit.status:type_name -> stride.records.LSMTokenDeposit.Status - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name -} - -func init() { file_stride_records_records_proto_init() } -func file_stride_records_records_proto_init() { - if File_stride_records_records_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_records_records_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserRedemptionRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_records_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DepositRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_records_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HostZoneUnbonding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_records_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochUnbondingRecord); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_records_records_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LSMTokenDeposit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_records_records_proto_rawDesc, - NumEnums: 4, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_records_records_proto_goTypes, - DependencyIndexes: file_stride_records_records_proto_depIdxs, - EnumInfos: file_stride_records_records_proto_enumTypes, - MessageInfos: file_stride_records_records_proto_msgTypes, - }.Build() - File_stride_records_records_proto = out.File - file_stride_records_records_proto_rawDesc = nil - file_stride_records_records_proto_goTypes = nil - file_stride_records_records_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/address_unbonding.pulsar.go b/api/stride/stakeibc/address_unbonding.pulsar.go deleted file mode 100644 index cd5057c2e..000000000 --- a/api/stride/stakeibc/address_unbonding.pulsar.go +++ /dev/null @@ -1,992 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_AddressUnbonding protoreflect.MessageDescriptor - fd_AddressUnbonding_address protoreflect.FieldDescriptor - fd_AddressUnbonding_receiver protoreflect.FieldDescriptor - fd_AddressUnbonding_unbonding_estimated_time protoreflect.FieldDescriptor - fd_AddressUnbonding_amount protoreflect.FieldDescriptor - fd_AddressUnbonding_denom protoreflect.FieldDescriptor - fd_AddressUnbonding_claim_is_pending protoreflect.FieldDescriptor - fd_AddressUnbonding_epoch_number protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_address_unbonding_proto_init() - md_AddressUnbonding = File_stride_stakeibc_address_unbonding_proto.Messages().ByName("AddressUnbonding") - fd_AddressUnbonding_address = md_AddressUnbonding.Fields().ByName("address") - fd_AddressUnbonding_receiver = md_AddressUnbonding.Fields().ByName("receiver") - fd_AddressUnbonding_unbonding_estimated_time = md_AddressUnbonding.Fields().ByName("unbonding_estimated_time") - fd_AddressUnbonding_amount = md_AddressUnbonding.Fields().ByName("amount") - fd_AddressUnbonding_denom = md_AddressUnbonding.Fields().ByName("denom") - fd_AddressUnbonding_claim_is_pending = md_AddressUnbonding.Fields().ByName("claim_is_pending") - fd_AddressUnbonding_epoch_number = md_AddressUnbonding.Fields().ByName("epoch_number") -} - -var _ protoreflect.Message = (*fastReflection_AddressUnbonding)(nil) - -type fastReflection_AddressUnbonding AddressUnbonding - -func (x *AddressUnbonding) ProtoReflect() protoreflect.Message { - return (*fastReflection_AddressUnbonding)(x) -} - -func (x *AddressUnbonding) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_address_unbonding_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AddressUnbonding_messageType fastReflection_AddressUnbonding_messageType -var _ protoreflect.MessageType = fastReflection_AddressUnbonding_messageType{} - -type fastReflection_AddressUnbonding_messageType struct{} - -func (x fastReflection_AddressUnbonding_messageType) Zero() protoreflect.Message { - return (*fastReflection_AddressUnbonding)(nil) -} -func (x fastReflection_AddressUnbonding_messageType) New() protoreflect.Message { - return new(fastReflection_AddressUnbonding) -} -func (x fastReflection_AddressUnbonding_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AddressUnbonding -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AddressUnbonding) Descriptor() protoreflect.MessageDescriptor { - return md_AddressUnbonding -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_AddressUnbonding) Type() protoreflect.MessageType { - return _fastReflection_AddressUnbonding_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AddressUnbonding) New() protoreflect.Message { - return new(fastReflection_AddressUnbonding) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AddressUnbonding) Interface() protoreflect.ProtoMessage { - return (*AddressUnbonding)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_AddressUnbonding) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_AddressUnbonding_address, value) { - return - } - } - if x.Receiver != "" { - value := protoreflect.ValueOfString(x.Receiver) - if !f(fd_AddressUnbonding_receiver, value) { - return - } - } - if x.UnbondingEstimatedTime != "" { - value := protoreflect.ValueOfString(x.UnbondingEstimatedTime) - if !f(fd_AddressUnbonding_unbonding_estimated_time, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_AddressUnbonding_amount, value) { - return - } - } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_AddressUnbonding_denom, value) { - return - } - } - if x.ClaimIsPending != false { - value := protoreflect.ValueOfBool(x.ClaimIsPending) - if !f(fd_AddressUnbonding_claim_is_pending, value) { - return - } - } - if x.EpochNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.EpochNumber) - if !f(fd_AddressUnbonding_epoch_number, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_AddressUnbonding) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.AddressUnbonding.address": - return x.Address != "" - case "stride.stakeibc.AddressUnbonding.receiver": - return x.Receiver != "" - case "stride.stakeibc.AddressUnbonding.unbonding_estimated_time": - return x.UnbondingEstimatedTime != "" - case "stride.stakeibc.AddressUnbonding.amount": - return x.Amount != "" - case "stride.stakeibc.AddressUnbonding.denom": - return x.Denom != "" - case "stride.stakeibc.AddressUnbonding.claim_is_pending": - return x.ClaimIsPending != false - case "stride.stakeibc.AddressUnbonding.epoch_number": - return x.EpochNumber != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.AddressUnbonding")) - } - panic(fmt.Errorf("message stride.stakeibc.AddressUnbonding does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AddressUnbonding) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.AddressUnbonding.address": - x.Address = "" - case "stride.stakeibc.AddressUnbonding.receiver": - x.Receiver = "" - case "stride.stakeibc.AddressUnbonding.unbonding_estimated_time": - x.UnbondingEstimatedTime = "" - case "stride.stakeibc.AddressUnbonding.amount": - x.Amount = "" - case "stride.stakeibc.AddressUnbonding.denom": - x.Denom = "" - case "stride.stakeibc.AddressUnbonding.claim_is_pending": - x.ClaimIsPending = false - case "stride.stakeibc.AddressUnbonding.epoch_number": - x.EpochNumber = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.AddressUnbonding")) - } - panic(fmt.Errorf("message stride.stakeibc.AddressUnbonding does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_AddressUnbonding) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.AddressUnbonding.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "stride.stakeibc.AddressUnbonding.receiver": - value := x.Receiver - return protoreflect.ValueOfString(value) - case "stride.stakeibc.AddressUnbonding.unbonding_estimated_time": - value := x.UnbondingEstimatedTime - return protoreflect.ValueOfString(value) - case "stride.stakeibc.AddressUnbonding.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "stride.stakeibc.AddressUnbonding.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "stride.stakeibc.AddressUnbonding.claim_is_pending": - value := x.ClaimIsPending - return protoreflect.ValueOfBool(value) - case "stride.stakeibc.AddressUnbonding.epoch_number": - value := x.EpochNumber - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.AddressUnbonding")) - } - panic(fmt.Errorf("message stride.stakeibc.AddressUnbonding does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AddressUnbonding) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.AddressUnbonding.address": - x.Address = value.Interface().(string) - case "stride.stakeibc.AddressUnbonding.receiver": - x.Receiver = value.Interface().(string) - case "stride.stakeibc.AddressUnbonding.unbonding_estimated_time": - x.UnbondingEstimatedTime = value.Interface().(string) - case "stride.stakeibc.AddressUnbonding.amount": - x.Amount = value.Interface().(string) - case "stride.stakeibc.AddressUnbonding.denom": - x.Denom = value.Interface().(string) - case "stride.stakeibc.AddressUnbonding.claim_is_pending": - x.ClaimIsPending = value.Bool() - case "stride.stakeibc.AddressUnbonding.epoch_number": - x.EpochNumber = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.AddressUnbonding")) - } - panic(fmt.Errorf("message stride.stakeibc.AddressUnbonding does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AddressUnbonding) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.AddressUnbonding.address": - panic(fmt.Errorf("field address of message stride.stakeibc.AddressUnbonding is not mutable")) - case "stride.stakeibc.AddressUnbonding.receiver": - panic(fmt.Errorf("field receiver of message stride.stakeibc.AddressUnbonding is not mutable")) - case "stride.stakeibc.AddressUnbonding.unbonding_estimated_time": - panic(fmt.Errorf("field unbonding_estimated_time of message stride.stakeibc.AddressUnbonding is not mutable")) - case "stride.stakeibc.AddressUnbonding.amount": - panic(fmt.Errorf("field amount of message stride.stakeibc.AddressUnbonding is not mutable")) - case "stride.stakeibc.AddressUnbonding.denom": - panic(fmt.Errorf("field denom of message stride.stakeibc.AddressUnbonding is not mutable")) - case "stride.stakeibc.AddressUnbonding.claim_is_pending": - panic(fmt.Errorf("field claim_is_pending of message stride.stakeibc.AddressUnbonding is not mutable")) - case "stride.stakeibc.AddressUnbonding.epoch_number": - panic(fmt.Errorf("field epoch_number of message stride.stakeibc.AddressUnbonding is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.AddressUnbonding")) - } - panic(fmt.Errorf("message stride.stakeibc.AddressUnbonding does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_AddressUnbonding) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.AddressUnbonding.address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.AddressUnbonding.receiver": - return protoreflect.ValueOfString("") - case "stride.stakeibc.AddressUnbonding.unbonding_estimated_time": - return protoreflect.ValueOfString("") - case "stride.stakeibc.AddressUnbonding.amount": - return protoreflect.ValueOfString("") - case "stride.stakeibc.AddressUnbonding.denom": - return protoreflect.ValueOfString("") - case "stride.stakeibc.AddressUnbonding.claim_is_pending": - return protoreflect.ValueOfBool(false) - case "stride.stakeibc.AddressUnbonding.epoch_number": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.AddressUnbonding")) - } - panic(fmt.Errorf("message stride.stakeibc.AddressUnbonding does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_AddressUnbonding) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.AddressUnbonding", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_AddressUnbonding) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AddressUnbonding) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_AddressUnbonding) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_AddressUnbonding) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AddressUnbonding) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Receiver) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.UnbondingEstimatedTime) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ClaimIsPending { - n += 2 - } - if x.EpochNumber != 0 { - n += 1 + runtime.Sov(uint64(x.EpochNumber)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AddressUnbonding) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.EpochNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EpochNumber)) - i-- - dAtA[i] = 0x48 - } - if x.ClaimIsPending { - i-- - if x.ClaimIsPending { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0x2a - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x22 - } - if len(x.UnbondingEstimatedTime) > 0 { - i -= len(x.UnbondingEstimatedTime) - copy(dAtA[i:], x.UnbondingEstimatedTime) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UnbondingEstimatedTime))) - i-- - dAtA[i] = 0x1a - } - if len(x.Receiver) > 0 { - i -= len(x.Receiver) - copy(dAtA[i:], x.Receiver) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AddressUnbonding) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressUnbonding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AddressUnbonding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnbondingEstimatedTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UnbondingEstimatedTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClaimIsPending", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.ClaimIsPending = bool(v != 0) - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - x.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/address_unbonding.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AddressUnbonding struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` - UnbondingEstimatedTime string `protobuf:"bytes,3,opt,name=unbonding_estimated_time,json=unbondingEstimatedTime,proto3" json:"unbonding_estimated_time,omitempty"` - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` - Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"` - ClaimIsPending bool `protobuf:"varint,8,opt,name=claim_is_pending,json=claimIsPending,proto3" json:"claim_is_pending,omitempty"` - EpochNumber uint64 `protobuf:"varint,9,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` -} - -func (x *AddressUnbonding) Reset() { - *x = AddressUnbonding{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_address_unbonding_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddressUnbonding) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddressUnbonding) ProtoMessage() {} - -// Deprecated: Use AddressUnbonding.ProtoReflect.Descriptor instead. -func (*AddressUnbonding) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_address_unbonding_proto_rawDescGZIP(), []int{0} -} - -func (x *AddressUnbonding) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *AddressUnbonding) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -func (x *AddressUnbonding) GetUnbondingEstimatedTime() string { - if x != nil { - return x.UnbondingEstimatedTime - } - return "" -} - -func (x *AddressUnbonding) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -func (x *AddressUnbonding) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *AddressUnbonding) GetClaimIsPending() bool { - if x != nil { - return x.ClaimIsPending - } - return false -} - -func (x *AddressUnbonding) GetEpochNumber() uint64 { - if x != nil { - return x.EpochNumber - } - return 0 -} - -var File_stride_stakeibc_address_unbonding_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_address_unbonding_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x9c, 0x02, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x55, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x18, 0x75, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x75, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, - 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, - 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x12, 0x28, 0x0a, 0x10, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x69, 0x73, 0x5f, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x63, 0x6c, - 0x61, 0x69, 0x6d, 0x49, 0x73, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, - 0xc0, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x15, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, - 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0f, - 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xca, - 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x10, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_address_unbonding_proto_rawDescOnce sync.Once - file_stride_stakeibc_address_unbonding_proto_rawDescData = file_stride_stakeibc_address_unbonding_proto_rawDesc -) - -func file_stride_stakeibc_address_unbonding_proto_rawDescGZIP() []byte { - file_stride_stakeibc_address_unbonding_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_address_unbonding_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_address_unbonding_proto_rawDescData) - }) - return file_stride_stakeibc_address_unbonding_proto_rawDescData -} - -var file_stride_stakeibc_address_unbonding_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_stakeibc_address_unbonding_proto_goTypes = []interface{}{ - (*AddressUnbonding)(nil), // 0: stride.stakeibc.AddressUnbonding -} -var file_stride_stakeibc_address_unbonding_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_address_unbonding_proto_init() } -func file_stride_stakeibc_address_unbonding_proto_init() { - if File_stride_stakeibc_address_unbonding_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_address_unbonding_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressUnbonding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_address_unbonding_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_address_unbonding_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_address_unbonding_proto_depIdxs, - MessageInfos: file_stride_stakeibc_address_unbonding_proto_msgTypes, - }.Build() - File_stride_stakeibc_address_unbonding_proto = out.File - file_stride_stakeibc_address_unbonding_proto_rawDesc = nil - file_stride_stakeibc_address_unbonding_proto_goTypes = nil - file_stride_stakeibc_address_unbonding_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/callbacks.pulsar.go b/api/stride/stakeibc/callbacks.pulsar.go deleted file mode 100644 index 61be3c8e9..000000000 --- a/api/stride/stakeibc/callbacks.pulsar.go +++ /dev/null @@ -1,8448 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - records "github.com/milkyway-labs/milkyway/api/stride/records" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_SplitDelegation protoreflect.MessageDescriptor - fd_SplitDelegation_validator protoreflect.FieldDescriptor - fd_SplitDelegation_amount protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_SplitDelegation = File_stride_stakeibc_callbacks_proto.Messages().ByName("SplitDelegation") - fd_SplitDelegation_validator = md_SplitDelegation.Fields().ByName("validator") - fd_SplitDelegation_amount = md_SplitDelegation.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_SplitDelegation)(nil) - -type fastReflection_SplitDelegation SplitDelegation - -func (x *SplitDelegation) ProtoReflect() protoreflect.Message { - return (*fastReflection_SplitDelegation)(x) -} - -func (x *SplitDelegation) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_SplitDelegation_messageType fastReflection_SplitDelegation_messageType -var _ protoreflect.MessageType = fastReflection_SplitDelegation_messageType{} - -type fastReflection_SplitDelegation_messageType struct{} - -func (x fastReflection_SplitDelegation_messageType) Zero() protoreflect.Message { - return (*fastReflection_SplitDelegation)(nil) -} -func (x fastReflection_SplitDelegation_messageType) New() protoreflect.Message { - return new(fastReflection_SplitDelegation) -} -func (x fastReflection_SplitDelegation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SplitDelegation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_SplitDelegation) Descriptor() protoreflect.MessageDescriptor { - return md_SplitDelegation -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_SplitDelegation) Type() protoreflect.MessageType { - return _fastReflection_SplitDelegation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_SplitDelegation) New() protoreflect.Message { - return new(fastReflection_SplitDelegation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_SplitDelegation) Interface() protoreflect.ProtoMessage { - return (*SplitDelegation)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_SplitDelegation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Validator != "" { - value := protoreflect.ValueOfString(x.Validator) - if !f(fd_SplitDelegation_validator, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_SplitDelegation_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_SplitDelegation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.SplitDelegation.validator": - return x.Validator != "" - case "stride.stakeibc.SplitDelegation.amount": - return x.Amount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.SplitDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.SplitDelegation does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SplitDelegation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.SplitDelegation.validator": - x.Validator = "" - case "stride.stakeibc.SplitDelegation.amount": - x.Amount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.SplitDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.SplitDelegation does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SplitDelegation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.SplitDelegation.validator": - value := x.Validator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.SplitDelegation.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.SplitDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.SplitDelegation does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SplitDelegation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.SplitDelegation.validator": - x.Validator = value.Interface().(string) - case "stride.stakeibc.SplitDelegation.amount": - x.Amount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.SplitDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.SplitDelegation does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SplitDelegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.SplitDelegation.validator": - panic(fmt.Errorf("field validator of message stride.stakeibc.SplitDelegation is not mutable")) - case "stride.stakeibc.SplitDelegation.amount": - panic(fmt.Errorf("field amount of message stride.stakeibc.SplitDelegation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.SplitDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.SplitDelegation does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_SplitDelegation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.SplitDelegation.validator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.SplitDelegation.amount": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.SplitDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.SplitDelegation does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_SplitDelegation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.SplitDelegation", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SplitDelegation) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SplitDelegation) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_SplitDelegation) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_SplitDelegation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SplitDelegation) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Validator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SplitDelegation) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(x.Validator) > 0 { - i -= len(x.Validator) - copy(dAtA[i:], x.Validator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Validator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SplitDelegation) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SplitDelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SplitDelegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_DelegateCallback_3_list)(nil) - -type _DelegateCallback_3_list struct { - list *[]*SplitDelegation -} - -func (x *_DelegateCallback_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_DelegateCallback_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_DelegateCallback_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SplitDelegation) - (*x.list)[i] = concreteValue -} - -func (x *_DelegateCallback_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SplitDelegation) - *x.list = append(*x.list, concreteValue) -} - -func (x *_DelegateCallback_3_list) AppendMutable() protoreflect.Value { - v := new(SplitDelegation) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DelegateCallback_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_DelegateCallback_3_list) NewElement() protoreflect.Value { - v := new(SplitDelegation) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_DelegateCallback_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_DelegateCallback protoreflect.MessageDescriptor - fd_DelegateCallback_host_zone_id protoreflect.FieldDescriptor - fd_DelegateCallback_deposit_record_id protoreflect.FieldDescriptor - fd_DelegateCallback_split_delegations protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_DelegateCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("DelegateCallback") - fd_DelegateCallback_host_zone_id = md_DelegateCallback.Fields().ByName("host_zone_id") - fd_DelegateCallback_deposit_record_id = md_DelegateCallback.Fields().ByName("deposit_record_id") - fd_DelegateCallback_split_delegations = md_DelegateCallback.Fields().ByName("split_delegations") -} - -var _ protoreflect.Message = (*fastReflection_DelegateCallback)(nil) - -type fastReflection_DelegateCallback DelegateCallback - -func (x *DelegateCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_DelegateCallback)(x) -} - -func (x *DelegateCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DelegateCallback_messageType fastReflection_DelegateCallback_messageType -var _ protoreflect.MessageType = fastReflection_DelegateCallback_messageType{} - -type fastReflection_DelegateCallback_messageType struct{} - -func (x fastReflection_DelegateCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_DelegateCallback)(nil) -} -func (x fastReflection_DelegateCallback_messageType) New() protoreflect.Message { - return new(fastReflection_DelegateCallback) -} -func (x fastReflection_DelegateCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DelegateCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DelegateCallback) Descriptor() protoreflect.MessageDescriptor { - return md_DelegateCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_DelegateCallback) Type() protoreflect.MessageType { - return _fastReflection_DelegateCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DelegateCallback) New() protoreflect.Message { - return new(fastReflection_DelegateCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DelegateCallback) Interface() protoreflect.ProtoMessage { - return (*DelegateCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_DelegateCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_DelegateCallback_host_zone_id, value) { - return - } - } - if x.DepositRecordId != uint64(0) { - value := protoreflect.ValueOfUint64(x.DepositRecordId) - if !f(fd_DelegateCallback_deposit_record_id, value) { - return - } - } - if len(x.SplitDelegations) != 0 { - value := protoreflect.ValueOfList(&_DelegateCallback_3_list{list: &x.SplitDelegations}) - if !f(fd_DelegateCallback_split_delegations, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DelegateCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.DelegateCallback.host_zone_id": - return x.HostZoneId != "" - case "stride.stakeibc.DelegateCallback.deposit_record_id": - return x.DepositRecordId != uint64(0) - case "stride.stakeibc.DelegateCallback.split_delegations": - return len(x.SplitDelegations) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegateCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegateCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.DelegateCallback.host_zone_id": - x.HostZoneId = "" - case "stride.stakeibc.DelegateCallback.deposit_record_id": - x.DepositRecordId = uint64(0) - case "stride.stakeibc.DelegateCallback.split_delegations": - x.SplitDelegations = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegateCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_DelegateCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.DelegateCallback.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.DelegateCallback.deposit_record_id": - value := x.DepositRecordId - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.DelegateCallback.split_delegations": - if len(x.SplitDelegations) == 0 { - return protoreflect.ValueOfList(&_DelegateCallback_3_list{}) - } - listValue := &_DelegateCallback_3_list{list: &x.SplitDelegations} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegateCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegateCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.DelegateCallback.host_zone_id": - x.HostZoneId = value.Interface().(string) - case "stride.stakeibc.DelegateCallback.deposit_record_id": - x.DepositRecordId = value.Uint() - case "stride.stakeibc.DelegateCallback.split_delegations": - lv := value.List() - clv := lv.(*_DelegateCallback_3_list) - x.SplitDelegations = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegateCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegateCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.DelegateCallback.split_delegations": - if x.SplitDelegations == nil { - x.SplitDelegations = []*SplitDelegation{} - } - value := &_DelegateCallback_3_list{list: &x.SplitDelegations} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.DelegateCallback.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.stakeibc.DelegateCallback is not mutable")) - case "stride.stakeibc.DelegateCallback.deposit_record_id": - panic(fmt.Errorf("field deposit_record_id of message stride.stakeibc.DelegateCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegateCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_DelegateCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.DelegateCallback.host_zone_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.DelegateCallback.deposit_record_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.DelegateCallback.split_delegations": - list := []*SplitDelegation{} - return protoreflect.ValueOfList(&_DelegateCallback_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegateCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_DelegateCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.DelegateCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_DelegateCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegateCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_DelegateCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_DelegateCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DelegateCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DepositRecordId != 0 { - n += 1 + runtime.Sov(uint64(x.DepositRecordId)) - } - if len(x.SplitDelegations) > 0 { - for _, e := range x.SplitDelegations { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DelegateCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.SplitDelegations) > 0 { - for iNdEx := len(x.SplitDelegations) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SplitDelegations[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.DepositRecordId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DepositRecordId)) - i-- - dAtA[i] = 0x10 - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DelegateCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegateCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegateCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositRecordId", wireType) - } - x.DepositRecordId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DepositRecordId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SplitDelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SplitDelegations = append(x.SplitDelegations, &SplitDelegation{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SplitDelegations[len(x.SplitDelegations)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ClaimCallback protoreflect.MessageDescriptor - fd_ClaimCallback_user_redemption_record_id protoreflect.FieldDescriptor - fd_ClaimCallback_chain_id protoreflect.FieldDescriptor - fd_ClaimCallback_epoch_number protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_ClaimCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("ClaimCallback") - fd_ClaimCallback_user_redemption_record_id = md_ClaimCallback.Fields().ByName("user_redemption_record_id") - fd_ClaimCallback_chain_id = md_ClaimCallback.Fields().ByName("chain_id") - fd_ClaimCallback_epoch_number = md_ClaimCallback.Fields().ByName("epoch_number") -} - -var _ protoreflect.Message = (*fastReflection_ClaimCallback)(nil) - -type fastReflection_ClaimCallback ClaimCallback - -func (x *ClaimCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_ClaimCallback)(x) -} - -func (x *ClaimCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ClaimCallback_messageType fastReflection_ClaimCallback_messageType -var _ protoreflect.MessageType = fastReflection_ClaimCallback_messageType{} - -type fastReflection_ClaimCallback_messageType struct{} - -func (x fastReflection_ClaimCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_ClaimCallback)(nil) -} -func (x fastReflection_ClaimCallback_messageType) New() protoreflect.Message { - return new(fastReflection_ClaimCallback) -} -func (x fastReflection_ClaimCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ClaimCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ClaimCallback) Descriptor() protoreflect.MessageDescriptor { - return md_ClaimCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ClaimCallback) Type() protoreflect.MessageType { - return _fastReflection_ClaimCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ClaimCallback) New() protoreflect.Message { - return new(fastReflection_ClaimCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ClaimCallback) Interface() protoreflect.ProtoMessage { - return (*ClaimCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ClaimCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.UserRedemptionRecordId != "" { - value := protoreflect.ValueOfString(x.UserRedemptionRecordId) - if !f(fd_ClaimCallback_user_redemption_record_id, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_ClaimCallback_chain_id, value) { - return - } - } - if x.EpochNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.EpochNumber) - if !f(fd_ClaimCallback_epoch_number, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ClaimCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.ClaimCallback.user_redemption_record_id": - return x.UserRedemptionRecordId != "" - case "stride.stakeibc.ClaimCallback.chain_id": - return x.ChainId != "" - case "stride.stakeibc.ClaimCallback.epoch_number": - return x.EpochNumber != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ClaimCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ClaimCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ClaimCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.ClaimCallback.user_redemption_record_id": - x.UserRedemptionRecordId = "" - case "stride.stakeibc.ClaimCallback.chain_id": - x.ChainId = "" - case "stride.stakeibc.ClaimCallback.epoch_number": - x.EpochNumber = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ClaimCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ClaimCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ClaimCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.ClaimCallback.user_redemption_record_id": - value := x.UserRedemptionRecordId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.ClaimCallback.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.ClaimCallback.epoch_number": - value := x.EpochNumber - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ClaimCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ClaimCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ClaimCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.ClaimCallback.user_redemption_record_id": - x.UserRedemptionRecordId = value.Interface().(string) - case "stride.stakeibc.ClaimCallback.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.ClaimCallback.epoch_number": - x.EpochNumber = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ClaimCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ClaimCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ClaimCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ClaimCallback.user_redemption_record_id": - panic(fmt.Errorf("field user_redemption_record_id of message stride.stakeibc.ClaimCallback is not mutable")) - case "stride.stakeibc.ClaimCallback.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.ClaimCallback is not mutable")) - case "stride.stakeibc.ClaimCallback.epoch_number": - panic(fmt.Errorf("field epoch_number of message stride.stakeibc.ClaimCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ClaimCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ClaimCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ClaimCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ClaimCallback.user_redemption_record_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.ClaimCallback.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.ClaimCallback.epoch_number": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ClaimCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ClaimCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ClaimCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.ClaimCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ClaimCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ClaimCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ClaimCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ClaimCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ClaimCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.UserRedemptionRecordId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.EpochNumber != 0 { - n += 1 + runtime.Sov(uint64(x.EpochNumber)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ClaimCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.EpochNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EpochNumber)) - i-- - dAtA[i] = 0x18 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.UserRedemptionRecordId) > 0 { - i -= len(x.UserRedemptionRecordId) - copy(dAtA[i:], x.UserRedemptionRecordId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UserRedemptionRecordId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ClaimCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ClaimCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ClaimCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecordId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UserRedemptionRecordId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - x.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ReinvestCallback protoreflect.MessageDescriptor - fd_ReinvestCallback_reinvest_amount protoreflect.FieldDescriptor - fd_ReinvestCallback_host_zone_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_ReinvestCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("ReinvestCallback") - fd_ReinvestCallback_reinvest_amount = md_ReinvestCallback.Fields().ByName("reinvest_amount") - fd_ReinvestCallback_host_zone_id = md_ReinvestCallback.Fields().ByName("host_zone_id") -} - -var _ protoreflect.Message = (*fastReflection_ReinvestCallback)(nil) - -type fastReflection_ReinvestCallback ReinvestCallback - -func (x *ReinvestCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_ReinvestCallback)(x) -} - -func (x *ReinvestCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ReinvestCallback_messageType fastReflection_ReinvestCallback_messageType -var _ protoreflect.MessageType = fastReflection_ReinvestCallback_messageType{} - -type fastReflection_ReinvestCallback_messageType struct{} - -func (x fastReflection_ReinvestCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_ReinvestCallback)(nil) -} -func (x fastReflection_ReinvestCallback_messageType) New() protoreflect.Message { - return new(fastReflection_ReinvestCallback) -} -func (x fastReflection_ReinvestCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ReinvestCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ReinvestCallback) Descriptor() protoreflect.MessageDescriptor { - return md_ReinvestCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ReinvestCallback) Type() protoreflect.MessageType { - return _fastReflection_ReinvestCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ReinvestCallback) New() protoreflect.Message { - return new(fastReflection_ReinvestCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ReinvestCallback) Interface() protoreflect.ProtoMessage { - return (*ReinvestCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ReinvestCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ReinvestAmount != nil { - value := protoreflect.ValueOfMessage(x.ReinvestAmount.ProtoReflect()) - if !f(fd_ReinvestCallback_reinvest_amount, value) { - return - } - } - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_ReinvestCallback_host_zone_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ReinvestCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.ReinvestCallback.reinvest_amount": - return x.ReinvestAmount != nil - case "stride.stakeibc.ReinvestCallback.host_zone_id": - return x.HostZoneId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ReinvestCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ReinvestCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ReinvestCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.ReinvestCallback.reinvest_amount": - x.ReinvestAmount = nil - case "stride.stakeibc.ReinvestCallback.host_zone_id": - x.HostZoneId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ReinvestCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ReinvestCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ReinvestCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.ReinvestCallback.reinvest_amount": - value := x.ReinvestAmount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.stakeibc.ReinvestCallback.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ReinvestCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ReinvestCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ReinvestCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.ReinvestCallback.reinvest_amount": - x.ReinvestAmount = value.Message().Interface().(*v1beta1.Coin) - case "stride.stakeibc.ReinvestCallback.host_zone_id": - x.HostZoneId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ReinvestCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ReinvestCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ReinvestCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ReinvestCallback.reinvest_amount": - if x.ReinvestAmount == nil { - x.ReinvestAmount = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.ReinvestAmount.ProtoReflect()) - case "stride.stakeibc.ReinvestCallback.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.stakeibc.ReinvestCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ReinvestCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ReinvestCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ReinvestCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ReinvestCallback.reinvest_amount": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.stakeibc.ReinvestCallback.host_zone_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ReinvestCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ReinvestCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ReinvestCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.ReinvestCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ReinvestCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ReinvestCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ReinvestCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ReinvestCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ReinvestCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.ReinvestAmount != nil { - l = options.Size(x.ReinvestAmount) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ReinvestCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0x1a - } - if x.ReinvestAmount != nil { - encoded, err := options.Marshal(x.ReinvestAmount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ReinvestCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ReinvestCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ReinvestCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ReinvestAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ReinvestAmount == nil { - x.ReinvestAmount = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ReinvestAmount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_UndelegateCallback_2_list)(nil) - -type _UndelegateCallback_2_list struct { - list *[]*SplitDelegation -} - -func (x *_UndelegateCallback_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_UndelegateCallback_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_UndelegateCallback_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SplitDelegation) - (*x.list)[i] = concreteValue -} - -func (x *_UndelegateCallback_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*SplitDelegation) - *x.list = append(*x.list, concreteValue) -} - -func (x *_UndelegateCallback_2_list) AppendMutable() protoreflect.Value { - v := new(SplitDelegation) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UndelegateCallback_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_UndelegateCallback_2_list) NewElement() protoreflect.Value { - v := new(SplitDelegation) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_UndelegateCallback_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_UndelegateCallback_3_list)(nil) - -type _UndelegateCallback_3_list struct { - list *[]uint64 -} - -func (x *_UndelegateCallback_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_UndelegateCallback_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint64((*x.list)[i]) -} - -func (x *_UndelegateCallback_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_UndelegateCallback_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_UndelegateCallback_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message UndelegateCallback at list field EpochUnbondingRecordIds as it is not of Message kind")) -} - -func (x *_UndelegateCallback_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_UndelegateCallback_3_list) NewElement() protoreflect.Value { - v := uint64(0) - return protoreflect.ValueOfUint64(v) -} - -func (x *_UndelegateCallback_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_UndelegateCallback protoreflect.MessageDescriptor - fd_UndelegateCallback_host_zone_id protoreflect.FieldDescriptor - fd_UndelegateCallback_split_delegations protoreflect.FieldDescriptor - fd_UndelegateCallback_epoch_unbonding_record_ids protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_UndelegateCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("UndelegateCallback") - fd_UndelegateCallback_host_zone_id = md_UndelegateCallback.Fields().ByName("host_zone_id") - fd_UndelegateCallback_split_delegations = md_UndelegateCallback.Fields().ByName("split_delegations") - fd_UndelegateCallback_epoch_unbonding_record_ids = md_UndelegateCallback.Fields().ByName("epoch_unbonding_record_ids") -} - -var _ protoreflect.Message = (*fastReflection_UndelegateCallback)(nil) - -type fastReflection_UndelegateCallback UndelegateCallback - -func (x *UndelegateCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_UndelegateCallback)(x) -} - -func (x *UndelegateCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_UndelegateCallback_messageType fastReflection_UndelegateCallback_messageType -var _ protoreflect.MessageType = fastReflection_UndelegateCallback_messageType{} - -type fastReflection_UndelegateCallback_messageType struct{} - -func (x fastReflection_UndelegateCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_UndelegateCallback)(nil) -} -func (x fastReflection_UndelegateCallback_messageType) New() protoreflect.Message { - return new(fastReflection_UndelegateCallback) -} -func (x fastReflection_UndelegateCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_UndelegateCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_UndelegateCallback) Descriptor() protoreflect.MessageDescriptor { - return md_UndelegateCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_UndelegateCallback) Type() protoreflect.MessageType { - return _fastReflection_UndelegateCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_UndelegateCallback) New() protoreflect.Message { - return new(fastReflection_UndelegateCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_UndelegateCallback) Interface() protoreflect.ProtoMessage { - return (*UndelegateCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_UndelegateCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_UndelegateCallback_host_zone_id, value) { - return - } - } - if len(x.SplitDelegations) != 0 { - value := protoreflect.ValueOfList(&_UndelegateCallback_2_list{list: &x.SplitDelegations}) - if !f(fd_UndelegateCallback_split_delegations, value) { - return - } - } - if len(x.EpochUnbondingRecordIds) != 0 { - value := protoreflect.ValueOfList(&_UndelegateCallback_3_list{list: &x.EpochUnbondingRecordIds}) - if !f(fd_UndelegateCallback_epoch_unbonding_record_ids, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_UndelegateCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.UndelegateCallback.host_zone_id": - return x.HostZoneId != "" - case "stride.stakeibc.UndelegateCallback.split_delegations": - return len(x.SplitDelegations) != 0 - case "stride.stakeibc.UndelegateCallback.epoch_unbonding_record_ids": - return len(x.EpochUnbondingRecordIds) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.UndelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.UndelegateCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UndelegateCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.UndelegateCallback.host_zone_id": - x.HostZoneId = "" - case "stride.stakeibc.UndelegateCallback.split_delegations": - x.SplitDelegations = nil - case "stride.stakeibc.UndelegateCallback.epoch_unbonding_record_ids": - x.EpochUnbondingRecordIds = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.UndelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.UndelegateCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_UndelegateCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.UndelegateCallback.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.UndelegateCallback.split_delegations": - if len(x.SplitDelegations) == 0 { - return protoreflect.ValueOfList(&_UndelegateCallback_2_list{}) - } - listValue := &_UndelegateCallback_2_list{list: &x.SplitDelegations} - return protoreflect.ValueOfList(listValue) - case "stride.stakeibc.UndelegateCallback.epoch_unbonding_record_ids": - if len(x.EpochUnbondingRecordIds) == 0 { - return protoreflect.ValueOfList(&_UndelegateCallback_3_list{}) - } - listValue := &_UndelegateCallback_3_list{list: &x.EpochUnbondingRecordIds} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.UndelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.UndelegateCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UndelegateCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.UndelegateCallback.host_zone_id": - x.HostZoneId = value.Interface().(string) - case "stride.stakeibc.UndelegateCallback.split_delegations": - lv := value.List() - clv := lv.(*_UndelegateCallback_2_list) - x.SplitDelegations = *clv.list - case "stride.stakeibc.UndelegateCallback.epoch_unbonding_record_ids": - lv := value.List() - clv := lv.(*_UndelegateCallback_3_list) - x.EpochUnbondingRecordIds = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.UndelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.UndelegateCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UndelegateCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.UndelegateCallback.split_delegations": - if x.SplitDelegations == nil { - x.SplitDelegations = []*SplitDelegation{} - } - value := &_UndelegateCallback_2_list{list: &x.SplitDelegations} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.UndelegateCallback.epoch_unbonding_record_ids": - if x.EpochUnbondingRecordIds == nil { - x.EpochUnbondingRecordIds = []uint64{} - } - value := &_UndelegateCallback_3_list{list: &x.EpochUnbondingRecordIds} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.UndelegateCallback.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.stakeibc.UndelegateCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.UndelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.UndelegateCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_UndelegateCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.UndelegateCallback.host_zone_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.UndelegateCallback.split_delegations": - list := []*SplitDelegation{} - return protoreflect.ValueOfList(&_UndelegateCallback_2_list{list: &list}) - case "stride.stakeibc.UndelegateCallback.epoch_unbonding_record_ids": - list := []uint64{} - return protoreflect.ValueOfList(&_UndelegateCallback_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.UndelegateCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.UndelegateCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_UndelegateCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.UndelegateCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_UndelegateCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UndelegateCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_UndelegateCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_UndelegateCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*UndelegateCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.SplitDelegations) > 0 { - for _, e := range x.SplitDelegations { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.EpochUnbondingRecordIds) > 0 { - l = 0 - for _, e := range x.EpochUnbondingRecordIds { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*UndelegateCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.EpochUnbondingRecordIds) > 0 { - var pksize2 int - for _, num := range x.EpochUnbondingRecordIds { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.EpochUnbondingRecordIds { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x1a - } - if len(x.SplitDelegations) > 0 { - for iNdEx := len(x.SplitDelegations) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SplitDelegations[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*UndelegateCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UndelegateCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UndelegateCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SplitDelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SplitDelegations = append(x.SplitDelegations, &SplitDelegation{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SplitDelegations[len(x.SplitDelegations)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EpochUnbondingRecordIds = append(x.EpochUnbondingRecordIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.EpochUnbondingRecordIds) == 0 { - x.EpochUnbondingRecordIds = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EpochUnbondingRecordIds = append(x.EpochUnbondingRecordIds, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecordIds", wireType) - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_RedemptionCallback_2_list)(nil) - -type _RedemptionCallback_2_list struct { - list *[]uint64 -} - -func (x *_RedemptionCallback_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_RedemptionCallback_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint64((*x.list)[i]) -} - -func (x *_RedemptionCallback_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_RedemptionCallback_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_RedemptionCallback_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message RedemptionCallback at list field EpochUnbondingRecordIds as it is not of Message kind")) -} - -func (x *_RedemptionCallback_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_RedemptionCallback_2_list) NewElement() protoreflect.Value { - v := uint64(0) - return protoreflect.ValueOfUint64(v) -} - -func (x *_RedemptionCallback_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_RedemptionCallback protoreflect.MessageDescriptor - fd_RedemptionCallback_host_zone_id protoreflect.FieldDescriptor - fd_RedemptionCallback_epoch_unbonding_record_ids protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_RedemptionCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("RedemptionCallback") - fd_RedemptionCallback_host_zone_id = md_RedemptionCallback.Fields().ByName("host_zone_id") - fd_RedemptionCallback_epoch_unbonding_record_ids = md_RedemptionCallback.Fields().ByName("epoch_unbonding_record_ids") -} - -var _ protoreflect.Message = (*fastReflection_RedemptionCallback)(nil) - -type fastReflection_RedemptionCallback RedemptionCallback - -func (x *RedemptionCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_RedemptionCallback)(x) -} - -func (x *RedemptionCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RedemptionCallback_messageType fastReflection_RedemptionCallback_messageType -var _ protoreflect.MessageType = fastReflection_RedemptionCallback_messageType{} - -type fastReflection_RedemptionCallback_messageType struct{} - -func (x fastReflection_RedemptionCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_RedemptionCallback)(nil) -} -func (x fastReflection_RedemptionCallback_messageType) New() protoreflect.Message { - return new(fastReflection_RedemptionCallback) -} -func (x fastReflection_RedemptionCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RedemptionCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RedemptionCallback) Descriptor() protoreflect.MessageDescriptor { - return md_RedemptionCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_RedemptionCallback) Type() protoreflect.MessageType { - return _fastReflection_RedemptionCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RedemptionCallback) New() protoreflect.Message { - return new(fastReflection_RedemptionCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RedemptionCallback) Interface() protoreflect.ProtoMessage { - return (*RedemptionCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_RedemptionCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_RedemptionCallback_host_zone_id, value) { - return - } - } - if len(x.EpochUnbondingRecordIds) != 0 { - value := protoreflect.ValueOfList(&_RedemptionCallback_2_list{list: &x.EpochUnbondingRecordIds}) - if !f(fd_RedemptionCallback_epoch_unbonding_record_ids, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_RedemptionCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.RedemptionCallback.host_zone_id": - return x.HostZoneId != "" - case "stride.stakeibc.RedemptionCallback.epoch_unbonding_record_ids": - return len(x.EpochUnbondingRecordIds) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RedemptionCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RedemptionCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_RedemptionCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.RedemptionCallback.host_zone_id": - x.HostZoneId = "" - case "stride.stakeibc.RedemptionCallback.epoch_unbonding_record_ids": - x.EpochUnbondingRecordIds = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RedemptionCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RedemptionCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_RedemptionCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.RedemptionCallback.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.RedemptionCallback.epoch_unbonding_record_ids": - if len(x.EpochUnbondingRecordIds) == 0 { - return protoreflect.ValueOfList(&_RedemptionCallback_2_list{}) - } - listValue := &_RedemptionCallback_2_list{list: &x.EpochUnbondingRecordIds} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RedemptionCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RedemptionCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_RedemptionCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.RedemptionCallback.host_zone_id": - x.HostZoneId = value.Interface().(string) - case "stride.stakeibc.RedemptionCallback.epoch_unbonding_record_ids": - lv := value.List() - clv := lv.(*_RedemptionCallback_2_list) - x.EpochUnbondingRecordIds = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RedemptionCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RedemptionCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_RedemptionCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.RedemptionCallback.epoch_unbonding_record_ids": - if x.EpochUnbondingRecordIds == nil { - x.EpochUnbondingRecordIds = []uint64{} - } - value := &_RedemptionCallback_2_list{list: &x.EpochUnbondingRecordIds} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.RedemptionCallback.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.stakeibc.RedemptionCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RedemptionCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RedemptionCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_RedemptionCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.RedemptionCallback.host_zone_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.RedemptionCallback.epoch_unbonding_record_ids": - list := []uint64{} - return protoreflect.ValueOfList(&_RedemptionCallback_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RedemptionCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RedemptionCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_RedemptionCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.RedemptionCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_RedemptionCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_RedemptionCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_RedemptionCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_RedemptionCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RedemptionCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.EpochUnbondingRecordIds) > 0 { - l = 0 - for _, e := range x.EpochUnbondingRecordIds { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RedemptionCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.EpochUnbondingRecordIds) > 0 { - var pksize2 int - for _, num := range x.EpochUnbondingRecordIds { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.EpochUnbondingRecordIds { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x12 - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*RedemptionCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RedemptionCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RedemptionCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EpochUnbondingRecordIds = append(x.EpochUnbondingRecordIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.EpochUnbondingRecordIds) == 0 { - x.EpochUnbondingRecordIds = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.EpochUnbondingRecordIds = append(x.EpochUnbondingRecordIds, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecordIds", wireType) - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Rebalancing protoreflect.MessageDescriptor - fd_Rebalancing_src_validator protoreflect.FieldDescriptor - fd_Rebalancing_dst_validator protoreflect.FieldDescriptor - fd_Rebalancing_amt protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_Rebalancing = File_stride_stakeibc_callbacks_proto.Messages().ByName("Rebalancing") - fd_Rebalancing_src_validator = md_Rebalancing.Fields().ByName("src_validator") - fd_Rebalancing_dst_validator = md_Rebalancing.Fields().ByName("dst_validator") - fd_Rebalancing_amt = md_Rebalancing.Fields().ByName("amt") -} - -var _ protoreflect.Message = (*fastReflection_Rebalancing)(nil) - -type fastReflection_Rebalancing Rebalancing - -func (x *Rebalancing) ProtoReflect() protoreflect.Message { - return (*fastReflection_Rebalancing)(x) -} - -func (x *Rebalancing) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Rebalancing_messageType fastReflection_Rebalancing_messageType -var _ protoreflect.MessageType = fastReflection_Rebalancing_messageType{} - -type fastReflection_Rebalancing_messageType struct{} - -func (x fastReflection_Rebalancing_messageType) Zero() protoreflect.Message { - return (*fastReflection_Rebalancing)(nil) -} -func (x fastReflection_Rebalancing_messageType) New() protoreflect.Message { - return new(fastReflection_Rebalancing) -} -func (x fastReflection_Rebalancing_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Rebalancing -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Rebalancing) Descriptor() protoreflect.MessageDescriptor { - return md_Rebalancing -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Rebalancing) Type() protoreflect.MessageType { - return _fastReflection_Rebalancing_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Rebalancing) New() protoreflect.Message { - return new(fastReflection_Rebalancing) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Rebalancing) Interface() protoreflect.ProtoMessage { - return (*Rebalancing)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Rebalancing) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SrcValidator != "" { - value := protoreflect.ValueOfString(x.SrcValidator) - if !f(fd_Rebalancing_src_validator, value) { - return - } - } - if x.DstValidator != "" { - value := protoreflect.ValueOfString(x.DstValidator) - if !f(fd_Rebalancing_dst_validator, value) { - return - } - } - if x.Amt != "" { - value := protoreflect.ValueOfString(x.Amt) - if !f(fd_Rebalancing_amt, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Rebalancing) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.Rebalancing.src_validator": - return x.SrcValidator != "" - case "stride.stakeibc.Rebalancing.dst_validator": - return x.DstValidator != "" - case "stride.stakeibc.Rebalancing.amt": - return x.Amt != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Rebalancing")) - } - panic(fmt.Errorf("message stride.stakeibc.Rebalancing does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Rebalancing) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.Rebalancing.src_validator": - x.SrcValidator = "" - case "stride.stakeibc.Rebalancing.dst_validator": - x.DstValidator = "" - case "stride.stakeibc.Rebalancing.amt": - x.Amt = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Rebalancing")) - } - panic(fmt.Errorf("message stride.stakeibc.Rebalancing does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Rebalancing) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.Rebalancing.src_validator": - value := x.SrcValidator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.Rebalancing.dst_validator": - value := x.DstValidator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.Rebalancing.amt": - value := x.Amt - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Rebalancing")) - } - panic(fmt.Errorf("message stride.stakeibc.Rebalancing does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Rebalancing) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.Rebalancing.src_validator": - x.SrcValidator = value.Interface().(string) - case "stride.stakeibc.Rebalancing.dst_validator": - x.DstValidator = value.Interface().(string) - case "stride.stakeibc.Rebalancing.amt": - x.Amt = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Rebalancing")) - } - panic(fmt.Errorf("message stride.stakeibc.Rebalancing does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Rebalancing) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.Rebalancing.src_validator": - panic(fmt.Errorf("field src_validator of message stride.stakeibc.Rebalancing is not mutable")) - case "stride.stakeibc.Rebalancing.dst_validator": - panic(fmt.Errorf("field dst_validator of message stride.stakeibc.Rebalancing is not mutable")) - case "stride.stakeibc.Rebalancing.amt": - panic(fmt.Errorf("field amt of message stride.stakeibc.Rebalancing is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Rebalancing")) - } - panic(fmt.Errorf("message stride.stakeibc.Rebalancing does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Rebalancing) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.Rebalancing.src_validator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.Rebalancing.dst_validator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.Rebalancing.amt": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Rebalancing")) - } - panic(fmt.Errorf("message stride.stakeibc.Rebalancing does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Rebalancing) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.Rebalancing", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Rebalancing) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Rebalancing) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Rebalancing) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Rebalancing) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Rebalancing) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.SrcValidator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.DstValidator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amt) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Rebalancing) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amt) > 0 { - i -= len(x.Amt) - copy(dAtA[i:], x.Amt) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amt))) - i-- - dAtA[i] = 0x1a - } - if len(x.DstValidator) > 0 { - i -= len(x.DstValidator) - copy(dAtA[i:], x.DstValidator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DstValidator))) - i-- - dAtA[i] = 0x12 - } - if len(x.SrcValidator) > 0 { - i -= len(x.SrcValidator) - copy(dAtA[i:], x.SrcValidator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SrcValidator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Rebalancing) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Rebalancing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Rebalancing: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SrcValidator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SrcValidator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DstValidator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DstValidator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amt", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amt = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_RebalanceCallback_2_list)(nil) - -type _RebalanceCallback_2_list struct { - list *[]*Rebalancing -} - -func (x *_RebalanceCallback_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_RebalanceCallback_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_RebalanceCallback_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Rebalancing) - (*x.list)[i] = concreteValue -} - -func (x *_RebalanceCallback_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Rebalancing) - *x.list = append(*x.list, concreteValue) -} - -func (x *_RebalanceCallback_2_list) AppendMutable() protoreflect.Value { - v := new(Rebalancing) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_RebalanceCallback_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_RebalanceCallback_2_list) NewElement() protoreflect.Value { - v := new(Rebalancing) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_RebalanceCallback_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_RebalanceCallback protoreflect.MessageDescriptor - fd_RebalanceCallback_host_zone_id protoreflect.FieldDescriptor - fd_RebalanceCallback_rebalancings protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_RebalanceCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("RebalanceCallback") - fd_RebalanceCallback_host_zone_id = md_RebalanceCallback.Fields().ByName("host_zone_id") - fd_RebalanceCallback_rebalancings = md_RebalanceCallback.Fields().ByName("rebalancings") -} - -var _ protoreflect.Message = (*fastReflection_RebalanceCallback)(nil) - -type fastReflection_RebalanceCallback RebalanceCallback - -func (x *RebalanceCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_RebalanceCallback)(x) -} - -func (x *RebalanceCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_RebalanceCallback_messageType fastReflection_RebalanceCallback_messageType -var _ protoreflect.MessageType = fastReflection_RebalanceCallback_messageType{} - -type fastReflection_RebalanceCallback_messageType struct{} - -func (x fastReflection_RebalanceCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_RebalanceCallback)(nil) -} -func (x fastReflection_RebalanceCallback_messageType) New() protoreflect.Message { - return new(fastReflection_RebalanceCallback) -} -func (x fastReflection_RebalanceCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_RebalanceCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_RebalanceCallback) Descriptor() protoreflect.MessageDescriptor { - return md_RebalanceCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_RebalanceCallback) Type() protoreflect.MessageType { - return _fastReflection_RebalanceCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_RebalanceCallback) New() protoreflect.Message { - return new(fastReflection_RebalanceCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_RebalanceCallback) Interface() protoreflect.ProtoMessage { - return (*RebalanceCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_RebalanceCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_RebalanceCallback_host_zone_id, value) { - return - } - } - if len(x.Rebalancings) != 0 { - value := protoreflect.ValueOfList(&_RebalanceCallback_2_list{list: &x.Rebalancings}) - if !f(fd_RebalanceCallback_rebalancings, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_RebalanceCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.RebalanceCallback.host_zone_id": - return x.HostZoneId != "" - case "stride.stakeibc.RebalanceCallback.rebalancings": - return len(x.Rebalancings) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RebalanceCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RebalanceCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_RebalanceCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.RebalanceCallback.host_zone_id": - x.HostZoneId = "" - case "stride.stakeibc.RebalanceCallback.rebalancings": - x.Rebalancings = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RebalanceCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RebalanceCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_RebalanceCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.RebalanceCallback.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.RebalanceCallback.rebalancings": - if len(x.Rebalancings) == 0 { - return protoreflect.ValueOfList(&_RebalanceCallback_2_list{}) - } - listValue := &_RebalanceCallback_2_list{list: &x.Rebalancings} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RebalanceCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RebalanceCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_RebalanceCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.RebalanceCallback.host_zone_id": - x.HostZoneId = value.Interface().(string) - case "stride.stakeibc.RebalanceCallback.rebalancings": - lv := value.List() - clv := lv.(*_RebalanceCallback_2_list) - x.Rebalancings = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RebalanceCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RebalanceCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_RebalanceCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.RebalanceCallback.rebalancings": - if x.Rebalancings == nil { - x.Rebalancings = []*Rebalancing{} - } - value := &_RebalanceCallback_2_list{list: &x.Rebalancings} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.RebalanceCallback.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.stakeibc.RebalanceCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RebalanceCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RebalanceCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_RebalanceCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.RebalanceCallback.host_zone_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.RebalanceCallback.rebalancings": - list := []*Rebalancing{} - return protoreflect.ValueOfList(&_RebalanceCallback_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.RebalanceCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.RebalanceCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_RebalanceCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.RebalanceCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_RebalanceCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_RebalanceCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_RebalanceCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_RebalanceCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*RebalanceCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Rebalancings) > 0 { - for _, e := range x.Rebalancings { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*RebalanceCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Rebalancings) > 0 { - for iNdEx := len(x.Rebalancings) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Rebalancings[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*RebalanceCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RebalanceCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RebalanceCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Rebalancings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Rebalancings = append(x.Rebalancings, &Rebalancing{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Rebalancings[len(x.Rebalancings)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DetokenizeSharesCallback protoreflect.MessageDescriptor - fd_DetokenizeSharesCallback_deposit protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_DetokenizeSharesCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("DetokenizeSharesCallback") - fd_DetokenizeSharesCallback_deposit = md_DetokenizeSharesCallback.Fields().ByName("deposit") -} - -var _ protoreflect.Message = (*fastReflection_DetokenizeSharesCallback)(nil) - -type fastReflection_DetokenizeSharesCallback DetokenizeSharesCallback - -func (x *DetokenizeSharesCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_DetokenizeSharesCallback)(x) -} - -func (x *DetokenizeSharesCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DetokenizeSharesCallback_messageType fastReflection_DetokenizeSharesCallback_messageType -var _ protoreflect.MessageType = fastReflection_DetokenizeSharesCallback_messageType{} - -type fastReflection_DetokenizeSharesCallback_messageType struct{} - -func (x fastReflection_DetokenizeSharesCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_DetokenizeSharesCallback)(nil) -} -func (x fastReflection_DetokenizeSharesCallback_messageType) New() protoreflect.Message { - return new(fastReflection_DetokenizeSharesCallback) -} -func (x fastReflection_DetokenizeSharesCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DetokenizeSharesCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DetokenizeSharesCallback) Descriptor() protoreflect.MessageDescriptor { - return md_DetokenizeSharesCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_DetokenizeSharesCallback) Type() protoreflect.MessageType { - return _fastReflection_DetokenizeSharesCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DetokenizeSharesCallback) New() protoreflect.Message { - return new(fastReflection_DetokenizeSharesCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DetokenizeSharesCallback) Interface() protoreflect.ProtoMessage { - return (*DetokenizeSharesCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_DetokenizeSharesCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Deposit != nil { - value := protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - if !f(fd_DetokenizeSharesCallback_deposit, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DetokenizeSharesCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.DetokenizeSharesCallback.deposit": - return x.Deposit != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DetokenizeSharesCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DetokenizeSharesCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DetokenizeSharesCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.DetokenizeSharesCallback.deposit": - x.Deposit = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DetokenizeSharesCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DetokenizeSharesCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_DetokenizeSharesCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.DetokenizeSharesCallback.deposit": - value := x.Deposit - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DetokenizeSharesCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DetokenizeSharesCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DetokenizeSharesCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.DetokenizeSharesCallback.deposit": - x.Deposit = value.Message().Interface().(*records.LSMTokenDeposit) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DetokenizeSharesCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DetokenizeSharesCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DetokenizeSharesCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.DetokenizeSharesCallback.deposit": - if x.Deposit == nil { - x.Deposit = new(records.LSMTokenDeposit) - } - return protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DetokenizeSharesCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DetokenizeSharesCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_DetokenizeSharesCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.DetokenizeSharesCallback.deposit": - m := new(records.LSMTokenDeposit) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DetokenizeSharesCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DetokenizeSharesCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_DetokenizeSharesCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.DetokenizeSharesCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_DetokenizeSharesCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DetokenizeSharesCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_DetokenizeSharesCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_DetokenizeSharesCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DetokenizeSharesCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Deposit != nil { - l = options.Size(x.Deposit) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DetokenizeSharesCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Deposit != nil { - encoded, err := options.Marshal(x.Deposit) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DetokenizeSharesCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DetokenizeSharesCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DetokenizeSharesCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Deposit == nil { - x.Deposit = &records.LSMTokenDeposit{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposit); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_LSMLiquidStake protoreflect.MessageDescriptor - fd_LSMLiquidStake_deposit protoreflect.FieldDescriptor - fd_LSMLiquidStake_host_zone protoreflect.FieldDescriptor - fd_LSMLiquidStake_validator protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_LSMLiquidStake = File_stride_stakeibc_callbacks_proto.Messages().ByName("LSMLiquidStake") - fd_LSMLiquidStake_deposit = md_LSMLiquidStake.Fields().ByName("deposit") - fd_LSMLiquidStake_host_zone = md_LSMLiquidStake.Fields().ByName("host_zone") - fd_LSMLiquidStake_validator = md_LSMLiquidStake.Fields().ByName("validator") -} - -var _ protoreflect.Message = (*fastReflection_LSMLiquidStake)(nil) - -type fastReflection_LSMLiquidStake LSMLiquidStake - -func (x *LSMLiquidStake) ProtoReflect() protoreflect.Message { - return (*fastReflection_LSMLiquidStake)(x) -} - -func (x *LSMLiquidStake) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_LSMLiquidStake_messageType fastReflection_LSMLiquidStake_messageType -var _ protoreflect.MessageType = fastReflection_LSMLiquidStake_messageType{} - -type fastReflection_LSMLiquidStake_messageType struct{} - -func (x fastReflection_LSMLiquidStake_messageType) Zero() protoreflect.Message { - return (*fastReflection_LSMLiquidStake)(nil) -} -func (x fastReflection_LSMLiquidStake_messageType) New() protoreflect.Message { - return new(fastReflection_LSMLiquidStake) -} -func (x fastReflection_LSMLiquidStake_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LSMLiquidStake -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LSMLiquidStake) Descriptor() protoreflect.MessageDescriptor { - return md_LSMLiquidStake -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_LSMLiquidStake) Type() protoreflect.MessageType { - return _fastReflection_LSMLiquidStake_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LSMLiquidStake) New() protoreflect.Message { - return new(fastReflection_LSMLiquidStake) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LSMLiquidStake) Interface() protoreflect.ProtoMessage { - return (*LSMLiquidStake)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_LSMLiquidStake) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Deposit != nil { - value := protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - if !f(fd_LSMLiquidStake_deposit, value) { - return - } - } - if x.HostZone != nil { - value := protoreflect.ValueOfMessage(x.HostZone.ProtoReflect()) - if !f(fd_LSMLiquidStake_host_zone, value) { - return - } - } - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_LSMLiquidStake_validator, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_LSMLiquidStake) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.LSMLiquidStake.deposit": - return x.Deposit != nil - case "stride.stakeibc.LSMLiquidStake.host_zone": - return x.HostZone != nil - case "stride.stakeibc.LSMLiquidStake.validator": - return x.Validator != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.LSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.LSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LSMLiquidStake) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.LSMLiquidStake.deposit": - x.Deposit = nil - case "stride.stakeibc.LSMLiquidStake.host_zone": - x.HostZone = nil - case "stride.stakeibc.LSMLiquidStake.validator": - x.Validator = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.LSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.LSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_LSMLiquidStake) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.LSMLiquidStake.deposit": - value := x.Deposit - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.stakeibc.LSMLiquidStake.host_zone": - value := x.HostZone - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.stakeibc.LSMLiquidStake.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.LSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.LSMLiquidStake does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LSMLiquidStake) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.LSMLiquidStake.deposit": - x.Deposit = value.Message().Interface().(*records.LSMTokenDeposit) - case "stride.stakeibc.LSMLiquidStake.host_zone": - x.HostZone = value.Message().Interface().(*HostZone) - case "stride.stakeibc.LSMLiquidStake.validator": - x.Validator = value.Message().Interface().(*Validator) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.LSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.LSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LSMLiquidStake) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.LSMLiquidStake.deposit": - if x.Deposit == nil { - x.Deposit = new(records.LSMTokenDeposit) - } - return protoreflect.ValueOfMessage(x.Deposit.ProtoReflect()) - case "stride.stakeibc.LSMLiquidStake.host_zone": - if x.HostZone == nil { - x.HostZone = new(HostZone) - } - return protoreflect.ValueOfMessage(x.HostZone.ProtoReflect()) - case "stride.stakeibc.LSMLiquidStake.validator": - if x.Validator == nil { - x.Validator = new(Validator) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.LSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.LSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_LSMLiquidStake) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.LSMLiquidStake.deposit": - m := new(records.LSMTokenDeposit) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.stakeibc.LSMLiquidStake.host_zone": - m := new(HostZone) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.stakeibc.LSMLiquidStake.validator": - m := new(Validator) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.LSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.LSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_LSMLiquidStake) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.LSMLiquidStake", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_LSMLiquidStake) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_LSMLiquidStake) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_LSMLiquidStake) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_LSMLiquidStake) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LSMLiquidStake) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Deposit != nil { - l = options.Size(x.Deposit) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.HostZone != nil { - l = options.Size(x.HostZone) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Validator != nil { - l = options.Size(x.Validator) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*LSMLiquidStake) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Validator != nil { - encoded, err := options.Marshal(x.Validator) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.HostZone != nil { - encoded, err := options.Marshal(x.HostZone) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Deposit != nil { - encoded, err := options.Marshal(x.Deposit) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*LSMLiquidStake) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LSMLiquidStake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LSMLiquidStake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Deposit == nil { - x.Deposit = &records.LSMTokenDeposit{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Deposit); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.HostZone == nil { - x.HostZone = &HostZone{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HostZone); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Validator == nil { - x.Validator = &Validator{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ValidatorSharesToTokensQueryCallback protoreflect.MessageDescriptor - fd_ValidatorSharesToTokensQueryCallback_lsm_liquid_stake protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_ValidatorSharesToTokensQueryCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("ValidatorSharesToTokensQueryCallback") - fd_ValidatorSharesToTokensQueryCallback_lsm_liquid_stake = md_ValidatorSharesToTokensQueryCallback.Fields().ByName("lsm_liquid_stake") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorSharesToTokensQueryCallback)(nil) - -type fastReflection_ValidatorSharesToTokensQueryCallback ValidatorSharesToTokensQueryCallback - -func (x *ValidatorSharesToTokensQueryCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorSharesToTokensQueryCallback)(x) -} - -func (x *ValidatorSharesToTokensQueryCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorSharesToTokensQueryCallback_messageType fastReflection_ValidatorSharesToTokensQueryCallback_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorSharesToTokensQueryCallback_messageType{} - -type fastReflection_ValidatorSharesToTokensQueryCallback_messageType struct{} - -func (x fastReflection_ValidatorSharesToTokensQueryCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorSharesToTokensQueryCallback)(nil) -} -func (x fastReflection_ValidatorSharesToTokensQueryCallback_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorSharesToTokensQueryCallback) -} -func (x fastReflection_ValidatorSharesToTokensQueryCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSharesToTokensQueryCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorSharesToTokensQueryCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) Type() protoreflect.MessageType { - return _fastReflection_ValidatorSharesToTokensQueryCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) New() protoreflect.Message { - return new(fastReflection_ValidatorSharesToTokensQueryCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) Interface() protoreflect.ProtoMessage { - return (*ValidatorSharesToTokensQueryCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.LsmLiquidStake != nil { - value := protoreflect.ValueOfMessage(x.LsmLiquidStake.ProtoReflect()) - if !f(fd_ValidatorSharesToTokensQueryCallback_lsm_liquid_stake, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.ValidatorSharesToTokensQueryCallback.lsm_liquid_stake": - return x.LsmLiquidStake != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorSharesToTokensQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorSharesToTokensQueryCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.ValidatorSharesToTokensQueryCallback.lsm_liquid_stake": - x.LsmLiquidStake = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorSharesToTokensQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorSharesToTokensQueryCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.ValidatorSharesToTokensQueryCallback.lsm_liquid_stake": - value := x.LsmLiquidStake - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorSharesToTokensQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorSharesToTokensQueryCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.ValidatorSharesToTokensQueryCallback.lsm_liquid_stake": - x.LsmLiquidStake = value.Message().Interface().(*LSMLiquidStake) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorSharesToTokensQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorSharesToTokensQueryCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ValidatorSharesToTokensQueryCallback.lsm_liquid_stake": - if x.LsmLiquidStake == nil { - x.LsmLiquidStake = new(LSMLiquidStake) - } - return protoreflect.ValueOfMessage(x.LsmLiquidStake.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorSharesToTokensQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorSharesToTokensQueryCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ValidatorSharesToTokensQueryCallback.lsm_liquid_stake": - m := new(LSMLiquidStake) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorSharesToTokensQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorSharesToTokensQueryCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.ValidatorSharesToTokensQueryCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ValidatorSharesToTokensQueryCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorSharesToTokensQueryCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.LsmLiquidStake != nil { - l = options.Size(x.LsmLiquidStake) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorSharesToTokensQueryCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.LsmLiquidStake != nil { - encoded, err := options.Marshal(x.LsmLiquidStake) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorSharesToTokensQueryCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSharesToTokensQueryCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorSharesToTokensQueryCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LsmLiquidStake", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.LsmLiquidStake == nil { - x.LsmLiquidStake = &LSMLiquidStake{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LsmLiquidStake); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_DelegatorSharesQueryCallback protoreflect.MessageDescriptor - fd_DelegatorSharesQueryCallback_initial_validator_delegation protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_DelegatorSharesQueryCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("DelegatorSharesQueryCallback") - fd_DelegatorSharesQueryCallback_initial_validator_delegation = md_DelegatorSharesQueryCallback.Fields().ByName("initial_validator_delegation") -} - -var _ protoreflect.Message = (*fastReflection_DelegatorSharesQueryCallback)(nil) - -type fastReflection_DelegatorSharesQueryCallback DelegatorSharesQueryCallback - -func (x *DelegatorSharesQueryCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_DelegatorSharesQueryCallback)(x) -} - -func (x *DelegatorSharesQueryCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DelegatorSharesQueryCallback_messageType fastReflection_DelegatorSharesQueryCallback_messageType -var _ protoreflect.MessageType = fastReflection_DelegatorSharesQueryCallback_messageType{} - -type fastReflection_DelegatorSharesQueryCallback_messageType struct{} - -func (x fastReflection_DelegatorSharesQueryCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_DelegatorSharesQueryCallback)(nil) -} -func (x fastReflection_DelegatorSharesQueryCallback_messageType) New() protoreflect.Message { - return new(fastReflection_DelegatorSharesQueryCallback) -} -func (x fastReflection_DelegatorSharesQueryCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorSharesQueryCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DelegatorSharesQueryCallback) Descriptor() protoreflect.MessageDescriptor { - return md_DelegatorSharesQueryCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_DelegatorSharesQueryCallback) Type() protoreflect.MessageType { - return _fastReflection_DelegatorSharesQueryCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DelegatorSharesQueryCallback) New() protoreflect.Message { - return new(fastReflection_DelegatorSharesQueryCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DelegatorSharesQueryCallback) Interface() protoreflect.ProtoMessage { - return (*DelegatorSharesQueryCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_DelegatorSharesQueryCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.InitialValidatorDelegation != "" { - value := protoreflect.ValueOfString(x.InitialValidatorDelegation) - if !f(fd_DelegatorSharesQueryCallback_initial_validator_delegation, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DelegatorSharesQueryCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.DelegatorSharesQueryCallback.initial_validator_delegation": - return x.InitialValidatorDelegation != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegatorSharesQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegatorSharesQueryCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegatorSharesQueryCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.DelegatorSharesQueryCallback.initial_validator_delegation": - x.InitialValidatorDelegation = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegatorSharesQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegatorSharesQueryCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_DelegatorSharesQueryCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.DelegatorSharesQueryCallback.initial_validator_delegation": - value := x.InitialValidatorDelegation - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegatorSharesQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegatorSharesQueryCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegatorSharesQueryCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.DelegatorSharesQueryCallback.initial_validator_delegation": - x.InitialValidatorDelegation = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegatorSharesQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegatorSharesQueryCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegatorSharesQueryCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.DelegatorSharesQueryCallback.initial_validator_delegation": - panic(fmt.Errorf("field initial_validator_delegation of message stride.stakeibc.DelegatorSharesQueryCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegatorSharesQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegatorSharesQueryCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_DelegatorSharesQueryCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.DelegatorSharesQueryCallback.initial_validator_delegation": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.DelegatorSharesQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.DelegatorSharesQueryCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_DelegatorSharesQueryCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.DelegatorSharesQueryCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_DelegatorSharesQueryCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DelegatorSharesQueryCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_DelegatorSharesQueryCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_DelegatorSharesQueryCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DelegatorSharesQueryCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.InitialValidatorDelegation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DelegatorSharesQueryCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.InitialValidatorDelegation) > 0 { - i -= len(x.InitialValidatorDelegation) - copy(dAtA[i:], x.InitialValidatorDelegation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InitialValidatorDelegation))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DelegatorSharesQueryCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorSharesQueryCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DelegatorSharesQueryCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitialValidatorDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.InitialValidatorDelegation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_CommunityPoolBalanceQueryCallback protoreflect.MessageDescriptor - fd_CommunityPoolBalanceQueryCallback_ica_type protoreflect.FieldDescriptor - fd_CommunityPoolBalanceQueryCallback_denom protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_CommunityPoolBalanceQueryCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("CommunityPoolBalanceQueryCallback") - fd_CommunityPoolBalanceQueryCallback_ica_type = md_CommunityPoolBalanceQueryCallback.Fields().ByName("ica_type") - fd_CommunityPoolBalanceQueryCallback_denom = md_CommunityPoolBalanceQueryCallback.Fields().ByName("denom") -} - -var _ protoreflect.Message = (*fastReflection_CommunityPoolBalanceQueryCallback)(nil) - -type fastReflection_CommunityPoolBalanceQueryCallback CommunityPoolBalanceQueryCallback - -func (x *CommunityPoolBalanceQueryCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_CommunityPoolBalanceQueryCallback)(x) -} - -func (x *CommunityPoolBalanceQueryCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CommunityPoolBalanceQueryCallback_messageType fastReflection_CommunityPoolBalanceQueryCallback_messageType -var _ protoreflect.MessageType = fastReflection_CommunityPoolBalanceQueryCallback_messageType{} - -type fastReflection_CommunityPoolBalanceQueryCallback_messageType struct{} - -func (x fastReflection_CommunityPoolBalanceQueryCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_CommunityPoolBalanceQueryCallback)(nil) -} -func (x fastReflection_CommunityPoolBalanceQueryCallback_messageType) New() protoreflect.Message { - return new(fastReflection_CommunityPoolBalanceQueryCallback) -} -func (x fastReflection_CommunityPoolBalanceQueryCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CommunityPoolBalanceQueryCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) Descriptor() protoreflect.MessageDescriptor { - return md_CommunityPoolBalanceQueryCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) Type() protoreflect.MessageType { - return _fastReflection_CommunityPoolBalanceQueryCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) New() protoreflect.Message { - return new(fastReflection_CommunityPoolBalanceQueryCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) Interface() protoreflect.ProtoMessage { - return (*CommunityPoolBalanceQueryCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.IcaType != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.IcaType)) - if !f(fd_CommunityPoolBalanceQueryCallback_ica_type, value) { - return - } - } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_CommunityPoolBalanceQueryCallback_denom, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.ica_type": - return x.IcaType != 0 - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.denom": - return x.Denom != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolBalanceQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolBalanceQueryCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.ica_type": - x.IcaType = 0 - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.denom": - x.Denom = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolBalanceQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolBalanceQueryCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.ica_type": - value := x.IcaType - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolBalanceQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolBalanceQueryCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.ica_type": - x.IcaType = (ICAAccountType)(value.Enum()) - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.denom": - x.Denom = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolBalanceQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolBalanceQueryCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.ica_type": - panic(fmt.Errorf("field ica_type of message stride.stakeibc.CommunityPoolBalanceQueryCallback is not mutable")) - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.denom": - panic(fmt.Errorf("field denom of message stride.stakeibc.CommunityPoolBalanceQueryCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolBalanceQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolBalanceQueryCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.ica_type": - return protoreflect.ValueOfEnum(0) - case "stride.stakeibc.CommunityPoolBalanceQueryCallback.denom": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolBalanceQueryCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolBalanceQueryCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.CommunityPoolBalanceQueryCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_CommunityPoolBalanceQueryCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CommunityPoolBalanceQueryCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.IcaType != 0 { - n += 1 + runtime.Sov(uint64(x.IcaType)) - } - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CommunityPoolBalanceQueryCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0x12 - } - if x.IcaType != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.IcaType)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*CommunityPoolBalanceQueryCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolBalanceQueryCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolBalanceQueryCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IcaType", wireType) - } - x.IcaType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.IcaType |= ICAAccountType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TradeRouteCallback protoreflect.MessageDescriptor - fd_TradeRouteCallback_reward_denom protoreflect.FieldDescriptor - fd_TradeRouteCallback_host_denom protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_callbacks_proto_init() - md_TradeRouteCallback = File_stride_stakeibc_callbacks_proto.Messages().ByName("TradeRouteCallback") - fd_TradeRouteCallback_reward_denom = md_TradeRouteCallback.Fields().ByName("reward_denom") - fd_TradeRouteCallback_host_denom = md_TradeRouteCallback.Fields().ByName("host_denom") -} - -var _ protoreflect.Message = (*fastReflection_TradeRouteCallback)(nil) - -type fastReflection_TradeRouteCallback TradeRouteCallback - -func (x *TradeRouteCallback) ProtoReflect() protoreflect.Message { - return (*fastReflection_TradeRouteCallback)(x) -} - -func (x *TradeRouteCallback) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TradeRouteCallback_messageType fastReflection_TradeRouteCallback_messageType -var _ protoreflect.MessageType = fastReflection_TradeRouteCallback_messageType{} - -type fastReflection_TradeRouteCallback_messageType struct{} - -func (x fastReflection_TradeRouteCallback_messageType) Zero() protoreflect.Message { - return (*fastReflection_TradeRouteCallback)(nil) -} -func (x fastReflection_TradeRouteCallback_messageType) New() protoreflect.Message { - return new(fastReflection_TradeRouteCallback) -} -func (x fastReflection_TradeRouteCallback_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TradeRouteCallback -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TradeRouteCallback) Descriptor() protoreflect.MessageDescriptor { - return md_TradeRouteCallback -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_TradeRouteCallback) Type() protoreflect.MessageType { - return _fastReflection_TradeRouteCallback_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TradeRouteCallback) New() protoreflect.Message { - return new(fastReflection_TradeRouteCallback) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TradeRouteCallback) Interface() protoreflect.ProtoMessage { - return (*TradeRouteCallback)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_TradeRouteCallback) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RewardDenom != "" { - value := protoreflect.ValueOfString(x.RewardDenom) - if !f(fd_TradeRouteCallback_reward_denom, value) { - return - } - } - if x.HostDenom != "" { - value := protoreflect.ValueOfString(x.HostDenom) - if !f(fd_TradeRouteCallback_host_denom, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_TradeRouteCallback) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.TradeRouteCallback.reward_denom": - return x.RewardDenom != "" - case "stride.stakeibc.TradeRouteCallback.host_denom": - return x.HostDenom != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRouteCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRouteCallback does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeRouteCallback) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.TradeRouteCallback.reward_denom": - x.RewardDenom = "" - case "stride.stakeibc.TradeRouteCallback.host_denom": - x.HostDenom = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRouteCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRouteCallback does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_TradeRouteCallback) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.TradeRouteCallback.reward_denom": - value := x.RewardDenom - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeRouteCallback.host_denom": - value := x.HostDenom - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRouteCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRouteCallback does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeRouteCallback) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.TradeRouteCallback.reward_denom": - x.RewardDenom = value.Interface().(string) - case "stride.stakeibc.TradeRouteCallback.host_denom": - x.HostDenom = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRouteCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRouteCallback does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeRouteCallback) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.TradeRouteCallback.reward_denom": - panic(fmt.Errorf("field reward_denom of message stride.stakeibc.TradeRouteCallback is not mutable")) - case "stride.stakeibc.TradeRouteCallback.host_denom": - panic(fmt.Errorf("field host_denom of message stride.stakeibc.TradeRouteCallback is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRouteCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRouteCallback does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_TradeRouteCallback) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.TradeRouteCallback.reward_denom": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeRouteCallback.host_denom": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRouteCallback")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRouteCallback does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_TradeRouteCallback) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.TradeRouteCallback", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_TradeRouteCallback) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeRouteCallback) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_TradeRouteCallback) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_TradeRouteCallback) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TradeRouteCallback) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.RewardDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TradeRouteCallback) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.HostDenom) > 0 { - i -= len(x.HostDenom) - copy(dAtA[i:], x.HostDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenom))) - i-- - dAtA[i] = 0x12 - } - if len(x.RewardDenom) > 0 { - i -= len(x.RewardDenom) - copy(dAtA[i:], x.RewardDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardDenom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TradeRouteCallback) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TradeRouteCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TradeRouteCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/callbacks.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type SplitDelegation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *SplitDelegation) Reset() { - *x = SplitDelegation{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SplitDelegation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SplitDelegation) ProtoMessage() {} - -// Deprecated: Use SplitDelegation.ProtoReflect.Descriptor instead. -func (*SplitDelegation) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{0} -} - -func (x *SplitDelegation) GetValidator() string { - if x != nil { - return x.Validator - } - return "" -} - -func (x *SplitDelegation) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -type DelegateCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - DepositRecordId uint64 `protobuf:"varint,2,opt,name=deposit_record_id,json=depositRecordId,proto3" json:"deposit_record_id,omitempty"` - SplitDelegations []*SplitDelegation `protobuf:"bytes,3,rep,name=split_delegations,json=splitDelegations,proto3" json:"split_delegations,omitempty"` -} - -func (x *DelegateCallback) Reset() { - *x = DelegateCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelegateCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelegateCallback) ProtoMessage() {} - -// Deprecated: Use DelegateCallback.ProtoReflect.Descriptor instead. -func (*DelegateCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{1} -} - -func (x *DelegateCallback) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -func (x *DelegateCallback) GetDepositRecordId() uint64 { - if x != nil { - return x.DepositRecordId - } - return 0 -} - -func (x *DelegateCallback) GetSplitDelegations() []*SplitDelegation { - if x != nil { - return x.SplitDelegations - } - return nil -} - -type ClaimCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserRedemptionRecordId string `protobuf:"bytes,1,opt,name=user_redemption_record_id,json=userRedemptionRecordId,proto3" json:"user_redemption_record_id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - EpochNumber uint64 `protobuf:"varint,3,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` -} - -func (x *ClaimCallback) Reset() { - *x = ClaimCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClaimCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClaimCallback) ProtoMessage() {} - -// Deprecated: Use ClaimCallback.ProtoReflect.Descriptor instead. -func (*ClaimCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{2} -} - -func (x *ClaimCallback) GetUserRedemptionRecordId() string { - if x != nil { - return x.UserRedemptionRecordId - } - return "" -} - -func (x *ClaimCallback) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *ClaimCallback) GetEpochNumber() uint64 { - if x != nil { - return x.EpochNumber - } - return 0 -} - -type ReinvestCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ReinvestAmount *v1beta1.Coin `protobuf:"bytes,1,opt,name=reinvest_amount,json=reinvestAmount,proto3" json:"reinvest_amount,omitempty"` - HostZoneId string `protobuf:"bytes,3,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` -} - -func (x *ReinvestCallback) Reset() { - *x = ReinvestCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ReinvestCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ReinvestCallback) ProtoMessage() {} - -// Deprecated: Use ReinvestCallback.ProtoReflect.Descriptor instead. -func (*ReinvestCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{3} -} - -func (x *ReinvestCallback) GetReinvestAmount() *v1beta1.Coin { - if x != nil { - return x.ReinvestAmount - } - return nil -} - -func (x *ReinvestCallback) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -type UndelegateCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - SplitDelegations []*SplitDelegation `protobuf:"bytes,2,rep,name=split_delegations,json=splitDelegations,proto3" json:"split_delegations,omitempty"` - EpochUnbondingRecordIds []uint64 `protobuf:"varint,3,rep,packed,name=epoch_unbonding_record_ids,json=epochUnbondingRecordIds,proto3" json:"epoch_unbonding_record_ids,omitempty"` -} - -func (x *UndelegateCallback) Reset() { - *x = UndelegateCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UndelegateCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UndelegateCallback) ProtoMessage() {} - -// Deprecated: Use UndelegateCallback.ProtoReflect.Descriptor instead. -func (*UndelegateCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{4} -} - -func (x *UndelegateCallback) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -func (x *UndelegateCallback) GetSplitDelegations() []*SplitDelegation { - if x != nil { - return x.SplitDelegations - } - return nil -} - -func (x *UndelegateCallback) GetEpochUnbondingRecordIds() []uint64 { - if x != nil { - return x.EpochUnbondingRecordIds - } - return nil -} - -type RedemptionCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - EpochUnbondingRecordIds []uint64 `protobuf:"varint,2,rep,packed,name=epoch_unbonding_record_ids,json=epochUnbondingRecordIds,proto3" json:"epoch_unbonding_record_ids,omitempty"` -} - -func (x *RedemptionCallback) Reset() { - *x = RedemptionCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RedemptionCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RedemptionCallback) ProtoMessage() {} - -// Deprecated: Use RedemptionCallback.ProtoReflect.Descriptor instead. -func (*RedemptionCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{5} -} - -func (x *RedemptionCallback) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -func (x *RedemptionCallback) GetEpochUnbondingRecordIds() []uint64 { - if x != nil { - return x.EpochUnbondingRecordIds - } - return nil -} - -type Rebalancing struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SrcValidator string `protobuf:"bytes,1,opt,name=src_validator,json=srcValidator,proto3" json:"src_validator,omitempty"` - DstValidator string `protobuf:"bytes,2,opt,name=dst_validator,json=dstValidator,proto3" json:"dst_validator,omitempty"` - Amt string `protobuf:"bytes,3,opt,name=amt,proto3" json:"amt,omitempty"` -} - -func (x *Rebalancing) Reset() { - *x = Rebalancing{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Rebalancing) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Rebalancing) ProtoMessage() {} - -// Deprecated: Use Rebalancing.ProtoReflect.Descriptor instead. -func (*Rebalancing) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{6} -} - -func (x *Rebalancing) GetSrcValidator() string { - if x != nil { - return x.SrcValidator - } - return "" -} - -func (x *Rebalancing) GetDstValidator() string { - if x != nil { - return x.DstValidator - } - return "" -} - -func (x *Rebalancing) GetAmt() string { - if x != nil { - return x.Amt - } - return "" -} - -type RebalanceCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - Rebalancings []*Rebalancing `protobuf:"bytes,2,rep,name=rebalancings,proto3" json:"rebalancings,omitempty"` -} - -func (x *RebalanceCallback) Reset() { - *x = RebalanceCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RebalanceCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RebalanceCallback) ProtoMessage() {} - -// Deprecated: Use RebalanceCallback.ProtoReflect.Descriptor instead. -func (*RebalanceCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{7} -} - -func (x *RebalanceCallback) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -func (x *RebalanceCallback) GetRebalancings() []*Rebalancing { - if x != nil { - return x.Rebalancings - } - return nil -} - -type DetokenizeSharesCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Deposit *records.LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` -} - -func (x *DetokenizeSharesCallback) Reset() { - *x = DetokenizeSharesCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DetokenizeSharesCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DetokenizeSharesCallback) ProtoMessage() {} - -// Deprecated: Use DetokenizeSharesCallback.ProtoReflect.Descriptor instead. -func (*DetokenizeSharesCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{8} -} - -func (x *DetokenizeSharesCallback) GetDeposit() *records.LSMTokenDeposit { - if x != nil { - return x.Deposit - } - return nil -} - -type LSMLiquidStake struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Deposit *records.LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` - HostZone *HostZone `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - Validator *Validator `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` -} - -func (x *LSMLiquidStake) Reset() { - *x = LSMLiquidStake{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LSMLiquidStake) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LSMLiquidStake) ProtoMessage() {} - -// Deprecated: Use LSMLiquidStake.ProtoReflect.Descriptor instead. -func (*LSMLiquidStake) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{9} -} - -func (x *LSMLiquidStake) GetDeposit() *records.LSMTokenDeposit { - if x != nil { - return x.Deposit - } - return nil -} - -func (x *LSMLiquidStake) GetHostZone() *HostZone { - if x != nil { - return x.HostZone - } - return nil -} - -func (x *LSMLiquidStake) GetValidator() *Validator { - if x != nil { - return x.Validator - } - return nil -} - -type ValidatorSharesToTokensQueryCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - LsmLiquidStake *LSMLiquidStake `protobuf:"bytes,1,opt,name=lsm_liquid_stake,json=lsmLiquidStake,proto3" json:"lsm_liquid_stake,omitempty"` -} - -func (x *ValidatorSharesToTokensQueryCallback) Reset() { - *x = ValidatorSharesToTokensQueryCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorSharesToTokensQueryCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorSharesToTokensQueryCallback) ProtoMessage() {} - -// Deprecated: Use ValidatorSharesToTokensQueryCallback.ProtoReflect.Descriptor instead. -func (*ValidatorSharesToTokensQueryCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{10} -} - -func (x *ValidatorSharesToTokensQueryCallback) GetLsmLiquidStake() *LSMLiquidStake { - if x != nil { - return x.LsmLiquidStake - } - return nil -} - -type DelegatorSharesQueryCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Validator delegation at the time the query is submitted - InitialValidatorDelegation string `protobuf:"bytes,1,opt,name=initial_validator_delegation,json=initialValidatorDelegation,proto3" json:"initial_validator_delegation,omitempty"` -} - -func (x *DelegatorSharesQueryCallback) Reset() { - *x = DelegatorSharesQueryCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DelegatorSharesQueryCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DelegatorSharesQueryCallback) ProtoMessage() {} - -// Deprecated: Use DelegatorSharesQueryCallback.ProtoReflect.Descriptor instead. -func (*DelegatorSharesQueryCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{11} -} - -func (x *DelegatorSharesQueryCallback) GetInitialValidatorDelegation() string { - if x != nil { - return x.InitialValidatorDelegation - } - return "" -} - -type CommunityPoolBalanceQueryCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IcaType ICAAccountType `protobuf:"varint,1,opt,name=ica_type,json=icaType,proto3,enum=stride.stakeibc.ICAAccountType" json:"ica_type,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (x *CommunityPoolBalanceQueryCallback) Reset() { - *x = CommunityPoolBalanceQueryCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommunityPoolBalanceQueryCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommunityPoolBalanceQueryCallback) ProtoMessage() {} - -// Deprecated: Use CommunityPoolBalanceQueryCallback.ProtoReflect.Descriptor instead. -func (*CommunityPoolBalanceQueryCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{12} -} - -func (x *CommunityPoolBalanceQueryCallback) GetIcaType() ICAAccountType { - if x != nil { - return x.IcaType - } - return ICAAccountType_DELEGATION -} - -func (x *CommunityPoolBalanceQueryCallback) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -type TradeRouteCallback struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RewardDenom string `protobuf:"bytes,1,opt,name=reward_denom,json=rewardDenom,proto3" json:"reward_denom,omitempty"` - HostDenom string `protobuf:"bytes,2,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` -} - -func (x *TradeRouteCallback) Reset() { - *x = TradeRouteCallback{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_callbacks_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TradeRouteCallback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TradeRouteCallback) ProtoMessage() {} - -// Deprecated: Use TradeRouteCallback.ProtoReflect.Descriptor instead. -func (*TradeRouteCallback) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_callbacks_proto_rawDescGZIP(), []int{13} -} - -func (x *TradeRouteCallback) GetRewardDenom() string { - if x != nil { - return x.RewardDenom - } - return "" -} - -func (x *TradeRouteCallback) GetHostDenom() string { - if x != nil { - return x.HostDenom - } - return "" -} - -var File_stride_stakeibc_callbacks_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_callbacks_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, - 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, - 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x69, 0x63, 0x61, 0x5f, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x66, 0x0a, 0x0f, 0x53, - 0x70, 0x6c, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, - 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xaf, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, - 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x11, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x0d, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x43, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x39, 0x0a, 0x19, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x75, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, - 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, - 0x0c, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x22, 0x98, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x69, 0x6e, 0x76, 0x65, 0x73, 0x74, 0x43, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x62, 0x0a, 0x0f, 0x72, 0x65, 0x69, 0x6e, 0x76, 0x65, 0x73, - 0x74, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1e, 0xc8, 0xde, 0x1f, 0x00, 0xaa, - 0xdf, 0x1f, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x0e, 0x72, 0x65, 0x69, 0x6e, 0x76, - 0x65, 0x73, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x22, 0xc2, 0x01, 0x0a, 0x12, - 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, - 0x6e, 0x65, 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x11, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x10, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x75, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x69, 0x64, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x17, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x55, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x64, 0x73, - 0x22, 0x73, 0x0a, 0x12, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x61, - 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, - 0x6f, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, - 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x65, 0x70, 0x6f, 0x63, - 0x68, 0x5f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x17, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x63, 0x6f, - 0x72, 0x64, 0x49, 0x64, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x72, 0x63, 0x5f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x72, - 0x63, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x73, - 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x64, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x2f, 0x0a, 0x03, 0x61, 0x6d, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, - 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x03, 0x61, 0x6d, 0x74, - 0x22, 0x77, 0x0a, 0x11, 0x52, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, - 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x73, - 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0c, 0x72, 0x65, 0x62, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, - 0x52, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x72, 0x65, 0x62, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x55, 0x0a, 0x18, 0x44, 0x65, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x69, 0x7a, 0x65, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x43, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x39, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x4c, 0x53, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x22, 0xbd, 0x01, 0x0a, 0x0e, 0x4c, 0x53, 0x4d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x72, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x73, 0x2e, 0x4c, 0x53, 0x4d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x07, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x36, - 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x08, 0x68, 0x6f, - 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x22, 0x71, 0x0a, 0x24, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, - 0x72, 0x65, 0x73, 0x54, 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x49, 0x0a, 0x10, 0x6c, 0x73, 0x6d, 0x5f, - 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4c, 0x53, 0x4d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x52, 0x0e, 0x6c, 0x73, 0x6d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x22, 0x7f, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x62, - 0x61, 0x63, 0x6b, 0x12, 0x5f, 0x0a, 0x1c, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x1a, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x75, 0x0a, 0x21, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, - 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x3a, 0x0a, 0x08, 0x69, 0x63, 0x61, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x49, 0x43, - 0x41, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x69, 0x63, - 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0x56, 0x0a, 0x12, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, - 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, - 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x44, 0x65, - 0x6e, 0x6f, 0x6d, 0x42, 0xb9, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x0e, 0x43, 0x61, 0x6c, - 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, - 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xca, 0x02, 0x0f, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xe2, 0x02, - 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_callbacks_proto_rawDescOnce sync.Once - file_stride_stakeibc_callbacks_proto_rawDescData = file_stride_stakeibc_callbacks_proto_rawDesc -) - -func file_stride_stakeibc_callbacks_proto_rawDescGZIP() []byte { - file_stride_stakeibc_callbacks_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_callbacks_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_callbacks_proto_rawDescData) - }) - return file_stride_stakeibc_callbacks_proto_rawDescData -} - -var file_stride_stakeibc_callbacks_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_stride_stakeibc_callbacks_proto_goTypes = []interface{}{ - (*SplitDelegation)(nil), // 0: stride.stakeibc.SplitDelegation - (*DelegateCallback)(nil), // 1: stride.stakeibc.DelegateCallback - (*ClaimCallback)(nil), // 2: stride.stakeibc.ClaimCallback - (*ReinvestCallback)(nil), // 3: stride.stakeibc.ReinvestCallback - (*UndelegateCallback)(nil), // 4: stride.stakeibc.UndelegateCallback - (*RedemptionCallback)(nil), // 5: stride.stakeibc.RedemptionCallback - (*Rebalancing)(nil), // 6: stride.stakeibc.Rebalancing - (*RebalanceCallback)(nil), // 7: stride.stakeibc.RebalanceCallback - (*DetokenizeSharesCallback)(nil), // 8: stride.stakeibc.DetokenizeSharesCallback - (*LSMLiquidStake)(nil), // 9: stride.stakeibc.LSMLiquidStake - (*ValidatorSharesToTokensQueryCallback)(nil), // 10: stride.stakeibc.ValidatorSharesToTokensQueryCallback - (*DelegatorSharesQueryCallback)(nil), // 11: stride.stakeibc.DelegatorSharesQueryCallback - (*CommunityPoolBalanceQueryCallback)(nil), // 12: stride.stakeibc.CommunityPoolBalanceQueryCallback - (*TradeRouteCallback)(nil), // 13: stride.stakeibc.TradeRouteCallback - (*v1beta1.Coin)(nil), // 14: cosmos.base.v1beta1.Coin - (*records.LSMTokenDeposit)(nil), // 15: stride.records.LSMTokenDeposit - (*HostZone)(nil), // 16: stride.stakeibc.HostZone - (*Validator)(nil), // 17: stride.stakeibc.Validator - (ICAAccountType)(0), // 18: stride.stakeibc.ICAAccountType -} -var file_stride_stakeibc_callbacks_proto_depIdxs = []int32{ - 0, // 0: stride.stakeibc.DelegateCallback.split_delegations:type_name -> stride.stakeibc.SplitDelegation - 14, // 1: stride.stakeibc.ReinvestCallback.reinvest_amount:type_name -> cosmos.base.v1beta1.Coin - 0, // 2: stride.stakeibc.UndelegateCallback.split_delegations:type_name -> stride.stakeibc.SplitDelegation - 6, // 3: stride.stakeibc.RebalanceCallback.rebalancings:type_name -> stride.stakeibc.Rebalancing - 15, // 4: stride.stakeibc.DetokenizeSharesCallback.deposit:type_name -> stride.records.LSMTokenDeposit - 15, // 5: stride.stakeibc.LSMLiquidStake.deposit:type_name -> stride.records.LSMTokenDeposit - 16, // 6: stride.stakeibc.LSMLiquidStake.host_zone:type_name -> stride.stakeibc.HostZone - 17, // 7: stride.stakeibc.LSMLiquidStake.validator:type_name -> stride.stakeibc.Validator - 9, // 8: stride.stakeibc.ValidatorSharesToTokensQueryCallback.lsm_liquid_stake:type_name -> stride.stakeibc.LSMLiquidStake - 18, // 9: stride.stakeibc.CommunityPoolBalanceQueryCallback.ica_type:type_name -> stride.stakeibc.ICAAccountType - 10, // [10:10] is the sub-list for method output_type - 10, // [10:10] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_callbacks_proto_init() } -func file_stride_stakeibc_callbacks_proto_init() { - if File_stride_stakeibc_callbacks_proto != nil { - return - } - file_stride_stakeibc_host_zone_proto_init() - file_stride_stakeibc_validator_proto_init() - file_stride_stakeibc_ica_account_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_callbacks_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SplitDelegation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegateCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClaimCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReinvestCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UndelegateCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RedemptionCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Rebalancing); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RebalanceCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DetokenizeSharesCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LSMLiquidStake); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorSharesToTokensQueryCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelegatorSharesQueryCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommunityPoolBalanceQueryCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_callbacks_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TradeRouteCallback); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_callbacks_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_callbacks_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_callbacks_proto_depIdxs, - MessageInfos: file_stride_stakeibc_callbacks_proto_msgTypes, - }.Build() - File_stride_stakeibc_callbacks_proto = out.File - file_stride_stakeibc_callbacks_proto_rawDesc = nil - file_stride_stakeibc_callbacks_proto_goTypes = nil - file_stride_stakeibc_callbacks_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/epoch_tracker.pulsar.go b/api/stride/stakeibc/epoch_tracker.pulsar.go deleted file mode 100644 index da6961c6b..000000000 --- a/api/stride/stakeibc/epoch_tracker.pulsar.go +++ /dev/null @@ -1,744 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_EpochTracker protoreflect.MessageDescriptor - fd_EpochTracker_epoch_identifier protoreflect.FieldDescriptor - fd_EpochTracker_epoch_number protoreflect.FieldDescriptor - fd_EpochTracker_next_epoch_start_time protoreflect.FieldDescriptor - fd_EpochTracker_duration protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_epoch_tracker_proto_init() - md_EpochTracker = File_stride_stakeibc_epoch_tracker_proto.Messages().ByName("EpochTracker") - fd_EpochTracker_epoch_identifier = md_EpochTracker.Fields().ByName("epoch_identifier") - fd_EpochTracker_epoch_number = md_EpochTracker.Fields().ByName("epoch_number") - fd_EpochTracker_next_epoch_start_time = md_EpochTracker.Fields().ByName("next_epoch_start_time") - fd_EpochTracker_duration = md_EpochTracker.Fields().ByName("duration") -} - -var _ protoreflect.Message = (*fastReflection_EpochTracker)(nil) - -type fastReflection_EpochTracker EpochTracker - -func (x *EpochTracker) ProtoReflect() protoreflect.Message { - return (*fastReflection_EpochTracker)(x) -} - -func (x *EpochTracker) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_epoch_tracker_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EpochTracker_messageType fastReflection_EpochTracker_messageType -var _ protoreflect.MessageType = fastReflection_EpochTracker_messageType{} - -type fastReflection_EpochTracker_messageType struct{} - -func (x fastReflection_EpochTracker_messageType) Zero() protoreflect.Message { - return (*fastReflection_EpochTracker)(nil) -} -func (x fastReflection_EpochTracker_messageType) New() protoreflect.Message { - return new(fastReflection_EpochTracker) -} -func (x fastReflection_EpochTracker_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EpochTracker -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EpochTracker) Descriptor() protoreflect.MessageDescriptor { - return md_EpochTracker -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_EpochTracker) Type() protoreflect.MessageType { - return _fastReflection_EpochTracker_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EpochTracker) New() protoreflect.Message { - return new(fastReflection_EpochTracker) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EpochTracker) Interface() protoreflect.ProtoMessage { - return (*EpochTracker)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_EpochTracker) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.EpochIdentifier != "" { - value := protoreflect.ValueOfString(x.EpochIdentifier) - if !f(fd_EpochTracker_epoch_identifier, value) { - return - } - } - if x.EpochNumber != uint64(0) { - value := protoreflect.ValueOfUint64(x.EpochNumber) - if !f(fd_EpochTracker_epoch_number, value) { - return - } - } - if x.NextEpochStartTime != uint64(0) { - value := protoreflect.ValueOfUint64(x.NextEpochStartTime) - if !f(fd_EpochTracker_next_epoch_start_time, value) { - return - } - } - if x.Duration != uint64(0) { - value := protoreflect.ValueOfUint64(x.Duration) - if !f(fd_EpochTracker_duration, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EpochTracker) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.EpochTracker.epoch_identifier": - return x.EpochIdentifier != "" - case "stride.stakeibc.EpochTracker.epoch_number": - return x.EpochNumber != uint64(0) - case "stride.stakeibc.EpochTracker.next_epoch_start_time": - return x.NextEpochStartTime != uint64(0) - case "stride.stakeibc.EpochTracker.duration": - return x.Duration != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.EpochTracker")) - } - panic(fmt.Errorf("message stride.stakeibc.EpochTracker does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochTracker) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.EpochTracker.epoch_identifier": - x.EpochIdentifier = "" - case "stride.stakeibc.EpochTracker.epoch_number": - x.EpochNumber = uint64(0) - case "stride.stakeibc.EpochTracker.next_epoch_start_time": - x.NextEpochStartTime = uint64(0) - case "stride.stakeibc.EpochTracker.duration": - x.Duration = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.EpochTracker")) - } - panic(fmt.Errorf("message stride.stakeibc.EpochTracker does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_EpochTracker) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.EpochTracker.epoch_identifier": - value := x.EpochIdentifier - return protoreflect.ValueOfString(value) - case "stride.stakeibc.EpochTracker.epoch_number": - value := x.EpochNumber - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.EpochTracker.next_epoch_start_time": - value := x.NextEpochStartTime - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.EpochTracker.duration": - value := x.Duration - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.EpochTracker")) - } - panic(fmt.Errorf("message stride.stakeibc.EpochTracker does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochTracker) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.EpochTracker.epoch_identifier": - x.EpochIdentifier = value.Interface().(string) - case "stride.stakeibc.EpochTracker.epoch_number": - x.EpochNumber = value.Uint() - case "stride.stakeibc.EpochTracker.next_epoch_start_time": - x.NextEpochStartTime = value.Uint() - case "stride.stakeibc.EpochTracker.duration": - x.Duration = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.EpochTracker")) - } - panic(fmt.Errorf("message stride.stakeibc.EpochTracker does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochTracker) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.EpochTracker.epoch_identifier": - panic(fmt.Errorf("field epoch_identifier of message stride.stakeibc.EpochTracker is not mutable")) - case "stride.stakeibc.EpochTracker.epoch_number": - panic(fmt.Errorf("field epoch_number of message stride.stakeibc.EpochTracker is not mutable")) - case "stride.stakeibc.EpochTracker.next_epoch_start_time": - panic(fmt.Errorf("field next_epoch_start_time of message stride.stakeibc.EpochTracker is not mutable")) - case "stride.stakeibc.EpochTracker.duration": - panic(fmt.Errorf("field duration of message stride.stakeibc.EpochTracker is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.EpochTracker")) - } - panic(fmt.Errorf("message stride.stakeibc.EpochTracker does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_EpochTracker) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.EpochTracker.epoch_identifier": - return protoreflect.ValueOfString("") - case "stride.stakeibc.EpochTracker.epoch_number": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.EpochTracker.next_epoch_start_time": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.EpochTracker.duration": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.EpochTracker")) - } - panic(fmt.Errorf("message stride.stakeibc.EpochTracker does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_EpochTracker) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.EpochTracker", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_EpochTracker) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EpochTracker) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_EpochTracker) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_EpochTracker) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EpochTracker) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.EpochIdentifier) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.EpochNumber != 0 { - n += 1 + runtime.Sov(uint64(x.EpochNumber)) - } - if x.NextEpochStartTime != 0 { - n += 1 + runtime.Sov(uint64(x.NextEpochStartTime)) - } - if x.Duration != 0 { - n += 1 + runtime.Sov(uint64(x.Duration)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EpochTracker) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Duration != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Duration)) - i-- - dAtA[i] = 0x20 - } - if x.NextEpochStartTime != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.NextEpochStartTime)) - i-- - dAtA[i] = 0x18 - } - if x.EpochNumber != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.EpochNumber)) - i-- - dAtA[i] = 0x10 - } - if len(x.EpochIdentifier) > 0 { - i -= len(x.EpochIdentifier) - copy(dAtA[i:], x.EpochIdentifier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EpochIdentifier))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EpochTracker) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EpochTracker: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EpochTracker: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochIdentifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.EpochIdentifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - x.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextEpochStartTime", wireType) - } - x.NextEpochStartTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.NextEpochStartTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - x.Duration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Duration |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/epoch_tracker.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type EpochTracker struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EpochIdentifier string `protobuf:"bytes,1,opt,name=epoch_identifier,json=epochIdentifier,proto3" json:"epoch_identifier,omitempty"` - EpochNumber uint64 `protobuf:"varint,2,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` - NextEpochStartTime uint64 `protobuf:"varint,3,opt,name=next_epoch_start_time,json=nextEpochStartTime,proto3" json:"next_epoch_start_time,omitempty"` - Duration uint64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` -} - -func (x *EpochTracker) Reset() { - *x = EpochTracker{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_epoch_tracker_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EpochTracker) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EpochTracker) ProtoMessage() {} - -// Deprecated: Use EpochTracker.ProtoReflect.Descriptor instead. -func (*EpochTracker) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_epoch_tracker_proto_rawDescGZIP(), []int{0} -} - -func (x *EpochTracker) GetEpochIdentifier() string { - if x != nil { - return x.EpochIdentifier - } - return "" -} - -func (x *EpochTracker) GetEpochNumber() uint64 { - if x != nil { - return x.EpochNumber - } - return 0 -} - -func (x *EpochTracker) GetNextEpochStartTime() uint64 { - if x != nil { - return x.NextEpochStartTime - } - return 0 -} - -func (x *EpochTracker) GetDuration() uint64 { - if x != nil { - return x.Duration - } - return 0 -} - -var File_stride_stakeibc_epoch_tracker_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_epoch_tracker_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x22, 0xab, 0x01, 0x0a, 0x0c, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x15, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x6e, 0x65, 0x78, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xbc, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x11, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, - 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, - 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0xca, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x10, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_epoch_tracker_proto_rawDescOnce sync.Once - file_stride_stakeibc_epoch_tracker_proto_rawDescData = file_stride_stakeibc_epoch_tracker_proto_rawDesc -) - -func file_stride_stakeibc_epoch_tracker_proto_rawDescGZIP() []byte { - file_stride_stakeibc_epoch_tracker_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_epoch_tracker_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_epoch_tracker_proto_rawDescData) - }) - return file_stride_stakeibc_epoch_tracker_proto_rawDescData -} - -var file_stride_stakeibc_epoch_tracker_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_stakeibc_epoch_tracker_proto_goTypes = []interface{}{ - (*EpochTracker)(nil), // 0: stride.stakeibc.EpochTracker -} -var file_stride_stakeibc_epoch_tracker_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_epoch_tracker_proto_init() } -func file_stride_stakeibc_epoch_tracker_proto_init() { - if File_stride_stakeibc_epoch_tracker_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_epoch_tracker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EpochTracker); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_epoch_tracker_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_epoch_tracker_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_epoch_tracker_proto_depIdxs, - MessageInfos: file_stride_stakeibc_epoch_tracker_proto_msgTypes, - }.Build() - File_stride_stakeibc_epoch_tracker_proto = out.File - file_stride_stakeibc_epoch_tracker_proto_rawDesc = nil - file_stride_stakeibc_epoch_tracker_proto_goTypes = nil - file_stride_stakeibc_epoch_tracker_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/genesis.pulsar.go b/api/stride/stakeibc/genesis.pulsar.go deleted file mode 100644 index 29d5aecf8..000000000 --- a/api/stride/stakeibc/genesis.pulsar.go +++ /dev/null @@ -1,981 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_GenesisState_5_list)(nil) - -type _GenesisState_5_list struct { - list *[]*HostZone -} - -func (x *_GenesisState_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*HostZone) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*HostZone) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_5_list) AppendMutable() protoreflect.Value { - v := new(HostZone) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_5_list) NewElement() protoreflect.Value { - v := new(HostZone) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_GenesisState_10_list)(nil) - -type _GenesisState_10_list struct { - list *[]*EpochTracker -} - -func (x *_GenesisState_10_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_GenesisState_10_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_GenesisState_10_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochTracker) - (*x.list)[i] = concreteValue -} - -func (x *_GenesisState_10_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochTracker) - *x.list = append(*x.list, concreteValue) -} - -func (x *_GenesisState_10_list) AppendMutable() protoreflect.Value { - v := new(EpochTracker) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_10_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_GenesisState_10_list) NewElement() protoreflect.Value { - v := new(EpochTracker) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_GenesisState_10_list) IsValid() bool { - return x.list != nil -} - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor - fd_GenesisState_port_id protoreflect.FieldDescriptor - fd_GenesisState_host_zone_list protoreflect.FieldDescriptor - fd_GenesisState_epoch_tracker_list protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_genesis_proto_init() - md_GenesisState = File_stride_stakeibc_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") - fd_GenesisState_port_id = md_GenesisState.Fields().ByName("port_id") - fd_GenesisState_host_zone_list = md_GenesisState.Fields().ByName("host_zone_list") - fd_GenesisState_epoch_tracker_list = md_GenesisState.Fields().ByName("epoch_tracker_list") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } - if x.PortId != "" { - value := protoreflect.ValueOfString(x.PortId) - if !f(fd_GenesisState_port_id, value) { - return - } - } - if len(x.HostZoneList) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_5_list{list: &x.HostZoneList}) - if !f(fd_GenesisState_host_zone_list, value) { - return - } - } - if len(x.EpochTrackerList) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_10_list{list: &x.EpochTrackerList}) - if !f(fd_GenesisState_epoch_tracker_list, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.GenesisState.params": - return x.Params != nil - case "stride.stakeibc.GenesisState.port_id": - return x.PortId != "" - case "stride.stakeibc.GenesisState.host_zone_list": - return len(x.HostZoneList) != 0 - case "stride.stakeibc.GenesisState.epoch_tracker_list": - return len(x.EpochTrackerList) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.GenesisState")) - } - panic(fmt.Errorf("message stride.stakeibc.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.GenesisState.params": - x.Params = nil - case "stride.stakeibc.GenesisState.port_id": - x.PortId = "" - case "stride.stakeibc.GenesisState.host_zone_list": - x.HostZoneList = nil - case "stride.stakeibc.GenesisState.epoch_tracker_list": - x.EpochTrackerList = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.GenesisState")) - } - panic(fmt.Errorf("message stride.stakeibc.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.stakeibc.GenesisState.port_id": - value := x.PortId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.GenesisState.host_zone_list": - if len(x.HostZoneList) == 0 { - return protoreflect.ValueOfList(&_GenesisState_5_list{}) - } - listValue := &_GenesisState_5_list{list: &x.HostZoneList} - return protoreflect.ValueOfList(listValue) - case "stride.stakeibc.GenesisState.epoch_tracker_list": - if len(x.EpochTrackerList) == 0 { - return protoreflect.ValueOfList(&_GenesisState_10_list{}) - } - listValue := &_GenesisState_10_list{list: &x.EpochTrackerList} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.GenesisState")) - } - panic(fmt.Errorf("message stride.stakeibc.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - case "stride.stakeibc.GenesisState.port_id": - x.PortId = value.Interface().(string) - case "stride.stakeibc.GenesisState.host_zone_list": - lv := value.List() - clv := lv.(*_GenesisState_5_list) - x.HostZoneList = *clv.list - case "stride.stakeibc.GenesisState.epoch_tracker_list": - lv := value.List() - clv := lv.(*_GenesisState_10_list) - x.EpochTrackerList = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.GenesisState")) - } - panic(fmt.Errorf("message stride.stakeibc.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "stride.stakeibc.GenesisState.host_zone_list": - if x.HostZoneList == nil { - x.HostZoneList = []*HostZone{} - } - value := &_GenesisState_5_list{list: &x.HostZoneList} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.GenesisState.epoch_tracker_list": - if x.EpochTrackerList == nil { - x.EpochTrackerList = []*EpochTracker{} - } - value := &_GenesisState_10_list{list: &x.EpochTrackerList} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.GenesisState.port_id": - panic(fmt.Errorf("field port_id of message stride.stakeibc.GenesisState is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.GenesisState")) - } - panic(fmt.Errorf("message stride.stakeibc.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.stakeibc.GenesisState.port_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.GenesisState.host_zone_list": - list := []*HostZone{} - return protoreflect.ValueOfList(&_GenesisState_5_list{list: &list}) - case "stride.stakeibc.GenesisState.epoch_tracker_list": - list := []*EpochTracker{} - return protoreflect.ValueOfList(&_GenesisState_10_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.GenesisState")) - } - panic(fmt.Errorf("message stride.stakeibc.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PortId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.HostZoneList) > 0 { - for _, e := range x.HostZoneList { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.EpochTrackerList) > 0 { - for _, e := range x.EpochTrackerList { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.EpochTrackerList) > 0 { - for iNdEx := len(x.EpochTrackerList) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.EpochTrackerList[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x52 - } - } - if len(x.HostZoneList) > 0 { - for iNdEx := len(x.HostZoneList) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.HostZoneList[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.PortId) > 0 { - i -= len(x.PortId) - copy(dAtA[i:], x.PortId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PortId))) - i-- - dAtA[i] = 0x12 - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneList = append(x.HostZoneList, &HostZone{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HostZoneList[len(x.HostZoneList)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochTrackerList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.EpochTrackerList = append(x.EpochTrackerList, &EpochTracker{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EpochTrackerList[len(x.EpochTrackerList)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the stakeibc module's genesis state. -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - // list of zones that are registered by the protocol - HostZoneList []*HostZone `protobuf:"bytes,5,rep,name=host_zone_list,json=hostZoneList,proto3" json:"host_zone_list,omitempty"` - EpochTrackerList []*EpochTracker `protobuf:"bytes,10,rep,name=epoch_tracker_list,json=epochTrackerList,proto3" json:"epoch_tracker_list,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -func (x *GenesisState) GetPortId() string { - if x != nil { - return x.PortId - } - return "" -} - -func (x *GenesisState) GetHostZoneList() []*HostZone { - if x != nil { - return x.HostZoneList - } - return nil -} - -func (x *GenesisState) GetEpochTrackerList() []*EpochTracker { - if x != nil { - return x.EpochTrackerList - } - return nil -} - -var File_stride_stakeibc_genesis_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_genesis_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x0f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, - 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x02, 0x0a, 0x0c, 0x47, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x0e, 0x68, - 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x51, 0x0a, 0x12, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x63, - 0x6b, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x10, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, - 0x72, 0x4c, 0x69, 0x73, 0x74, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, - 0x05, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, - 0x0b, 0x10, 0x0c, 0x42, 0xb7, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x0c, 0x47, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, - 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xca, 0x02, 0x0f, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xe2, 0x02, 0x1b, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_genesis_proto_rawDescOnce sync.Once - file_stride_stakeibc_genesis_proto_rawDescData = file_stride_stakeibc_genesis_proto_rawDesc -) - -func file_stride_stakeibc_genesis_proto_rawDescGZIP() []byte { - file_stride_stakeibc_genesis_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_genesis_proto_rawDescData) - }) - return file_stride_stakeibc_genesis_proto_rawDescData -} - -var file_stride_stakeibc_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_stakeibc_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: stride.stakeibc.GenesisState - (*Params)(nil), // 1: stride.stakeibc.Params - (*HostZone)(nil), // 2: stride.stakeibc.HostZone - (*EpochTracker)(nil), // 3: stride.stakeibc.EpochTracker -} -var file_stride_stakeibc_genesis_proto_depIdxs = []int32{ - 1, // 0: stride.stakeibc.GenesisState.params:type_name -> stride.stakeibc.Params - 2, // 1: stride.stakeibc.GenesisState.host_zone_list:type_name -> stride.stakeibc.HostZone - 3, // 2: stride.stakeibc.GenesisState.epoch_tracker_list:type_name -> stride.stakeibc.EpochTracker - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_genesis_proto_init() } -func file_stride_stakeibc_genesis_proto_init() { - if File_stride_stakeibc_genesis_proto != nil { - return - } - file_stride_stakeibc_params_proto_init() - file_stride_stakeibc_host_zone_proto_init() - file_stride_stakeibc_epoch_tracker_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_genesis_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_genesis_proto_depIdxs, - MessageInfos: file_stride_stakeibc_genesis_proto_msgTypes, - }.Build() - File_stride_stakeibc_genesis_proto = out.File - file_stride_stakeibc_genesis_proto_rawDesc = nil - file_stride_stakeibc_genesis_proto_goTypes = nil - file_stride_stakeibc_genesis_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/host_zone.pulsar.go b/api/stride/stakeibc/host_zone.pulsar.go deleted file mode 100644 index b28ec5b08..000000000 --- a/api/stride/stakeibc/host_zone.pulsar.go +++ /dev/null @@ -1,3405 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_CommunityPoolRebate protoreflect.MessageDescriptor - fd_CommunityPoolRebate_rebate_rate protoreflect.FieldDescriptor - fd_CommunityPoolRebate_liquid_staked_st_token_amount protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_host_zone_proto_init() - md_CommunityPoolRebate = File_stride_stakeibc_host_zone_proto.Messages().ByName("CommunityPoolRebate") - fd_CommunityPoolRebate_rebate_rate = md_CommunityPoolRebate.Fields().ByName("rebate_rate") - fd_CommunityPoolRebate_liquid_staked_st_token_amount = md_CommunityPoolRebate.Fields().ByName("liquid_staked_st_token_amount") -} - -var _ protoreflect.Message = (*fastReflection_CommunityPoolRebate)(nil) - -type fastReflection_CommunityPoolRebate CommunityPoolRebate - -func (x *CommunityPoolRebate) ProtoReflect() protoreflect.Message { - return (*fastReflection_CommunityPoolRebate)(x) -} - -func (x *CommunityPoolRebate) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_host_zone_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_CommunityPoolRebate_messageType fastReflection_CommunityPoolRebate_messageType -var _ protoreflect.MessageType = fastReflection_CommunityPoolRebate_messageType{} - -type fastReflection_CommunityPoolRebate_messageType struct{} - -func (x fastReflection_CommunityPoolRebate_messageType) Zero() protoreflect.Message { - return (*fastReflection_CommunityPoolRebate)(nil) -} -func (x fastReflection_CommunityPoolRebate_messageType) New() protoreflect.Message { - return new(fastReflection_CommunityPoolRebate) -} -func (x fastReflection_CommunityPoolRebate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_CommunityPoolRebate -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_CommunityPoolRebate) Descriptor() protoreflect.MessageDescriptor { - return md_CommunityPoolRebate -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_CommunityPoolRebate) Type() protoreflect.MessageType { - return _fastReflection_CommunityPoolRebate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_CommunityPoolRebate) New() protoreflect.Message { - return new(fastReflection_CommunityPoolRebate) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_CommunityPoolRebate) Interface() protoreflect.ProtoMessage { - return (*CommunityPoolRebate)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_CommunityPoolRebate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RebateRate != "" { - value := protoreflect.ValueOfString(x.RebateRate) - if !f(fd_CommunityPoolRebate_rebate_rate, value) { - return - } - } - if x.LiquidStakedStTokenAmount != "" { - value := protoreflect.ValueOfString(x.LiquidStakedStTokenAmount) - if !f(fd_CommunityPoolRebate_liquid_staked_st_token_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_CommunityPoolRebate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolRebate.rebate_rate": - return x.RebateRate != "" - case "stride.stakeibc.CommunityPoolRebate.liquid_staked_st_token_amount": - return x.LiquidStakedStTokenAmount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CommunityPoolRebate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolRebate.rebate_rate": - x.RebateRate = "" - case "stride.stakeibc.CommunityPoolRebate.liquid_staked_st_token_amount": - x.LiquidStakedStTokenAmount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_CommunityPoolRebate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.CommunityPoolRebate.rebate_rate": - value := x.RebateRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.CommunityPoolRebate.liquid_staked_st_token_amount": - value := x.LiquidStakedStTokenAmount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolRebate does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CommunityPoolRebate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolRebate.rebate_rate": - x.RebateRate = value.Interface().(string) - case "stride.stakeibc.CommunityPoolRebate.liquid_staked_st_token_amount": - x.LiquidStakedStTokenAmount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CommunityPoolRebate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolRebate.rebate_rate": - panic(fmt.Errorf("field rebate_rate of message stride.stakeibc.CommunityPoolRebate is not mutable")) - case "stride.stakeibc.CommunityPoolRebate.liquid_staked_st_token_amount": - panic(fmt.Errorf("field liquid_staked_st_token_amount of message stride.stakeibc.CommunityPoolRebate is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_CommunityPoolRebate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.CommunityPoolRebate.rebate_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.CommunityPoolRebate.liquid_staked_st_token_amount": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.CommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.CommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_CommunityPoolRebate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.CommunityPoolRebate", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_CommunityPoolRebate) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_CommunityPoolRebate) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_CommunityPoolRebate) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_CommunityPoolRebate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*CommunityPoolRebate) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.RebateRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LiquidStakedStTokenAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*CommunityPoolRebate) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.LiquidStakedStTokenAmount) > 0 { - i -= len(x.LiquidStakedStTokenAmount) - copy(dAtA[i:], x.LiquidStakedStTokenAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LiquidStakedStTokenAmount))) - i-- - dAtA[i] = 0x12 - } - if len(x.RebateRate) > 0 { - i -= len(x.RebateRate) - copy(dAtA[i:], x.RebateRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RebateRate))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*CommunityPoolRebate) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolRebate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CommunityPoolRebate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RebateRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RebateRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LiquidStakedStTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LiquidStakedStTokenAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_HostZone_3_list)(nil) - -type _HostZone_3_list struct { - list *[]*Validator -} - -func (x *_HostZone_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_HostZone_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_HostZone_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_HostZone_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_HostZone_3_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_HostZone_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_HostZone_3_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_HostZone_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_HostZone protoreflect.MessageDescriptor - fd_HostZone_chain_id protoreflect.FieldDescriptor - fd_HostZone_bech32prefix protoreflect.FieldDescriptor - fd_HostZone_connection_id protoreflect.FieldDescriptor - fd_HostZone_transfer_channel_id protoreflect.FieldDescriptor - fd_HostZone_ibc_denom protoreflect.FieldDescriptor - fd_HostZone_host_denom protoreflect.FieldDescriptor - fd_HostZone_unbonding_period protoreflect.FieldDescriptor - fd_HostZone_validators protoreflect.FieldDescriptor - fd_HostZone_deposit_address protoreflect.FieldDescriptor - fd_HostZone_withdrawal_ica_address protoreflect.FieldDescriptor - fd_HostZone_fee_ica_address protoreflect.FieldDescriptor - fd_HostZone_delegation_ica_address protoreflect.FieldDescriptor - fd_HostZone_redemption_ica_address protoreflect.FieldDescriptor - fd_HostZone_community_pool_deposit_ica_address protoreflect.FieldDescriptor - fd_HostZone_community_pool_return_ica_address protoreflect.FieldDescriptor - fd_HostZone_community_pool_stake_holding_address protoreflect.FieldDescriptor - fd_HostZone_community_pool_redeem_holding_address protoreflect.FieldDescriptor - fd_HostZone_community_pool_treasury_address protoreflect.FieldDescriptor - fd_HostZone_total_delegations protoreflect.FieldDescriptor - fd_HostZone_last_redemption_rate protoreflect.FieldDescriptor - fd_HostZone_redemption_rate protoreflect.FieldDescriptor - fd_HostZone_min_redemption_rate protoreflect.FieldDescriptor - fd_HostZone_max_redemption_rate protoreflect.FieldDescriptor - fd_HostZone_min_inner_redemption_rate protoreflect.FieldDescriptor - fd_HostZone_max_inner_redemption_rate protoreflect.FieldDescriptor - fd_HostZone_max_messages_per_ica_tx protoreflect.FieldDescriptor - fd_HostZone_community_pool_rebate protoreflect.FieldDescriptor - fd_HostZone_lsm_liquid_stake_enabled protoreflect.FieldDescriptor - fd_HostZone_halted protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_host_zone_proto_init() - md_HostZone = File_stride_stakeibc_host_zone_proto.Messages().ByName("HostZone") - fd_HostZone_chain_id = md_HostZone.Fields().ByName("chain_id") - fd_HostZone_bech32prefix = md_HostZone.Fields().ByName("bech32prefix") - fd_HostZone_connection_id = md_HostZone.Fields().ByName("connection_id") - fd_HostZone_transfer_channel_id = md_HostZone.Fields().ByName("transfer_channel_id") - fd_HostZone_ibc_denom = md_HostZone.Fields().ByName("ibc_denom") - fd_HostZone_host_denom = md_HostZone.Fields().ByName("host_denom") - fd_HostZone_unbonding_period = md_HostZone.Fields().ByName("unbonding_period") - fd_HostZone_validators = md_HostZone.Fields().ByName("validators") - fd_HostZone_deposit_address = md_HostZone.Fields().ByName("deposit_address") - fd_HostZone_withdrawal_ica_address = md_HostZone.Fields().ByName("withdrawal_ica_address") - fd_HostZone_fee_ica_address = md_HostZone.Fields().ByName("fee_ica_address") - fd_HostZone_delegation_ica_address = md_HostZone.Fields().ByName("delegation_ica_address") - fd_HostZone_redemption_ica_address = md_HostZone.Fields().ByName("redemption_ica_address") - fd_HostZone_community_pool_deposit_ica_address = md_HostZone.Fields().ByName("community_pool_deposit_ica_address") - fd_HostZone_community_pool_return_ica_address = md_HostZone.Fields().ByName("community_pool_return_ica_address") - fd_HostZone_community_pool_stake_holding_address = md_HostZone.Fields().ByName("community_pool_stake_holding_address") - fd_HostZone_community_pool_redeem_holding_address = md_HostZone.Fields().ByName("community_pool_redeem_holding_address") - fd_HostZone_community_pool_treasury_address = md_HostZone.Fields().ByName("community_pool_treasury_address") - fd_HostZone_total_delegations = md_HostZone.Fields().ByName("total_delegations") - fd_HostZone_last_redemption_rate = md_HostZone.Fields().ByName("last_redemption_rate") - fd_HostZone_redemption_rate = md_HostZone.Fields().ByName("redemption_rate") - fd_HostZone_min_redemption_rate = md_HostZone.Fields().ByName("min_redemption_rate") - fd_HostZone_max_redemption_rate = md_HostZone.Fields().ByName("max_redemption_rate") - fd_HostZone_min_inner_redemption_rate = md_HostZone.Fields().ByName("min_inner_redemption_rate") - fd_HostZone_max_inner_redemption_rate = md_HostZone.Fields().ByName("max_inner_redemption_rate") - fd_HostZone_max_messages_per_ica_tx = md_HostZone.Fields().ByName("max_messages_per_ica_tx") - fd_HostZone_community_pool_rebate = md_HostZone.Fields().ByName("community_pool_rebate") - fd_HostZone_lsm_liquid_stake_enabled = md_HostZone.Fields().ByName("lsm_liquid_stake_enabled") - fd_HostZone_halted = md_HostZone.Fields().ByName("halted") -} - -var _ protoreflect.Message = (*fastReflection_HostZone)(nil) - -type fastReflection_HostZone HostZone - -func (x *HostZone) ProtoReflect() protoreflect.Message { - return (*fastReflection_HostZone)(x) -} - -func (x *HostZone) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_host_zone_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_HostZone_messageType fastReflection_HostZone_messageType -var _ protoreflect.MessageType = fastReflection_HostZone_messageType{} - -type fastReflection_HostZone_messageType struct{} - -func (x fastReflection_HostZone_messageType) Zero() protoreflect.Message { - return (*fastReflection_HostZone)(nil) -} -func (x fastReflection_HostZone_messageType) New() protoreflect.Message { - return new(fastReflection_HostZone) -} -func (x fastReflection_HostZone_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_HostZone -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_HostZone) Descriptor() protoreflect.MessageDescriptor { - return md_HostZone -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_HostZone) Type() protoreflect.MessageType { - return _fastReflection_HostZone_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_HostZone) New() protoreflect.Message { - return new(fastReflection_HostZone) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_HostZone) Interface() protoreflect.ProtoMessage { - return (*HostZone)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_HostZone) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_HostZone_chain_id, value) { - return - } - } - if x.Bech32Prefix != "" { - value := protoreflect.ValueOfString(x.Bech32Prefix) - if !f(fd_HostZone_bech32prefix, value) { - return - } - } - if x.ConnectionId != "" { - value := protoreflect.ValueOfString(x.ConnectionId) - if !f(fd_HostZone_connection_id, value) { - return - } - } - if x.TransferChannelId != "" { - value := protoreflect.ValueOfString(x.TransferChannelId) - if !f(fd_HostZone_transfer_channel_id, value) { - return - } - } - if x.IbcDenom != "" { - value := protoreflect.ValueOfString(x.IbcDenom) - if !f(fd_HostZone_ibc_denom, value) { - return - } - } - if x.HostDenom != "" { - value := protoreflect.ValueOfString(x.HostDenom) - if !f(fd_HostZone_host_denom, value) { - return - } - } - if x.UnbondingPeriod != uint64(0) { - value := protoreflect.ValueOfUint64(x.UnbondingPeriod) - if !f(fd_HostZone_unbonding_period, value) { - return - } - } - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_HostZone_3_list{list: &x.Validators}) - if !f(fd_HostZone_validators, value) { - return - } - } - if x.DepositAddress != "" { - value := protoreflect.ValueOfString(x.DepositAddress) - if !f(fd_HostZone_deposit_address, value) { - return - } - } - if x.WithdrawalIcaAddress != "" { - value := protoreflect.ValueOfString(x.WithdrawalIcaAddress) - if !f(fd_HostZone_withdrawal_ica_address, value) { - return - } - } - if x.FeeIcaAddress != "" { - value := protoreflect.ValueOfString(x.FeeIcaAddress) - if !f(fd_HostZone_fee_ica_address, value) { - return - } - } - if x.DelegationIcaAddress != "" { - value := protoreflect.ValueOfString(x.DelegationIcaAddress) - if !f(fd_HostZone_delegation_ica_address, value) { - return - } - } - if x.RedemptionIcaAddress != "" { - value := protoreflect.ValueOfString(x.RedemptionIcaAddress) - if !f(fd_HostZone_redemption_ica_address, value) { - return - } - } - if x.CommunityPoolDepositIcaAddress != "" { - value := protoreflect.ValueOfString(x.CommunityPoolDepositIcaAddress) - if !f(fd_HostZone_community_pool_deposit_ica_address, value) { - return - } - } - if x.CommunityPoolReturnIcaAddress != "" { - value := protoreflect.ValueOfString(x.CommunityPoolReturnIcaAddress) - if !f(fd_HostZone_community_pool_return_ica_address, value) { - return - } - } - if x.CommunityPoolStakeHoldingAddress != "" { - value := protoreflect.ValueOfString(x.CommunityPoolStakeHoldingAddress) - if !f(fd_HostZone_community_pool_stake_holding_address, value) { - return - } - } - if x.CommunityPoolRedeemHoldingAddress != "" { - value := protoreflect.ValueOfString(x.CommunityPoolRedeemHoldingAddress) - if !f(fd_HostZone_community_pool_redeem_holding_address, value) { - return - } - } - if x.CommunityPoolTreasuryAddress != "" { - value := protoreflect.ValueOfString(x.CommunityPoolTreasuryAddress) - if !f(fd_HostZone_community_pool_treasury_address, value) { - return - } - } - if x.TotalDelegations != "" { - value := protoreflect.ValueOfString(x.TotalDelegations) - if !f(fd_HostZone_total_delegations, value) { - return - } - } - if x.LastRedemptionRate != "" { - value := protoreflect.ValueOfString(x.LastRedemptionRate) - if !f(fd_HostZone_last_redemption_rate, value) { - return - } - } - if x.RedemptionRate != "" { - value := protoreflect.ValueOfString(x.RedemptionRate) - if !f(fd_HostZone_redemption_rate, value) { - return - } - } - if x.MinRedemptionRate != "" { - value := protoreflect.ValueOfString(x.MinRedemptionRate) - if !f(fd_HostZone_min_redemption_rate, value) { - return - } - } - if x.MaxRedemptionRate != "" { - value := protoreflect.ValueOfString(x.MaxRedemptionRate) - if !f(fd_HostZone_max_redemption_rate, value) { - return - } - } - if x.MinInnerRedemptionRate != "" { - value := protoreflect.ValueOfString(x.MinInnerRedemptionRate) - if !f(fd_HostZone_min_inner_redemption_rate, value) { - return - } - } - if x.MaxInnerRedemptionRate != "" { - value := protoreflect.ValueOfString(x.MaxInnerRedemptionRate) - if !f(fd_HostZone_max_inner_redemption_rate, value) { - return - } - } - if x.MaxMessagesPerIcaTx != uint64(0) { - value := protoreflect.ValueOfUint64(x.MaxMessagesPerIcaTx) - if !f(fd_HostZone_max_messages_per_ica_tx, value) { - return - } - } - if x.CommunityPoolRebate != nil { - value := protoreflect.ValueOfMessage(x.CommunityPoolRebate.ProtoReflect()) - if !f(fd_HostZone_community_pool_rebate, value) { - return - } - } - if x.LsmLiquidStakeEnabled != false { - value := protoreflect.ValueOfBool(x.LsmLiquidStakeEnabled) - if !f(fd_HostZone_lsm_liquid_stake_enabled, value) { - return - } - } - if x.Halted != false { - value := protoreflect.ValueOfBool(x.Halted) - if !f(fd_HostZone_halted, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_HostZone) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.HostZone.chain_id": - return x.ChainId != "" - case "stride.stakeibc.HostZone.bech32prefix": - return x.Bech32Prefix != "" - case "stride.stakeibc.HostZone.connection_id": - return x.ConnectionId != "" - case "stride.stakeibc.HostZone.transfer_channel_id": - return x.TransferChannelId != "" - case "stride.stakeibc.HostZone.ibc_denom": - return x.IbcDenom != "" - case "stride.stakeibc.HostZone.host_denom": - return x.HostDenom != "" - case "stride.stakeibc.HostZone.unbonding_period": - return x.UnbondingPeriod != uint64(0) - case "stride.stakeibc.HostZone.validators": - return len(x.Validators) != 0 - case "stride.stakeibc.HostZone.deposit_address": - return x.DepositAddress != "" - case "stride.stakeibc.HostZone.withdrawal_ica_address": - return x.WithdrawalIcaAddress != "" - case "stride.stakeibc.HostZone.fee_ica_address": - return x.FeeIcaAddress != "" - case "stride.stakeibc.HostZone.delegation_ica_address": - return x.DelegationIcaAddress != "" - case "stride.stakeibc.HostZone.redemption_ica_address": - return x.RedemptionIcaAddress != "" - case "stride.stakeibc.HostZone.community_pool_deposit_ica_address": - return x.CommunityPoolDepositIcaAddress != "" - case "stride.stakeibc.HostZone.community_pool_return_ica_address": - return x.CommunityPoolReturnIcaAddress != "" - case "stride.stakeibc.HostZone.community_pool_stake_holding_address": - return x.CommunityPoolStakeHoldingAddress != "" - case "stride.stakeibc.HostZone.community_pool_redeem_holding_address": - return x.CommunityPoolRedeemHoldingAddress != "" - case "stride.stakeibc.HostZone.community_pool_treasury_address": - return x.CommunityPoolTreasuryAddress != "" - case "stride.stakeibc.HostZone.total_delegations": - return x.TotalDelegations != "" - case "stride.stakeibc.HostZone.last_redemption_rate": - return x.LastRedemptionRate != "" - case "stride.stakeibc.HostZone.redemption_rate": - return x.RedemptionRate != "" - case "stride.stakeibc.HostZone.min_redemption_rate": - return x.MinRedemptionRate != "" - case "stride.stakeibc.HostZone.max_redemption_rate": - return x.MaxRedemptionRate != "" - case "stride.stakeibc.HostZone.min_inner_redemption_rate": - return x.MinInnerRedemptionRate != "" - case "stride.stakeibc.HostZone.max_inner_redemption_rate": - return x.MaxInnerRedemptionRate != "" - case "stride.stakeibc.HostZone.max_messages_per_ica_tx": - return x.MaxMessagesPerIcaTx != uint64(0) - case "stride.stakeibc.HostZone.community_pool_rebate": - return x.CommunityPoolRebate != nil - case "stride.stakeibc.HostZone.lsm_liquid_stake_enabled": - return x.LsmLiquidStakeEnabled != false - case "stride.stakeibc.HostZone.halted": - return x.Halted != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.HostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.HostZone does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_HostZone) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.HostZone.chain_id": - x.ChainId = "" - case "stride.stakeibc.HostZone.bech32prefix": - x.Bech32Prefix = "" - case "stride.stakeibc.HostZone.connection_id": - x.ConnectionId = "" - case "stride.stakeibc.HostZone.transfer_channel_id": - x.TransferChannelId = "" - case "stride.stakeibc.HostZone.ibc_denom": - x.IbcDenom = "" - case "stride.stakeibc.HostZone.host_denom": - x.HostDenom = "" - case "stride.stakeibc.HostZone.unbonding_period": - x.UnbondingPeriod = uint64(0) - case "stride.stakeibc.HostZone.validators": - x.Validators = nil - case "stride.stakeibc.HostZone.deposit_address": - x.DepositAddress = "" - case "stride.stakeibc.HostZone.withdrawal_ica_address": - x.WithdrawalIcaAddress = "" - case "stride.stakeibc.HostZone.fee_ica_address": - x.FeeIcaAddress = "" - case "stride.stakeibc.HostZone.delegation_ica_address": - x.DelegationIcaAddress = "" - case "stride.stakeibc.HostZone.redemption_ica_address": - x.RedemptionIcaAddress = "" - case "stride.stakeibc.HostZone.community_pool_deposit_ica_address": - x.CommunityPoolDepositIcaAddress = "" - case "stride.stakeibc.HostZone.community_pool_return_ica_address": - x.CommunityPoolReturnIcaAddress = "" - case "stride.stakeibc.HostZone.community_pool_stake_holding_address": - x.CommunityPoolStakeHoldingAddress = "" - case "stride.stakeibc.HostZone.community_pool_redeem_holding_address": - x.CommunityPoolRedeemHoldingAddress = "" - case "stride.stakeibc.HostZone.community_pool_treasury_address": - x.CommunityPoolTreasuryAddress = "" - case "stride.stakeibc.HostZone.total_delegations": - x.TotalDelegations = "" - case "stride.stakeibc.HostZone.last_redemption_rate": - x.LastRedemptionRate = "" - case "stride.stakeibc.HostZone.redemption_rate": - x.RedemptionRate = "" - case "stride.stakeibc.HostZone.min_redemption_rate": - x.MinRedemptionRate = "" - case "stride.stakeibc.HostZone.max_redemption_rate": - x.MaxRedemptionRate = "" - case "stride.stakeibc.HostZone.min_inner_redemption_rate": - x.MinInnerRedemptionRate = "" - case "stride.stakeibc.HostZone.max_inner_redemption_rate": - x.MaxInnerRedemptionRate = "" - case "stride.stakeibc.HostZone.max_messages_per_ica_tx": - x.MaxMessagesPerIcaTx = uint64(0) - case "stride.stakeibc.HostZone.community_pool_rebate": - x.CommunityPoolRebate = nil - case "stride.stakeibc.HostZone.lsm_liquid_stake_enabled": - x.LsmLiquidStakeEnabled = false - case "stride.stakeibc.HostZone.halted": - x.Halted = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.HostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.HostZone does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_HostZone) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.HostZone.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.bech32prefix": - value := x.Bech32Prefix - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.connection_id": - value := x.ConnectionId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.transfer_channel_id": - value := x.TransferChannelId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.ibc_denom": - value := x.IbcDenom - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.host_denom": - value := x.HostDenom - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.unbonding_period": - value := x.UnbondingPeriod - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.HostZone.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_HostZone_3_list{}) - } - listValue := &_HostZone_3_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - case "stride.stakeibc.HostZone.deposit_address": - value := x.DepositAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.withdrawal_ica_address": - value := x.WithdrawalIcaAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.fee_ica_address": - value := x.FeeIcaAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.delegation_ica_address": - value := x.DelegationIcaAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.redemption_ica_address": - value := x.RedemptionIcaAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.community_pool_deposit_ica_address": - value := x.CommunityPoolDepositIcaAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.community_pool_return_ica_address": - value := x.CommunityPoolReturnIcaAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.community_pool_stake_holding_address": - value := x.CommunityPoolStakeHoldingAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.community_pool_redeem_holding_address": - value := x.CommunityPoolRedeemHoldingAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.community_pool_treasury_address": - value := x.CommunityPoolTreasuryAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.total_delegations": - value := x.TotalDelegations - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.last_redemption_rate": - value := x.LastRedemptionRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.redemption_rate": - value := x.RedemptionRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.min_redemption_rate": - value := x.MinRedemptionRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.max_redemption_rate": - value := x.MaxRedemptionRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.min_inner_redemption_rate": - value := x.MinInnerRedemptionRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.max_inner_redemption_rate": - value := x.MaxInnerRedemptionRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.HostZone.max_messages_per_ica_tx": - value := x.MaxMessagesPerIcaTx - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.HostZone.community_pool_rebate": - value := x.CommunityPoolRebate - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.stakeibc.HostZone.lsm_liquid_stake_enabled": - value := x.LsmLiquidStakeEnabled - return protoreflect.ValueOfBool(value) - case "stride.stakeibc.HostZone.halted": - value := x.Halted - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.HostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.HostZone does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_HostZone) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.HostZone.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.HostZone.bech32prefix": - x.Bech32Prefix = value.Interface().(string) - case "stride.stakeibc.HostZone.connection_id": - x.ConnectionId = value.Interface().(string) - case "stride.stakeibc.HostZone.transfer_channel_id": - x.TransferChannelId = value.Interface().(string) - case "stride.stakeibc.HostZone.ibc_denom": - x.IbcDenom = value.Interface().(string) - case "stride.stakeibc.HostZone.host_denom": - x.HostDenom = value.Interface().(string) - case "stride.stakeibc.HostZone.unbonding_period": - x.UnbondingPeriod = value.Uint() - case "stride.stakeibc.HostZone.validators": - lv := value.List() - clv := lv.(*_HostZone_3_list) - x.Validators = *clv.list - case "stride.stakeibc.HostZone.deposit_address": - x.DepositAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.withdrawal_ica_address": - x.WithdrawalIcaAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.fee_ica_address": - x.FeeIcaAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.delegation_ica_address": - x.DelegationIcaAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.redemption_ica_address": - x.RedemptionIcaAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.community_pool_deposit_ica_address": - x.CommunityPoolDepositIcaAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.community_pool_return_ica_address": - x.CommunityPoolReturnIcaAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.community_pool_stake_holding_address": - x.CommunityPoolStakeHoldingAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.community_pool_redeem_holding_address": - x.CommunityPoolRedeemHoldingAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.community_pool_treasury_address": - x.CommunityPoolTreasuryAddress = value.Interface().(string) - case "stride.stakeibc.HostZone.total_delegations": - x.TotalDelegations = value.Interface().(string) - case "stride.stakeibc.HostZone.last_redemption_rate": - x.LastRedemptionRate = value.Interface().(string) - case "stride.stakeibc.HostZone.redemption_rate": - x.RedemptionRate = value.Interface().(string) - case "stride.stakeibc.HostZone.min_redemption_rate": - x.MinRedemptionRate = value.Interface().(string) - case "stride.stakeibc.HostZone.max_redemption_rate": - x.MaxRedemptionRate = value.Interface().(string) - case "stride.stakeibc.HostZone.min_inner_redemption_rate": - x.MinInnerRedemptionRate = value.Interface().(string) - case "stride.stakeibc.HostZone.max_inner_redemption_rate": - x.MaxInnerRedemptionRate = value.Interface().(string) - case "stride.stakeibc.HostZone.max_messages_per_ica_tx": - x.MaxMessagesPerIcaTx = value.Uint() - case "stride.stakeibc.HostZone.community_pool_rebate": - x.CommunityPoolRebate = value.Message().Interface().(*CommunityPoolRebate) - case "stride.stakeibc.HostZone.lsm_liquid_stake_enabled": - x.LsmLiquidStakeEnabled = value.Bool() - case "stride.stakeibc.HostZone.halted": - x.Halted = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.HostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.HostZone does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_HostZone) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.HostZone.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_HostZone_3_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.HostZone.community_pool_rebate": - if x.CommunityPoolRebate == nil { - x.CommunityPoolRebate = new(CommunityPoolRebate) - } - return protoreflect.ValueOfMessage(x.CommunityPoolRebate.ProtoReflect()) - case "stride.stakeibc.HostZone.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.bech32prefix": - panic(fmt.Errorf("field bech32prefix of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.connection_id": - panic(fmt.Errorf("field connection_id of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.transfer_channel_id": - panic(fmt.Errorf("field transfer_channel_id of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.ibc_denom": - panic(fmt.Errorf("field ibc_denom of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.host_denom": - panic(fmt.Errorf("field host_denom of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.unbonding_period": - panic(fmt.Errorf("field unbonding_period of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.deposit_address": - panic(fmt.Errorf("field deposit_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.withdrawal_ica_address": - panic(fmt.Errorf("field withdrawal_ica_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.fee_ica_address": - panic(fmt.Errorf("field fee_ica_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.delegation_ica_address": - panic(fmt.Errorf("field delegation_ica_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.redemption_ica_address": - panic(fmt.Errorf("field redemption_ica_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.community_pool_deposit_ica_address": - panic(fmt.Errorf("field community_pool_deposit_ica_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.community_pool_return_ica_address": - panic(fmt.Errorf("field community_pool_return_ica_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.community_pool_stake_holding_address": - panic(fmt.Errorf("field community_pool_stake_holding_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.community_pool_redeem_holding_address": - panic(fmt.Errorf("field community_pool_redeem_holding_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.community_pool_treasury_address": - panic(fmt.Errorf("field community_pool_treasury_address of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.total_delegations": - panic(fmt.Errorf("field total_delegations of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.last_redemption_rate": - panic(fmt.Errorf("field last_redemption_rate of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.redemption_rate": - panic(fmt.Errorf("field redemption_rate of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.min_redemption_rate": - panic(fmt.Errorf("field min_redemption_rate of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.max_redemption_rate": - panic(fmt.Errorf("field max_redemption_rate of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.min_inner_redemption_rate": - panic(fmt.Errorf("field min_inner_redemption_rate of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.max_inner_redemption_rate": - panic(fmt.Errorf("field max_inner_redemption_rate of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.max_messages_per_ica_tx": - panic(fmt.Errorf("field max_messages_per_ica_tx of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.lsm_liquid_stake_enabled": - panic(fmt.Errorf("field lsm_liquid_stake_enabled of message stride.stakeibc.HostZone is not mutable")) - case "stride.stakeibc.HostZone.halted": - panic(fmt.Errorf("field halted of message stride.stakeibc.HostZone is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.HostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.HostZone does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_HostZone) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.HostZone.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.bech32prefix": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.connection_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.transfer_channel_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.ibc_denom": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.host_denom": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.unbonding_period": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.HostZone.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_HostZone_3_list{list: &list}) - case "stride.stakeibc.HostZone.deposit_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.withdrawal_ica_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.fee_ica_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.delegation_ica_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.redemption_ica_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.community_pool_deposit_ica_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.community_pool_return_ica_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.community_pool_stake_holding_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.community_pool_redeem_holding_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.community_pool_treasury_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.total_delegations": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.last_redemption_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.redemption_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.min_redemption_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.max_redemption_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.min_inner_redemption_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.max_inner_redemption_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.HostZone.max_messages_per_ica_tx": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.HostZone.community_pool_rebate": - m := new(CommunityPoolRebate) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.stakeibc.HostZone.lsm_liquid_stake_enabled": - return protoreflect.ValueOfBool(false) - case "stride.stakeibc.HostZone.halted": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.HostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.HostZone does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_HostZone) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.HostZone", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_HostZone) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_HostZone) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_HostZone) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_HostZone) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*HostZone) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Bech32Prefix) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.ConnectionId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TransferChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.IbcDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.UnbondingPeriod != 0 { - n += 2 + runtime.Sov(uint64(x.UnbondingPeriod)) - } - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.DepositAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.WithdrawalIcaAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.FeeIcaAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.DelegationIcaAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.RedemptionIcaAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.CommunityPoolDepositIcaAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.CommunityPoolReturnIcaAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.CommunityPoolStakeHoldingAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.CommunityPoolRedeemHoldingAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.CommunityPoolTreasuryAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.TotalDelegations) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LastRedemptionRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RedemptionRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinRedemptionRate) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaxRedemptionRate) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinInnerRedemptionRate) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaxInnerRedemptionRate) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.MaxMessagesPerIcaTx != 0 { - n += 2 + runtime.Sov(uint64(x.MaxMessagesPerIcaTx)) - } - if x.CommunityPoolRebate != nil { - l = options.Size(x.CommunityPoolRebate) - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.LsmLiquidStakeEnabled { - n += 3 - } - if x.Halted { - n += 3 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*HostZone) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.MaxMessagesPerIcaTx != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxMessagesPerIcaTx)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xa0 - } - if len(x.CommunityPoolTreasuryAddress) > 0 { - i -= len(x.CommunityPoolTreasuryAddress) - copy(dAtA[i:], x.CommunityPoolTreasuryAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommunityPoolTreasuryAddress))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x9a - } - if x.CommunityPoolRebate != nil { - encoded, err := options.Marshal(x.CommunityPoolRebate) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - if len(x.CommunityPoolRedeemHoldingAddress) > 0 { - i -= len(x.CommunityPoolRedeemHoldingAddress) - copy(dAtA[i:], x.CommunityPoolRedeemHoldingAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommunityPoolRedeemHoldingAddress))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x8a - } - if len(x.CommunityPoolStakeHoldingAddress) > 0 { - i -= len(x.CommunityPoolStakeHoldingAddress) - copy(dAtA[i:], x.CommunityPoolStakeHoldingAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommunityPoolStakeHoldingAddress))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - if len(x.CommunityPoolReturnIcaAddress) > 0 { - i -= len(x.CommunityPoolReturnIcaAddress) - copy(dAtA[i:], x.CommunityPoolReturnIcaAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommunityPoolReturnIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - if len(x.CommunityPoolDepositIcaAddress) > 0 { - i -= len(x.CommunityPoolDepositIcaAddress) - copy(dAtA[i:], x.CommunityPoolDepositIcaAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommunityPoolDepositIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - if len(x.MaxInnerRedemptionRate) > 0 { - i -= len(x.MaxInnerRedemptionRate) - copy(dAtA[i:], x.MaxInnerRedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxInnerRedemptionRate))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea - } - if len(x.MinInnerRedemptionRate) > 0 { - i -= len(x.MinInnerRedemptionRate) - copy(dAtA[i:], x.MinInnerRedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinInnerRedemptionRate))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - } - if x.LsmLiquidStakeEnabled { - i-- - if x.LsmLiquidStakeEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 - } - if x.UnbondingPeriod != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.UnbondingPeriod)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd0 - } - if len(x.RedemptionIcaAddress) > 0 { - i -= len(x.RedemptionIcaAddress) - copy(dAtA[i:], x.RedemptionIcaAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RedemptionIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca - } - if len(x.DelegationIcaAddress) > 0 { - i -= len(x.DelegationIcaAddress) - copy(dAtA[i:], x.DelegationIcaAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DelegationIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - if len(x.FeeIcaAddress) > 0 { - i -= len(x.FeeIcaAddress) - copy(dAtA[i:], x.FeeIcaAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - if len(x.WithdrawalIcaAddress) > 0 { - i -= len(x.WithdrawalIcaAddress) - copy(dAtA[i:], x.WithdrawalIcaAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WithdrawalIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if len(x.MaxRedemptionRate) > 0 { - i -= len(x.MaxRedemptionRate) - copy(dAtA[i:], x.MaxRedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxRedemptionRate))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if len(x.MinRedemptionRate) > 0 { - i -= len(x.MinRedemptionRate) - copy(dAtA[i:], x.MinRedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinRedemptionRate))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if x.Halted { - i-- - if x.Halted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if len(x.DepositAddress) > 0 { - i -= len(x.DepositAddress) - copy(dAtA[i:], x.DepositAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DepositAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if len(x.Bech32Prefix) > 0 { - i -= len(x.Bech32Prefix) - copy(dAtA[i:], x.Bech32Prefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if len(x.TotalDelegations) > 0 { - i -= len(x.TotalDelegations) - copy(dAtA[i:], x.TotalDelegations) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TotalDelegations))) - i-- - dAtA[i] = 0x6a - } - if len(x.TransferChannelId) > 0 { - i -= len(x.TransferChannelId) - copy(dAtA[i:], x.TransferChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TransferChannelId))) - i-- - dAtA[i] = 0x62 - } - if len(x.RedemptionRate) > 0 { - i -= len(x.RedemptionRate) - copy(dAtA[i:], x.RedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RedemptionRate))) - i-- - dAtA[i] = 0x5a - } - if len(x.LastRedemptionRate) > 0 { - i -= len(x.LastRedemptionRate) - copy(dAtA[i:], x.LastRedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LastRedemptionRate))) - i-- - dAtA[i] = 0x52 - } - if len(x.HostDenom) > 0 { - i -= len(x.HostDenom) - copy(dAtA[i:], x.HostDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenom))) - i-- - dAtA[i] = 0x4a - } - if len(x.IbcDenom) > 0 { - i -= len(x.IbcDenom) - copy(dAtA[i:], x.IbcDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcDenom))) - i-- - dAtA[i] = 0x42 - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.ConnectionId) > 0 { - i -= len(x.ConnectionId) - copy(dAtA[i:], x.ConnectionId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConnectionId))) - i-- - dAtA[i] = 0x12 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*HostZone) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HostZone: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: HostZone: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 17: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.IbcDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 26: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnbondingPeriod", wireType) - } - x.UnbondingPeriod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.UnbondingPeriod |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 18: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DepositAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 22: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WithdrawalIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.WithdrawalIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 23: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.FeeIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 24: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegationIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DelegationIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 25: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RedemptionIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RedemptionIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 30: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolDepositIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CommunityPoolDepositIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 31: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolReturnIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CommunityPoolReturnIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 32: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolStakeHoldingAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CommunityPoolStakeHoldingAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 33: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolRedeemHoldingAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CommunityPoolRedeemHoldingAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 35: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolTreasuryAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CommunityPoolTreasuryAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalDelegations", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TotalDelegations = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LastRedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 20: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinRedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 21: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxRedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 28: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinInnerRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinInnerRedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 29: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxInnerRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxInnerRedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 36: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxMessagesPerIcaTx", wireType) - } - x.MaxMessagesPerIcaTx = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxMessagesPerIcaTx |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 34: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolRebate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.CommunityPoolRebate == nil { - x.CommunityPoolRebate = &CommunityPoolRebate{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CommunityPoolRebate); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 27: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LsmLiquidStakeEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.LsmLiquidStakeEnabled = bool(v != 0) - case 19: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Halted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Halted = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/host_zone.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// CommunityPoolRebate stores the size of the community pool liquid stake -// (denominated in stTokens) and the rebate rate as a decimal -type CommunityPoolRebate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Rebate percentage as a decimal (e.g. 0.2 for 20%) - RebateRate string `protobuf:"bytes,1,opt,name=rebate_rate,json=rebateRate,proto3" json:"rebate_rate,omitempty"` - // Number of stTokens received from the community pool liquid stake - LiquidStakedStTokenAmount string `protobuf:"bytes,2,opt,name=liquid_staked_st_token_amount,json=liquidStakedStTokenAmount,proto3" json:"liquid_staked_st_token_amount,omitempty"` -} - -func (x *CommunityPoolRebate) Reset() { - *x = CommunityPoolRebate{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_host_zone_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CommunityPoolRebate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CommunityPoolRebate) ProtoMessage() {} - -// Deprecated: Use CommunityPoolRebate.ProtoReflect.Descriptor instead. -func (*CommunityPoolRebate) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_host_zone_proto_rawDescGZIP(), []int{0} -} - -func (x *CommunityPoolRebate) GetRebateRate() string { - if x != nil { - return x.RebateRate - } - return "" -} - -func (x *CommunityPoolRebate) GetLiquidStakedStTokenAmount() string { - if x != nil { - return x.LiquidStakedStTokenAmount - } - return "" -} - -// Core data structure to track liquid staking zones -type HostZone struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Chain ID of the host zone - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Bech32 prefix of host zone's address - Bech32Prefix string `protobuf:"bytes,17,opt,name=bech32prefix,proto3" json:"bech32prefix,omitempty"` - // ConnectionID from Stride to the host zone (ID is on the stride side) - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - // Transfer Channel ID from Stride to the host zone (ID is on the stride side) - TransferChannelId string `protobuf:"bytes,12,opt,name=transfer_channel_id,json=transferChannelId,proto3" json:"transfer_channel_id,omitempty"` - // ibc denom of the host zone's native token on stride - IbcDenom string `protobuf:"bytes,8,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty"` - // native denom on host zone - HostDenom string `protobuf:"bytes,9,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` - // The unbonding period in days (e.g. 21) - UnbondingPeriod uint64 `protobuf:"varint,26,opt,name=unbonding_period,json=unbondingPeriod,proto3" json:"unbonding_period,omitempty"` - // List of validators that are delegated to - Validators []*Validator `protobuf:"bytes,3,rep,name=validators,proto3" json:"validators,omitempty"` - // Address that custodies native tokens during a liquid stake - DepositAddress string `protobuf:"bytes,18,opt,name=deposit_address,json=depositAddress,proto3" json:"deposit_address,omitempty"` - // ICA Address on the host zone responsible for collecting rewards - WithdrawalIcaAddress string `protobuf:"bytes,22,opt,name=withdrawal_ica_address,json=withdrawalIcaAddress,proto3" json:"withdrawal_ica_address,omitempty"` - // ICA Address on the host zone responsible for commission - FeeIcaAddress string `protobuf:"bytes,23,opt,name=fee_ica_address,json=feeIcaAddress,proto3" json:"fee_ica_address,omitempty"` - // ICA Address on the host zone responsible for staking and unstaking - DelegationIcaAddress string `protobuf:"bytes,24,opt,name=delegation_ica_address,json=delegationIcaAddress,proto3" json:"delegation_ica_address,omitempty"` - // ICA Address that receives unstaked tokens after they've finished unbonding - RedemptionIcaAddress string `protobuf:"bytes,25,opt,name=redemption_ica_address,json=redemptionIcaAddress,proto3" json:"redemption_ica_address,omitempty"` - // ICA Address that receives tokens from a community pool to liquid stake or - // redeem In the case of a liquid stake, the community pool deposits native - // tokens In the case of a redemption, the community pool deposits stTokens - CommunityPoolDepositIcaAddress string `protobuf:"bytes,30,opt,name=community_pool_deposit_ica_address,json=communityPoolDepositIcaAddress,proto3" json:"community_pool_deposit_ica_address,omitempty"` - // ICA Address that distributes tokens back to the community pool during a - // community pool liquid stake or redeem In the case of a liquid stake, the - // return address sends back stTokens In the case of a redemption, the return - // address sends back native tokens - CommunityPoolReturnIcaAddress string `protobuf:"bytes,31,opt,name=community_pool_return_ica_address,json=communityPoolReturnIcaAddress,proto3" json:"community_pool_return_ica_address,omitempty"` - // Module account on Stride that receives native tokens from the deposit ICA - // and liquid stakes them - CommunityPoolStakeHoldingAddress string `protobuf:"bytes,32,opt,name=community_pool_stake_holding_address,json=communityPoolStakeHoldingAddress,proto3" json:"community_pool_stake_holding_address,omitempty"` - // Module account on Stride that receives stTokens from the deposit ICA and - // redeems them - CommunityPoolRedeemHoldingAddress string `protobuf:"bytes,33,opt,name=community_pool_redeem_holding_address,json=communityPoolRedeemHoldingAddress,proto3" json:"community_pool_redeem_holding_address,omitempty"` - // Optional community pool address to send tokens to after a community pool - // liquid stake or redemption If this address is empty, the tokens are sent to - // the main community pool - CommunityPoolTreasuryAddress string `protobuf:"bytes,35,opt,name=community_pool_treasury_address,json=communityPoolTreasuryAddress,proto3" json:"community_pool_treasury_address,omitempty"` - // The total delegated balance on the host zone - TotalDelegations string `protobuf:"bytes,13,opt,name=total_delegations,json=totalDelegations,proto3" json:"total_delegations,omitempty"` - // The redemption rate from the previous epoch - LastRedemptionRate string `protobuf:"bytes,10,opt,name=last_redemption_rate,json=lastRedemptionRate,proto3" json:"last_redemption_rate,omitempty"` - // The current redemption rate - RedemptionRate string `protobuf:"bytes,11,opt,name=redemption_rate,json=redemptionRate,proto3" json:"redemption_rate,omitempty"` - // The min outer redemption rate bound - controlled only be governance - // The min inner bound cannot exceed this bound - MinRedemptionRate string `protobuf:"bytes,20,opt,name=min_redemption_rate,json=minRedemptionRate,proto3" json:"min_redemption_rate,omitempty"` - // The max outer redemption rate bound - controlled only be governance - // The max inner bound cannot exceed this bound - MaxRedemptionRate string `protobuf:"bytes,21,opt,name=max_redemption_rate,json=maxRedemptionRate,proto3" json:"max_redemption_rate,omitempty"` - // The min minner redemption rate bound - controlled by the admin - // If the redemption rate exceeds this bound, the host zone is halted - MinInnerRedemptionRate string `protobuf:"bytes,28,opt,name=min_inner_redemption_rate,json=minInnerRedemptionRate,proto3" json:"min_inner_redemption_rate,omitempty"` - // The max minner redemption rate bound - controlled by the admin - // If the redemption rate exceeds this bound, the host zone is halted - MaxInnerRedemptionRate string `protobuf:"bytes,29,opt,name=max_inner_redemption_rate,json=maxInnerRedemptionRate,proto3" json:"max_inner_redemption_rate,omitempty"` - // The max number of messages that can be sent in a delegation - // or undelegation ICA tx - MaxMessagesPerIcaTx uint64 `protobuf:"varint,36,opt,name=max_messages_per_ica_tx,json=maxMessagesPerIcaTx,proto3" json:"max_messages_per_ica_tx,omitempty"` - // An optional fee rebate - // If there is no rebate for the host zone, this will be nil - CommunityPoolRebate *CommunityPoolRebate `protobuf:"bytes,34,opt,name=community_pool_rebate,json=communityPoolRebate,proto3" json:"community_pool_rebate,omitempty"` - // A boolean indicating whether the chain has LSM enabled - LsmLiquidStakeEnabled bool `protobuf:"varint,27,opt,name=lsm_liquid_stake_enabled,json=lsmLiquidStakeEnabled,proto3" json:"lsm_liquid_stake_enabled,omitempty"` - // A boolean indicating whether the chain is currently halted - Halted bool `protobuf:"varint,19,opt,name=halted,proto3" json:"halted,omitempty"` -} - -func (x *HostZone) Reset() { - *x = HostZone{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_host_zone_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HostZone) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HostZone) ProtoMessage() {} - -// Deprecated: Use HostZone.ProtoReflect.Descriptor instead. -func (*HostZone) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_host_zone_proto_rawDescGZIP(), []int{1} -} - -func (x *HostZone) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *HostZone) GetBech32Prefix() string { - if x != nil { - return x.Bech32Prefix - } - return "" -} - -func (x *HostZone) GetConnectionId() string { - if x != nil { - return x.ConnectionId - } - return "" -} - -func (x *HostZone) GetTransferChannelId() string { - if x != nil { - return x.TransferChannelId - } - return "" -} - -func (x *HostZone) GetIbcDenom() string { - if x != nil { - return x.IbcDenom - } - return "" -} - -func (x *HostZone) GetHostDenom() string { - if x != nil { - return x.HostDenom - } - return "" -} - -func (x *HostZone) GetUnbondingPeriod() uint64 { - if x != nil { - return x.UnbondingPeriod - } - return 0 -} - -func (x *HostZone) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -func (x *HostZone) GetDepositAddress() string { - if x != nil { - return x.DepositAddress - } - return "" -} - -func (x *HostZone) GetWithdrawalIcaAddress() string { - if x != nil { - return x.WithdrawalIcaAddress - } - return "" -} - -func (x *HostZone) GetFeeIcaAddress() string { - if x != nil { - return x.FeeIcaAddress - } - return "" -} - -func (x *HostZone) GetDelegationIcaAddress() string { - if x != nil { - return x.DelegationIcaAddress - } - return "" -} - -func (x *HostZone) GetRedemptionIcaAddress() string { - if x != nil { - return x.RedemptionIcaAddress - } - return "" -} - -func (x *HostZone) GetCommunityPoolDepositIcaAddress() string { - if x != nil { - return x.CommunityPoolDepositIcaAddress - } - return "" -} - -func (x *HostZone) GetCommunityPoolReturnIcaAddress() string { - if x != nil { - return x.CommunityPoolReturnIcaAddress - } - return "" -} - -func (x *HostZone) GetCommunityPoolStakeHoldingAddress() string { - if x != nil { - return x.CommunityPoolStakeHoldingAddress - } - return "" -} - -func (x *HostZone) GetCommunityPoolRedeemHoldingAddress() string { - if x != nil { - return x.CommunityPoolRedeemHoldingAddress - } - return "" -} - -func (x *HostZone) GetCommunityPoolTreasuryAddress() string { - if x != nil { - return x.CommunityPoolTreasuryAddress - } - return "" -} - -func (x *HostZone) GetTotalDelegations() string { - if x != nil { - return x.TotalDelegations - } - return "" -} - -func (x *HostZone) GetLastRedemptionRate() string { - if x != nil { - return x.LastRedemptionRate - } - return "" -} - -func (x *HostZone) GetRedemptionRate() string { - if x != nil { - return x.RedemptionRate - } - return "" -} - -func (x *HostZone) GetMinRedemptionRate() string { - if x != nil { - return x.MinRedemptionRate - } - return "" -} - -func (x *HostZone) GetMaxRedemptionRate() string { - if x != nil { - return x.MaxRedemptionRate - } - return "" -} - -func (x *HostZone) GetMinInnerRedemptionRate() string { - if x != nil { - return x.MinInnerRedemptionRate - } - return "" -} - -func (x *HostZone) GetMaxInnerRedemptionRate() string { - if x != nil { - return x.MaxInnerRedemptionRate - } - return "" -} - -func (x *HostZone) GetMaxMessagesPerIcaTx() uint64 { - if x != nil { - return x.MaxMessagesPerIcaTx - } - return 0 -} - -func (x *HostZone) GetCommunityPoolRebate() *CommunityPoolRebate { - if x != nil { - return x.CommunityPoolRebate - } - return nil -} - -func (x *HostZone) GetLsmLiquidStakeEnabled() bool { - if x != nil { - return x.LsmLiquidStakeEnabled - } - return false -} - -func (x *HostZone) GetHalted() bool { - if x != nil { - return x.Halted - } - return false -} - -var File_stride_stakeibc_host_zone_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_host_zone_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x1a, 0x1f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x0b, - 0x72, 0x65, 0x62, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x23, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x72, 0x65, 0x62, 0x61, 0x74, 0x65, 0x52, 0x61, - 0x74, 0x65, 0x12, 0x5f, 0x0a, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x19, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x53, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x22, 0xf1, 0x10, 0x0a, 0x08, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, - 0x65, 0x63, 0x68, 0x33, 0x32, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x11, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, - 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, - 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x62, 0x63, 0x5f, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x62, 0x63, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, - 0x12, 0x29, 0x0a, 0x10, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x75, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x16, 0x77, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x5f, 0x69, 0x63, 0x61, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x49, 0x63, 0x61, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x40, 0x0a, 0x0f, 0x66, 0x65, - 0x65, 0x5f, 0x69, 0x63, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x17, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x66, - 0x65, 0x65, 0x49, 0x63, 0x61, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x16, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x63, 0x61, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x63, 0x61, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x16, - 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x63, 0x61, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x63, 0x61, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x64, 0x0a, 0x22, - 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x69, 0x63, 0x61, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x1e, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, - 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x63, 0x61, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x62, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, - 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x69, 0x63, 0x61, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x1d, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x49, 0x63, 0x61, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x68, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x68, - 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x20, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x20, - 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x48, 0x6f, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x6a, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, - 0x6f, 0x6c, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x5f, 0x68, 0x6f, 0x6c, 0x64, 0x69, 0x6e, - 0x67, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x21, 0x63, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x48, 0x6f, - 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5f, 0x0a, 0x1f, - 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x74, - 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x23, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x54, 0x72, - 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4a, 0x0a, - 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x44, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x63, 0x0a, 0x14, 0x6c, 0x61, 0x73, - 0x74, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, - 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x6c, 0x61, 0x73, 0x74, - 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x5a, - 0x0a, 0x0f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, - 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0e, 0x72, 0x65, 0x64, 0x65, - 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x61, 0x0a, 0x13, 0x6d, 0x69, - 0x6e, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, - 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, - 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x52, - 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x61, 0x0a, - 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, - 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, - 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x11, 0x6d, - 0x61, 0x78, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, - 0x12, 0x6c, 0x0a, 0x19, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x72, 0x65, - 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x1c, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, - 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x6e, 0x65, 0x72, - 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x6c, - 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x64, 0x65, - 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x1d, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, - 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x17, - 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, - 0x5f, 0x69, 0x63, 0x61, 0x5f, 0x74, 0x78, 0x18, 0x24, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6d, - 0x61, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x50, 0x65, 0x72, 0x49, 0x63, 0x61, - 0x54, 0x78, 0x12, 0x58, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, - 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x72, 0x65, 0x62, 0x61, 0x74, 0x65, 0x18, 0x22, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, - 0x6c, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x52, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x18, - 0x6c, 0x73, 0x6d, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, - 0x6c, 0x73, 0x6d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6c, 0x74, 0x65, 0x64, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x61, 0x6c, 0x74, 0x65, 0x64, 0x4a, 0x04, 0x08, - 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, - 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x0e, 0x10, 0x0f, 0x4a, 0x04, 0x08, 0x0f, 0x10, - 0x10, 0x4a, 0x04, 0x08, 0x10, 0x10, 0x11, 0x42, 0xb8, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, - 0x0d, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, - 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0f, - 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xca, - 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x10, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_host_zone_proto_rawDescOnce sync.Once - file_stride_stakeibc_host_zone_proto_rawDescData = file_stride_stakeibc_host_zone_proto_rawDesc -) - -func file_stride_stakeibc_host_zone_proto_rawDescGZIP() []byte { - file_stride_stakeibc_host_zone_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_host_zone_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_host_zone_proto_rawDescData) - }) - return file_stride_stakeibc_host_zone_proto_rawDescData -} - -var file_stride_stakeibc_host_zone_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_stride_stakeibc_host_zone_proto_goTypes = []interface{}{ - (*CommunityPoolRebate)(nil), // 0: stride.stakeibc.CommunityPoolRebate - (*HostZone)(nil), // 1: stride.stakeibc.HostZone - (*Validator)(nil), // 2: stride.stakeibc.Validator -} -var file_stride_stakeibc_host_zone_proto_depIdxs = []int32{ - 2, // 0: stride.stakeibc.HostZone.validators:type_name -> stride.stakeibc.Validator - 0, // 1: stride.stakeibc.HostZone.community_pool_rebate:type_name -> stride.stakeibc.CommunityPoolRebate - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_host_zone_proto_init() } -func file_stride_stakeibc_host_zone_proto_init() { - if File_stride_stakeibc_host_zone_proto != nil { - return - } - file_stride_stakeibc_validator_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_host_zone_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CommunityPoolRebate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_host_zone_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HostZone); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_host_zone_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_host_zone_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_host_zone_proto_depIdxs, - MessageInfos: file_stride_stakeibc_host_zone_proto_msgTypes, - }.Build() - File_stride_stakeibc_host_zone_proto = out.File - file_stride_stakeibc_host_zone_proto_rawDesc = nil - file_stride_stakeibc_host_zone_proto_goTypes = nil - file_stride_stakeibc_host_zone_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/ica_account.pulsar.go b/api/stride/stakeibc/ica_account.pulsar.go deleted file mode 100644 index 238c790d6..000000000 --- a/api/stride/stakeibc/ica_account.pulsar.go +++ /dev/null @@ -1,854 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_ICAAccount protoreflect.MessageDescriptor - fd_ICAAccount_chain_id protoreflect.FieldDescriptor - fd_ICAAccount_type protoreflect.FieldDescriptor - fd_ICAAccount_connection_id protoreflect.FieldDescriptor - fd_ICAAccount_address protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_ica_account_proto_init() - md_ICAAccount = File_stride_stakeibc_ica_account_proto.Messages().ByName("ICAAccount") - fd_ICAAccount_chain_id = md_ICAAccount.Fields().ByName("chain_id") - fd_ICAAccount_type = md_ICAAccount.Fields().ByName("type") - fd_ICAAccount_connection_id = md_ICAAccount.Fields().ByName("connection_id") - fd_ICAAccount_address = md_ICAAccount.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_ICAAccount)(nil) - -type fastReflection_ICAAccount ICAAccount - -func (x *ICAAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_ICAAccount)(x) -} - -func (x *ICAAccount) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_ica_account_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ICAAccount_messageType fastReflection_ICAAccount_messageType -var _ protoreflect.MessageType = fastReflection_ICAAccount_messageType{} - -type fastReflection_ICAAccount_messageType struct{} - -func (x fastReflection_ICAAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_ICAAccount)(nil) -} -func (x fastReflection_ICAAccount_messageType) New() protoreflect.Message { - return new(fastReflection_ICAAccount) -} -func (x fastReflection_ICAAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ICAAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ICAAccount) Descriptor() protoreflect.MessageDescriptor { - return md_ICAAccount -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ICAAccount) Type() protoreflect.MessageType { - return _fastReflection_ICAAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ICAAccount) New() protoreflect.Message { - return new(fastReflection_ICAAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ICAAccount) Interface() protoreflect.ProtoMessage { - return (*ICAAccount)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ICAAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_ICAAccount_chain_id, value) { - return - } - } - if x.Type_ != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) - if !f(fd_ICAAccount_type, value) { - return - } - } - if x.ConnectionId != "" { - value := protoreflect.ValueOfString(x.ConnectionId) - if !f(fd_ICAAccount_connection_id, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_ICAAccount_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ICAAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.ICAAccount.chain_id": - return x.ChainId != "" - case "stride.stakeibc.ICAAccount.type": - return x.Type_ != 0 - case "stride.stakeibc.ICAAccount.connection_id": - return x.ConnectionId != "" - case "stride.stakeibc.ICAAccount.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ICAAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.ICAAccount does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ICAAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.ICAAccount.chain_id": - x.ChainId = "" - case "stride.stakeibc.ICAAccount.type": - x.Type_ = 0 - case "stride.stakeibc.ICAAccount.connection_id": - x.ConnectionId = "" - case "stride.stakeibc.ICAAccount.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ICAAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.ICAAccount does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ICAAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.ICAAccount.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.ICAAccount.type": - value := x.Type_ - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "stride.stakeibc.ICAAccount.connection_id": - value := x.ConnectionId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.ICAAccount.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ICAAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.ICAAccount does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ICAAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.ICAAccount.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.ICAAccount.type": - x.Type_ = (ICAAccountType)(value.Enum()) - case "stride.stakeibc.ICAAccount.connection_id": - x.ConnectionId = value.Interface().(string) - case "stride.stakeibc.ICAAccount.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ICAAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.ICAAccount does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ICAAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ICAAccount.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.ICAAccount is not mutable")) - case "stride.stakeibc.ICAAccount.type": - panic(fmt.Errorf("field type of message stride.stakeibc.ICAAccount is not mutable")) - case "stride.stakeibc.ICAAccount.connection_id": - panic(fmt.Errorf("field connection_id of message stride.stakeibc.ICAAccount is not mutable")) - case "stride.stakeibc.ICAAccount.address": - panic(fmt.Errorf("field address of message stride.stakeibc.ICAAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ICAAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.ICAAccount does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ICAAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ICAAccount.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.ICAAccount.type": - return protoreflect.ValueOfEnum(0) - case "stride.stakeibc.ICAAccount.connection_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.ICAAccount.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ICAAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.ICAAccount does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ICAAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.ICAAccount", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ICAAccount) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ICAAccount) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ICAAccount) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ICAAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ICAAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Type_ != 0 { - n += 1 + runtime.Sov(uint64(x.Type_)) - } - l = len(x.ConnectionId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ICAAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x22 - } - if len(x.ConnectionId) > 0 { - i -= len(x.ConnectionId) - copy(dAtA[i:], x.ConnectionId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConnectionId))) - i-- - dAtA[i] = 0x1a - } - if x.Type_ != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) - i-- - dAtA[i] = 0x10 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ICAAccount) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ICAAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ICAAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) - } - x.Type_ = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Type_ |= ICAAccountType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/ica_account.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ICAAccountType int32 - -const ( - ICAAccountType_DELEGATION ICAAccountType = 0 - ICAAccountType_FEE ICAAccountType = 1 - ICAAccountType_WITHDRAWAL ICAAccountType = 2 - ICAAccountType_REDEMPTION ICAAccountType = 3 - ICAAccountType_COMMUNITY_POOL_DEPOSIT ICAAccountType = 4 - ICAAccountType_COMMUNITY_POOL_RETURN ICAAccountType = 5 - ICAAccountType_CONVERTER_UNWIND ICAAccountType = 6 - ICAAccountType_CONVERTER_TRADE ICAAccountType = 7 -) - -// Enum value maps for ICAAccountType. -var ( - ICAAccountType_name = map[int32]string{ - 0: "DELEGATION", - 1: "FEE", - 2: "WITHDRAWAL", - 3: "REDEMPTION", - 4: "COMMUNITY_POOL_DEPOSIT", - 5: "COMMUNITY_POOL_RETURN", - 6: "CONVERTER_UNWIND", - 7: "CONVERTER_TRADE", - } - ICAAccountType_value = map[string]int32{ - "DELEGATION": 0, - "FEE": 1, - "WITHDRAWAL": 2, - "REDEMPTION": 3, - "COMMUNITY_POOL_DEPOSIT": 4, - "COMMUNITY_POOL_RETURN": 5, - "CONVERTER_UNWIND": 6, - "CONVERTER_TRADE": 7, - } -) - -func (x ICAAccountType) Enum() *ICAAccountType { - p := new(ICAAccountType) - *p = x - return p -} - -func (x ICAAccountType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ICAAccountType) Descriptor() protoreflect.EnumDescriptor { - return file_stride_stakeibc_ica_account_proto_enumTypes[0].Descriptor() -} - -func (ICAAccountType) Type() protoreflect.EnumType { - return &file_stride_stakeibc_ica_account_proto_enumTypes[0] -} - -func (x ICAAccountType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ICAAccountType.Descriptor instead. -func (ICAAccountType) EnumDescriptor() ([]byte, []int) { - return file_stride_stakeibc_ica_account_proto_rawDescGZIP(), []int{0} -} - -type ICAAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Type_ ICAAccountType `protobuf:"varint,2,opt,name=type,proto3,enum=stride.stakeibc.ICAAccountType" json:"type,omitempty"` - ConnectionId string `protobuf:"bytes,3,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *ICAAccount) Reset() { - *x = ICAAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_ica_account_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ICAAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ICAAccount) ProtoMessage() {} - -// Deprecated: Use ICAAccount.ProtoReflect.Descriptor instead. -func (*ICAAccount) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_ica_account_proto_rawDescGZIP(), []int{0} -} - -func (x *ICAAccount) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *ICAAccount) GetType_() ICAAccountType { - if x != nil { - return x.Type_ - } - return ICAAccountType_DELEGATION -} - -func (x *ICAAccount) GetConnectionId() string { - if x != nil { - return x.ConnectionId - } - return "" -} - -func (x *ICAAccount) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -var File_stride_stakeibc_ica_account_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_ica_account_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x69, 0x63, 0x61, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x22, 0x9b, 0x01, 0x0a, 0x0a, 0x49, 0x43, 0x41, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x33, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x49, - 0x43, 0x41, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x2a, 0xab, 0x01, 0x0a, 0x0e, 0x49, 0x43, 0x41, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x45, 0x45, 0x10, 0x01, 0x12, 0x0e, - 0x0a, 0x0a, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x0e, - 0x0a, 0x0a, 0x52, 0x45, 0x44, 0x45, 0x4d, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x1a, - 0x0a, 0x16, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, - 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, - 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x4f, 0x4f, 0x4c, 0x5f, 0x52, 0x45, 0x54, - 0x55, 0x52, 0x4e, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, - 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x57, 0x49, 0x4e, 0x44, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x43, - 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x45, 0x52, 0x5f, 0x54, 0x52, 0x41, 0x44, 0x45, 0x10, 0x07, - 0x42, 0xba, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x0f, 0x49, 0x63, 0x61, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, - 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xca, 0x02, 0x0f, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xe2, 0x02, 0x1b, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_ica_account_proto_rawDescOnce sync.Once - file_stride_stakeibc_ica_account_proto_rawDescData = file_stride_stakeibc_ica_account_proto_rawDesc -) - -func file_stride_stakeibc_ica_account_proto_rawDescGZIP() []byte { - file_stride_stakeibc_ica_account_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_ica_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_ica_account_proto_rawDescData) - }) - return file_stride_stakeibc_ica_account_proto_rawDescData -} - -var file_stride_stakeibc_ica_account_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_stride_stakeibc_ica_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_stakeibc_ica_account_proto_goTypes = []interface{}{ - (ICAAccountType)(0), // 0: stride.stakeibc.ICAAccountType - (*ICAAccount)(nil), // 1: stride.stakeibc.ICAAccount -} -var file_stride_stakeibc_ica_account_proto_depIdxs = []int32{ - 0, // 0: stride.stakeibc.ICAAccount.type:type_name -> stride.stakeibc.ICAAccountType - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_ica_account_proto_init() } -func file_stride_stakeibc_ica_account_proto_init() { - if File_stride_stakeibc_ica_account_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_ica_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ICAAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_ica_account_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_ica_account_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_ica_account_proto_depIdxs, - EnumInfos: file_stride_stakeibc_ica_account_proto_enumTypes, - MessageInfos: file_stride_stakeibc_ica_account_proto_msgTypes, - }.Build() - File_stride_stakeibc_ica_account_proto = out.File - file_stride_stakeibc_ica_account_proto_rawDesc = nil - file_stride_stakeibc_ica_account_proto_goTypes = nil - file_stride_stakeibc_ica_account_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/packet.pulsar.go b/api/stride/stakeibc/packet.pulsar.go deleted file mode 100644 index e5b966a85..000000000 --- a/api/stride/stakeibc/packet.pulsar.go +++ /dev/null @@ -1,1043 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_StakeibcPacketData protoreflect.MessageDescriptor - fd_StakeibcPacketData_no_data protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_packet_proto_init() - md_StakeibcPacketData = File_stride_stakeibc_packet_proto.Messages().ByName("StakeibcPacketData") - fd_StakeibcPacketData_no_data = md_StakeibcPacketData.Fields().ByName("no_data") -} - -var _ protoreflect.Message = (*fastReflection_StakeibcPacketData)(nil) - -type fastReflection_StakeibcPacketData StakeibcPacketData - -func (x *StakeibcPacketData) ProtoReflect() protoreflect.Message { - return (*fastReflection_StakeibcPacketData)(x) -} - -func (x *StakeibcPacketData) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_packet_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_StakeibcPacketData_messageType fastReflection_StakeibcPacketData_messageType -var _ protoreflect.MessageType = fastReflection_StakeibcPacketData_messageType{} - -type fastReflection_StakeibcPacketData_messageType struct{} - -func (x fastReflection_StakeibcPacketData_messageType) Zero() protoreflect.Message { - return (*fastReflection_StakeibcPacketData)(nil) -} -func (x fastReflection_StakeibcPacketData_messageType) New() protoreflect.Message { - return new(fastReflection_StakeibcPacketData) -} -func (x fastReflection_StakeibcPacketData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_StakeibcPacketData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_StakeibcPacketData) Descriptor() protoreflect.MessageDescriptor { - return md_StakeibcPacketData -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_StakeibcPacketData) Type() protoreflect.MessageType { - return _fastReflection_StakeibcPacketData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_StakeibcPacketData) New() protoreflect.Message { - return new(fastReflection_StakeibcPacketData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_StakeibcPacketData) Interface() protoreflect.ProtoMessage { - return (*StakeibcPacketData)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_StakeibcPacketData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Packet != nil { - switch o := x.Packet.(type) { - case *StakeibcPacketData_NoData: - v := o.NoData - value := protoreflect.ValueOfMessage(v.ProtoReflect()) - if !f(fd_StakeibcPacketData_no_data, value) { - return - } - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_StakeibcPacketData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.StakeibcPacketData.no_data": - if x.Packet == nil { - return false - } else if _, ok := x.Packet.(*StakeibcPacketData_NoData); ok { - return true - } else { - return false - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.StakeibcPacketData")) - } - panic(fmt.Errorf("message stride.stakeibc.StakeibcPacketData does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StakeibcPacketData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.StakeibcPacketData.no_data": - x.Packet = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.StakeibcPacketData")) - } - panic(fmt.Errorf("message stride.stakeibc.StakeibcPacketData does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_StakeibcPacketData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.StakeibcPacketData.no_data": - if x.Packet == nil { - return protoreflect.ValueOfMessage((*NoData)(nil).ProtoReflect()) - } else if v, ok := x.Packet.(*StakeibcPacketData_NoData); ok { - return protoreflect.ValueOfMessage(v.NoData.ProtoReflect()) - } else { - return protoreflect.ValueOfMessage((*NoData)(nil).ProtoReflect()) - } - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.StakeibcPacketData")) - } - panic(fmt.Errorf("message stride.stakeibc.StakeibcPacketData does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StakeibcPacketData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.StakeibcPacketData.no_data": - cv := value.Message().Interface().(*NoData) - x.Packet = &StakeibcPacketData_NoData{NoData: cv} - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.StakeibcPacketData")) - } - panic(fmt.Errorf("message stride.stakeibc.StakeibcPacketData does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StakeibcPacketData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.StakeibcPacketData.no_data": - if x.Packet == nil { - value := &NoData{} - oneofValue := &StakeibcPacketData_NoData{NoData: value} - x.Packet = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - switch m := x.Packet.(type) { - case *StakeibcPacketData_NoData: - return protoreflect.ValueOfMessage(m.NoData.ProtoReflect()) - default: - value := &NoData{} - oneofValue := &StakeibcPacketData_NoData{NoData: value} - x.Packet = oneofValue - return protoreflect.ValueOfMessage(value.ProtoReflect()) - } - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.StakeibcPacketData")) - } - panic(fmt.Errorf("message stride.stakeibc.StakeibcPacketData does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_StakeibcPacketData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.StakeibcPacketData.no_data": - value := &NoData{} - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.StakeibcPacketData")) - } - panic(fmt.Errorf("message stride.stakeibc.StakeibcPacketData does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_StakeibcPacketData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - case "stride.stakeibc.StakeibcPacketData.packet": - if x.Packet == nil { - return nil - } - switch x.Packet.(type) { - case *StakeibcPacketData_NoData: - return x.Descriptor().Fields().ByName("no_data") - } - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.StakeibcPacketData", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_StakeibcPacketData) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StakeibcPacketData) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_StakeibcPacketData) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_StakeibcPacketData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*StakeibcPacketData) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - switch x := x.Packet.(type) { - case *StakeibcPacketData_NoData: - if x == nil { - break - } - l = options.Size(x.NoData) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*StakeibcPacketData) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - switch x := x.Packet.(type) { - case *StakeibcPacketData_NoData: - encoded, err := options.Marshal(x.NoData) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*StakeibcPacketData) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StakeibcPacketData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StakeibcPacketData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NoData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v := &NoData{} - if err := options.Unmarshal(dAtA[iNdEx:postIndex], v); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - x.Packet = &StakeibcPacketData_NoData{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_NoData protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_packet_proto_init() - md_NoData = File_stride_stakeibc_packet_proto.Messages().ByName("NoData") -} - -var _ protoreflect.Message = (*fastReflection_NoData)(nil) - -type fastReflection_NoData NoData - -func (x *NoData) ProtoReflect() protoreflect.Message { - return (*fastReflection_NoData)(x) -} - -func (x *NoData) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_packet_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_NoData_messageType fastReflection_NoData_messageType -var _ protoreflect.MessageType = fastReflection_NoData_messageType{} - -type fastReflection_NoData_messageType struct{} - -func (x fastReflection_NoData_messageType) Zero() protoreflect.Message { - return (*fastReflection_NoData)(nil) -} -func (x fastReflection_NoData_messageType) New() protoreflect.Message { - return new(fastReflection_NoData) -} -func (x fastReflection_NoData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_NoData -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_NoData) Descriptor() protoreflect.MessageDescriptor { - return md_NoData -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_NoData) Type() protoreflect.MessageType { - return _fastReflection_NoData_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_NoData) New() protoreflect.Message { - return new(fastReflection_NoData) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_NoData) Interface() protoreflect.ProtoMessage { - return (*NoData)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_NoData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_NoData) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.NoData")) - } - panic(fmt.Errorf("message stride.stakeibc.NoData does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoData) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.NoData")) - } - panic(fmt.Errorf("message stride.stakeibc.NoData does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_NoData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.NoData")) - } - panic(fmt.Errorf("message stride.stakeibc.NoData does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.NoData")) - } - panic(fmt.Errorf("message stride.stakeibc.NoData does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.NoData")) - } - panic(fmt.Errorf("message stride.stakeibc.NoData does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_NoData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.NoData")) - } - panic(fmt.Errorf("message stride.stakeibc.NoData does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_NoData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.NoData", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_NoData) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_NoData) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_NoData) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_NoData) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*NoData) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*NoData) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*NoData) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NoData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: NoData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/packet.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type StakeibcPacketData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Packet: - // - // *StakeibcPacketData_NoData - Packet isStakeibcPacketData_Packet `protobuf_oneof:"packet"` -} - -func (x *StakeibcPacketData) Reset() { - *x = StakeibcPacketData{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_packet_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StakeibcPacketData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StakeibcPacketData) ProtoMessage() {} - -// Deprecated: Use StakeibcPacketData.ProtoReflect.Descriptor instead. -func (*StakeibcPacketData) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_packet_proto_rawDescGZIP(), []int{0} -} - -func (x *StakeibcPacketData) GetPacket() isStakeibcPacketData_Packet { - if x != nil { - return x.Packet - } - return nil -} - -func (x *StakeibcPacketData) GetNoData() *NoData { - if x, ok := x.GetPacket().(*StakeibcPacketData_NoData); ok { - return x.NoData - } - return nil -} - -type isStakeibcPacketData_Packet interface { - isStakeibcPacketData_Packet() -} - -type StakeibcPacketData_NoData struct { - NoData *NoData `protobuf:"bytes,1,opt,name=no_data,json=noData,proto3,oneof"` // this line is used by starport scaffolding # ibc/packet/proto/field -} - -func (*StakeibcPacketData_NoData) isStakeibcPacketData_Packet() {} - -type NoData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *NoData) Reset() { - *x = NoData{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_packet_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *NoData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*NoData) ProtoMessage() {} - -// Deprecated: Use NoData.ProtoReflect.Descriptor instead. -func (*NoData) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_packet_proto_rawDescGZIP(), []int{1} -} - -var File_stride_stakeibc_packet_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_packet_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x22, - 0x52, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x50, 0x61, 0x63, 0x6b, 0x65, - 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x32, 0x0a, 0x07, 0x6e, 0x6f, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x48, - 0x00, 0x52, 0x06, 0x6e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x22, 0x08, 0x0a, 0x06, 0x4e, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x42, 0xb6, 0x01, - 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x0b, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, - 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x53, - 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0xca, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_packet_proto_rawDescOnce sync.Once - file_stride_stakeibc_packet_proto_rawDescData = file_stride_stakeibc_packet_proto_rawDesc -) - -func file_stride_stakeibc_packet_proto_rawDescGZIP() []byte { - file_stride_stakeibc_packet_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_packet_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_packet_proto_rawDescData) - }) - return file_stride_stakeibc_packet_proto_rawDescData -} - -var file_stride_stakeibc_packet_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_stride_stakeibc_packet_proto_goTypes = []interface{}{ - (*StakeibcPacketData)(nil), // 0: stride.stakeibc.StakeibcPacketData - (*NoData)(nil), // 1: stride.stakeibc.NoData -} -var file_stride_stakeibc_packet_proto_depIdxs = []int32{ - 1, // 0: stride.stakeibc.StakeibcPacketData.no_data:type_name -> stride.stakeibc.NoData - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_packet_proto_init() } -func file_stride_stakeibc_packet_proto_init() { - if File_stride_stakeibc_packet_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_packet_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakeibcPacketData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_packet_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NoData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_stride_stakeibc_packet_proto_msgTypes[0].OneofWrappers = []interface{}{ - (*StakeibcPacketData_NoData)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_packet_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_packet_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_packet_proto_depIdxs, - MessageInfos: file_stride_stakeibc_packet_proto_msgTypes, - }.Build() - File_stride_stakeibc_packet_proto = out.File - file_stride_stakeibc_packet_proto_rawDesc = nil - file_stride_stakeibc_packet_proto_goTypes = nil - file_stride_stakeibc_packet_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/params.pulsar.go b/api/stride/stakeibc/params.pulsar.go deleted file mode 100644 index 754db6f24..000000000 --- a/api/stride/stakeibc/params.pulsar.go +++ /dev/null @@ -1,1457 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_rewards_interval protoreflect.FieldDescriptor - fd_Params_delegate_interval protoreflect.FieldDescriptor - fd_Params_deposit_interval protoreflect.FieldDescriptor - fd_Params_redemption_rate_interval protoreflect.FieldDescriptor - fd_Params_stride_commission protoreflect.FieldDescriptor - fd_Params_reinvest_interval protoreflect.FieldDescriptor - fd_Params_ica_timeout_nanos protoreflect.FieldDescriptor - fd_Params_buffer_size protoreflect.FieldDescriptor - fd_Params_ibc_timeout_blocks protoreflect.FieldDescriptor - fd_Params_fee_transfer_timeout_nanos protoreflect.FieldDescriptor - fd_Params_max_stake_ica_calls_per_epoch protoreflect.FieldDescriptor - fd_Params_default_min_redemption_rate_threshold protoreflect.FieldDescriptor - fd_Params_default_max_redemption_rate_threshold protoreflect.FieldDescriptor - fd_Params_ibc_transfer_timeout_nanos protoreflect.FieldDescriptor - fd_Params_validator_slash_query_threshold protoreflect.FieldDescriptor - fd_Params_validator_weight_cap protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_params_proto_init() - md_Params = File_stride_stakeibc_params_proto.Messages().ByName("Params") - fd_Params_rewards_interval = md_Params.Fields().ByName("rewards_interval") - fd_Params_delegate_interval = md_Params.Fields().ByName("delegate_interval") - fd_Params_deposit_interval = md_Params.Fields().ByName("deposit_interval") - fd_Params_redemption_rate_interval = md_Params.Fields().ByName("redemption_rate_interval") - fd_Params_stride_commission = md_Params.Fields().ByName("stride_commission") - fd_Params_reinvest_interval = md_Params.Fields().ByName("reinvest_interval") - fd_Params_ica_timeout_nanos = md_Params.Fields().ByName("ica_timeout_nanos") - fd_Params_buffer_size = md_Params.Fields().ByName("buffer_size") - fd_Params_ibc_timeout_blocks = md_Params.Fields().ByName("ibc_timeout_blocks") - fd_Params_fee_transfer_timeout_nanos = md_Params.Fields().ByName("fee_transfer_timeout_nanos") - fd_Params_max_stake_ica_calls_per_epoch = md_Params.Fields().ByName("max_stake_ica_calls_per_epoch") - fd_Params_default_min_redemption_rate_threshold = md_Params.Fields().ByName("default_min_redemption_rate_threshold") - fd_Params_default_max_redemption_rate_threshold = md_Params.Fields().ByName("default_max_redemption_rate_threshold") - fd_Params_ibc_transfer_timeout_nanos = md_Params.Fields().ByName("ibc_transfer_timeout_nanos") - fd_Params_validator_slash_query_threshold = md_Params.Fields().ByName("validator_slash_query_threshold") - fd_Params_validator_weight_cap = md_Params.Fields().ByName("validator_weight_cap") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_params_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RewardsInterval != uint64(0) { - value := protoreflect.ValueOfUint64(x.RewardsInterval) - if !f(fd_Params_rewards_interval, value) { - return - } - } - if x.DelegateInterval != uint64(0) { - value := protoreflect.ValueOfUint64(x.DelegateInterval) - if !f(fd_Params_delegate_interval, value) { - return - } - } - if x.DepositInterval != uint64(0) { - value := protoreflect.ValueOfUint64(x.DepositInterval) - if !f(fd_Params_deposit_interval, value) { - return - } - } - if x.RedemptionRateInterval != uint64(0) { - value := protoreflect.ValueOfUint64(x.RedemptionRateInterval) - if !f(fd_Params_redemption_rate_interval, value) { - return - } - } - if x.StrideCommission != uint64(0) { - value := protoreflect.ValueOfUint64(x.StrideCommission) - if !f(fd_Params_stride_commission, value) { - return - } - } - if x.ReinvestInterval != uint64(0) { - value := protoreflect.ValueOfUint64(x.ReinvestInterval) - if !f(fd_Params_reinvest_interval, value) { - return - } - } - if x.IcaTimeoutNanos != uint64(0) { - value := protoreflect.ValueOfUint64(x.IcaTimeoutNanos) - if !f(fd_Params_ica_timeout_nanos, value) { - return - } - } - if x.BufferSize != uint64(0) { - value := protoreflect.ValueOfUint64(x.BufferSize) - if !f(fd_Params_buffer_size, value) { - return - } - } - if x.IbcTimeoutBlocks != uint64(0) { - value := protoreflect.ValueOfUint64(x.IbcTimeoutBlocks) - if !f(fd_Params_ibc_timeout_blocks, value) { - return - } - } - if x.FeeTransferTimeoutNanos != uint64(0) { - value := protoreflect.ValueOfUint64(x.FeeTransferTimeoutNanos) - if !f(fd_Params_fee_transfer_timeout_nanos, value) { - return - } - } - if x.MaxStakeIcaCallsPerEpoch != uint64(0) { - value := protoreflect.ValueOfUint64(x.MaxStakeIcaCallsPerEpoch) - if !f(fd_Params_max_stake_ica_calls_per_epoch, value) { - return - } - } - if x.DefaultMinRedemptionRateThreshold != uint64(0) { - value := protoreflect.ValueOfUint64(x.DefaultMinRedemptionRateThreshold) - if !f(fd_Params_default_min_redemption_rate_threshold, value) { - return - } - } - if x.DefaultMaxRedemptionRateThreshold != uint64(0) { - value := protoreflect.ValueOfUint64(x.DefaultMaxRedemptionRateThreshold) - if !f(fd_Params_default_max_redemption_rate_threshold, value) { - return - } - } - if x.IbcTransferTimeoutNanos != uint64(0) { - value := protoreflect.ValueOfUint64(x.IbcTransferTimeoutNanos) - if !f(fd_Params_ibc_transfer_timeout_nanos, value) { - return - } - } - if x.ValidatorSlashQueryThreshold != uint64(0) { - value := protoreflect.ValueOfUint64(x.ValidatorSlashQueryThreshold) - if !f(fd_Params_validator_slash_query_threshold, value) { - return - } - } - if x.ValidatorWeightCap != uint64(0) { - value := protoreflect.ValueOfUint64(x.ValidatorWeightCap) - if !f(fd_Params_validator_weight_cap, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.Params.rewards_interval": - return x.RewardsInterval != uint64(0) - case "stride.stakeibc.Params.delegate_interval": - return x.DelegateInterval != uint64(0) - case "stride.stakeibc.Params.deposit_interval": - return x.DepositInterval != uint64(0) - case "stride.stakeibc.Params.redemption_rate_interval": - return x.RedemptionRateInterval != uint64(0) - case "stride.stakeibc.Params.stride_commission": - return x.StrideCommission != uint64(0) - case "stride.stakeibc.Params.reinvest_interval": - return x.ReinvestInterval != uint64(0) - case "stride.stakeibc.Params.ica_timeout_nanos": - return x.IcaTimeoutNanos != uint64(0) - case "stride.stakeibc.Params.buffer_size": - return x.BufferSize != uint64(0) - case "stride.stakeibc.Params.ibc_timeout_blocks": - return x.IbcTimeoutBlocks != uint64(0) - case "stride.stakeibc.Params.fee_transfer_timeout_nanos": - return x.FeeTransferTimeoutNanos != uint64(0) - case "stride.stakeibc.Params.max_stake_ica_calls_per_epoch": - return x.MaxStakeIcaCallsPerEpoch != uint64(0) - case "stride.stakeibc.Params.default_min_redemption_rate_threshold": - return x.DefaultMinRedemptionRateThreshold != uint64(0) - case "stride.stakeibc.Params.default_max_redemption_rate_threshold": - return x.DefaultMaxRedemptionRateThreshold != uint64(0) - case "stride.stakeibc.Params.ibc_transfer_timeout_nanos": - return x.IbcTransferTimeoutNanos != uint64(0) - case "stride.stakeibc.Params.validator_slash_query_threshold": - return x.ValidatorSlashQueryThreshold != uint64(0) - case "stride.stakeibc.Params.validator_weight_cap": - return x.ValidatorWeightCap != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Params")) - } - panic(fmt.Errorf("message stride.stakeibc.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.Params.rewards_interval": - x.RewardsInterval = uint64(0) - case "stride.stakeibc.Params.delegate_interval": - x.DelegateInterval = uint64(0) - case "stride.stakeibc.Params.deposit_interval": - x.DepositInterval = uint64(0) - case "stride.stakeibc.Params.redemption_rate_interval": - x.RedemptionRateInterval = uint64(0) - case "stride.stakeibc.Params.stride_commission": - x.StrideCommission = uint64(0) - case "stride.stakeibc.Params.reinvest_interval": - x.ReinvestInterval = uint64(0) - case "stride.stakeibc.Params.ica_timeout_nanos": - x.IcaTimeoutNanos = uint64(0) - case "stride.stakeibc.Params.buffer_size": - x.BufferSize = uint64(0) - case "stride.stakeibc.Params.ibc_timeout_blocks": - x.IbcTimeoutBlocks = uint64(0) - case "stride.stakeibc.Params.fee_transfer_timeout_nanos": - x.FeeTransferTimeoutNanos = uint64(0) - case "stride.stakeibc.Params.max_stake_ica_calls_per_epoch": - x.MaxStakeIcaCallsPerEpoch = uint64(0) - case "stride.stakeibc.Params.default_min_redemption_rate_threshold": - x.DefaultMinRedemptionRateThreshold = uint64(0) - case "stride.stakeibc.Params.default_max_redemption_rate_threshold": - x.DefaultMaxRedemptionRateThreshold = uint64(0) - case "stride.stakeibc.Params.ibc_transfer_timeout_nanos": - x.IbcTransferTimeoutNanos = uint64(0) - case "stride.stakeibc.Params.validator_slash_query_threshold": - x.ValidatorSlashQueryThreshold = uint64(0) - case "stride.stakeibc.Params.validator_weight_cap": - x.ValidatorWeightCap = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Params")) - } - panic(fmt.Errorf("message stride.stakeibc.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.Params.rewards_interval": - value := x.RewardsInterval - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.delegate_interval": - value := x.DelegateInterval - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.deposit_interval": - value := x.DepositInterval - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.redemption_rate_interval": - value := x.RedemptionRateInterval - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.stride_commission": - value := x.StrideCommission - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.reinvest_interval": - value := x.ReinvestInterval - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.ica_timeout_nanos": - value := x.IcaTimeoutNanos - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.buffer_size": - value := x.BufferSize - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.ibc_timeout_blocks": - value := x.IbcTimeoutBlocks - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.fee_transfer_timeout_nanos": - value := x.FeeTransferTimeoutNanos - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.max_stake_ica_calls_per_epoch": - value := x.MaxStakeIcaCallsPerEpoch - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.default_min_redemption_rate_threshold": - value := x.DefaultMinRedemptionRateThreshold - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.default_max_redemption_rate_threshold": - value := x.DefaultMaxRedemptionRateThreshold - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.ibc_transfer_timeout_nanos": - value := x.IbcTransferTimeoutNanos - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.validator_slash_query_threshold": - value := x.ValidatorSlashQueryThreshold - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Params.validator_weight_cap": - value := x.ValidatorWeightCap - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Params")) - } - panic(fmt.Errorf("message stride.stakeibc.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.Params.rewards_interval": - x.RewardsInterval = value.Uint() - case "stride.stakeibc.Params.delegate_interval": - x.DelegateInterval = value.Uint() - case "stride.stakeibc.Params.deposit_interval": - x.DepositInterval = value.Uint() - case "stride.stakeibc.Params.redemption_rate_interval": - x.RedemptionRateInterval = value.Uint() - case "stride.stakeibc.Params.stride_commission": - x.StrideCommission = value.Uint() - case "stride.stakeibc.Params.reinvest_interval": - x.ReinvestInterval = value.Uint() - case "stride.stakeibc.Params.ica_timeout_nanos": - x.IcaTimeoutNanos = value.Uint() - case "stride.stakeibc.Params.buffer_size": - x.BufferSize = value.Uint() - case "stride.stakeibc.Params.ibc_timeout_blocks": - x.IbcTimeoutBlocks = value.Uint() - case "stride.stakeibc.Params.fee_transfer_timeout_nanos": - x.FeeTransferTimeoutNanos = value.Uint() - case "stride.stakeibc.Params.max_stake_ica_calls_per_epoch": - x.MaxStakeIcaCallsPerEpoch = value.Uint() - case "stride.stakeibc.Params.default_min_redemption_rate_threshold": - x.DefaultMinRedemptionRateThreshold = value.Uint() - case "stride.stakeibc.Params.default_max_redemption_rate_threshold": - x.DefaultMaxRedemptionRateThreshold = value.Uint() - case "stride.stakeibc.Params.ibc_transfer_timeout_nanos": - x.IbcTransferTimeoutNanos = value.Uint() - case "stride.stakeibc.Params.validator_slash_query_threshold": - x.ValidatorSlashQueryThreshold = value.Uint() - case "stride.stakeibc.Params.validator_weight_cap": - x.ValidatorWeightCap = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Params")) - } - panic(fmt.Errorf("message stride.stakeibc.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.Params.rewards_interval": - panic(fmt.Errorf("field rewards_interval of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.delegate_interval": - panic(fmt.Errorf("field delegate_interval of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.deposit_interval": - panic(fmt.Errorf("field deposit_interval of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.redemption_rate_interval": - panic(fmt.Errorf("field redemption_rate_interval of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.stride_commission": - panic(fmt.Errorf("field stride_commission of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.reinvest_interval": - panic(fmt.Errorf("field reinvest_interval of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.ica_timeout_nanos": - panic(fmt.Errorf("field ica_timeout_nanos of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.buffer_size": - panic(fmt.Errorf("field buffer_size of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.ibc_timeout_blocks": - panic(fmt.Errorf("field ibc_timeout_blocks of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.fee_transfer_timeout_nanos": - panic(fmt.Errorf("field fee_transfer_timeout_nanos of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.max_stake_ica_calls_per_epoch": - panic(fmt.Errorf("field max_stake_ica_calls_per_epoch of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.default_min_redemption_rate_threshold": - panic(fmt.Errorf("field default_min_redemption_rate_threshold of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.default_max_redemption_rate_threshold": - panic(fmt.Errorf("field default_max_redemption_rate_threshold of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.ibc_transfer_timeout_nanos": - panic(fmt.Errorf("field ibc_transfer_timeout_nanos of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.validator_slash_query_threshold": - panic(fmt.Errorf("field validator_slash_query_threshold of message stride.stakeibc.Params is not mutable")) - case "stride.stakeibc.Params.validator_weight_cap": - panic(fmt.Errorf("field validator_weight_cap of message stride.stakeibc.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Params")) - } - panic(fmt.Errorf("message stride.stakeibc.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.Params.rewards_interval": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.delegate_interval": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.deposit_interval": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.redemption_rate_interval": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.stride_commission": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.reinvest_interval": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.ica_timeout_nanos": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.buffer_size": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.ibc_timeout_blocks": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.fee_transfer_timeout_nanos": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.max_stake_ica_calls_per_epoch": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.default_min_redemption_rate_threshold": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.default_max_redemption_rate_threshold": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.ibc_transfer_timeout_nanos": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.validator_slash_query_threshold": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Params.validator_weight_cap": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Params")) - } - panic(fmt.Errorf("message stride.stakeibc.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.RewardsInterval != 0 { - n += 1 + runtime.Sov(uint64(x.RewardsInterval)) - } - if x.DelegateInterval != 0 { - n += 1 + runtime.Sov(uint64(x.DelegateInterval)) - } - if x.DepositInterval != 0 { - n += 1 + runtime.Sov(uint64(x.DepositInterval)) - } - if x.RedemptionRateInterval != 0 { - n += 1 + runtime.Sov(uint64(x.RedemptionRateInterval)) - } - if x.StrideCommission != 0 { - n += 1 + runtime.Sov(uint64(x.StrideCommission)) - } - if x.ReinvestInterval != 0 { - n += 1 + runtime.Sov(uint64(x.ReinvestInterval)) - } - if x.IcaTimeoutNanos != 0 { - n += 1 + runtime.Sov(uint64(x.IcaTimeoutNanos)) - } - if x.BufferSize != 0 { - n += 1 + runtime.Sov(uint64(x.BufferSize)) - } - if x.IbcTimeoutBlocks != 0 { - n += 1 + runtime.Sov(uint64(x.IbcTimeoutBlocks)) - } - if x.FeeTransferTimeoutNanos != 0 { - n += 1 + runtime.Sov(uint64(x.FeeTransferTimeoutNanos)) - } - if x.MaxStakeIcaCallsPerEpoch != 0 { - n += 1 + runtime.Sov(uint64(x.MaxStakeIcaCallsPerEpoch)) - } - if x.DefaultMinRedemptionRateThreshold != 0 { - n += 1 + runtime.Sov(uint64(x.DefaultMinRedemptionRateThreshold)) - } - if x.DefaultMaxRedemptionRateThreshold != 0 { - n += 1 + runtime.Sov(uint64(x.DefaultMaxRedemptionRateThreshold)) - } - if x.IbcTransferTimeoutNanos != 0 { - n += 2 + runtime.Sov(uint64(x.IbcTransferTimeoutNanos)) - } - if x.ValidatorSlashQueryThreshold != 0 { - n += 2 + runtime.Sov(uint64(x.ValidatorSlashQueryThreshold)) - } - if x.ValidatorWeightCap != 0 { - n += 2 + runtime.Sov(uint64(x.ValidatorWeightCap)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.ValidatorWeightCap != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ValidatorWeightCap)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if x.ValidatorSlashQueryThreshold != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ValidatorSlashQueryThreshold)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if x.IbcTransferTimeoutNanos != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.IbcTransferTimeoutNanos)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if x.DefaultMaxRedemptionRateThreshold != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DefaultMaxRedemptionRateThreshold)) - i-- - dAtA[i] = 0x78 - } - if x.DefaultMinRedemptionRateThreshold != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DefaultMinRedemptionRateThreshold)) - i-- - dAtA[i] = 0x70 - } - if x.MaxStakeIcaCallsPerEpoch != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxStakeIcaCallsPerEpoch)) - i-- - dAtA[i] = 0x68 - } - if x.FeeTransferTimeoutNanos != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.FeeTransferTimeoutNanos)) - i-- - dAtA[i] = 0x60 - } - if x.IbcTimeoutBlocks != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.IbcTimeoutBlocks)) - i-- - dAtA[i] = 0x58 - } - if x.BufferSize != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BufferSize)) - i-- - dAtA[i] = 0x50 - } - if x.IcaTimeoutNanos != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.IcaTimeoutNanos)) - i-- - dAtA[i] = 0x48 - } - if x.ReinvestInterval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ReinvestInterval)) - i-- - dAtA[i] = 0x38 - } - if x.DelegateInterval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DelegateInterval)) - i-- - dAtA[i] = 0x30 - } - if x.StrideCommission != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.StrideCommission)) - i-- - dAtA[i] = 0x20 - } - if x.RedemptionRateInterval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.RedemptionRateInterval)) - i-- - dAtA[i] = 0x18 - } - if x.DepositInterval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DepositInterval)) - i-- - dAtA[i] = 0x10 - } - if x.RewardsInterval != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.RewardsInterval)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardsInterval", wireType) - } - x.RewardsInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.RewardsInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegateInterval", wireType) - } - x.DelegateInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DelegateInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DepositInterval", wireType) - } - x.DepositInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DepositInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RedemptionRateInterval", wireType) - } - x.RedemptionRateInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.RedemptionRateInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StrideCommission", wireType) - } - x.StrideCommission = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.StrideCommission |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ReinvestInterval", wireType) - } - x.ReinvestInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ReinvestInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IcaTimeoutNanos", wireType) - } - x.IcaTimeoutNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.IcaTimeoutNanos |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BufferSize", wireType) - } - x.BufferSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.BufferSize |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcTimeoutBlocks", wireType) - } - x.IbcTimeoutBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.IbcTimeoutBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeTransferTimeoutNanos", wireType) - } - x.FeeTransferTimeoutNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.FeeTransferTimeoutNanos |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxStakeIcaCallsPerEpoch", wireType) - } - x.MaxStakeIcaCallsPerEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxStakeIcaCallsPerEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DefaultMinRedemptionRateThreshold", wireType) - } - x.DefaultMinRedemptionRateThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DefaultMinRedemptionRateThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DefaultMaxRedemptionRateThreshold", wireType) - } - x.DefaultMaxRedemptionRateThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DefaultMaxRedemptionRateThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcTransferTimeoutNanos", wireType) - } - x.IbcTransferTimeoutNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.IbcTransferTimeoutNanos |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashQueryThreshold", wireType) - } - x.ValidatorSlashQueryThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ValidatorSlashQueryThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorWeightCap", wireType) - } - x.ValidatorWeightCap = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ValidatorWeightCap |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/params.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Params defines the parameters for the module. -// next id: 20 -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // define epoch lengths, in stride_epochs - RewardsInterval uint64 `protobuf:"varint,1,opt,name=rewards_interval,json=rewardsInterval,proto3" json:"rewards_interval,omitempty"` - DelegateInterval uint64 `protobuf:"varint,6,opt,name=delegate_interval,json=delegateInterval,proto3" json:"delegate_interval,omitempty"` - DepositInterval uint64 `protobuf:"varint,2,opt,name=deposit_interval,json=depositInterval,proto3" json:"deposit_interval,omitempty"` - RedemptionRateInterval uint64 `protobuf:"varint,3,opt,name=redemption_rate_interval,json=redemptionRateInterval,proto3" json:"redemption_rate_interval,omitempty"` - StrideCommission uint64 `protobuf:"varint,4,opt,name=stride_commission,json=strideCommission,proto3" json:"stride_commission,omitempty"` - ReinvestInterval uint64 `protobuf:"varint,7,opt,name=reinvest_interval,json=reinvestInterval,proto3" json:"reinvest_interval,omitempty"` - IcaTimeoutNanos uint64 `protobuf:"varint,9,opt,name=ica_timeout_nanos,json=icaTimeoutNanos,proto3" json:"ica_timeout_nanos,omitempty"` - BufferSize uint64 `protobuf:"varint,10,opt,name=buffer_size,json=bufferSize,proto3" json:"buffer_size,omitempty"` - IbcTimeoutBlocks uint64 `protobuf:"varint,11,opt,name=ibc_timeout_blocks,json=ibcTimeoutBlocks,proto3" json:"ibc_timeout_blocks,omitempty"` - FeeTransferTimeoutNanos uint64 `protobuf:"varint,12,opt,name=fee_transfer_timeout_nanos,json=feeTransferTimeoutNanos,proto3" json:"fee_transfer_timeout_nanos,omitempty"` - MaxStakeIcaCallsPerEpoch uint64 `protobuf:"varint,13,opt,name=max_stake_ica_calls_per_epoch,json=maxStakeIcaCallsPerEpoch,proto3" json:"max_stake_ica_calls_per_epoch,omitempty"` - DefaultMinRedemptionRateThreshold uint64 `protobuf:"varint,14,opt,name=default_min_redemption_rate_threshold,json=defaultMinRedemptionRateThreshold,proto3" json:"default_min_redemption_rate_threshold,omitempty"` - DefaultMaxRedemptionRateThreshold uint64 `protobuf:"varint,15,opt,name=default_max_redemption_rate_threshold,json=defaultMaxRedemptionRateThreshold,proto3" json:"default_max_redemption_rate_threshold,omitempty"` - IbcTransferTimeoutNanos uint64 `protobuf:"varint,16,opt,name=ibc_transfer_timeout_nanos,json=ibcTransferTimeoutNanos,proto3" json:"ibc_transfer_timeout_nanos,omitempty"` - ValidatorSlashQueryThreshold uint64 `protobuf:"varint,19,opt,name=validator_slash_query_threshold,json=validatorSlashQueryThreshold,proto3" json:"validator_slash_query_threshold,omitempty"` - ValidatorWeightCap uint64 `protobuf:"varint,20,opt,name=validator_weight_cap,json=validatorWeightCap,proto3" json:"validator_weight_cap,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_params_proto_rawDescGZIP(), []int{0} -} - -func (x *Params) GetRewardsInterval() uint64 { - if x != nil { - return x.RewardsInterval - } - return 0 -} - -func (x *Params) GetDelegateInterval() uint64 { - if x != nil { - return x.DelegateInterval - } - return 0 -} - -func (x *Params) GetDepositInterval() uint64 { - if x != nil { - return x.DepositInterval - } - return 0 -} - -func (x *Params) GetRedemptionRateInterval() uint64 { - if x != nil { - return x.RedemptionRateInterval - } - return 0 -} - -func (x *Params) GetStrideCommission() uint64 { - if x != nil { - return x.StrideCommission - } - return 0 -} - -func (x *Params) GetReinvestInterval() uint64 { - if x != nil { - return x.ReinvestInterval - } - return 0 -} - -func (x *Params) GetIcaTimeoutNanos() uint64 { - if x != nil { - return x.IcaTimeoutNanos - } - return 0 -} - -func (x *Params) GetBufferSize() uint64 { - if x != nil { - return x.BufferSize - } - return 0 -} - -func (x *Params) GetIbcTimeoutBlocks() uint64 { - if x != nil { - return x.IbcTimeoutBlocks - } - return 0 -} - -func (x *Params) GetFeeTransferTimeoutNanos() uint64 { - if x != nil { - return x.FeeTransferTimeoutNanos - } - return 0 -} - -func (x *Params) GetMaxStakeIcaCallsPerEpoch() uint64 { - if x != nil { - return x.MaxStakeIcaCallsPerEpoch - } - return 0 -} - -func (x *Params) GetDefaultMinRedemptionRateThreshold() uint64 { - if x != nil { - return x.DefaultMinRedemptionRateThreshold - } - return 0 -} - -func (x *Params) GetDefaultMaxRedemptionRateThreshold() uint64 { - if x != nil { - return x.DefaultMaxRedemptionRateThreshold - } - return 0 -} - -func (x *Params) GetIbcTransferTimeoutNanos() uint64 { - if x != nil { - return x.IbcTransferTimeoutNanos - } - return 0 -} - -func (x *Params) GetValidatorSlashQueryThreshold() uint64 { - if x != nil { - return x.ValidatorSlashQueryThreshold - } - return 0 -} - -func (x *Params) GetValidatorWeightCap() uint64 { - if x != nil { - return x.ValidatorWeightCap - } - return 0 -} - -var File_stride_stakeibc_params_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_params_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x1a, - 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x07, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x73, 0x5f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x73, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2b, 0x0a, 0x11, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x16, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2b, 0x0a, - 0x11, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, - 0x69, 0x6e, 0x76, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x72, 0x65, 0x69, 0x6e, 0x76, 0x65, 0x73, 0x74, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x63, 0x61, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0f, 0x69, 0x63, 0x61, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4e, 0x61, - 0x6e, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x5f, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, - 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x62, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x10, 0x69, 0x62, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x66, 0x65, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, - 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x66, 0x65, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x12, - 0x3f, 0x0a, 0x1d, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x69, 0x63, 0x61, - 0x5f, 0x63, 0x61, 0x6c, 0x6c, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x49, 0x63, 0x61, 0x43, 0x61, 0x6c, 0x6c, 0x73, 0x50, 0x65, 0x72, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x12, 0x50, 0x0a, 0x25, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, - 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, - 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x21, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4d, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6d, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, - 0x6c, 0x64, 0x12, 0x50, 0x0a, 0x25, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x6d, 0x61, - 0x78, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x21, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x4d, 0x61, 0x78, 0x52, 0x65, 0x64, - 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x54, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x62, 0x63, 0x5f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x6e, 0x61, 0x6e, - 0x6f, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x69, 0x62, 0x63, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4e, 0x61, 0x6e, 0x6f, - 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x73, - 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1c, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x63, 0x61, 0x70, - 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x43, 0x61, 0x70, 0x3a, 0x04, 0x98, 0xa0, 0x1f, 0x00, - 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x11, 0x10, 0x12, 0x4a, 0x04, 0x08, 0x12, - 0x10, 0x13, 0x42, 0xb6, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xca, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_params_proto_rawDescOnce sync.Once - file_stride_stakeibc_params_proto_rawDescData = file_stride_stakeibc_params_proto_rawDesc -) - -func file_stride_stakeibc_params_proto_rawDescGZIP() []byte { - file_stride_stakeibc_params_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_params_proto_rawDescData) - }) - return file_stride_stakeibc_params_proto_rawDescData -} - -var file_stride_stakeibc_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_stakeibc_params_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: stride.stakeibc.Params -} -var file_stride_stakeibc_params_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_params_proto_init() } -func file_stride_stakeibc_params_proto_init() { - if File_stride_stakeibc_params_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_params_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_params_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_params_proto_depIdxs, - MessageInfos: file_stride_stakeibc_params_proto_msgTypes, - }.Build() - File_stride_stakeibc_params_proto = out.File - file_stride_stakeibc_params_proto_rawDesc = nil - file_stride_stakeibc_params_proto_goTypes = nil - file_stride_stakeibc_params_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/query.pulsar.go b/api/stride/stakeibc/query.pulsar.go deleted file mode 100644 index fa8b7cf17..000000000 --- a/api/stride/stakeibc/query.pulsar.go +++ /dev/null @@ -1,11119 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/query/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryInterchainAccountFromAddressRequest protoreflect.MessageDescriptor - fd_QueryInterchainAccountFromAddressRequest_owner protoreflect.FieldDescriptor - fd_QueryInterchainAccountFromAddressRequest_connection_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryInterchainAccountFromAddressRequest = File_stride_stakeibc_query_proto.Messages().ByName("QueryInterchainAccountFromAddressRequest") - fd_QueryInterchainAccountFromAddressRequest_owner = md_QueryInterchainAccountFromAddressRequest.Fields().ByName("owner") - fd_QueryInterchainAccountFromAddressRequest_connection_id = md_QueryInterchainAccountFromAddressRequest.Fields().ByName("connection_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryInterchainAccountFromAddressRequest)(nil) - -type fastReflection_QueryInterchainAccountFromAddressRequest QueryInterchainAccountFromAddressRequest - -func (x *QueryInterchainAccountFromAddressRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryInterchainAccountFromAddressRequest)(x) -} - -func (x *QueryInterchainAccountFromAddressRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryInterchainAccountFromAddressRequest_messageType fastReflection_QueryInterchainAccountFromAddressRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryInterchainAccountFromAddressRequest_messageType{} - -type fastReflection_QueryInterchainAccountFromAddressRequest_messageType struct{} - -func (x fastReflection_QueryInterchainAccountFromAddressRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryInterchainAccountFromAddressRequest)(nil) -} -func (x fastReflection_QueryInterchainAccountFromAddressRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryInterchainAccountFromAddressRequest) -} -func (x fastReflection_QueryInterchainAccountFromAddressRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryInterchainAccountFromAddressRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryInterchainAccountFromAddressRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryInterchainAccountFromAddressRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) New() protoreflect.Message { - return new(fastReflection_QueryInterchainAccountFromAddressRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) Interface() protoreflect.ProtoMessage { - return (*QueryInterchainAccountFromAddressRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_QueryInterchainAccountFromAddressRequest_owner, value) { - return - } - } - if x.ConnectionId != "" { - value := protoreflect.ValueOfString(x.ConnectionId) - if !f(fd_QueryInterchainAccountFromAddressRequest_connection_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.owner": - return x.Owner != "" - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.connection_id": - return x.ConnectionId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.owner": - x.Owner = "" - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.connection_id": - x.ConnectionId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.connection_id": - value := x.ConnectionId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.owner": - x.Owner = value.Interface().(string) - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.connection_id": - x.ConnectionId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.owner": - panic(fmt.Errorf("field owner of message stride.stakeibc.QueryInterchainAccountFromAddressRequest is not mutable")) - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.connection_id": - panic(fmt.Errorf("field connection_id of message stride.stakeibc.QueryInterchainAccountFromAddressRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.owner": - return protoreflect.ValueOfString("") - case "stride.stakeibc.QueryInterchainAccountFromAddressRequest.connection_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryInterchainAccountFromAddressRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryInterchainAccountFromAddressRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryInterchainAccountFromAddressRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ConnectionId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryInterchainAccountFromAddressRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ConnectionId) > 0 { - i -= len(x.ConnectionId) - copy(dAtA[i:], x.ConnectionId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConnectionId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryInterchainAccountFromAddressRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryInterchainAccountFromAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryInterchainAccountFromAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryInterchainAccountFromAddressResponse protoreflect.MessageDescriptor - fd_QueryInterchainAccountFromAddressResponse_interchain_account_address protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryInterchainAccountFromAddressResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryInterchainAccountFromAddressResponse") - fd_QueryInterchainAccountFromAddressResponse_interchain_account_address = md_QueryInterchainAccountFromAddressResponse.Fields().ByName("interchain_account_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryInterchainAccountFromAddressResponse)(nil) - -type fastReflection_QueryInterchainAccountFromAddressResponse QueryInterchainAccountFromAddressResponse - -func (x *QueryInterchainAccountFromAddressResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryInterchainAccountFromAddressResponse)(x) -} - -func (x *QueryInterchainAccountFromAddressResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryInterchainAccountFromAddressResponse_messageType fastReflection_QueryInterchainAccountFromAddressResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryInterchainAccountFromAddressResponse_messageType{} - -type fastReflection_QueryInterchainAccountFromAddressResponse_messageType struct{} - -func (x fastReflection_QueryInterchainAccountFromAddressResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryInterchainAccountFromAddressResponse)(nil) -} -func (x fastReflection_QueryInterchainAccountFromAddressResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryInterchainAccountFromAddressResponse) -} -func (x fastReflection_QueryInterchainAccountFromAddressResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryInterchainAccountFromAddressResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryInterchainAccountFromAddressResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryInterchainAccountFromAddressResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) New() protoreflect.Message { - return new(fastReflection_QueryInterchainAccountFromAddressResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) Interface() protoreflect.ProtoMessage { - return (*QueryInterchainAccountFromAddressResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.InterchainAccountAddress != "" { - value := protoreflect.ValueOfString(x.InterchainAccountAddress) - if !f(fd_QueryInterchainAccountFromAddressResponse_interchain_account_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressResponse.interchain_account_address": - return x.InterchainAccountAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressResponse.interchain_account_address": - x.InterchainAccountAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressResponse.interchain_account_address": - value := x.InterchainAccountAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressResponse.interchain_account_address": - x.InterchainAccountAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressResponse.interchain_account_address": - panic(fmt.Errorf("field interchain_account_address of message stride.stakeibc.QueryInterchainAccountFromAddressResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryInterchainAccountFromAddressResponse.interchain_account_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryInterchainAccountFromAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryInterchainAccountFromAddressResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryInterchainAccountFromAddressResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryInterchainAccountFromAddressResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryInterchainAccountFromAddressResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.InterchainAccountAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryInterchainAccountFromAddressResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.InterchainAccountAddress) > 0 { - i -= len(x.InterchainAccountAddress) - copy(dAtA[i:], x.InterchainAccountAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.InterchainAccountAddress))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryInterchainAccountFromAddressResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryInterchainAccountFromAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryInterchainAccountFromAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InterchainAccountAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.InterchainAccountAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryParamsRequest = File_stride_stakeibc_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryParamsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryParamsResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) - -type fastReflection_QueryParamsResponse QueryParamsResponse - -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) -} - -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} - -type fastReflection_QueryParamsResponse_messageType struct{} - -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) -} -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetValidatorsRequest protoreflect.MessageDescriptor - fd_QueryGetValidatorsRequest_chain_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryGetValidatorsRequest = File_stride_stakeibc_query_proto.Messages().ByName("QueryGetValidatorsRequest") - fd_QueryGetValidatorsRequest_chain_id = md_QueryGetValidatorsRequest.Fields().ByName("chain_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetValidatorsRequest)(nil) - -type fastReflection_QueryGetValidatorsRequest QueryGetValidatorsRequest - -func (x *QueryGetValidatorsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetValidatorsRequest)(x) -} - -func (x *QueryGetValidatorsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetValidatorsRequest_messageType fastReflection_QueryGetValidatorsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetValidatorsRequest_messageType{} - -type fastReflection_QueryGetValidatorsRequest_messageType struct{} - -func (x fastReflection_QueryGetValidatorsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetValidatorsRequest)(nil) -} -func (x fastReflection_QueryGetValidatorsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetValidatorsRequest) -} -func (x fastReflection_QueryGetValidatorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetValidatorsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetValidatorsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetValidatorsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetValidatorsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetValidatorsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetValidatorsRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetValidatorsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetValidatorsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetValidatorsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetValidatorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_QueryGetValidatorsRequest_chain_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetValidatorsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsRequest.chain_id": - return x.ChainId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetValidatorsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsRequest.chain_id": - x.ChainId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetValidatorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryGetValidatorsRequest.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetValidatorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsRequest.chain_id": - x.ChainId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetValidatorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsRequest.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.QueryGetValidatorsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetValidatorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsRequest.chain_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetValidatorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryGetValidatorsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetValidatorsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetValidatorsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetValidatorsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetValidatorsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetValidatorsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetValidatorsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetValidatorsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetValidatorsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryGetValidatorsResponse_1_list)(nil) - -type _QueryGetValidatorsResponse_1_list struct { - list *[]*Validator -} - -func (x *_QueryGetValidatorsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryGetValidatorsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryGetValidatorsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_QueryGetValidatorsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryGetValidatorsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGetValidatorsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryGetValidatorsResponse_1_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryGetValidatorsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryGetValidatorsResponse protoreflect.MessageDescriptor - fd_QueryGetValidatorsResponse_validators protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryGetValidatorsResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryGetValidatorsResponse") - fd_QueryGetValidatorsResponse_validators = md_QueryGetValidatorsResponse.Fields().ByName("validators") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetValidatorsResponse)(nil) - -type fastReflection_QueryGetValidatorsResponse QueryGetValidatorsResponse - -func (x *QueryGetValidatorsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetValidatorsResponse)(x) -} - -func (x *QueryGetValidatorsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetValidatorsResponse_messageType fastReflection_QueryGetValidatorsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetValidatorsResponse_messageType{} - -type fastReflection_QueryGetValidatorsResponse_messageType struct{} - -func (x fastReflection_QueryGetValidatorsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetValidatorsResponse)(nil) -} -func (x fastReflection_QueryGetValidatorsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetValidatorsResponse) -} -func (x fastReflection_QueryGetValidatorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetValidatorsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetValidatorsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetValidatorsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetValidatorsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetValidatorsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetValidatorsResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetValidatorsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetValidatorsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetValidatorsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetValidatorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_QueryGetValidatorsResponse_1_list{list: &x.Validators}) - if !f(fd_QueryGetValidatorsResponse_validators, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetValidatorsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsResponse.validators": - return len(x.Validators) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetValidatorsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsResponse.validators": - x.Validators = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetValidatorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryGetValidatorsResponse.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_QueryGetValidatorsResponse_1_list{}) - } - listValue := &_QueryGetValidatorsResponse_1_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetValidatorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsResponse.validators": - lv := value.List() - clv := lv.(*_QueryGetValidatorsResponse_1_list) - x.Validators = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetValidatorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsResponse.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_QueryGetValidatorsResponse_1_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetValidatorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetValidatorsResponse.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_QueryGetValidatorsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetValidatorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryGetValidatorsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetValidatorsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetValidatorsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetValidatorsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetValidatorsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetValidatorsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetValidatorsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetValidatorsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetHostZoneRequest protoreflect.MessageDescriptor - fd_QueryGetHostZoneRequest_chain_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryGetHostZoneRequest = File_stride_stakeibc_query_proto.Messages().ByName("QueryGetHostZoneRequest") - fd_QueryGetHostZoneRequest_chain_id = md_QueryGetHostZoneRequest.Fields().ByName("chain_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetHostZoneRequest)(nil) - -type fastReflection_QueryGetHostZoneRequest QueryGetHostZoneRequest - -func (x *QueryGetHostZoneRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetHostZoneRequest)(x) -} - -func (x *QueryGetHostZoneRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetHostZoneRequest_messageType fastReflection_QueryGetHostZoneRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetHostZoneRequest_messageType{} - -type fastReflection_QueryGetHostZoneRequest_messageType struct{} - -func (x fastReflection_QueryGetHostZoneRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetHostZoneRequest)(nil) -} -func (x fastReflection_QueryGetHostZoneRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetHostZoneRequest) -} -func (x fastReflection_QueryGetHostZoneRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetHostZoneRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetHostZoneRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetHostZoneRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetHostZoneRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetHostZoneRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetHostZoneRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetHostZoneRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetHostZoneRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetHostZoneRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetHostZoneRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_QueryGetHostZoneRequest_chain_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetHostZoneRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneRequest.chain_id": - return x.ChainId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetHostZoneRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneRequest.chain_id": - x.ChainId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetHostZoneRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryGetHostZoneRequest.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetHostZoneRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneRequest.chain_id": - x.ChainId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetHostZoneRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneRequest.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.QueryGetHostZoneRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetHostZoneRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneRequest.chain_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetHostZoneRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryGetHostZoneRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetHostZoneRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetHostZoneRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetHostZoneRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetHostZoneRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetHostZoneRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetHostZoneRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetHostZoneRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetHostZoneRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetHostZoneRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetHostZoneResponse protoreflect.MessageDescriptor - fd_QueryGetHostZoneResponse_host_zone protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryGetHostZoneResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryGetHostZoneResponse") - fd_QueryGetHostZoneResponse_host_zone = md_QueryGetHostZoneResponse.Fields().ByName("host_zone") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetHostZoneResponse)(nil) - -type fastReflection_QueryGetHostZoneResponse QueryGetHostZoneResponse - -func (x *QueryGetHostZoneResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetHostZoneResponse)(x) -} - -func (x *QueryGetHostZoneResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetHostZoneResponse_messageType fastReflection_QueryGetHostZoneResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetHostZoneResponse_messageType{} - -type fastReflection_QueryGetHostZoneResponse_messageType struct{} - -func (x fastReflection_QueryGetHostZoneResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetHostZoneResponse)(nil) -} -func (x fastReflection_QueryGetHostZoneResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetHostZoneResponse) -} -func (x fastReflection_QueryGetHostZoneResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetHostZoneResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetHostZoneResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetHostZoneResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetHostZoneResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetHostZoneResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetHostZoneResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetHostZoneResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetHostZoneResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetHostZoneResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetHostZoneResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.HostZone != nil { - value := protoreflect.ValueOfMessage(x.HostZone.ProtoReflect()) - if !f(fd_QueryGetHostZoneResponse_host_zone, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetHostZoneResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneResponse.host_zone": - return x.HostZone != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetHostZoneResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneResponse.host_zone": - x.HostZone = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetHostZoneResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryGetHostZoneResponse.host_zone": - value := x.HostZone - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetHostZoneResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneResponse.host_zone": - x.HostZone = value.Message().Interface().(*HostZone) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetHostZoneResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneResponse.host_zone": - if x.HostZone == nil { - x.HostZone = new(HostZone) - } - return protoreflect.ValueOfMessage(x.HostZone.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetHostZoneResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetHostZoneResponse.host_zone": - m := new(HostZone) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetHostZoneResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryGetHostZoneResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetHostZoneResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetHostZoneResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetHostZoneResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetHostZoneResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetHostZoneResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.HostZone != nil { - l = options.Size(x.HostZone) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetHostZoneResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.HostZone != nil { - encoded, err := options.Marshal(x.HostZone) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetHostZoneResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetHostZoneResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetHostZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.HostZone == nil { - x.HostZone = &HostZone{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HostZone); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllHostZoneRequest protoreflect.MessageDescriptor - fd_QueryAllHostZoneRequest_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryAllHostZoneRequest = File_stride_stakeibc_query_proto.Messages().ByName("QueryAllHostZoneRequest") - fd_QueryAllHostZoneRequest_pagination = md_QueryAllHostZoneRequest.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllHostZoneRequest)(nil) - -type fastReflection_QueryAllHostZoneRequest QueryAllHostZoneRequest - -func (x *QueryAllHostZoneRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllHostZoneRequest)(x) -} - -func (x *QueryAllHostZoneRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllHostZoneRequest_messageType fastReflection_QueryAllHostZoneRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllHostZoneRequest_messageType{} - -type fastReflection_QueryAllHostZoneRequest_messageType struct{} - -func (x fastReflection_QueryAllHostZoneRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllHostZoneRequest)(nil) -} -func (x fastReflection_QueryAllHostZoneRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllHostZoneRequest) -} -func (x fastReflection_QueryAllHostZoneRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllHostZoneRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllHostZoneRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllHostZoneRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllHostZoneRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllHostZoneRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllHostZoneRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllHostZoneRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllHostZoneRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllHostZoneRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllHostZoneRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllHostZoneRequest_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllHostZoneRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneRequest.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllHostZoneRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneRequest.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllHostZoneRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryAllHostZoneRequest.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllHostZoneRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneRequest.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllHostZoneRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneRequest.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageRequest) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllHostZoneRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneRequest.pagination": - m := new(v1beta1.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllHostZoneRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryAllHostZoneRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllHostZoneRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllHostZoneRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllHostZoneRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllHostZoneRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllHostZoneRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllHostZoneRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllHostZoneRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllHostZoneRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllHostZoneRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllHostZoneResponse_1_list)(nil) - -type _QueryAllHostZoneResponse_1_list struct { - list *[]*HostZone -} - -func (x *_QueryAllHostZoneResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllHostZoneResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllHostZoneResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*HostZone) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllHostZoneResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*HostZone) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllHostZoneResponse_1_list) AppendMutable() protoreflect.Value { - v := new(HostZone) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllHostZoneResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllHostZoneResponse_1_list) NewElement() protoreflect.Value { - v := new(HostZone) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllHostZoneResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllHostZoneResponse protoreflect.MessageDescriptor - fd_QueryAllHostZoneResponse_host_zone protoreflect.FieldDescriptor - fd_QueryAllHostZoneResponse_pagination protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryAllHostZoneResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryAllHostZoneResponse") - fd_QueryAllHostZoneResponse_host_zone = md_QueryAllHostZoneResponse.Fields().ByName("host_zone") - fd_QueryAllHostZoneResponse_pagination = md_QueryAllHostZoneResponse.Fields().ByName("pagination") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllHostZoneResponse)(nil) - -type fastReflection_QueryAllHostZoneResponse QueryAllHostZoneResponse - -func (x *QueryAllHostZoneResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllHostZoneResponse)(x) -} - -func (x *QueryAllHostZoneResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllHostZoneResponse_messageType fastReflection_QueryAllHostZoneResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllHostZoneResponse_messageType{} - -type fastReflection_QueryAllHostZoneResponse_messageType struct{} - -func (x fastReflection_QueryAllHostZoneResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllHostZoneResponse)(nil) -} -func (x fastReflection_QueryAllHostZoneResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllHostZoneResponse) -} -func (x fastReflection_QueryAllHostZoneResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllHostZoneResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllHostZoneResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllHostZoneResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllHostZoneResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllHostZoneResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllHostZoneResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllHostZoneResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllHostZoneResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllHostZoneResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllHostZoneResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.HostZone) != 0 { - value := protoreflect.ValueOfList(&_QueryAllHostZoneResponse_1_list{list: &x.HostZone}) - if !f(fd_QueryAllHostZoneResponse_host_zone, value) { - return - } - } - if x.Pagination != nil { - value := protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - if !f(fd_QueryAllHostZoneResponse_pagination, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllHostZoneResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneResponse.host_zone": - return len(x.HostZone) != 0 - case "stride.stakeibc.QueryAllHostZoneResponse.pagination": - return x.Pagination != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllHostZoneResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneResponse.host_zone": - x.HostZone = nil - case "stride.stakeibc.QueryAllHostZoneResponse.pagination": - x.Pagination = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllHostZoneResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryAllHostZoneResponse.host_zone": - if len(x.HostZone) == 0 { - return protoreflect.ValueOfList(&_QueryAllHostZoneResponse_1_list{}) - } - listValue := &_QueryAllHostZoneResponse_1_list{list: &x.HostZone} - return protoreflect.ValueOfList(listValue) - case "stride.stakeibc.QueryAllHostZoneResponse.pagination": - value := x.Pagination - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllHostZoneResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneResponse.host_zone": - lv := value.List() - clv := lv.(*_QueryAllHostZoneResponse_1_list) - x.HostZone = *clv.list - case "stride.stakeibc.QueryAllHostZoneResponse.pagination": - x.Pagination = value.Message().Interface().(*v1beta1.PageResponse) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllHostZoneResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneResponse.host_zone": - if x.HostZone == nil { - x.HostZone = []*HostZone{} - } - value := &_QueryAllHostZoneResponse_1_list{list: &x.HostZone} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.QueryAllHostZoneResponse.pagination": - if x.Pagination == nil { - x.Pagination = new(v1beta1.PageResponse) - } - return protoreflect.ValueOfMessage(x.Pagination.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllHostZoneResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAllHostZoneResponse.host_zone": - list := []*HostZone{} - return protoreflect.ValueOfList(&_QueryAllHostZoneResponse_1_list{list: &list}) - case "stride.stakeibc.QueryAllHostZoneResponse.pagination": - m := new(v1beta1.PageResponse) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllHostZoneResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryAllHostZoneResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllHostZoneResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllHostZoneResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllHostZoneResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllHostZoneResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllHostZoneResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.HostZone) > 0 { - for _, e := range x.HostZone { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Pagination != nil { - l = options.Size(x.Pagination) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllHostZoneResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Pagination != nil { - encoded, err := options.Marshal(x.Pagination) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.HostZone) > 0 { - for iNdEx := len(x.HostZone) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.HostZone[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllHostZoneResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllHostZoneResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllHostZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZone = append(x.HostZone, &HostZone{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HostZone[len(x.HostZone)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Pagination == nil { - x.Pagination = &v1beta1.PageResponse{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Pagination); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryModuleAddressRequest protoreflect.MessageDescriptor - fd_QueryModuleAddressRequest_name protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryModuleAddressRequest = File_stride_stakeibc_query_proto.Messages().ByName("QueryModuleAddressRequest") - fd_QueryModuleAddressRequest_name = md_QueryModuleAddressRequest.Fields().ByName("name") -} - -var _ protoreflect.Message = (*fastReflection_QueryModuleAddressRequest)(nil) - -type fastReflection_QueryModuleAddressRequest QueryModuleAddressRequest - -func (x *QueryModuleAddressRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAddressRequest)(x) -} - -func (x *QueryModuleAddressRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryModuleAddressRequest_messageType fastReflection_QueryModuleAddressRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAddressRequest_messageType{} - -type fastReflection_QueryModuleAddressRequest_messageType struct{} - -func (x fastReflection_QueryModuleAddressRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAddressRequest)(nil) -} -func (x fastReflection_QueryModuleAddressRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAddressRequest) -} -func (x fastReflection_QueryModuleAddressRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAddressRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryModuleAddressRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAddressRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryModuleAddressRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAddressRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAddressRequest) New() protoreflect.Message { - return new(fastReflection_QueryModuleAddressRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAddressRequest) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAddressRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryModuleAddressRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_QueryModuleAddressRequest_name, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryModuleAddressRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressRequest.name": - return x.Name != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAddressRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressRequest.name": - x.Name = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryModuleAddressRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryModuleAddressRequest.name": - value := x.Name - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAddressRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressRequest.name": - x.Name = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAddressRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressRequest.name": - panic(fmt.Errorf("field name of message stride.stakeibc.QueryModuleAddressRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryModuleAddressRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressRequest.name": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryModuleAddressRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryModuleAddressRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryModuleAddressRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAddressRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryModuleAddressRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryModuleAddressRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAddressRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAddressRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAddressRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryModuleAddressResponse protoreflect.MessageDescriptor - fd_QueryModuleAddressResponse_addr protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryModuleAddressResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryModuleAddressResponse") - fd_QueryModuleAddressResponse_addr = md_QueryModuleAddressResponse.Fields().ByName("addr") -} - -var _ protoreflect.Message = (*fastReflection_QueryModuleAddressResponse)(nil) - -type fastReflection_QueryModuleAddressResponse QueryModuleAddressResponse - -func (x *QueryModuleAddressResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryModuleAddressResponse)(x) -} - -func (x *QueryModuleAddressResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryModuleAddressResponse_messageType fastReflection_QueryModuleAddressResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryModuleAddressResponse_messageType{} - -type fastReflection_QueryModuleAddressResponse_messageType struct{} - -func (x fastReflection_QueryModuleAddressResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryModuleAddressResponse)(nil) -} -func (x fastReflection_QueryModuleAddressResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryModuleAddressResponse) -} -func (x fastReflection_QueryModuleAddressResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAddressResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryModuleAddressResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryModuleAddressResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryModuleAddressResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryModuleAddressResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryModuleAddressResponse) New() protoreflect.Message { - return new(fastReflection_QueryModuleAddressResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryModuleAddressResponse) Interface() protoreflect.ProtoMessage { - return (*QueryModuleAddressResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryModuleAddressResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Addr != "" { - value := protoreflect.ValueOfString(x.Addr) - if !f(fd_QueryModuleAddressResponse_addr, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryModuleAddressResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressResponse.addr": - return x.Addr != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAddressResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressResponse.addr": - x.Addr = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryModuleAddressResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryModuleAddressResponse.addr": - value := x.Addr - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAddressResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressResponse.addr": - x.Addr = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAddressResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressResponse.addr": - panic(fmt.Errorf("field addr of message stride.stakeibc.QueryModuleAddressResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryModuleAddressResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryModuleAddressResponse.addr": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryModuleAddressResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryModuleAddressResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryModuleAddressResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryModuleAddressResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryModuleAddressResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryModuleAddressResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryModuleAddressResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryModuleAddressResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryModuleAddressResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Addr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAddressResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Addr) > 0 { - i -= len(x.Addr) - copy(dAtA[i:], x.Addr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Addr))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryModuleAddressResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryModuleAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Addr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetEpochTrackerRequest protoreflect.MessageDescriptor - fd_QueryGetEpochTrackerRequest_epoch_identifier protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryGetEpochTrackerRequest = File_stride_stakeibc_query_proto.Messages().ByName("QueryGetEpochTrackerRequest") - fd_QueryGetEpochTrackerRequest_epoch_identifier = md_QueryGetEpochTrackerRequest.Fields().ByName("epoch_identifier") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetEpochTrackerRequest)(nil) - -type fastReflection_QueryGetEpochTrackerRequest QueryGetEpochTrackerRequest - -func (x *QueryGetEpochTrackerRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetEpochTrackerRequest)(x) -} - -func (x *QueryGetEpochTrackerRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetEpochTrackerRequest_messageType fastReflection_QueryGetEpochTrackerRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetEpochTrackerRequest_messageType{} - -type fastReflection_QueryGetEpochTrackerRequest_messageType struct{} - -func (x fastReflection_QueryGetEpochTrackerRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetEpochTrackerRequest)(nil) -} -func (x fastReflection_QueryGetEpochTrackerRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetEpochTrackerRequest) -} -func (x fastReflection_QueryGetEpochTrackerRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetEpochTrackerRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetEpochTrackerRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetEpochTrackerRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetEpochTrackerRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetEpochTrackerRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetEpochTrackerRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetEpochTrackerRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetEpochTrackerRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetEpochTrackerRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetEpochTrackerRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.EpochIdentifier != "" { - value := protoreflect.ValueOfString(x.EpochIdentifier) - if !f(fd_QueryGetEpochTrackerRequest_epoch_identifier, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetEpochTrackerRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerRequest.epoch_identifier": - return x.EpochIdentifier != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochTrackerRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerRequest.epoch_identifier": - x.EpochIdentifier = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetEpochTrackerRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerRequest.epoch_identifier": - value := x.EpochIdentifier - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochTrackerRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerRequest.epoch_identifier": - x.EpochIdentifier = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochTrackerRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerRequest.epoch_identifier": - panic(fmt.Errorf("field epoch_identifier of message stride.stakeibc.QueryGetEpochTrackerRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetEpochTrackerRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerRequest.epoch_identifier": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetEpochTrackerRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryGetEpochTrackerRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetEpochTrackerRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochTrackerRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetEpochTrackerRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetEpochTrackerRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetEpochTrackerRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.EpochIdentifier) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetEpochTrackerRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.EpochIdentifier) > 0 { - i -= len(x.EpochIdentifier) - copy(dAtA[i:], x.EpochIdentifier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EpochIdentifier))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetEpochTrackerRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetEpochTrackerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetEpochTrackerRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochIdentifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.EpochIdentifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetEpochTrackerResponse protoreflect.MessageDescriptor - fd_QueryGetEpochTrackerResponse_epoch_tracker protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryGetEpochTrackerResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryGetEpochTrackerResponse") - fd_QueryGetEpochTrackerResponse_epoch_tracker = md_QueryGetEpochTrackerResponse.Fields().ByName("epoch_tracker") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetEpochTrackerResponse)(nil) - -type fastReflection_QueryGetEpochTrackerResponse QueryGetEpochTrackerResponse - -func (x *QueryGetEpochTrackerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetEpochTrackerResponse)(x) -} - -func (x *QueryGetEpochTrackerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetEpochTrackerResponse_messageType fastReflection_QueryGetEpochTrackerResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetEpochTrackerResponse_messageType{} - -type fastReflection_QueryGetEpochTrackerResponse_messageType struct{} - -func (x fastReflection_QueryGetEpochTrackerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetEpochTrackerResponse)(nil) -} -func (x fastReflection_QueryGetEpochTrackerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetEpochTrackerResponse) -} -func (x fastReflection_QueryGetEpochTrackerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetEpochTrackerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetEpochTrackerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetEpochTrackerResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetEpochTrackerResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetEpochTrackerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetEpochTrackerResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetEpochTrackerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetEpochTrackerResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetEpochTrackerResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetEpochTrackerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.EpochTracker != nil { - value := protoreflect.ValueOfMessage(x.EpochTracker.ProtoReflect()) - if !f(fd_QueryGetEpochTrackerResponse_epoch_tracker, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetEpochTrackerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerResponse.epoch_tracker": - return x.EpochTracker != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochTrackerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerResponse.epoch_tracker": - x.EpochTracker = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetEpochTrackerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerResponse.epoch_tracker": - value := x.EpochTracker - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochTrackerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerResponse.epoch_tracker": - x.EpochTracker = value.Message().Interface().(*EpochTracker) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochTrackerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerResponse.epoch_tracker": - if x.EpochTracker == nil { - x.EpochTracker = new(EpochTracker) - } - return protoreflect.ValueOfMessage(x.EpochTracker.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetEpochTrackerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetEpochTrackerResponse.epoch_tracker": - m := new(EpochTracker) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetEpochTrackerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryGetEpochTrackerResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetEpochTrackerResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetEpochTrackerResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetEpochTrackerResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetEpochTrackerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetEpochTrackerResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.EpochTracker != nil { - l = options.Size(x.EpochTracker) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetEpochTrackerResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.EpochTracker != nil { - encoded, err := options.Marshal(x.EpochTracker) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetEpochTrackerResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetEpochTrackerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetEpochTrackerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochTracker", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.EpochTracker == nil { - x.EpochTracker = &EpochTracker{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EpochTracker); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllEpochTrackerRequest protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryAllEpochTrackerRequest = File_stride_stakeibc_query_proto.Messages().ByName("QueryAllEpochTrackerRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllEpochTrackerRequest)(nil) - -type fastReflection_QueryAllEpochTrackerRequest QueryAllEpochTrackerRequest - -func (x *QueryAllEpochTrackerRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllEpochTrackerRequest)(x) -} - -func (x *QueryAllEpochTrackerRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllEpochTrackerRequest_messageType fastReflection_QueryAllEpochTrackerRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllEpochTrackerRequest_messageType{} - -type fastReflection_QueryAllEpochTrackerRequest_messageType struct{} - -func (x fastReflection_QueryAllEpochTrackerRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllEpochTrackerRequest)(nil) -} -func (x fastReflection_QueryAllEpochTrackerRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllEpochTrackerRequest) -} -func (x fastReflection_QueryAllEpochTrackerRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEpochTrackerRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllEpochTrackerRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEpochTrackerRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllEpochTrackerRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllEpochTrackerRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllEpochTrackerRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllEpochTrackerRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllEpochTrackerRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllEpochTrackerRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllEpochTrackerRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllEpochTrackerRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochTrackerRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllEpochTrackerRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochTrackerRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochTrackerRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllEpochTrackerRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllEpochTrackerRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryAllEpochTrackerRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllEpochTrackerRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochTrackerRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllEpochTrackerRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllEpochTrackerRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllEpochTrackerRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllEpochTrackerRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllEpochTrackerRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEpochTrackerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEpochTrackerRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllEpochTrackerResponse_1_list)(nil) - -type _QueryAllEpochTrackerResponse_1_list struct { - list *[]*EpochTracker -} - -func (x *_QueryAllEpochTrackerResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllEpochTrackerResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllEpochTrackerResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochTracker) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllEpochTrackerResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EpochTracker) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllEpochTrackerResponse_1_list) AppendMutable() protoreflect.Value { - v := new(EpochTracker) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllEpochTrackerResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllEpochTrackerResponse_1_list) NewElement() protoreflect.Value { - v := new(EpochTracker) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllEpochTrackerResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllEpochTrackerResponse protoreflect.MessageDescriptor - fd_QueryAllEpochTrackerResponse_epoch_tracker protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryAllEpochTrackerResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryAllEpochTrackerResponse") - fd_QueryAllEpochTrackerResponse_epoch_tracker = md_QueryAllEpochTrackerResponse.Fields().ByName("epoch_tracker") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllEpochTrackerResponse)(nil) - -type fastReflection_QueryAllEpochTrackerResponse QueryAllEpochTrackerResponse - -func (x *QueryAllEpochTrackerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllEpochTrackerResponse)(x) -} - -func (x *QueryAllEpochTrackerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllEpochTrackerResponse_messageType fastReflection_QueryAllEpochTrackerResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllEpochTrackerResponse_messageType{} - -type fastReflection_QueryAllEpochTrackerResponse_messageType struct{} - -func (x fastReflection_QueryAllEpochTrackerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllEpochTrackerResponse)(nil) -} -func (x fastReflection_QueryAllEpochTrackerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllEpochTrackerResponse) -} -func (x fastReflection_QueryAllEpochTrackerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEpochTrackerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllEpochTrackerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllEpochTrackerResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllEpochTrackerResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllEpochTrackerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllEpochTrackerResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllEpochTrackerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllEpochTrackerResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllEpochTrackerResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllEpochTrackerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.EpochTracker) != 0 { - value := protoreflect.ValueOfList(&_QueryAllEpochTrackerResponse_1_list{list: &x.EpochTracker}) - if !f(fd_QueryAllEpochTrackerResponse_epoch_tracker, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllEpochTrackerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryAllEpochTrackerResponse.epoch_tracker": - return len(x.EpochTracker) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochTrackerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryAllEpochTrackerResponse.epoch_tracker": - x.EpochTracker = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllEpochTrackerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryAllEpochTrackerResponse.epoch_tracker": - if len(x.EpochTracker) == 0 { - return protoreflect.ValueOfList(&_QueryAllEpochTrackerResponse_1_list{}) - } - listValue := &_QueryAllEpochTrackerResponse_1_list{list: &x.EpochTracker} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochTrackerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryAllEpochTrackerResponse.epoch_tracker": - lv := value.List() - clv := lv.(*_QueryAllEpochTrackerResponse_1_list) - x.EpochTracker = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochTrackerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAllEpochTrackerResponse.epoch_tracker": - if x.EpochTracker == nil { - x.EpochTracker = []*EpochTracker{} - } - value := &_QueryAllEpochTrackerResponse_1_list{list: &x.EpochTracker} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllEpochTrackerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAllEpochTrackerResponse.epoch_tracker": - list := []*EpochTracker{} - return protoreflect.ValueOfList(&_QueryAllEpochTrackerResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllEpochTrackerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllEpochTrackerResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllEpochTrackerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryAllEpochTrackerResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllEpochTrackerResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllEpochTrackerResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllEpochTrackerResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllEpochTrackerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllEpochTrackerResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.EpochTracker) > 0 { - for _, e := range x.EpochTracker { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllEpochTrackerResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.EpochTracker) > 0 { - for iNdEx := len(x.EpochTracker) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.EpochTracker[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllEpochTrackerResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEpochTrackerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllEpochTrackerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EpochTracker", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.EpochTracker = append(x.EpochTracker, &EpochTracker{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EpochTracker[len(x.EpochTracker)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetNextPacketSequenceRequest protoreflect.MessageDescriptor - fd_QueryGetNextPacketSequenceRequest_channel_id protoreflect.FieldDescriptor - fd_QueryGetNextPacketSequenceRequest_port_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryGetNextPacketSequenceRequest = File_stride_stakeibc_query_proto.Messages().ByName("QueryGetNextPacketSequenceRequest") - fd_QueryGetNextPacketSequenceRequest_channel_id = md_QueryGetNextPacketSequenceRequest.Fields().ByName("channel_id") - fd_QueryGetNextPacketSequenceRequest_port_id = md_QueryGetNextPacketSequenceRequest.Fields().ByName("port_id") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetNextPacketSequenceRequest)(nil) - -type fastReflection_QueryGetNextPacketSequenceRequest QueryGetNextPacketSequenceRequest - -func (x *QueryGetNextPacketSequenceRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetNextPacketSequenceRequest)(x) -} - -func (x *QueryGetNextPacketSequenceRequest) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetNextPacketSequenceRequest_messageType fastReflection_QueryGetNextPacketSequenceRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetNextPacketSequenceRequest_messageType{} - -type fastReflection_QueryGetNextPacketSequenceRequest_messageType struct{} - -func (x fastReflection_QueryGetNextPacketSequenceRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetNextPacketSequenceRequest)(nil) -} -func (x fastReflection_QueryGetNextPacketSequenceRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetNextPacketSequenceRequest) -} -func (x fastReflection_QueryGetNextPacketSequenceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetNextPacketSequenceRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetNextPacketSequenceRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryGetNextPacketSequenceRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) New() protoreflect.Message { - return new(fastReflection_QueryGetNextPacketSequenceRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) Interface() protoreflect.ProtoMessage { - return (*QueryGetNextPacketSequenceRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChannelId != "" { - value := protoreflect.ValueOfString(x.ChannelId) - if !f(fd_QueryGetNextPacketSequenceRequest_channel_id, value) { - return - } - } - if x.PortId != "" { - value := protoreflect.ValueOfString(x.PortId) - if !f(fd_QueryGetNextPacketSequenceRequest_port_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.channel_id": - return x.ChannelId != "" - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.port_id": - return x.PortId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.channel_id": - x.ChannelId = "" - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.port_id": - x.PortId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.channel_id": - value := x.ChannelId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.port_id": - value := x.PortId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.channel_id": - x.ChannelId = value.Interface().(string) - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.port_id": - x.PortId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.channel_id": - panic(fmt.Errorf("field channel_id of message stride.stakeibc.QueryGetNextPacketSequenceRequest is not mutable")) - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.port_id": - panic(fmt.Errorf("field port_id of message stride.stakeibc.QueryGetNextPacketSequenceRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.channel_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.QueryGetNextPacketSequenceRequest.port_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceRequest")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryGetNextPacketSequenceRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetNextPacketSequenceRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetNextPacketSequenceRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PortId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetNextPacketSequenceRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.PortId) > 0 { - i -= len(x.PortId) - copy(dAtA[i:], x.PortId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PortId))) - i-- - dAtA[i] = 0x12 - } - if len(x.ChannelId) > 0 { - i -= len(x.ChannelId) - copy(dAtA[i:], x.ChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChannelId))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetNextPacketSequenceRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetNextPacketSequenceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetNextPacketSequenceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryGetNextPacketSequenceResponse protoreflect.MessageDescriptor - fd_QueryGetNextPacketSequenceResponse_sequence protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryGetNextPacketSequenceResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryGetNextPacketSequenceResponse") - fd_QueryGetNextPacketSequenceResponse_sequence = md_QueryGetNextPacketSequenceResponse.Fields().ByName("sequence") -} - -var _ protoreflect.Message = (*fastReflection_QueryGetNextPacketSequenceResponse)(nil) - -type fastReflection_QueryGetNextPacketSequenceResponse QueryGetNextPacketSequenceResponse - -func (x *QueryGetNextPacketSequenceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryGetNextPacketSequenceResponse)(x) -} - -func (x *QueryGetNextPacketSequenceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryGetNextPacketSequenceResponse_messageType fastReflection_QueryGetNextPacketSequenceResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryGetNextPacketSequenceResponse_messageType{} - -type fastReflection_QueryGetNextPacketSequenceResponse_messageType struct{} - -func (x fastReflection_QueryGetNextPacketSequenceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryGetNextPacketSequenceResponse)(nil) -} -func (x fastReflection_QueryGetNextPacketSequenceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryGetNextPacketSequenceResponse) -} -func (x fastReflection_QueryGetNextPacketSequenceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetNextPacketSequenceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryGetNextPacketSequenceResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryGetNextPacketSequenceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) New() protoreflect.Message { - return new(fastReflection_QueryGetNextPacketSequenceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) Interface() protoreflect.ProtoMessage { - return (*QueryGetNextPacketSequenceResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sequence != uint64(0) { - value := protoreflect.ValueOfUint64(x.Sequence) - if !f(fd_QueryGetNextPacketSequenceResponse_sequence, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceResponse.sequence": - return x.Sequence != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceResponse.sequence": - x.Sequence = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceResponse.sequence": - value := x.Sequence - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceResponse.sequence": - x.Sequence = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceResponse.sequence": - panic(fmt.Errorf("field sequence of message stride.stakeibc.QueryGetNextPacketSequenceResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryGetNextPacketSequenceResponse.sequence": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryGetNextPacketSequenceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryGetNextPacketSequenceResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryGetNextPacketSequenceResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryGetNextPacketSequenceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryGetNextPacketSequenceResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Sequence != 0 { - n += 1 + runtime.Sov(uint64(x.Sequence)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryGetNextPacketSequenceResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Sequence != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Sequence)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryGetNextPacketSequenceResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetNextPacketSequenceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetNextPacketSequenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - x.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAddressUnbondings protoreflect.MessageDescriptor - fd_QueryAddressUnbondings_address protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryAddressUnbondings = File_stride_stakeibc_query_proto.Messages().ByName("QueryAddressUnbondings") - fd_QueryAddressUnbondings_address = md_QueryAddressUnbondings.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_QueryAddressUnbondings)(nil) - -type fastReflection_QueryAddressUnbondings QueryAddressUnbondings - -func (x *QueryAddressUnbondings) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAddressUnbondings)(x) -} - -func (x *QueryAddressUnbondings) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAddressUnbondings_messageType fastReflection_QueryAddressUnbondings_messageType -var _ protoreflect.MessageType = fastReflection_QueryAddressUnbondings_messageType{} - -type fastReflection_QueryAddressUnbondings_messageType struct{} - -func (x fastReflection_QueryAddressUnbondings_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAddressUnbondings)(nil) -} -func (x fastReflection_QueryAddressUnbondings_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAddressUnbondings) -} -func (x fastReflection_QueryAddressUnbondings_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAddressUnbondings -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAddressUnbondings) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAddressUnbondings -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAddressUnbondings) Type() protoreflect.MessageType { - return _fastReflection_QueryAddressUnbondings_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAddressUnbondings) New() protoreflect.Message { - return new(fastReflection_QueryAddressUnbondings) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAddressUnbondings) Interface() protoreflect.ProtoMessage { - return (*QueryAddressUnbondings)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAddressUnbondings) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QueryAddressUnbondings_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAddressUnbondings) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondings.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondings")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondings does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAddressUnbondings) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondings.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondings")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondings does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAddressUnbondings) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryAddressUnbondings.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondings")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondings does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAddressUnbondings) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondings.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondings")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondings does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAddressUnbondings) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondings.address": - panic(fmt.Errorf("field address of message stride.stakeibc.QueryAddressUnbondings is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondings")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondings does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAddressUnbondings) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondings.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondings")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondings does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAddressUnbondings) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryAddressUnbondings", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAddressUnbondings) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAddressUnbondings) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAddressUnbondings) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAddressUnbondings) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAddressUnbondings) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAddressUnbondings) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAddressUnbondings) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAddressUnbondings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAddressUnbondings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAddressUnbondingsResponse_1_list)(nil) - -type _QueryAddressUnbondingsResponse_1_list struct { - list *[]*AddressUnbonding -} - -func (x *_QueryAddressUnbondingsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAddressUnbondingsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAddressUnbondingsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AddressUnbonding) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAddressUnbondingsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AddressUnbonding) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAddressUnbondingsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(AddressUnbonding) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAddressUnbondingsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAddressUnbondingsResponse_1_list) NewElement() protoreflect.Value { - v := new(AddressUnbonding) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAddressUnbondingsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAddressUnbondingsResponse protoreflect.MessageDescriptor - fd_QueryAddressUnbondingsResponse_address_unbondings protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryAddressUnbondingsResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryAddressUnbondingsResponse") - fd_QueryAddressUnbondingsResponse_address_unbondings = md_QueryAddressUnbondingsResponse.Fields().ByName("address_unbondings") -} - -var _ protoreflect.Message = (*fastReflection_QueryAddressUnbondingsResponse)(nil) - -type fastReflection_QueryAddressUnbondingsResponse QueryAddressUnbondingsResponse - -func (x *QueryAddressUnbondingsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAddressUnbondingsResponse)(x) -} - -func (x *QueryAddressUnbondingsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAddressUnbondingsResponse_messageType fastReflection_QueryAddressUnbondingsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAddressUnbondingsResponse_messageType{} - -type fastReflection_QueryAddressUnbondingsResponse_messageType struct{} - -func (x fastReflection_QueryAddressUnbondingsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAddressUnbondingsResponse)(nil) -} -func (x fastReflection_QueryAddressUnbondingsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAddressUnbondingsResponse) -} -func (x fastReflection_QueryAddressUnbondingsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAddressUnbondingsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAddressUnbondingsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAddressUnbondingsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAddressUnbondingsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAddressUnbondingsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAddressUnbondingsResponse) New() protoreflect.Message { - return new(fastReflection_QueryAddressUnbondingsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAddressUnbondingsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAddressUnbondingsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAddressUnbondingsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AddressUnbondings) != 0 { - value := protoreflect.ValueOfList(&_QueryAddressUnbondingsResponse_1_list{list: &x.AddressUnbondings}) - if !f(fd_QueryAddressUnbondingsResponse_address_unbondings, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAddressUnbondingsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondingsResponse.address_unbondings": - return len(x.AddressUnbondings) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondingsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondingsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAddressUnbondingsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondingsResponse.address_unbondings": - x.AddressUnbondings = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondingsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondingsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAddressUnbondingsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryAddressUnbondingsResponse.address_unbondings": - if len(x.AddressUnbondings) == 0 { - return protoreflect.ValueOfList(&_QueryAddressUnbondingsResponse_1_list{}) - } - listValue := &_QueryAddressUnbondingsResponse_1_list{list: &x.AddressUnbondings} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondingsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondingsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAddressUnbondingsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondingsResponse.address_unbondings": - lv := value.List() - clv := lv.(*_QueryAddressUnbondingsResponse_1_list) - x.AddressUnbondings = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondingsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondingsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAddressUnbondingsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondingsResponse.address_unbondings": - if x.AddressUnbondings == nil { - x.AddressUnbondings = []*AddressUnbonding{} - } - value := &_QueryAddressUnbondingsResponse_1_list{list: &x.AddressUnbondings} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondingsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondingsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAddressUnbondingsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAddressUnbondingsResponse.address_unbondings": - list := []*AddressUnbonding{} - return protoreflect.ValueOfList(&_QueryAddressUnbondingsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAddressUnbondingsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAddressUnbondingsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAddressUnbondingsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryAddressUnbondingsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAddressUnbondingsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAddressUnbondingsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAddressUnbondingsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAddressUnbondingsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAddressUnbondingsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.AddressUnbondings) > 0 { - for _, e := range x.AddressUnbondings { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAddressUnbondingsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AddressUnbondings) > 0 { - for iNdEx := len(x.AddressUnbondings) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.AddressUnbondings[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAddressUnbondingsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAddressUnbondingsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAddressUnbondingsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AddressUnbondings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AddressUnbondings = append(x.AddressUnbondings, &AddressUnbonding{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AddressUnbondings[len(x.AddressUnbondings)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllTradeRoutes protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryAllTradeRoutes = File_stride_stakeibc_query_proto.Messages().ByName("QueryAllTradeRoutes") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllTradeRoutes)(nil) - -type fastReflection_QueryAllTradeRoutes QueryAllTradeRoutes - -func (x *QueryAllTradeRoutes) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllTradeRoutes)(x) -} - -func (x *QueryAllTradeRoutes) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllTradeRoutes_messageType fastReflection_QueryAllTradeRoutes_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllTradeRoutes_messageType{} - -type fastReflection_QueryAllTradeRoutes_messageType struct{} - -func (x fastReflection_QueryAllTradeRoutes_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllTradeRoutes)(nil) -} -func (x fastReflection_QueryAllTradeRoutes_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllTradeRoutes) -} -func (x fastReflection_QueryAllTradeRoutes_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllTradeRoutes -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllTradeRoutes) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllTradeRoutes -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllTradeRoutes) Type() protoreflect.MessageType { - return _fastReflection_QueryAllTradeRoutes_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllTradeRoutes) New() protoreflect.Message { - return new(fastReflection_QueryAllTradeRoutes) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllTradeRoutes) Interface() protoreflect.ProtoMessage { - return (*QueryAllTradeRoutes)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllTradeRoutes) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllTradeRoutes) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutes")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutes does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllTradeRoutes) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutes")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutes does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllTradeRoutes) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutes")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutes does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllTradeRoutes) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutes")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutes does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllTradeRoutes) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutes")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutes does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllTradeRoutes) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutes")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutes does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllTradeRoutes) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryAllTradeRoutes", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllTradeRoutes) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllTradeRoutes) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllTradeRoutes) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllTradeRoutes) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllTradeRoutes) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllTradeRoutes) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllTradeRoutes) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllTradeRoutes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllTradeRoutes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryAllTradeRoutesResponse_1_list)(nil) - -type _QueryAllTradeRoutesResponse_1_list struct { - list *[]*TradeRoute -} - -func (x *_QueryAllTradeRoutesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryAllTradeRoutesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryAllTradeRoutesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TradeRoute) - (*x.list)[i] = concreteValue -} - -func (x *_QueryAllTradeRoutesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*TradeRoute) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryAllTradeRoutesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(TradeRoute) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllTradeRoutesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryAllTradeRoutesResponse_1_list) NewElement() protoreflect.Value { - v := new(TradeRoute) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryAllTradeRoutesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryAllTradeRoutesResponse protoreflect.MessageDescriptor - fd_QueryAllTradeRoutesResponse_trade_routes protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_query_proto_init() - md_QueryAllTradeRoutesResponse = File_stride_stakeibc_query_proto.Messages().ByName("QueryAllTradeRoutesResponse") - fd_QueryAllTradeRoutesResponse_trade_routes = md_QueryAllTradeRoutesResponse.Fields().ByName("trade_routes") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllTradeRoutesResponse)(nil) - -type fastReflection_QueryAllTradeRoutesResponse QueryAllTradeRoutesResponse - -func (x *QueryAllTradeRoutesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllTradeRoutesResponse)(x) -} - -func (x *QueryAllTradeRoutesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_query_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllTradeRoutesResponse_messageType fastReflection_QueryAllTradeRoutesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllTradeRoutesResponse_messageType{} - -type fastReflection_QueryAllTradeRoutesResponse_messageType struct{} - -func (x fastReflection_QueryAllTradeRoutesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllTradeRoutesResponse)(nil) -} -func (x fastReflection_QueryAllTradeRoutesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllTradeRoutesResponse) -} -func (x fastReflection_QueryAllTradeRoutesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllTradeRoutesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllTradeRoutesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllTradeRoutesResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllTradeRoutesResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllTradeRoutesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllTradeRoutesResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllTradeRoutesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllTradeRoutesResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllTradeRoutesResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllTradeRoutesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.TradeRoutes) != 0 { - value := protoreflect.ValueOfList(&_QueryAllTradeRoutesResponse_1_list{list: &x.TradeRoutes}) - if !f(fd_QueryAllTradeRoutesResponse_trade_routes, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllTradeRoutesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.QueryAllTradeRoutesResponse.trade_routes": - return len(x.TradeRoutes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutesResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutesResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllTradeRoutesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.QueryAllTradeRoutesResponse.trade_routes": - x.TradeRoutes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutesResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutesResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllTradeRoutesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.QueryAllTradeRoutesResponse.trade_routes": - if len(x.TradeRoutes) == 0 { - return protoreflect.ValueOfList(&_QueryAllTradeRoutesResponse_1_list{}) - } - listValue := &_QueryAllTradeRoutesResponse_1_list{list: &x.TradeRoutes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutesResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutesResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllTradeRoutesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.QueryAllTradeRoutesResponse.trade_routes": - lv := value.List() - clv := lv.(*_QueryAllTradeRoutesResponse_1_list) - x.TradeRoutes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutesResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutesResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllTradeRoutesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAllTradeRoutesResponse.trade_routes": - if x.TradeRoutes == nil { - x.TradeRoutes = []*TradeRoute{} - } - value := &_QueryAllTradeRoutesResponse_1_list{list: &x.TradeRoutes} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutesResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutesResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllTradeRoutesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.QueryAllTradeRoutesResponse.trade_routes": - list := []*TradeRoute{} - return protoreflect.ValueOfList(&_QueryAllTradeRoutesResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.QueryAllTradeRoutesResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.QueryAllTradeRoutesResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllTradeRoutesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.QueryAllTradeRoutesResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllTradeRoutesResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllTradeRoutesResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllTradeRoutesResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllTradeRoutesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllTradeRoutesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.TradeRoutes) > 0 { - for _, e := range x.TradeRoutes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllTradeRoutesResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.TradeRoutes) > 0 { - for iNdEx := len(x.TradeRoutes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.TradeRoutes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllTradeRoutesResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllTradeRoutesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllTradeRoutesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TradeRoutes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TradeRoutes = append(x.TradeRoutes, &TradeRoute{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TradeRoutes[len(x.TradeRoutes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryInterchainAccountFromAddressRequest is the request type for the -// Query/InterchainAccountAddress RPC -type QueryInterchainAccountFromAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` -} - -func (x *QueryInterchainAccountFromAddressRequest) Reset() { - *x = QueryInterchainAccountFromAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryInterchainAccountFromAddressRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryInterchainAccountFromAddressRequest) ProtoMessage() {} - -// Deprecated: Use QueryInterchainAccountFromAddressRequest.ProtoReflect.Descriptor instead. -func (*QueryInterchainAccountFromAddressRequest) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{0} -} - -func (x *QueryInterchainAccountFromAddressRequest) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *QueryInterchainAccountFromAddressRequest) GetConnectionId() string { - if x != nil { - return x.ConnectionId - } - return "" -} - -// QueryInterchainAccountFromAddressResponse the response type for the -// Query/InterchainAccountAddress RPC -type QueryInterchainAccountFromAddressResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - InterchainAccountAddress string `protobuf:"bytes,1,opt,name=interchain_account_address,json=interchainAccountAddress,proto3" json:"interchain_account_address,omitempty"` -} - -func (x *QueryInterchainAccountFromAddressResponse) Reset() { - *x = QueryInterchainAccountFromAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryInterchainAccountFromAddressResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryInterchainAccountFromAddressResponse) ProtoMessage() {} - -// Deprecated: Use QueryInterchainAccountFromAddressResponse.ProtoReflect.Descriptor instead. -func (*QueryInterchainAccountFromAddressResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryInterchainAccountFromAddressResponse) GetInterchainAccountAddress() string { - if x != nil { - return x.InterchainAccountAddress - } - return "" -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{2} -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params holds all the parameters of this module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -type QueryGetValidatorsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (x *QueryGetValidatorsRequest) Reset() { - *x = QueryGetValidatorsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetValidatorsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetValidatorsRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetValidatorsRequest.ProtoReflect.Descriptor instead. -func (*QueryGetValidatorsRequest) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryGetValidatorsRequest) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -type QueryGetValidatorsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` -} - -func (x *QueryGetValidatorsResponse) Reset() { - *x = QueryGetValidatorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetValidatorsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetValidatorsResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetValidatorsResponse.ProtoReflect.Descriptor instead. -func (*QueryGetValidatorsResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryGetValidatorsResponse) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -type QueryGetHostZoneRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (x *QueryGetHostZoneRequest) Reset() { - *x = QueryGetHostZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetHostZoneRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetHostZoneRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetHostZoneRequest.ProtoReflect.Descriptor instead. -func (*QueryGetHostZoneRequest) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryGetHostZoneRequest) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -type QueryGetHostZoneResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HostZone *HostZone `protobuf:"bytes,1,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` -} - -func (x *QueryGetHostZoneResponse) Reset() { - *x = QueryGetHostZoneResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetHostZoneResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetHostZoneResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetHostZoneResponse.ProtoReflect.Descriptor instead. -func (*QueryGetHostZoneResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryGetHostZoneResponse) GetHostZone() *HostZone { - if x != nil { - return x.HostZone - } - return nil -} - -type QueryAllHostZoneRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllHostZoneRequest) Reset() { - *x = QueryAllHostZoneRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllHostZoneRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllHostZoneRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllHostZoneRequest.ProtoReflect.Descriptor instead. -func (*QueryAllHostZoneRequest) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryAllHostZoneRequest) GetPagination() *v1beta1.PageRequest { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryAllHostZoneResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - HostZone []*HostZone `protobuf:"bytes,1,rep,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (x *QueryAllHostZoneResponse) Reset() { - *x = QueryAllHostZoneResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllHostZoneResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllHostZoneResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllHostZoneResponse.ProtoReflect.Descriptor instead. -func (*QueryAllHostZoneResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{9} -} - -func (x *QueryAllHostZoneResponse) GetHostZone() []*HostZone { - if x != nil { - return x.HostZone - } - return nil -} - -func (x *QueryAllHostZoneResponse) GetPagination() *v1beta1.PageResponse { - if x != nil { - return x.Pagination - } - return nil -} - -type QueryModuleAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (x *QueryModuleAddressRequest) Reset() { - *x = QueryModuleAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleAddressRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleAddressRequest) ProtoMessage() {} - -// Deprecated: Use QueryModuleAddressRequest.ProtoReflect.Descriptor instead. -func (*QueryModuleAddressRequest) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{10} -} - -func (x *QueryModuleAddressRequest) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -type QueryModuleAddressResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` -} - -func (x *QueryModuleAddressResponse) Reset() { - *x = QueryModuleAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryModuleAddressResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryModuleAddressResponse) ProtoMessage() {} - -// Deprecated: Use QueryModuleAddressResponse.ProtoReflect.Descriptor instead. -func (*QueryModuleAddressResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{11} -} - -func (x *QueryModuleAddressResponse) GetAddr() string { - if x != nil { - return x.Addr - } - return "" -} - -type QueryGetEpochTrackerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EpochIdentifier string `protobuf:"bytes,1,opt,name=epoch_identifier,json=epochIdentifier,proto3" json:"epoch_identifier,omitempty"` -} - -func (x *QueryGetEpochTrackerRequest) Reset() { - *x = QueryGetEpochTrackerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetEpochTrackerRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetEpochTrackerRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetEpochTrackerRequest.ProtoReflect.Descriptor instead. -func (*QueryGetEpochTrackerRequest) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{12} -} - -func (x *QueryGetEpochTrackerRequest) GetEpochIdentifier() string { - if x != nil { - return x.EpochIdentifier - } - return "" -} - -type QueryGetEpochTrackerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EpochTracker *EpochTracker `protobuf:"bytes,1,opt,name=epoch_tracker,json=epochTracker,proto3" json:"epoch_tracker,omitempty"` -} - -func (x *QueryGetEpochTrackerResponse) Reset() { - *x = QueryGetEpochTrackerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetEpochTrackerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetEpochTrackerResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetEpochTrackerResponse.ProtoReflect.Descriptor instead. -func (*QueryGetEpochTrackerResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{13} -} - -func (x *QueryGetEpochTrackerResponse) GetEpochTracker() *EpochTracker { - if x != nil { - return x.EpochTracker - } - return nil -} - -type QueryAllEpochTrackerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryAllEpochTrackerRequest) Reset() { - *x = QueryAllEpochTrackerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllEpochTrackerRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllEpochTrackerRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllEpochTrackerRequest.ProtoReflect.Descriptor instead. -func (*QueryAllEpochTrackerRequest) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{14} -} - -type QueryAllEpochTrackerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - EpochTracker []*EpochTracker `protobuf:"bytes,1,rep,name=epoch_tracker,json=epochTracker,proto3" json:"epoch_tracker,omitempty"` -} - -func (x *QueryAllEpochTrackerResponse) Reset() { - *x = QueryAllEpochTrackerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllEpochTrackerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllEpochTrackerResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllEpochTrackerResponse.ProtoReflect.Descriptor instead. -func (*QueryAllEpochTrackerResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{15} -} - -func (x *QueryAllEpochTrackerResponse) GetEpochTracker() []*EpochTracker { - if x != nil { - return x.EpochTracker - } - return nil -} - -type QueryGetNextPacketSequenceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` -} - -func (x *QueryGetNextPacketSequenceRequest) Reset() { - *x = QueryGetNextPacketSequenceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetNextPacketSequenceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetNextPacketSequenceRequest) ProtoMessage() {} - -// Deprecated: Use QueryGetNextPacketSequenceRequest.ProtoReflect.Descriptor instead. -func (*QueryGetNextPacketSequenceRequest) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{16} -} - -func (x *QueryGetNextPacketSequenceRequest) GetChannelId() string { - if x != nil { - return x.ChannelId - } - return "" -} - -func (x *QueryGetNextPacketSequenceRequest) GetPortId() string { - if x != nil { - return x.PortId - } - return "" -} - -type QueryGetNextPacketSequenceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (x *QueryGetNextPacketSequenceResponse) Reset() { - *x = QueryGetNextPacketSequenceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryGetNextPacketSequenceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryGetNextPacketSequenceResponse) ProtoMessage() {} - -// Deprecated: Use QueryGetNextPacketSequenceResponse.ProtoReflect.Descriptor instead. -func (*QueryGetNextPacketSequenceResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{17} -} - -func (x *QueryGetNextPacketSequenceResponse) GetSequence() uint64 { - if x != nil { - return x.Sequence - } - return 0 -} - -type QueryAddressUnbondings struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *QueryAddressUnbondings) Reset() { - *x = QueryAddressUnbondings{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAddressUnbondings) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAddressUnbondings) ProtoMessage() {} - -// Deprecated: Use QueryAddressUnbondings.ProtoReflect.Descriptor instead. -func (*QueryAddressUnbondings) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{18} -} - -func (x *QueryAddressUnbondings) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -type QueryAddressUnbondingsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - AddressUnbondings []*AddressUnbonding `protobuf:"bytes,1,rep,name=address_unbondings,json=addressUnbondings,proto3" json:"address_unbondings,omitempty"` -} - -func (x *QueryAddressUnbondingsResponse) Reset() { - *x = QueryAddressUnbondingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAddressUnbondingsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAddressUnbondingsResponse) ProtoMessage() {} - -// Deprecated: Use QueryAddressUnbondingsResponse.ProtoReflect.Descriptor instead. -func (*QueryAddressUnbondingsResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{19} -} - -func (x *QueryAddressUnbondingsResponse) GetAddressUnbondings() []*AddressUnbonding { - if x != nil { - return x.AddressUnbondings - } - return nil -} - -type QueryAllTradeRoutes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryAllTradeRoutes) Reset() { - *x = QueryAllTradeRoutes{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllTradeRoutes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllTradeRoutes) ProtoMessage() {} - -// Deprecated: Use QueryAllTradeRoutes.ProtoReflect.Descriptor instead. -func (*QueryAllTradeRoutes) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{20} -} - -type QueryAllTradeRoutesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TradeRoutes []*TradeRoute `protobuf:"bytes,1,rep,name=trade_routes,json=tradeRoutes,proto3" json:"trade_routes,omitempty"` -} - -func (x *QueryAllTradeRoutesResponse) Reset() { - *x = QueryAllTradeRoutesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_query_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllTradeRoutesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllTradeRoutesResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllTradeRoutesResponse.ProtoReflect.Descriptor instead. -func (*QueryAllTradeRoutesResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_query_proto_rawDescGZIP(), []int{21} -} - -func (x *QueryAllTradeRoutesResponse) GetTradeRoutes() []*TradeRoute { - if x != nil { - return x.TradeRoutes - } - return nil -} - -var File_stride_stakeibc_query_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_query_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, - 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x68, - 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, - 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x27, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x75, 0x6e, 0x62, - 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x74, 0x72, - 0x61, 0x64, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x7f, 0x0a, 0x28, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x12, 0x3d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xf2, 0xde, 0x1f, 0x14, 0x79, 0x61, - 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x22, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0x90, 0x01, 0x0a, 0x29, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, - 0x0a, 0x1a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x25, 0xf2, 0xde, 0x1f, 0x21, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4c, 0x0a, 0x13, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x35, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x36, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, - 0x58, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, - 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x34, 0x0a, 0x17, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, - 0x58, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x5a, - 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x68, - 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, - 0x08, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x22, 0x61, 0x0a, 0x17, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa1, 0x01, 0x0a, - 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x09, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x48, - 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x68, - 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x2f, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0x30, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, - 0x64, 0x64, 0x72, 0x22, 0x48, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, - 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x68, 0x0a, - 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, - 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, - 0x0d, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, - 0x6b, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x65, 0x70, 0x6f, 0x63, 0x68, - 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x41, 0x6c, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x68, 0x0a, 0x1c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, - 0x6c, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0d, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, - 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, - 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x0c, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, - 0x22, 0x5b, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, - 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x64, 0x22, 0x40, 0x0a, - 0x22, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, - 0x32, 0x0a, 0x16, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x55, - 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x78, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x5f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x55, 0x6e, 0x62, 0x6f, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x15, 0x0a, - 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x73, 0x22, 0x63, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x74, 0x72, - 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x32, 0x8e, 0x0e, 0x0a, 0x05, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x12, 0x7f, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, - 0x12, 0x22, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0xa1, 0x01, 0x0a, 0x0a, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x73, 0x12, 0x2a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2b, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, - 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x9a, 0x01, 0x0a, 0x08, 0x48, 0x6f, 0x73, - 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, - 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x29, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, - 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x33, 0x12, 0x31, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x2f, 0x7b, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, - 0x6e, 0x65, 0x41, 0x6c, 0x6c, 0x12, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x29, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, - 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x28, 0x12, 0x26, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x12, 0xa4, 0x01, 0x0a, 0x0d, 0x4d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x2e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, - 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x1c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x39, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xb2, 0x01, 0x0a, 0x0c, 0x45, 0x70, - 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x47, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x12, - 0x3d, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x65, 0x70, - 0x6f, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x7b, 0x65, 0x70, 0x6f, - 0x63, 0x68, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x7d, 0x12, 0xa2, - 0x01, 0x0a, 0x0f, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x41, - 0x6c, 0x6c, 0x12, 0x2c, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x70, 0x6f, - 0x63, 0x68, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x45, 0x70, 0x6f, 0x63, 0x68, - 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x63, - 0x6b, 0x65, 0x72, 0x12, 0xcf, 0x01, 0x0a, 0x12, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x2e, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, - 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x63, - 0x6b, 0x65, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x50, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4a, 0x12, 0x48, 0x2f, 0x53, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, - 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x7b, - 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x70, 0x6f, 0x72, - 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0xa8, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x73, 0x1a, 0x2f, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x55, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, - 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x75, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, - 0x12, 0x97, 0x01, 0x0a, 0x0e, 0x41, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x54, 0x72, - 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x2c, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x41, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x12, - 0x29, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2d, 0x4c, 0x61, 0x62, 0x73, 0x2f, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x74, 0x72, - 0x61, 0x64, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x42, 0xb5, 0x01, 0x0a, 0x13, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, - 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0f, - 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xca, - 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x10, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_query_proto_rawDescOnce sync.Once - file_stride_stakeibc_query_proto_rawDescData = file_stride_stakeibc_query_proto_rawDesc -) - -func file_stride_stakeibc_query_proto_rawDescGZIP() []byte { - file_stride_stakeibc_query_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_query_proto_rawDescData) - }) - return file_stride_stakeibc_query_proto_rawDescData -} - -var file_stride_stakeibc_query_proto_msgTypes = make([]protoimpl.MessageInfo, 22) -var file_stride_stakeibc_query_proto_goTypes = []interface{}{ - (*QueryInterchainAccountFromAddressRequest)(nil), // 0: stride.stakeibc.QueryInterchainAccountFromAddressRequest - (*QueryInterchainAccountFromAddressResponse)(nil), // 1: stride.stakeibc.QueryInterchainAccountFromAddressResponse - (*QueryParamsRequest)(nil), // 2: stride.stakeibc.QueryParamsRequest - (*QueryParamsResponse)(nil), // 3: stride.stakeibc.QueryParamsResponse - (*QueryGetValidatorsRequest)(nil), // 4: stride.stakeibc.QueryGetValidatorsRequest - (*QueryGetValidatorsResponse)(nil), // 5: stride.stakeibc.QueryGetValidatorsResponse - (*QueryGetHostZoneRequest)(nil), // 6: stride.stakeibc.QueryGetHostZoneRequest - (*QueryGetHostZoneResponse)(nil), // 7: stride.stakeibc.QueryGetHostZoneResponse - (*QueryAllHostZoneRequest)(nil), // 8: stride.stakeibc.QueryAllHostZoneRequest - (*QueryAllHostZoneResponse)(nil), // 9: stride.stakeibc.QueryAllHostZoneResponse - (*QueryModuleAddressRequest)(nil), // 10: stride.stakeibc.QueryModuleAddressRequest - (*QueryModuleAddressResponse)(nil), // 11: stride.stakeibc.QueryModuleAddressResponse - (*QueryGetEpochTrackerRequest)(nil), // 12: stride.stakeibc.QueryGetEpochTrackerRequest - (*QueryGetEpochTrackerResponse)(nil), // 13: stride.stakeibc.QueryGetEpochTrackerResponse - (*QueryAllEpochTrackerRequest)(nil), // 14: stride.stakeibc.QueryAllEpochTrackerRequest - (*QueryAllEpochTrackerResponse)(nil), // 15: stride.stakeibc.QueryAllEpochTrackerResponse - (*QueryGetNextPacketSequenceRequest)(nil), // 16: stride.stakeibc.QueryGetNextPacketSequenceRequest - (*QueryGetNextPacketSequenceResponse)(nil), // 17: stride.stakeibc.QueryGetNextPacketSequenceResponse - (*QueryAddressUnbondings)(nil), // 18: stride.stakeibc.QueryAddressUnbondings - (*QueryAddressUnbondingsResponse)(nil), // 19: stride.stakeibc.QueryAddressUnbondingsResponse - (*QueryAllTradeRoutes)(nil), // 20: stride.stakeibc.QueryAllTradeRoutes - (*QueryAllTradeRoutesResponse)(nil), // 21: stride.stakeibc.QueryAllTradeRoutesResponse - (*Params)(nil), // 22: stride.stakeibc.Params - (*Validator)(nil), // 23: stride.stakeibc.Validator - (*HostZone)(nil), // 24: stride.stakeibc.HostZone - (*v1beta1.PageRequest)(nil), // 25: cosmos.base.query.v1beta1.PageRequest - (*v1beta1.PageResponse)(nil), // 26: cosmos.base.query.v1beta1.PageResponse - (*EpochTracker)(nil), // 27: stride.stakeibc.EpochTracker - (*AddressUnbonding)(nil), // 28: stride.stakeibc.AddressUnbonding - (*TradeRoute)(nil), // 29: stride.stakeibc.TradeRoute -} -var file_stride_stakeibc_query_proto_depIdxs = []int32{ - 22, // 0: stride.stakeibc.QueryParamsResponse.params:type_name -> stride.stakeibc.Params - 23, // 1: stride.stakeibc.QueryGetValidatorsResponse.validators:type_name -> stride.stakeibc.Validator - 24, // 2: stride.stakeibc.QueryGetHostZoneResponse.host_zone:type_name -> stride.stakeibc.HostZone - 25, // 3: stride.stakeibc.QueryAllHostZoneRequest.pagination:type_name -> cosmos.base.query.v1beta1.PageRequest - 24, // 4: stride.stakeibc.QueryAllHostZoneResponse.host_zone:type_name -> stride.stakeibc.HostZone - 26, // 5: stride.stakeibc.QueryAllHostZoneResponse.pagination:type_name -> cosmos.base.query.v1beta1.PageResponse - 27, // 6: stride.stakeibc.QueryGetEpochTrackerResponse.epoch_tracker:type_name -> stride.stakeibc.EpochTracker - 27, // 7: stride.stakeibc.QueryAllEpochTrackerResponse.epoch_tracker:type_name -> stride.stakeibc.EpochTracker - 28, // 8: stride.stakeibc.QueryAddressUnbondingsResponse.address_unbondings:type_name -> stride.stakeibc.AddressUnbonding - 29, // 9: stride.stakeibc.QueryAllTradeRoutesResponse.trade_routes:type_name -> stride.stakeibc.TradeRoute - 2, // 10: stride.stakeibc.Query.Params:input_type -> stride.stakeibc.QueryParamsRequest - 4, // 11: stride.stakeibc.Query.Validators:input_type -> stride.stakeibc.QueryGetValidatorsRequest - 6, // 12: stride.stakeibc.Query.HostZone:input_type -> stride.stakeibc.QueryGetHostZoneRequest - 8, // 13: stride.stakeibc.Query.HostZoneAll:input_type -> stride.stakeibc.QueryAllHostZoneRequest - 10, // 14: stride.stakeibc.Query.ModuleAddress:input_type -> stride.stakeibc.QueryModuleAddressRequest - 0, // 15: stride.stakeibc.Query.InterchainAccountFromAddress:input_type -> stride.stakeibc.QueryInterchainAccountFromAddressRequest - 12, // 16: stride.stakeibc.Query.EpochTracker:input_type -> stride.stakeibc.QueryGetEpochTrackerRequest - 14, // 17: stride.stakeibc.Query.EpochTrackerAll:input_type -> stride.stakeibc.QueryAllEpochTrackerRequest - 16, // 18: stride.stakeibc.Query.NextPacketSequence:input_type -> stride.stakeibc.QueryGetNextPacketSequenceRequest - 18, // 19: stride.stakeibc.Query.AddressUnbondings:input_type -> stride.stakeibc.QueryAddressUnbondings - 20, // 20: stride.stakeibc.Query.AllTradeRoutes:input_type -> stride.stakeibc.QueryAllTradeRoutes - 3, // 21: stride.stakeibc.Query.Params:output_type -> stride.stakeibc.QueryParamsResponse - 5, // 22: stride.stakeibc.Query.Validators:output_type -> stride.stakeibc.QueryGetValidatorsResponse - 7, // 23: stride.stakeibc.Query.HostZone:output_type -> stride.stakeibc.QueryGetHostZoneResponse - 9, // 24: stride.stakeibc.Query.HostZoneAll:output_type -> stride.stakeibc.QueryAllHostZoneResponse - 11, // 25: stride.stakeibc.Query.ModuleAddress:output_type -> stride.stakeibc.QueryModuleAddressResponse - 1, // 26: stride.stakeibc.Query.InterchainAccountFromAddress:output_type -> stride.stakeibc.QueryInterchainAccountFromAddressResponse - 13, // 27: stride.stakeibc.Query.EpochTracker:output_type -> stride.stakeibc.QueryGetEpochTrackerResponse - 15, // 28: stride.stakeibc.Query.EpochTrackerAll:output_type -> stride.stakeibc.QueryAllEpochTrackerResponse - 17, // 29: stride.stakeibc.Query.NextPacketSequence:output_type -> stride.stakeibc.QueryGetNextPacketSequenceResponse - 19, // 30: stride.stakeibc.Query.AddressUnbondings:output_type -> stride.stakeibc.QueryAddressUnbondingsResponse - 21, // 31: stride.stakeibc.Query.AllTradeRoutes:output_type -> stride.stakeibc.QueryAllTradeRoutesResponse - 21, // [21:32] is the sub-list for method output_type - 10, // [10:21] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_query_proto_init() } -func file_stride_stakeibc_query_proto_init() { - if File_stride_stakeibc_query_proto != nil { - return - } - file_stride_stakeibc_params_proto_init() - file_stride_stakeibc_validator_proto_init() - file_stride_stakeibc_host_zone_proto_init() - file_stride_stakeibc_epoch_tracker_proto_init() - file_stride_stakeibc_address_unbonding_proto_init() - file_stride_stakeibc_trade_route_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryInterchainAccountFromAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryInterchainAccountFromAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetValidatorsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetValidatorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetHostZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetHostZoneResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllHostZoneRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllHostZoneResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryModuleAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetEpochTrackerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetEpochTrackerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllEpochTrackerRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllEpochTrackerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetNextPacketSequenceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryGetNextPacketSequenceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAddressUnbondings); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAddressUnbondingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllTradeRoutes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_query_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllTradeRoutesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 22, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_stride_stakeibc_query_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_query_proto_depIdxs, - MessageInfos: file_stride_stakeibc_query_proto_msgTypes, - }.Build() - File_stride_stakeibc_query_proto = out.File - file_stride_stakeibc_query_proto_rawDesc = nil - file_stride_stakeibc_query_proto_goTypes = nil - file_stride_stakeibc_query_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/query_grpc.pb.go b/api/stride/stakeibc/query_grpc.pb.go deleted file mode 100644 index 6218fcaa4..000000000 --- a/api/stride/stakeibc/query_grpc.pb.go +++ /dev/null @@ -1,529 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: stride/stakeibc/query.proto - -package stakeibc - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Query_Params_FullMethodName = "/stride.stakeibc.Query/Params" - Query_Validators_FullMethodName = "/stride.stakeibc.Query/Validators" - Query_HostZone_FullMethodName = "/stride.stakeibc.Query/HostZone" - Query_HostZoneAll_FullMethodName = "/stride.stakeibc.Query/HostZoneAll" - Query_ModuleAddress_FullMethodName = "/stride.stakeibc.Query/ModuleAddress" - Query_InterchainAccountFromAddress_FullMethodName = "/stride.stakeibc.Query/InterchainAccountFromAddress" - Query_EpochTracker_FullMethodName = "/stride.stakeibc.Query/EpochTracker" - Query_EpochTrackerAll_FullMethodName = "/stride.stakeibc.Query/EpochTrackerAll" - Query_NextPacketSequence_FullMethodName = "/stride.stakeibc.Query/NextPacketSequence" - Query_AddressUnbondings_FullMethodName = "/stride.stakeibc.Query/AddressUnbondings" - Query_AllTradeRoutes_FullMethodName = "/stride.stakeibc.Query/AllTradeRoutes" -) - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Query defines the gRPC querier service. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Queries a Validator by host zone. - Validators(ctx context.Context, in *QueryGetValidatorsRequest, opts ...grpc.CallOption) (*QueryGetValidatorsResponse, error) - // Queries a HostZone by id. - HostZone(ctx context.Context, in *QueryGetHostZoneRequest, opts ...grpc.CallOption) (*QueryGetHostZoneResponse, error) - // Queries a list of HostZone items. - HostZoneAll(ctx context.Context, in *QueryAllHostZoneRequest, opts ...grpc.CallOption) (*QueryAllHostZoneResponse, error) - // Queries a list of ModuleAddress items. - ModuleAddress(ctx context.Context, in *QueryModuleAddressRequest, opts ...grpc.CallOption) (*QueryModuleAddressResponse, error) - // QueryInterchainAccountFromAddress returns the interchain account for given - // owner address on a given connection pair - InterchainAccountFromAddress(ctx context.Context, in *QueryInterchainAccountFromAddressRequest, opts ...grpc.CallOption) (*QueryInterchainAccountFromAddressResponse, error) - // Queries a EpochTracker by index. - EpochTracker(ctx context.Context, in *QueryGetEpochTrackerRequest, opts ...grpc.CallOption) (*QueryGetEpochTrackerResponse, error) - // Queries a list of EpochTracker items. - EpochTrackerAll(ctx context.Context, in *QueryAllEpochTrackerRequest, opts ...grpc.CallOption) (*QueryAllEpochTrackerResponse, error) - // Queries the next packet sequence for one for a given channel - NextPacketSequence(ctx context.Context, in *QueryGetNextPacketSequenceRequest, opts ...grpc.CallOption) (*QueryGetNextPacketSequenceResponse, error) - // Queries an address's unbondings - AddressUnbondings(ctx context.Context, in *QueryAddressUnbondings, opts ...grpc.CallOption) (*QueryAddressUnbondingsResponse, error) - // Queries all trade routes - AllTradeRoutes(ctx context.Context, in *QueryAllTradeRoutes, opts ...grpc.CallOption) (*QueryAllTradeRoutesResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Validators(ctx context.Context, in *QueryGetValidatorsRequest, opts ...grpc.CallOption) (*QueryGetValidatorsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryGetValidatorsResponse) - err := c.cc.Invoke(ctx, Query_Validators_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) HostZone(ctx context.Context, in *QueryGetHostZoneRequest, opts ...grpc.CallOption) (*QueryGetHostZoneResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryGetHostZoneResponse) - err := c.cc.Invoke(ctx, Query_HostZone_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) HostZoneAll(ctx context.Context, in *QueryAllHostZoneRequest, opts ...grpc.CallOption) (*QueryAllHostZoneResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAllHostZoneResponse) - err := c.cc.Invoke(ctx, Query_HostZoneAll_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ModuleAddress(ctx context.Context, in *QueryModuleAddressRequest, opts ...grpc.CallOption) (*QueryModuleAddressResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryModuleAddressResponse) - err := c.cc.Invoke(ctx, Query_ModuleAddress_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) InterchainAccountFromAddress(ctx context.Context, in *QueryInterchainAccountFromAddressRequest, opts ...grpc.CallOption) (*QueryInterchainAccountFromAddressResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryInterchainAccountFromAddressResponse) - err := c.cc.Invoke(ctx, Query_InterchainAccountFromAddress_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochTracker(ctx context.Context, in *QueryGetEpochTrackerRequest, opts ...grpc.CallOption) (*QueryGetEpochTrackerResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryGetEpochTrackerResponse) - err := c.cc.Invoke(ctx, Query_EpochTracker_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochTrackerAll(ctx context.Context, in *QueryAllEpochTrackerRequest, opts ...grpc.CallOption) (*QueryAllEpochTrackerResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAllEpochTrackerResponse) - err := c.cc.Invoke(ctx, Query_EpochTrackerAll_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) NextPacketSequence(ctx context.Context, in *QueryGetNextPacketSequenceRequest, opts ...grpc.CallOption) (*QueryGetNextPacketSequenceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryGetNextPacketSequenceResponse) - err := c.cc.Invoke(ctx, Query_NextPacketSequence_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AddressUnbondings(ctx context.Context, in *QueryAddressUnbondings, opts ...grpc.CallOption) (*QueryAddressUnbondingsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAddressUnbondingsResponse) - err := c.cc.Invoke(ctx, Query_AddressUnbondings_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AllTradeRoutes(ctx context.Context, in *QueryAllTradeRoutes, opts ...grpc.CallOption) (*QueryAllTradeRoutesResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAllTradeRoutesResponse) - err := c.cc.Invoke(ctx, Query_AllTradeRoutes_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility. -// -// Query defines the gRPC querier service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Queries a Validator by host zone. - Validators(context.Context, *QueryGetValidatorsRequest) (*QueryGetValidatorsResponse, error) - // Queries a HostZone by id. - HostZone(context.Context, *QueryGetHostZoneRequest) (*QueryGetHostZoneResponse, error) - // Queries a list of HostZone items. - HostZoneAll(context.Context, *QueryAllHostZoneRequest) (*QueryAllHostZoneResponse, error) - // Queries a list of ModuleAddress items. - ModuleAddress(context.Context, *QueryModuleAddressRequest) (*QueryModuleAddressResponse, error) - // QueryInterchainAccountFromAddress returns the interchain account for given - // owner address on a given connection pair - InterchainAccountFromAddress(context.Context, *QueryInterchainAccountFromAddressRequest) (*QueryInterchainAccountFromAddressResponse, error) - // Queries a EpochTracker by index. - EpochTracker(context.Context, *QueryGetEpochTrackerRequest) (*QueryGetEpochTrackerResponse, error) - // Queries a list of EpochTracker items. - EpochTrackerAll(context.Context, *QueryAllEpochTrackerRequest) (*QueryAllEpochTrackerResponse, error) - // Queries the next packet sequence for one for a given channel - NextPacketSequence(context.Context, *QueryGetNextPacketSequenceRequest) (*QueryGetNextPacketSequenceResponse, error) - // Queries an address's unbondings - AddressUnbondings(context.Context, *QueryAddressUnbondings) (*QueryAddressUnbondingsResponse, error) - // Queries all trade routes - AllTradeRoutes(context.Context, *QueryAllTradeRoutes) (*QueryAllTradeRoutesResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedQueryServer struct{} - -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) Validators(context.Context, *QueryGetValidatorsRequest) (*QueryGetValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Validators not implemented") -} -func (UnimplementedQueryServer) HostZone(context.Context, *QueryGetHostZoneRequest) (*QueryGetHostZoneResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HostZone not implemented") -} -func (UnimplementedQueryServer) HostZoneAll(context.Context, *QueryAllHostZoneRequest) (*QueryAllHostZoneResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HostZoneAll not implemented") -} -func (UnimplementedQueryServer) ModuleAddress(context.Context, *QueryModuleAddressRequest) (*QueryModuleAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModuleAddress not implemented") -} -func (UnimplementedQueryServer) InterchainAccountFromAddress(context.Context, *QueryInterchainAccountFromAddressRequest) (*QueryInterchainAccountFromAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InterchainAccountFromAddress not implemented") -} -func (UnimplementedQueryServer) EpochTracker(context.Context, *QueryGetEpochTrackerRequest) (*QueryGetEpochTrackerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochTracker not implemented") -} -func (UnimplementedQueryServer) EpochTrackerAll(context.Context, *QueryAllEpochTrackerRequest) (*QueryAllEpochTrackerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochTrackerAll not implemented") -} -func (UnimplementedQueryServer) NextPacketSequence(context.Context, *QueryGetNextPacketSequenceRequest) (*QueryGetNextPacketSequenceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NextPacketSequence not implemented") -} -func (UnimplementedQueryServer) AddressUnbondings(context.Context, *QueryAddressUnbondings) (*QueryAddressUnbondingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddressUnbondings not implemented") -} -func (UnimplementedQueryServer) AllTradeRoutes(context.Context, *QueryAllTradeRoutes) (*QueryAllTradeRoutesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllTradeRoutes not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} -func (UnimplementedQueryServer) testEmbeddedByValue() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - // If the following call pancis, it indicates UnimplementedQueryServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Params_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Validators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetValidatorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Validators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Validators_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Validators(ctx, req.(*QueryGetValidatorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_HostZone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetHostZoneRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).HostZone(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_HostZone_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).HostZone(ctx, req.(*QueryGetHostZoneRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_HostZoneAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllHostZoneRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).HostZoneAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_HostZoneAll_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).HostZoneAll(ctx, req.(*QueryAllHostZoneRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ModuleAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryModuleAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ModuleAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_ModuleAddress_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ModuleAddress(ctx, req.(*QueryModuleAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_InterchainAccountFromAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryInterchainAccountFromAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).InterchainAccountFromAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_InterchainAccountFromAddress_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).InterchainAccountFromAddress(ctx, req.(*QueryInterchainAccountFromAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochTracker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetEpochTrackerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochTracker(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_EpochTracker_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochTracker(ctx, req.(*QueryGetEpochTrackerRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochTrackerAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllEpochTrackerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochTrackerAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_EpochTrackerAll_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochTrackerAll(ctx, req.(*QueryAllEpochTrackerRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_NextPacketSequence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetNextPacketSequenceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).NextPacketSequence(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_NextPacketSequence_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NextPacketSequence(ctx, req.(*QueryGetNextPacketSequenceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AddressUnbondings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAddressUnbondings) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AddressUnbondings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_AddressUnbondings_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AddressUnbondings(ctx, req.(*QueryAddressUnbondings)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AllTradeRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllTradeRoutes) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AllTradeRoutes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_AllTradeRoutes_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AllTradeRoutes(ctx, req.(*QueryAllTradeRoutes)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "stride.stakeibc.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "Validators", - Handler: _Query_Validators_Handler, - }, - { - MethodName: "HostZone", - Handler: _Query_HostZone_Handler, - }, - { - MethodName: "HostZoneAll", - Handler: _Query_HostZoneAll_Handler, - }, - { - MethodName: "ModuleAddress", - Handler: _Query_ModuleAddress_Handler, - }, - { - MethodName: "InterchainAccountFromAddress", - Handler: _Query_InterchainAccountFromAddress_Handler, - }, - { - MethodName: "EpochTracker", - Handler: _Query_EpochTracker_Handler, - }, - { - MethodName: "EpochTrackerAll", - Handler: _Query_EpochTrackerAll_Handler, - }, - { - MethodName: "NextPacketSequence", - Handler: _Query_NextPacketSequence_Handler, - }, - { - MethodName: "AddressUnbondings", - Handler: _Query_AddressUnbondings_Handler, - }, - { - MethodName: "AllTradeRoutes", - Handler: _Query_AllTradeRoutes_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/stakeibc/query.proto", -} diff --git a/api/stride/stakeibc/trade_route.pulsar.go b/api/stride/stakeibc/trade_route.pulsar.go deleted file mode 100644 index b563d8f34..000000000 --- a/api/stride/stakeibc/trade_route.pulsar.go +++ /dev/null @@ -1,2339 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_TradeConfig protoreflect.MessageDescriptor - fd_TradeConfig_pool_id protoreflect.FieldDescriptor - fd_TradeConfig_swap_price protoreflect.FieldDescriptor - fd_TradeConfig_price_update_timestamp protoreflect.FieldDescriptor - fd_TradeConfig_max_allowed_swap_loss_rate protoreflect.FieldDescriptor - fd_TradeConfig_min_swap_amount protoreflect.FieldDescriptor - fd_TradeConfig_max_swap_amount protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_trade_route_proto_init() - md_TradeConfig = File_stride_stakeibc_trade_route_proto.Messages().ByName("TradeConfig") - fd_TradeConfig_pool_id = md_TradeConfig.Fields().ByName("pool_id") - fd_TradeConfig_swap_price = md_TradeConfig.Fields().ByName("swap_price") - fd_TradeConfig_price_update_timestamp = md_TradeConfig.Fields().ByName("price_update_timestamp") - fd_TradeConfig_max_allowed_swap_loss_rate = md_TradeConfig.Fields().ByName("max_allowed_swap_loss_rate") - fd_TradeConfig_min_swap_amount = md_TradeConfig.Fields().ByName("min_swap_amount") - fd_TradeConfig_max_swap_amount = md_TradeConfig.Fields().ByName("max_swap_amount") -} - -var _ protoreflect.Message = (*fastReflection_TradeConfig)(nil) - -type fastReflection_TradeConfig TradeConfig - -func (x *TradeConfig) ProtoReflect() protoreflect.Message { - return (*fastReflection_TradeConfig)(x) -} - -func (x *TradeConfig) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_trade_route_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TradeConfig_messageType fastReflection_TradeConfig_messageType -var _ protoreflect.MessageType = fastReflection_TradeConfig_messageType{} - -type fastReflection_TradeConfig_messageType struct{} - -func (x fastReflection_TradeConfig_messageType) Zero() protoreflect.Message { - return (*fastReflection_TradeConfig)(nil) -} -func (x fastReflection_TradeConfig_messageType) New() protoreflect.Message { - return new(fastReflection_TradeConfig) -} -func (x fastReflection_TradeConfig_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TradeConfig -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TradeConfig) Descriptor() protoreflect.MessageDescriptor { - return md_TradeConfig -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_TradeConfig) Type() protoreflect.MessageType { - return _fastReflection_TradeConfig_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TradeConfig) New() protoreflect.Message { - return new(fastReflection_TradeConfig) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TradeConfig) Interface() protoreflect.ProtoMessage { - return (*TradeConfig)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_TradeConfig) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.PoolId != uint64(0) { - value := protoreflect.ValueOfUint64(x.PoolId) - if !f(fd_TradeConfig_pool_id, value) { - return - } - } - if x.SwapPrice != "" { - value := protoreflect.ValueOfString(x.SwapPrice) - if !f(fd_TradeConfig_swap_price, value) { - return - } - } - if x.PriceUpdateTimestamp != uint64(0) { - value := protoreflect.ValueOfUint64(x.PriceUpdateTimestamp) - if !f(fd_TradeConfig_price_update_timestamp, value) { - return - } - } - if x.MaxAllowedSwapLossRate != "" { - value := protoreflect.ValueOfString(x.MaxAllowedSwapLossRate) - if !f(fd_TradeConfig_max_allowed_swap_loss_rate, value) { - return - } - } - if x.MinSwapAmount != "" { - value := protoreflect.ValueOfString(x.MinSwapAmount) - if !f(fd_TradeConfig_min_swap_amount, value) { - return - } - } - if x.MaxSwapAmount != "" { - value := protoreflect.ValueOfString(x.MaxSwapAmount) - if !f(fd_TradeConfig_max_swap_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_TradeConfig) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.TradeConfig.pool_id": - return x.PoolId != uint64(0) - case "stride.stakeibc.TradeConfig.swap_price": - return x.SwapPrice != "" - case "stride.stakeibc.TradeConfig.price_update_timestamp": - return x.PriceUpdateTimestamp != uint64(0) - case "stride.stakeibc.TradeConfig.max_allowed_swap_loss_rate": - return x.MaxAllowedSwapLossRate != "" - case "stride.stakeibc.TradeConfig.min_swap_amount": - return x.MinSwapAmount != "" - case "stride.stakeibc.TradeConfig.max_swap_amount": - return x.MaxSwapAmount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeConfig")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeConfig does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeConfig) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.TradeConfig.pool_id": - x.PoolId = uint64(0) - case "stride.stakeibc.TradeConfig.swap_price": - x.SwapPrice = "" - case "stride.stakeibc.TradeConfig.price_update_timestamp": - x.PriceUpdateTimestamp = uint64(0) - case "stride.stakeibc.TradeConfig.max_allowed_swap_loss_rate": - x.MaxAllowedSwapLossRate = "" - case "stride.stakeibc.TradeConfig.min_swap_amount": - x.MinSwapAmount = "" - case "stride.stakeibc.TradeConfig.max_swap_amount": - x.MaxSwapAmount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeConfig")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeConfig does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_TradeConfig) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.TradeConfig.pool_id": - value := x.PoolId - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.TradeConfig.swap_price": - value := x.SwapPrice - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeConfig.price_update_timestamp": - value := x.PriceUpdateTimestamp - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.TradeConfig.max_allowed_swap_loss_rate": - value := x.MaxAllowedSwapLossRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeConfig.min_swap_amount": - value := x.MinSwapAmount - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeConfig.max_swap_amount": - value := x.MaxSwapAmount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeConfig")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeConfig does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeConfig) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.TradeConfig.pool_id": - x.PoolId = value.Uint() - case "stride.stakeibc.TradeConfig.swap_price": - x.SwapPrice = value.Interface().(string) - case "stride.stakeibc.TradeConfig.price_update_timestamp": - x.PriceUpdateTimestamp = value.Uint() - case "stride.stakeibc.TradeConfig.max_allowed_swap_loss_rate": - x.MaxAllowedSwapLossRate = value.Interface().(string) - case "stride.stakeibc.TradeConfig.min_swap_amount": - x.MinSwapAmount = value.Interface().(string) - case "stride.stakeibc.TradeConfig.max_swap_amount": - x.MaxSwapAmount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeConfig")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeConfig does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeConfig) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.TradeConfig.pool_id": - panic(fmt.Errorf("field pool_id of message stride.stakeibc.TradeConfig is not mutable")) - case "stride.stakeibc.TradeConfig.swap_price": - panic(fmt.Errorf("field swap_price of message stride.stakeibc.TradeConfig is not mutable")) - case "stride.stakeibc.TradeConfig.price_update_timestamp": - panic(fmt.Errorf("field price_update_timestamp of message stride.stakeibc.TradeConfig is not mutable")) - case "stride.stakeibc.TradeConfig.max_allowed_swap_loss_rate": - panic(fmt.Errorf("field max_allowed_swap_loss_rate of message stride.stakeibc.TradeConfig is not mutable")) - case "stride.stakeibc.TradeConfig.min_swap_amount": - panic(fmt.Errorf("field min_swap_amount of message stride.stakeibc.TradeConfig is not mutable")) - case "stride.stakeibc.TradeConfig.max_swap_amount": - panic(fmt.Errorf("field max_swap_amount of message stride.stakeibc.TradeConfig is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeConfig")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeConfig does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_TradeConfig) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.TradeConfig.pool_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.TradeConfig.swap_price": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeConfig.price_update_timestamp": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.TradeConfig.max_allowed_swap_loss_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeConfig.min_swap_amount": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeConfig.max_swap_amount": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeConfig")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeConfig does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_TradeConfig) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.TradeConfig", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_TradeConfig) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeConfig) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_TradeConfig) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_TradeConfig) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TradeConfig) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.PoolId != 0 { - n += 1 + runtime.Sov(uint64(x.PoolId)) - } - l = len(x.SwapPrice) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PriceUpdateTimestamp != 0 { - n += 1 + runtime.Sov(uint64(x.PriceUpdateTimestamp)) - } - l = len(x.MaxAllowedSwapLossRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinSwapAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaxSwapAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TradeConfig) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MaxSwapAmount) > 0 { - i -= len(x.MaxSwapAmount) - copy(dAtA[i:], x.MaxSwapAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxSwapAmount))) - i-- - dAtA[i] = 0x32 - } - if len(x.MinSwapAmount) > 0 { - i -= len(x.MinSwapAmount) - copy(dAtA[i:], x.MinSwapAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinSwapAmount))) - i-- - dAtA[i] = 0x2a - } - if len(x.MaxAllowedSwapLossRate) > 0 { - i -= len(x.MaxAllowedSwapLossRate) - copy(dAtA[i:], x.MaxAllowedSwapLossRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxAllowedSwapLossRate))) - i-- - dAtA[i] = 0x22 - } - if x.PriceUpdateTimestamp != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PriceUpdateTimestamp)) - i-- - dAtA[i] = 0x18 - } - if len(x.SwapPrice) > 0 { - i -= len(x.SwapPrice) - copy(dAtA[i:], x.SwapPrice) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SwapPrice))) - i-- - dAtA[i] = 0x12 - } - if x.PoolId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PoolId)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TradeConfig) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TradeConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TradeConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - x.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SwapPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SwapPrice = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PriceUpdateTimestamp", wireType) - } - x.PriceUpdateTimestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.PriceUpdateTimestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxAllowedSwapLossRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxAllowedSwapLossRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinSwapAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxSwapAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_TradeRoute protoreflect.MessageDescriptor - fd_TradeRoute_reward_denom_on_host_zone protoreflect.FieldDescriptor - fd_TradeRoute_reward_denom_on_reward_zone protoreflect.FieldDescriptor - fd_TradeRoute_reward_denom_on_trade_zone protoreflect.FieldDescriptor - fd_TradeRoute_host_denom_on_trade_zone protoreflect.FieldDescriptor - fd_TradeRoute_host_denom_on_host_zone protoreflect.FieldDescriptor - fd_TradeRoute_host_account protoreflect.FieldDescriptor - fd_TradeRoute_reward_account protoreflect.FieldDescriptor - fd_TradeRoute_trade_account protoreflect.FieldDescriptor - fd_TradeRoute_host_to_reward_channel_id protoreflect.FieldDescriptor - fd_TradeRoute_reward_to_trade_channel_id protoreflect.FieldDescriptor - fd_TradeRoute_trade_to_host_channel_id protoreflect.FieldDescriptor - fd_TradeRoute_trade_config protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_trade_route_proto_init() - md_TradeRoute = File_stride_stakeibc_trade_route_proto.Messages().ByName("TradeRoute") - fd_TradeRoute_reward_denom_on_host_zone = md_TradeRoute.Fields().ByName("reward_denom_on_host_zone") - fd_TradeRoute_reward_denom_on_reward_zone = md_TradeRoute.Fields().ByName("reward_denom_on_reward_zone") - fd_TradeRoute_reward_denom_on_trade_zone = md_TradeRoute.Fields().ByName("reward_denom_on_trade_zone") - fd_TradeRoute_host_denom_on_trade_zone = md_TradeRoute.Fields().ByName("host_denom_on_trade_zone") - fd_TradeRoute_host_denom_on_host_zone = md_TradeRoute.Fields().ByName("host_denom_on_host_zone") - fd_TradeRoute_host_account = md_TradeRoute.Fields().ByName("host_account") - fd_TradeRoute_reward_account = md_TradeRoute.Fields().ByName("reward_account") - fd_TradeRoute_trade_account = md_TradeRoute.Fields().ByName("trade_account") - fd_TradeRoute_host_to_reward_channel_id = md_TradeRoute.Fields().ByName("host_to_reward_channel_id") - fd_TradeRoute_reward_to_trade_channel_id = md_TradeRoute.Fields().ByName("reward_to_trade_channel_id") - fd_TradeRoute_trade_to_host_channel_id = md_TradeRoute.Fields().ByName("trade_to_host_channel_id") - fd_TradeRoute_trade_config = md_TradeRoute.Fields().ByName("trade_config") -} - -var _ protoreflect.Message = (*fastReflection_TradeRoute)(nil) - -type fastReflection_TradeRoute TradeRoute - -func (x *TradeRoute) ProtoReflect() protoreflect.Message { - return (*fastReflection_TradeRoute)(x) -} - -func (x *TradeRoute) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_trade_route_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_TradeRoute_messageType fastReflection_TradeRoute_messageType -var _ protoreflect.MessageType = fastReflection_TradeRoute_messageType{} - -type fastReflection_TradeRoute_messageType struct{} - -func (x fastReflection_TradeRoute_messageType) Zero() protoreflect.Message { - return (*fastReflection_TradeRoute)(nil) -} -func (x fastReflection_TradeRoute_messageType) New() protoreflect.Message { - return new(fastReflection_TradeRoute) -} -func (x fastReflection_TradeRoute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_TradeRoute -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_TradeRoute) Descriptor() protoreflect.MessageDescriptor { - return md_TradeRoute -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_TradeRoute) Type() protoreflect.MessageType { - return _fastReflection_TradeRoute_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_TradeRoute) New() protoreflect.Message { - return new(fastReflection_TradeRoute) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_TradeRoute) Interface() protoreflect.ProtoMessage { - return (*TradeRoute)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_TradeRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.RewardDenomOnHostZone != "" { - value := protoreflect.ValueOfString(x.RewardDenomOnHostZone) - if !f(fd_TradeRoute_reward_denom_on_host_zone, value) { - return - } - } - if x.RewardDenomOnRewardZone != "" { - value := protoreflect.ValueOfString(x.RewardDenomOnRewardZone) - if !f(fd_TradeRoute_reward_denom_on_reward_zone, value) { - return - } - } - if x.RewardDenomOnTradeZone != "" { - value := protoreflect.ValueOfString(x.RewardDenomOnTradeZone) - if !f(fd_TradeRoute_reward_denom_on_trade_zone, value) { - return - } - } - if x.HostDenomOnTradeZone != "" { - value := protoreflect.ValueOfString(x.HostDenomOnTradeZone) - if !f(fd_TradeRoute_host_denom_on_trade_zone, value) { - return - } - } - if x.HostDenomOnHostZone != "" { - value := protoreflect.ValueOfString(x.HostDenomOnHostZone) - if !f(fd_TradeRoute_host_denom_on_host_zone, value) { - return - } - } - if x.HostAccount != nil { - value := protoreflect.ValueOfMessage(x.HostAccount.ProtoReflect()) - if !f(fd_TradeRoute_host_account, value) { - return - } - } - if x.RewardAccount != nil { - value := protoreflect.ValueOfMessage(x.RewardAccount.ProtoReflect()) - if !f(fd_TradeRoute_reward_account, value) { - return - } - } - if x.TradeAccount != nil { - value := protoreflect.ValueOfMessage(x.TradeAccount.ProtoReflect()) - if !f(fd_TradeRoute_trade_account, value) { - return - } - } - if x.HostToRewardChannelId != "" { - value := protoreflect.ValueOfString(x.HostToRewardChannelId) - if !f(fd_TradeRoute_host_to_reward_channel_id, value) { - return - } - } - if x.RewardToTradeChannelId != "" { - value := protoreflect.ValueOfString(x.RewardToTradeChannelId) - if !f(fd_TradeRoute_reward_to_trade_channel_id, value) { - return - } - } - if x.TradeToHostChannelId != "" { - value := protoreflect.ValueOfString(x.TradeToHostChannelId) - if !f(fd_TradeRoute_trade_to_host_channel_id, value) { - return - } - } - if x.TradeConfig != nil { - value := protoreflect.ValueOfMessage(x.TradeConfig.ProtoReflect()) - if !f(fd_TradeRoute_trade_config, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_TradeRoute) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.TradeRoute.reward_denom_on_host_zone": - return x.RewardDenomOnHostZone != "" - case "stride.stakeibc.TradeRoute.reward_denom_on_reward_zone": - return x.RewardDenomOnRewardZone != "" - case "stride.stakeibc.TradeRoute.reward_denom_on_trade_zone": - return x.RewardDenomOnTradeZone != "" - case "stride.stakeibc.TradeRoute.host_denom_on_trade_zone": - return x.HostDenomOnTradeZone != "" - case "stride.stakeibc.TradeRoute.host_denom_on_host_zone": - return x.HostDenomOnHostZone != "" - case "stride.stakeibc.TradeRoute.host_account": - return x.HostAccount != nil - case "stride.stakeibc.TradeRoute.reward_account": - return x.RewardAccount != nil - case "stride.stakeibc.TradeRoute.trade_account": - return x.TradeAccount != nil - case "stride.stakeibc.TradeRoute.host_to_reward_channel_id": - return x.HostToRewardChannelId != "" - case "stride.stakeibc.TradeRoute.reward_to_trade_channel_id": - return x.RewardToTradeChannelId != "" - case "stride.stakeibc.TradeRoute.trade_to_host_channel_id": - return x.TradeToHostChannelId != "" - case "stride.stakeibc.TradeRoute.trade_config": - return x.TradeConfig != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRoute does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeRoute) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.TradeRoute.reward_denom_on_host_zone": - x.RewardDenomOnHostZone = "" - case "stride.stakeibc.TradeRoute.reward_denom_on_reward_zone": - x.RewardDenomOnRewardZone = "" - case "stride.stakeibc.TradeRoute.reward_denom_on_trade_zone": - x.RewardDenomOnTradeZone = "" - case "stride.stakeibc.TradeRoute.host_denom_on_trade_zone": - x.HostDenomOnTradeZone = "" - case "stride.stakeibc.TradeRoute.host_denom_on_host_zone": - x.HostDenomOnHostZone = "" - case "stride.stakeibc.TradeRoute.host_account": - x.HostAccount = nil - case "stride.stakeibc.TradeRoute.reward_account": - x.RewardAccount = nil - case "stride.stakeibc.TradeRoute.trade_account": - x.TradeAccount = nil - case "stride.stakeibc.TradeRoute.host_to_reward_channel_id": - x.HostToRewardChannelId = "" - case "stride.stakeibc.TradeRoute.reward_to_trade_channel_id": - x.RewardToTradeChannelId = "" - case "stride.stakeibc.TradeRoute.trade_to_host_channel_id": - x.TradeToHostChannelId = "" - case "stride.stakeibc.TradeRoute.trade_config": - x.TradeConfig = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRoute does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_TradeRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.TradeRoute.reward_denom_on_host_zone": - value := x.RewardDenomOnHostZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeRoute.reward_denom_on_reward_zone": - value := x.RewardDenomOnRewardZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeRoute.reward_denom_on_trade_zone": - value := x.RewardDenomOnTradeZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeRoute.host_denom_on_trade_zone": - value := x.HostDenomOnTradeZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeRoute.host_denom_on_host_zone": - value := x.HostDenomOnHostZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeRoute.host_account": - value := x.HostAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.stakeibc.TradeRoute.reward_account": - value := x.RewardAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.stakeibc.TradeRoute.trade_account": - value := x.TradeAccount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "stride.stakeibc.TradeRoute.host_to_reward_channel_id": - value := x.HostToRewardChannelId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeRoute.reward_to_trade_channel_id": - value := x.RewardToTradeChannelId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeRoute.trade_to_host_channel_id": - value := x.TradeToHostChannelId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.TradeRoute.trade_config": - value := x.TradeConfig - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRoute does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.TradeRoute.reward_denom_on_host_zone": - x.RewardDenomOnHostZone = value.Interface().(string) - case "stride.stakeibc.TradeRoute.reward_denom_on_reward_zone": - x.RewardDenomOnRewardZone = value.Interface().(string) - case "stride.stakeibc.TradeRoute.reward_denom_on_trade_zone": - x.RewardDenomOnTradeZone = value.Interface().(string) - case "stride.stakeibc.TradeRoute.host_denom_on_trade_zone": - x.HostDenomOnTradeZone = value.Interface().(string) - case "stride.stakeibc.TradeRoute.host_denom_on_host_zone": - x.HostDenomOnHostZone = value.Interface().(string) - case "stride.stakeibc.TradeRoute.host_account": - x.HostAccount = value.Message().Interface().(*ICAAccount) - case "stride.stakeibc.TradeRoute.reward_account": - x.RewardAccount = value.Message().Interface().(*ICAAccount) - case "stride.stakeibc.TradeRoute.trade_account": - x.TradeAccount = value.Message().Interface().(*ICAAccount) - case "stride.stakeibc.TradeRoute.host_to_reward_channel_id": - x.HostToRewardChannelId = value.Interface().(string) - case "stride.stakeibc.TradeRoute.reward_to_trade_channel_id": - x.RewardToTradeChannelId = value.Interface().(string) - case "stride.stakeibc.TradeRoute.trade_to_host_channel_id": - x.TradeToHostChannelId = value.Interface().(string) - case "stride.stakeibc.TradeRoute.trade_config": - x.TradeConfig = value.Message().Interface().(*TradeConfig) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRoute does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.TradeRoute.host_account": - if x.HostAccount == nil { - x.HostAccount = new(ICAAccount) - } - return protoreflect.ValueOfMessage(x.HostAccount.ProtoReflect()) - case "stride.stakeibc.TradeRoute.reward_account": - if x.RewardAccount == nil { - x.RewardAccount = new(ICAAccount) - } - return protoreflect.ValueOfMessage(x.RewardAccount.ProtoReflect()) - case "stride.stakeibc.TradeRoute.trade_account": - if x.TradeAccount == nil { - x.TradeAccount = new(ICAAccount) - } - return protoreflect.ValueOfMessage(x.TradeAccount.ProtoReflect()) - case "stride.stakeibc.TradeRoute.trade_config": - if x.TradeConfig == nil { - x.TradeConfig = new(TradeConfig) - } - return protoreflect.ValueOfMessage(x.TradeConfig.ProtoReflect()) - case "stride.stakeibc.TradeRoute.reward_denom_on_host_zone": - panic(fmt.Errorf("field reward_denom_on_host_zone of message stride.stakeibc.TradeRoute is not mutable")) - case "stride.stakeibc.TradeRoute.reward_denom_on_reward_zone": - panic(fmt.Errorf("field reward_denom_on_reward_zone of message stride.stakeibc.TradeRoute is not mutable")) - case "stride.stakeibc.TradeRoute.reward_denom_on_trade_zone": - panic(fmt.Errorf("field reward_denom_on_trade_zone of message stride.stakeibc.TradeRoute is not mutable")) - case "stride.stakeibc.TradeRoute.host_denom_on_trade_zone": - panic(fmt.Errorf("field host_denom_on_trade_zone of message stride.stakeibc.TradeRoute is not mutable")) - case "stride.stakeibc.TradeRoute.host_denom_on_host_zone": - panic(fmt.Errorf("field host_denom_on_host_zone of message stride.stakeibc.TradeRoute is not mutable")) - case "stride.stakeibc.TradeRoute.host_to_reward_channel_id": - panic(fmt.Errorf("field host_to_reward_channel_id of message stride.stakeibc.TradeRoute is not mutable")) - case "stride.stakeibc.TradeRoute.reward_to_trade_channel_id": - panic(fmt.Errorf("field reward_to_trade_channel_id of message stride.stakeibc.TradeRoute is not mutable")) - case "stride.stakeibc.TradeRoute.trade_to_host_channel_id": - panic(fmt.Errorf("field trade_to_host_channel_id of message stride.stakeibc.TradeRoute is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRoute does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_TradeRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.TradeRoute.reward_denom_on_host_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeRoute.reward_denom_on_reward_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeRoute.reward_denom_on_trade_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeRoute.host_denom_on_trade_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeRoute.host_denom_on_host_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeRoute.host_account": - m := new(ICAAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.stakeibc.TradeRoute.reward_account": - m := new(ICAAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.stakeibc.TradeRoute.trade_account": - m := new(ICAAccount) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "stride.stakeibc.TradeRoute.host_to_reward_channel_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeRoute.reward_to_trade_channel_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeRoute.trade_to_host_channel_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.TradeRoute.trade_config": - m := new(TradeConfig) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.TradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.TradeRoute does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_TradeRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.TradeRoute", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_TradeRoute) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_TradeRoute) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_TradeRoute) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_TradeRoute) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*TradeRoute) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.RewardDenomOnHostZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RewardDenomOnRewardZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RewardDenomOnTradeZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenomOnTradeZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenomOnHostZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.HostAccount != nil { - l = options.Size(x.HostAccount) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.RewardAccount != nil { - l = options.Size(x.RewardAccount) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TradeAccount != nil { - l = options.Size(x.TradeAccount) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostToRewardChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RewardToTradeChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TradeToHostChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.TradeConfig != nil { - l = options.Size(x.TradeConfig) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*TradeRoute) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.TradeConfig != nil { - encoded, err := options.Marshal(x.TradeConfig) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x62 - } - if len(x.TradeToHostChannelId) > 0 { - i -= len(x.TradeToHostChannelId) - copy(dAtA[i:], x.TradeToHostChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TradeToHostChannelId))) - i-- - dAtA[i] = 0x5a - } - if len(x.RewardToTradeChannelId) > 0 { - i -= len(x.RewardToTradeChannelId) - copy(dAtA[i:], x.RewardToTradeChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardToTradeChannelId))) - i-- - dAtA[i] = 0x52 - } - if len(x.HostToRewardChannelId) > 0 { - i -= len(x.HostToRewardChannelId) - copy(dAtA[i:], x.HostToRewardChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostToRewardChannelId))) - i-- - dAtA[i] = 0x4a - } - if x.TradeAccount != nil { - encoded, err := options.Marshal(x.TradeAccount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - if x.RewardAccount != nil { - encoded, err := options.Marshal(x.RewardAccount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if x.HostAccount != nil { - encoded, err := options.Marshal(x.HostAccount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if len(x.HostDenomOnHostZone) > 0 { - i -= len(x.HostDenomOnHostZone) - copy(dAtA[i:], x.HostDenomOnHostZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenomOnHostZone))) - i-- - dAtA[i] = 0x2a - } - if len(x.HostDenomOnTradeZone) > 0 { - i -= len(x.HostDenomOnTradeZone) - copy(dAtA[i:], x.HostDenomOnTradeZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenomOnTradeZone))) - i-- - dAtA[i] = 0x22 - } - if len(x.RewardDenomOnTradeZone) > 0 { - i -= len(x.RewardDenomOnTradeZone) - copy(dAtA[i:], x.RewardDenomOnTradeZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardDenomOnTradeZone))) - i-- - dAtA[i] = 0x1a - } - if len(x.RewardDenomOnRewardZone) > 0 { - i -= len(x.RewardDenomOnRewardZone) - copy(dAtA[i:], x.RewardDenomOnRewardZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardDenomOnRewardZone))) - i-- - dAtA[i] = 0x12 - } - if len(x.RewardDenomOnHostZone) > 0 { - i -= len(x.RewardDenomOnHostZone) - copy(dAtA[i:], x.RewardDenomOnHostZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardDenomOnHostZone))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*TradeRoute) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TradeRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: TradeRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnHostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardDenomOnHostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnRewardZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardDenomOnRewardZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnTradeZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardDenomOnTradeZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnTradeZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenomOnTradeZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnHostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenomOnHostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.HostAccount == nil { - x.HostAccount = &ICAAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.HostAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.RewardAccount == nil { - x.RewardAccount = &ICAAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RewardAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TradeAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.TradeAccount == nil { - x.TradeAccount = &ICAAccount{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TradeAccount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostToRewardChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostToRewardChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardToTradeChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardToTradeChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TradeToHostChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TradeToHostChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TradeConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.TradeConfig == nil { - x.TradeConfig = &TradeConfig{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TradeConfig); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/trade_route.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Stores pool information needed to execute the swap along a trade route -type TradeConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Currently Osmosis is the only trade chain so this is an osmosis pool id - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // Spot price in the pool to convert the reward denom to the host denom - // output_tokens = swap_price * input tokens - // This value may be slightly stale as it is updated by an ICQ - SwapPrice string `protobuf:"bytes,2,opt,name=swap_price,json=swapPrice,proto3" json:"swap_price,omitempty"` - // unix time in seconds that the price was last updated - PriceUpdateTimestamp uint64 `protobuf:"varint,3,opt,name=price_update_timestamp,json=priceUpdateTimestamp,proto3" json:"price_update_timestamp,omitempty"` - // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price on stride - // 0.05 means the output from the trade can be no less than a 5% deviation - // from the current value - MaxAllowedSwapLossRate string `protobuf:"bytes,4,opt,name=max_allowed_swap_loss_rate,json=maxAllowedSwapLossRate,proto3" json:"max_allowed_swap_loss_rate,omitempty"` - // min and max set boundaries of reward denom on trade chain we will swap - // min also decides when reward token transfers are worth it (transfer fees) - MinSwapAmount string `protobuf:"bytes,5,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"` - MaxSwapAmount string `protobuf:"bytes,6,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"` -} - -func (x *TradeConfig) Reset() { - *x = TradeConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_trade_route_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TradeConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TradeConfig) ProtoMessage() {} - -// Deprecated: Use TradeConfig.ProtoReflect.Descriptor instead. -func (*TradeConfig) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_trade_route_proto_rawDescGZIP(), []int{0} -} - -func (x *TradeConfig) GetPoolId() uint64 { - if x != nil { - return x.PoolId - } - return 0 -} - -func (x *TradeConfig) GetSwapPrice() string { - if x != nil { - return x.SwapPrice - } - return "" -} - -func (x *TradeConfig) GetPriceUpdateTimestamp() uint64 { - if x != nil { - return x.PriceUpdateTimestamp - } - return 0 -} - -func (x *TradeConfig) GetMaxAllowedSwapLossRate() string { - if x != nil { - return x.MaxAllowedSwapLossRate - } - return "" -} - -func (x *TradeConfig) GetMinSwapAmount() string { - if x != nil { - return x.MinSwapAmount - } - return "" -} - -func (x *TradeConfig) GetMaxSwapAmount() string { - if x != nil { - return x.MaxSwapAmount - } - return "" -} - -// TradeRoute represents a round trip including info on transfer and how to do -// the swap. It makes the assumption that the reward token is always foreign to -// the host so therefore the first two hops are to unwind the ibc denom enroute -// to the trade chain and the last hop is the return so funds start/end in the -// withdrawl ICA on hostZone -// The structure is key'd on reward denom and host denom in their native forms -// (i.e. reward_denom_on_reward_zone and host_denom_on_host_zone) -type TradeRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // ibc denom for the reward on the host zone - RewardDenomOnHostZone string `protobuf:"bytes,1,opt,name=reward_denom_on_host_zone,json=rewardDenomOnHostZone,proto3" json:"reward_denom_on_host_zone,omitempty"` - // should be the native denom for the reward chain - RewardDenomOnRewardZone string `protobuf:"bytes,2,opt,name=reward_denom_on_reward_zone,json=rewardDenomOnRewardZone,proto3" json:"reward_denom_on_reward_zone,omitempty"` - // ibc denom of the reward on the trade chain, input to the swap - RewardDenomOnTradeZone string `protobuf:"bytes,3,opt,name=reward_denom_on_trade_zone,json=rewardDenomOnTradeZone,proto3" json:"reward_denom_on_trade_zone,omitempty"` - // ibc of the host denom on the trade chain, output from the swap - HostDenomOnTradeZone string `protobuf:"bytes,4,opt,name=host_denom_on_trade_zone,json=hostDenomOnTradeZone,proto3" json:"host_denom_on_trade_zone,omitempty"` - // should be the same as the native host denom on the host chain - HostDenomOnHostZone string `protobuf:"bytes,5,opt,name=host_denom_on_host_zone,json=hostDenomOnHostZone,proto3" json:"host_denom_on_host_zone,omitempty"` - // ICAAccount on the host zone with the reward tokens - // This is the same as the host zone withdrawal ICA account - HostAccount *ICAAccount `protobuf:"bytes,6,opt,name=host_account,json=hostAccount,proto3" json:"host_account,omitempty"` - // ICAAccount on the reward zone that is acts as the intermediate - // receiver of the transfer from host zone to trade zone - RewardAccount *ICAAccount `protobuf:"bytes,7,opt,name=reward_account,json=rewardAccount,proto3" json:"reward_account,omitempty"` - // ICAAccount responsible for executing the swap of reward - // tokens for host tokens - TradeAccount *ICAAccount `protobuf:"bytes,8,opt,name=trade_account,json=tradeAccount,proto3" json:"trade_account,omitempty"` - // Channel responsible for the transfer of reward tokens from the host - // zone to the reward zone. This is the channel ID on the host zone side - HostToRewardChannelId string `protobuf:"bytes,9,opt,name=host_to_reward_channel_id,json=hostToRewardChannelId,proto3" json:"host_to_reward_channel_id,omitempty"` - // Channel responsible for the transfer of reward tokens from the reward - // zone to the trade zone. This is the channel ID on the reward zone side - RewardToTradeChannelId string `protobuf:"bytes,10,opt,name=reward_to_trade_channel_id,json=rewardToTradeChannelId,proto3" json:"reward_to_trade_channel_id,omitempty"` - // Channel responsible for the transfer of host tokens from the trade - // zone, back to the host zone. This is the channel ID on the trade zone side - TradeToHostChannelId string `protobuf:"bytes,11,opt,name=trade_to_host_channel_id,json=tradeToHostChannelId,proto3" json:"trade_to_host_channel_id,omitempty"` - // specifies the configuration needed to execute the swap - // such as pool_id, slippage, min trade amount, etc. - TradeConfig *TradeConfig `protobuf:"bytes,12,opt,name=trade_config,json=tradeConfig,proto3" json:"trade_config,omitempty"` -} - -func (x *TradeRoute) Reset() { - *x = TradeRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_trade_route_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *TradeRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TradeRoute) ProtoMessage() {} - -// Deprecated: Use TradeRoute.ProtoReflect.Descriptor instead. -func (*TradeRoute) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_trade_route_proto_rawDescGZIP(), []int{1} -} - -func (x *TradeRoute) GetRewardDenomOnHostZone() string { - if x != nil { - return x.RewardDenomOnHostZone - } - return "" -} - -func (x *TradeRoute) GetRewardDenomOnRewardZone() string { - if x != nil { - return x.RewardDenomOnRewardZone - } - return "" -} - -func (x *TradeRoute) GetRewardDenomOnTradeZone() string { - if x != nil { - return x.RewardDenomOnTradeZone - } - return "" -} - -func (x *TradeRoute) GetHostDenomOnTradeZone() string { - if x != nil { - return x.HostDenomOnTradeZone - } - return "" -} - -func (x *TradeRoute) GetHostDenomOnHostZone() string { - if x != nil { - return x.HostDenomOnHostZone - } - return "" -} - -func (x *TradeRoute) GetHostAccount() *ICAAccount { - if x != nil { - return x.HostAccount - } - return nil -} - -func (x *TradeRoute) GetRewardAccount() *ICAAccount { - if x != nil { - return x.RewardAccount - } - return nil -} - -func (x *TradeRoute) GetTradeAccount() *ICAAccount { - if x != nil { - return x.TradeAccount - } - return nil -} - -func (x *TradeRoute) GetHostToRewardChannelId() string { - if x != nil { - return x.HostToRewardChannelId - } - return "" -} - -func (x *TradeRoute) GetRewardToTradeChannelId() string { - if x != nil { - return x.RewardToTradeChannelId - } - return "" -} - -func (x *TradeRoute) GetTradeToHostChannelId() string { - if x != nil { - return x.TradeToHostChannelId - } - return "" -} - -func (x *TradeRoute) GetTradeConfig() *TradeConfig { - if x != nil { - return x.TradeConfig - } - return nil -} - -var File_stride_stakeibc_trade_route_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_trade_route_proto_rawDesc = []byte{ - 0x0a, 0x21, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x69, 0x63, 0x61, 0x5f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x03, 0x0a, 0x0b, 0x54, 0x72, 0x61, - 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, - 0x64, 0x12, 0x50, 0x0a, 0x0a, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, - 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x73, 0x77, 0x61, 0x70, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x72, 0x69, 0x63, 0x65, 0x5f, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x14, 0x70, 0x72, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x6d, 0x0a, 0x1a, 0x6d, 0x61, 0x78, - 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x6c, 0x6f, - 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, - 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0x52, 0x16, 0x6d, 0x61, 0x78, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x53, 0x77, 0x61, 0x70, - 0x4c, 0x6f, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, - 0x73, 0x77, 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, - 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x45, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, - 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xfb, 0x05, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x64, 0x65, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x38, 0x0a, 0x19, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, - 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x12, - 0x3c, 0x0a, 0x1b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, - 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x4f, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x3a, 0x0a, - 0x1a, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x6e, - 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x16, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x6e, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x36, 0x0a, 0x18, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, - 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x68, 0x6f, 0x73, - 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x6e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x5a, 0x6f, 0x6e, - 0x65, 0x12, 0x34, 0x0a, 0x17, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, - 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x6e, 0x48, - 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x44, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, - 0x49, 0x43, 0x41, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x0b, 0x68, 0x6f, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x48, 0x0a, - 0x0e, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x49, 0x43, 0x41, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x46, 0x0a, 0x0d, 0x74, 0x72, 0x61, 0x64, 0x65, - 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2e, 0x49, 0x43, 0x41, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x64, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x38, 0x0a, 0x19, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, - 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x15, 0x68, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x1a, 0x72, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x6f, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x68, 0x61, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x18, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, - 0x6f, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x74, 0x72, 0x61, 0x64, 0x65, 0x54, 0x6f, - 0x48, 0x6f, 0x73, 0x74, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x45, 0x0a, - 0x0c, 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x42, 0xba, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x0f, 0x54, 0x72, - 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, - 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, - 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0f, 0x53, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xca, 0x02, - 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x10, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_trade_route_proto_rawDescOnce sync.Once - file_stride_stakeibc_trade_route_proto_rawDescData = file_stride_stakeibc_trade_route_proto_rawDesc -) - -func file_stride_stakeibc_trade_route_proto_rawDescGZIP() []byte { - file_stride_stakeibc_trade_route_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_trade_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_trade_route_proto_rawDescData) - }) - return file_stride_stakeibc_trade_route_proto_rawDescData -} - -var file_stride_stakeibc_trade_route_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_stride_stakeibc_trade_route_proto_goTypes = []interface{}{ - (*TradeConfig)(nil), // 0: stride.stakeibc.TradeConfig - (*TradeRoute)(nil), // 1: stride.stakeibc.TradeRoute - (*ICAAccount)(nil), // 2: stride.stakeibc.ICAAccount -} -var file_stride_stakeibc_trade_route_proto_depIdxs = []int32{ - 2, // 0: stride.stakeibc.TradeRoute.host_account:type_name -> stride.stakeibc.ICAAccount - 2, // 1: stride.stakeibc.TradeRoute.reward_account:type_name -> stride.stakeibc.ICAAccount - 2, // 2: stride.stakeibc.TradeRoute.trade_account:type_name -> stride.stakeibc.ICAAccount - 0, // 3: stride.stakeibc.TradeRoute.trade_config:type_name -> stride.stakeibc.TradeConfig - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_trade_route_proto_init() } -func file_stride_stakeibc_trade_route_proto_init() { - if File_stride_stakeibc_trade_route_proto != nil { - return - } - file_stride_stakeibc_ica_account_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_trade_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TradeConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_trade_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TradeRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_trade_route_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_trade_route_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_trade_route_proto_depIdxs, - MessageInfos: file_stride_stakeibc_trade_route_proto_msgTypes, - }.Build() - File_stride_stakeibc_trade_route_proto = out.File - file_stride_stakeibc_trade_route_proto_rawDesc = nil - file_stride_stakeibc_trade_route_proto_goTypes = nil - file_stride_stakeibc_trade_route_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/tx.pulsar.go b/api/stride/stakeibc/tx.pulsar.go deleted file mode 100644 index 27942fab3..000000000 --- a/api/stride/stakeibc/tx.pulsar.go +++ /dev/null @@ -1,25990 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - _ "cosmossdk.io/api/amino" - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - _ "cosmossdk.io/api/cosmos/msg/v1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgUpdateInnerRedemptionRateBounds protoreflect.MessageDescriptor - fd_MsgUpdateInnerRedemptionRateBounds_creator protoreflect.FieldDescriptor - fd_MsgUpdateInnerRedemptionRateBounds_chain_id protoreflect.FieldDescriptor - fd_MsgUpdateInnerRedemptionRateBounds_min_inner_redemption_rate protoreflect.FieldDescriptor - fd_MsgUpdateInnerRedemptionRateBounds_max_inner_redemption_rate protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateInnerRedemptionRateBounds = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateInnerRedemptionRateBounds") - fd_MsgUpdateInnerRedemptionRateBounds_creator = md_MsgUpdateInnerRedemptionRateBounds.Fields().ByName("creator") - fd_MsgUpdateInnerRedemptionRateBounds_chain_id = md_MsgUpdateInnerRedemptionRateBounds.Fields().ByName("chain_id") - fd_MsgUpdateInnerRedemptionRateBounds_min_inner_redemption_rate = md_MsgUpdateInnerRedemptionRateBounds.Fields().ByName("min_inner_redemption_rate") - fd_MsgUpdateInnerRedemptionRateBounds_max_inner_redemption_rate = md_MsgUpdateInnerRedemptionRateBounds.Fields().ByName("max_inner_redemption_rate") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateInnerRedemptionRateBounds)(nil) - -type fastReflection_MsgUpdateInnerRedemptionRateBounds MsgUpdateInnerRedemptionRateBounds - -func (x *MsgUpdateInnerRedemptionRateBounds) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateInnerRedemptionRateBounds)(x) -} - -func (x *MsgUpdateInnerRedemptionRateBounds) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateInnerRedemptionRateBounds_messageType fastReflection_MsgUpdateInnerRedemptionRateBounds_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateInnerRedemptionRateBounds_messageType{} - -type fastReflection_MsgUpdateInnerRedemptionRateBounds_messageType struct{} - -func (x fastReflection_MsgUpdateInnerRedemptionRateBounds_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateInnerRedemptionRateBounds)(nil) -} -func (x fastReflection_MsgUpdateInnerRedemptionRateBounds_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateInnerRedemptionRateBounds) -} -func (x fastReflection_MsgUpdateInnerRedemptionRateBounds_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateInnerRedemptionRateBounds -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateInnerRedemptionRateBounds -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateInnerRedemptionRateBounds_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) New() protoreflect.Message { - return new(fastReflection_MsgUpdateInnerRedemptionRateBounds) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateInnerRedemptionRateBounds)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgUpdateInnerRedemptionRateBounds_creator, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgUpdateInnerRedemptionRateBounds_chain_id, value) { - return - } - } - if x.MinInnerRedemptionRate != "" { - value := protoreflect.ValueOfString(x.MinInnerRedemptionRate) - if !f(fd_MsgUpdateInnerRedemptionRateBounds_min_inner_redemption_rate, value) { - return - } - } - if x.MaxInnerRedemptionRate != "" { - value := protoreflect.ValueOfString(x.MaxInnerRedemptionRate) - if !f(fd_MsgUpdateInnerRedemptionRateBounds_max_inner_redemption_rate, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.creator": - return x.Creator != "" - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.chain_id": - return x.ChainId != "" - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.min_inner_redemption_rate": - return x.MinInnerRedemptionRate != "" - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.max_inner_redemption_rate": - return x.MaxInnerRedemptionRate != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBounds")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.creator": - x.Creator = "" - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.chain_id": - x.ChainId = "" - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.min_inner_redemption_rate": - x.MinInnerRedemptionRate = "" - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.max_inner_redemption_rate": - x.MaxInnerRedemptionRate = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBounds")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.min_inner_redemption_rate": - value := x.MinInnerRedemptionRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.max_inner_redemption_rate": - value := x.MaxInnerRedemptionRate - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBounds")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.min_inner_redemption_rate": - x.MinInnerRedemptionRate = value.Interface().(string) - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.max_inner_redemption_rate": - x.MaxInnerRedemptionRate = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBounds")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds is not mutable")) - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds is not mutable")) - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.min_inner_redemption_rate": - panic(fmt.Errorf("field min_inner_redemption_rate of message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds is not mutable")) - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.max_inner_redemption_rate": - panic(fmt.Errorf("field max_inner_redemption_rate of message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBounds")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.min_inner_redemption_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds.max_inner_redemption_rate": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBounds")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBounds does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateInnerRedemptionRateBounds", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBounds) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateInnerRedemptionRateBounds) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinInnerRedemptionRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaxInnerRedemptionRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateInnerRedemptionRateBounds) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MaxInnerRedemptionRate) > 0 { - i -= len(x.MaxInnerRedemptionRate) - copy(dAtA[i:], x.MaxInnerRedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxInnerRedemptionRate))) - i-- - dAtA[i] = 0x22 - } - if len(x.MinInnerRedemptionRate) > 0 { - i -= len(x.MinInnerRedemptionRate) - copy(dAtA[i:], x.MinInnerRedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinInnerRedemptionRate))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateInnerRedemptionRateBounds) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateInnerRedemptionRateBounds: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateInnerRedemptionRateBounds: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinInnerRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinInnerRedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxInnerRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxInnerRedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateInnerRedemptionRateBoundsResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateInnerRedemptionRateBoundsResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateInnerRedemptionRateBoundsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse)(nil) - -type fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse MsgUpdateInnerRedemptionRateBoundsResponse - -func (x *MsgUpdateInnerRedemptionRateBoundsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse)(x) -} - -func (x *MsgUpdateInnerRedemptionRateBoundsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse_messageType fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse_messageType{} - -type fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse)(nil) -} -func (x fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) -} -func (x fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateInnerRedemptionRateBoundsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateInnerRedemptionRateBoundsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateInnerRedemptionRateBoundsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateInnerRedemptionRateBoundsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateInnerRedemptionRateBoundsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateInnerRedemptionRateBoundsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateInnerRedemptionRateBoundsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateInnerRedemptionRateBoundsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateInnerRedemptionRateBoundsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgLiquidStake protoreflect.MessageDescriptor - fd_MsgLiquidStake_creator protoreflect.FieldDescriptor - fd_MsgLiquidStake_amount protoreflect.FieldDescriptor - fd_MsgLiquidStake_host_denom protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgLiquidStake = File_stride_stakeibc_tx_proto.Messages().ByName("MsgLiquidStake") - fd_MsgLiquidStake_creator = md_MsgLiquidStake.Fields().ByName("creator") - fd_MsgLiquidStake_amount = md_MsgLiquidStake.Fields().ByName("amount") - fd_MsgLiquidStake_host_denom = md_MsgLiquidStake.Fields().ByName("host_denom") -} - -var _ protoreflect.Message = (*fastReflection_MsgLiquidStake)(nil) - -type fastReflection_MsgLiquidStake MsgLiquidStake - -func (x *MsgLiquidStake) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgLiquidStake)(x) -} - -func (x *MsgLiquidStake) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgLiquidStake_messageType fastReflection_MsgLiquidStake_messageType -var _ protoreflect.MessageType = fastReflection_MsgLiquidStake_messageType{} - -type fastReflection_MsgLiquidStake_messageType struct{} - -func (x fastReflection_MsgLiquidStake_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgLiquidStake)(nil) -} -func (x fastReflection_MsgLiquidStake_messageType) New() protoreflect.Message { - return new(fastReflection_MsgLiquidStake) -} -func (x fastReflection_MsgLiquidStake_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLiquidStake -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgLiquidStake) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLiquidStake -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgLiquidStake) Type() protoreflect.MessageType { - return _fastReflection_MsgLiquidStake_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgLiquidStake) New() protoreflect.Message { - return new(fastReflection_MsgLiquidStake) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgLiquidStake) Interface() protoreflect.ProtoMessage { - return (*MsgLiquidStake)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgLiquidStake) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgLiquidStake_creator, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_MsgLiquidStake_amount, value) { - return - } - } - if x.HostDenom != "" { - value := protoreflect.ValueOfString(x.HostDenom) - if !f(fd_MsgLiquidStake_host_denom, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgLiquidStake) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStake.creator": - return x.Creator != "" - case "stride.stakeibc.MsgLiquidStake.amount": - return x.Amount != "" - case "stride.stakeibc.MsgLiquidStake.host_denom": - return x.HostDenom != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStake does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLiquidStake) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStake.creator": - x.Creator = "" - case "stride.stakeibc.MsgLiquidStake.amount": - x.Amount = "" - case "stride.stakeibc.MsgLiquidStake.host_denom": - x.HostDenom = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStake does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgLiquidStake) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgLiquidStake.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgLiquidStake.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgLiquidStake.host_denom": - value := x.HostDenom - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStake does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLiquidStake) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStake.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgLiquidStake.amount": - x.Amount = value.Interface().(string) - case "stride.stakeibc.MsgLiquidStake.host_denom": - x.HostDenom = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStake does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLiquidStake) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStake.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgLiquidStake is not mutable")) - case "stride.stakeibc.MsgLiquidStake.amount": - panic(fmt.Errorf("field amount of message stride.stakeibc.MsgLiquidStake is not mutable")) - case "stride.stakeibc.MsgLiquidStake.host_denom": - panic(fmt.Errorf("field host_denom of message stride.stakeibc.MsgLiquidStake is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStake does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgLiquidStake) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStake.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgLiquidStake.amount": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgLiquidStake.host_denom": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStake does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgLiquidStake) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgLiquidStake", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgLiquidStake) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLiquidStake) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgLiquidStake) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgLiquidStake) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgLiquidStake) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgLiquidStake) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.HostDenom) > 0 { - i -= len(x.HostDenom) - copy(dAtA[i:], x.HostDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenom))) - i-- - dAtA[i] = 0x1a - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgLiquidStake) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLiquidStake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLiquidStake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgLiquidStakeResponse protoreflect.MessageDescriptor - fd_MsgLiquidStakeResponse_st_token protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgLiquidStakeResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgLiquidStakeResponse") - fd_MsgLiquidStakeResponse_st_token = md_MsgLiquidStakeResponse.Fields().ByName("st_token") -} - -var _ protoreflect.Message = (*fastReflection_MsgLiquidStakeResponse)(nil) - -type fastReflection_MsgLiquidStakeResponse MsgLiquidStakeResponse - -func (x *MsgLiquidStakeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgLiquidStakeResponse)(x) -} - -func (x *MsgLiquidStakeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgLiquidStakeResponse_messageType fastReflection_MsgLiquidStakeResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgLiquidStakeResponse_messageType{} - -type fastReflection_MsgLiquidStakeResponse_messageType struct{} - -func (x fastReflection_MsgLiquidStakeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgLiquidStakeResponse)(nil) -} -func (x fastReflection_MsgLiquidStakeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgLiquidStakeResponse) -} -func (x fastReflection_MsgLiquidStakeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLiquidStakeResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgLiquidStakeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLiquidStakeResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgLiquidStakeResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgLiquidStakeResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgLiquidStakeResponse) New() protoreflect.Message { - return new(fastReflection_MsgLiquidStakeResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgLiquidStakeResponse) Interface() protoreflect.ProtoMessage { - return (*MsgLiquidStakeResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgLiquidStakeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.StToken != nil { - value := protoreflect.ValueOfMessage(x.StToken.ProtoReflect()) - if !f(fd_MsgLiquidStakeResponse_st_token, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgLiquidStakeResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStakeResponse.st_token": - return x.StToken != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLiquidStakeResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStakeResponse.st_token": - x.StToken = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgLiquidStakeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgLiquidStakeResponse.st_token": - value := x.StToken - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStakeResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLiquidStakeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStakeResponse.st_token": - x.StToken = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLiquidStakeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStakeResponse.st_token": - if x.StToken == nil { - x.StToken = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.StToken.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgLiquidStakeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgLiquidStakeResponse.st_token": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgLiquidStakeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgLiquidStakeResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgLiquidStakeResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLiquidStakeResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgLiquidStakeResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgLiquidStakeResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgLiquidStakeResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.StToken != nil { - l = options.Size(x.StToken) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgLiquidStakeResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.StToken != nil { - encoded, err := options.Marshal(x.StToken) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgLiquidStakeResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLiquidStakeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLiquidStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StToken", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.StToken == nil { - x.StToken = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StToken); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgLSMLiquidStake protoreflect.MessageDescriptor - fd_MsgLSMLiquidStake_creator protoreflect.FieldDescriptor - fd_MsgLSMLiquidStake_amount protoreflect.FieldDescriptor - fd_MsgLSMLiquidStake_lsm_token_ibc_denom protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgLSMLiquidStake = File_stride_stakeibc_tx_proto.Messages().ByName("MsgLSMLiquidStake") - fd_MsgLSMLiquidStake_creator = md_MsgLSMLiquidStake.Fields().ByName("creator") - fd_MsgLSMLiquidStake_amount = md_MsgLSMLiquidStake.Fields().ByName("amount") - fd_MsgLSMLiquidStake_lsm_token_ibc_denom = md_MsgLSMLiquidStake.Fields().ByName("lsm_token_ibc_denom") -} - -var _ protoreflect.Message = (*fastReflection_MsgLSMLiquidStake)(nil) - -type fastReflection_MsgLSMLiquidStake MsgLSMLiquidStake - -func (x *MsgLSMLiquidStake) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgLSMLiquidStake)(x) -} - -func (x *MsgLSMLiquidStake) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgLSMLiquidStake_messageType fastReflection_MsgLSMLiquidStake_messageType -var _ protoreflect.MessageType = fastReflection_MsgLSMLiquidStake_messageType{} - -type fastReflection_MsgLSMLiquidStake_messageType struct{} - -func (x fastReflection_MsgLSMLiquidStake_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgLSMLiquidStake)(nil) -} -func (x fastReflection_MsgLSMLiquidStake_messageType) New() protoreflect.Message { - return new(fastReflection_MsgLSMLiquidStake) -} -func (x fastReflection_MsgLSMLiquidStake_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLSMLiquidStake -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgLSMLiquidStake) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLSMLiquidStake -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgLSMLiquidStake) Type() protoreflect.MessageType { - return _fastReflection_MsgLSMLiquidStake_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgLSMLiquidStake) New() protoreflect.Message { - return new(fastReflection_MsgLSMLiquidStake) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgLSMLiquidStake) Interface() protoreflect.ProtoMessage { - return (*MsgLSMLiquidStake)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgLSMLiquidStake) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgLSMLiquidStake_creator, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_MsgLSMLiquidStake_amount, value) { - return - } - } - if x.LsmTokenIbcDenom != "" { - value := protoreflect.ValueOfString(x.LsmTokenIbcDenom) - if !f(fd_MsgLSMLiquidStake_lsm_token_ibc_denom, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgLSMLiquidStake) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStake.creator": - return x.Creator != "" - case "stride.stakeibc.MsgLSMLiquidStake.amount": - return x.Amount != "" - case "stride.stakeibc.MsgLSMLiquidStake.lsm_token_ibc_denom": - return x.LsmTokenIbcDenom != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLSMLiquidStake) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStake.creator": - x.Creator = "" - case "stride.stakeibc.MsgLSMLiquidStake.amount": - x.Amount = "" - case "stride.stakeibc.MsgLSMLiquidStake.lsm_token_ibc_denom": - x.LsmTokenIbcDenom = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgLSMLiquidStake) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgLSMLiquidStake.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgLSMLiquidStake.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgLSMLiquidStake.lsm_token_ibc_denom": - value := x.LsmTokenIbcDenom - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStake does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLSMLiquidStake) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStake.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgLSMLiquidStake.amount": - x.Amount = value.Interface().(string) - case "stride.stakeibc.MsgLSMLiquidStake.lsm_token_ibc_denom": - x.LsmTokenIbcDenom = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLSMLiquidStake) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStake.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgLSMLiquidStake is not mutable")) - case "stride.stakeibc.MsgLSMLiquidStake.amount": - panic(fmt.Errorf("field amount of message stride.stakeibc.MsgLSMLiquidStake is not mutable")) - case "stride.stakeibc.MsgLSMLiquidStake.lsm_token_ibc_denom": - panic(fmt.Errorf("field lsm_token_ibc_denom of message stride.stakeibc.MsgLSMLiquidStake is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgLSMLiquidStake) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStake.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgLSMLiquidStake.amount": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgLSMLiquidStake.lsm_token_ibc_denom": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStake does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgLSMLiquidStake) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgLSMLiquidStake", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgLSMLiquidStake) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLSMLiquidStake) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgLSMLiquidStake) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgLSMLiquidStake) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgLSMLiquidStake) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LsmTokenIbcDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgLSMLiquidStake) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.LsmTokenIbcDenom) > 0 { - i -= len(x.LsmTokenIbcDenom) - copy(dAtA[i:], x.LsmTokenIbcDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LsmTokenIbcDenom))) - i-- - dAtA[i] = 0x1a - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgLSMLiquidStake) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLSMLiquidStake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLSMLiquidStake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LsmTokenIbcDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LsmTokenIbcDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgLSMLiquidStakeResponse protoreflect.MessageDescriptor - fd_MsgLSMLiquidStakeResponse_transaction_complete protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgLSMLiquidStakeResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgLSMLiquidStakeResponse") - fd_MsgLSMLiquidStakeResponse_transaction_complete = md_MsgLSMLiquidStakeResponse.Fields().ByName("transaction_complete") -} - -var _ protoreflect.Message = (*fastReflection_MsgLSMLiquidStakeResponse)(nil) - -type fastReflection_MsgLSMLiquidStakeResponse MsgLSMLiquidStakeResponse - -func (x *MsgLSMLiquidStakeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgLSMLiquidStakeResponse)(x) -} - -func (x *MsgLSMLiquidStakeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgLSMLiquidStakeResponse_messageType fastReflection_MsgLSMLiquidStakeResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgLSMLiquidStakeResponse_messageType{} - -type fastReflection_MsgLSMLiquidStakeResponse_messageType struct{} - -func (x fastReflection_MsgLSMLiquidStakeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgLSMLiquidStakeResponse)(nil) -} -func (x fastReflection_MsgLSMLiquidStakeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgLSMLiquidStakeResponse) -} -func (x fastReflection_MsgLSMLiquidStakeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLSMLiquidStakeResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgLSMLiquidStakeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgLSMLiquidStakeResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgLSMLiquidStakeResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgLSMLiquidStakeResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgLSMLiquidStakeResponse) New() protoreflect.Message { - return new(fastReflection_MsgLSMLiquidStakeResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgLSMLiquidStakeResponse) Interface() protoreflect.ProtoMessage { - return (*MsgLSMLiquidStakeResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgLSMLiquidStakeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.TransactionComplete != false { - value := protoreflect.ValueOfBool(x.TransactionComplete) - if !f(fd_MsgLSMLiquidStakeResponse_transaction_complete, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgLSMLiquidStakeResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStakeResponse.transaction_complete": - return x.TransactionComplete != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLSMLiquidStakeResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStakeResponse.transaction_complete": - x.TransactionComplete = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgLSMLiquidStakeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgLSMLiquidStakeResponse.transaction_complete": - value := x.TransactionComplete - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStakeResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLSMLiquidStakeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStakeResponse.transaction_complete": - x.TransactionComplete = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLSMLiquidStakeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStakeResponse.transaction_complete": - panic(fmt.Errorf("field transaction_complete of message stride.stakeibc.MsgLSMLiquidStakeResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgLSMLiquidStakeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgLSMLiquidStakeResponse.transaction_complete": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgLSMLiquidStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgLSMLiquidStakeResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgLSMLiquidStakeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgLSMLiquidStakeResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgLSMLiquidStakeResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgLSMLiquidStakeResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgLSMLiquidStakeResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgLSMLiquidStakeResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgLSMLiquidStakeResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.TransactionComplete { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgLSMLiquidStakeResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.TransactionComplete { - i-- - if x.TransactionComplete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgLSMLiquidStakeResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLSMLiquidStakeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLSMLiquidStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TransactionComplete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.TransactionComplete = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgClearBalance protoreflect.MessageDescriptor - fd_MsgClearBalance_creator protoreflect.FieldDescriptor - fd_MsgClearBalance_chain_id protoreflect.FieldDescriptor - fd_MsgClearBalance_amount protoreflect.FieldDescriptor - fd_MsgClearBalance_channel protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgClearBalance = File_stride_stakeibc_tx_proto.Messages().ByName("MsgClearBalance") - fd_MsgClearBalance_creator = md_MsgClearBalance.Fields().ByName("creator") - fd_MsgClearBalance_chain_id = md_MsgClearBalance.Fields().ByName("chain_id") - fd_MsgClearBalance_amount = md_MsgClearBalance.Fields().ByName("amount") - fd_MsgClearBalance_channel = md_MsgClearBalance.Fields().ByName("channel") -} - -var _ protoreflect.Message = (*fastReflection_MsgClearBalance)(nil) - -type fastReflection_MsgClearBalance MsgClearBalance - -func (x *MsgClearBalance) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgClearBalance)(x) -} - -func (x *MsgClearBalance) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgClearBalance_messageType fastReflection_MsgClearBalance_messageType -var _ protoreflect.MessageType = fastReflection_MsgClearBalance_messageType{} - -type fastReflection_MsgClearBalance_messageType struct{} - -func (x fastReflection_MsgClearBalance_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgClearBalance)(nil) -} -func (x fastReflection_MsgClearBalance_messageType) New() protoreflect.Message { - return new(fastReflection_MsgClearBalance) -} -func (x fastReflection_MsgClearBalance_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgClearBalance -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgClearBalance) Descriptor() protoreflect.MessageDescriptor { - return md_MsgClearBalance -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgClearBalance) Type() protoreflect.MessageType { - return _fastReflection_MsgClearBalance_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgClearBalance) New() protoreflect.Message { - return new(fastReflection_MsgClearBalance) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgClearBalance) Interface() protoreflect.ProtoMessage { - return (*MsgClearBalance)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgClearBalance) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgClearBalance_creator, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgClearBalance_chain_id, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_MsgClearBalance_amount, value) { - return - } - } - if x.Channel != "" { - value := protoreflect.ValueOfString(x.Channel) - if !f(fd_MsgClearBalance_channel, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgClearBalance) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgClearBalance.creator": - return x.Creator != "" - case "stride.stakeibc.MsgClearBalance.chain_id": - return x.ChainId != "" - case "stride.stakeibc.MsgClearBalance.amount": - return x.Amount != "" - case "stride.stakeibc.MsgClearBalance.channel": - return x.Channel != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalance")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalance does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClearBalance) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgClearBalance.creator": - x.Creator = "" - case "stride.stakeibc.MsgClearBalance.chain_id": - x.ChainId = "" - case "stride.stakeibc.MsgClearBalance.amount": - x.Amount = "" - case "stride.stakeibc.MsgClearBalance.channel": - x.Channel = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalance")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalance does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgClearBalance) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgClearBalance.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgClearBalance.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgClearBalance.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgClearBalance.channel": - value := x.Channel - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalance")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalance does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClearBalance) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgClearBalance.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgClearBalance.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.MsgClearBalance.amount": - x.Amount = value.Interface().(string) - case "stride.stakeibc.MsgClearBalance.channel": - x.Channel = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalance")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalance does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClearBalance) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgClearBalance.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgClearBalance is not mutable")) - case "stride.stakeibc.MsgClearBalance.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.MsgClearBalance is not mutable")) - case "stride.stakeibc.MsgClearBalance.amount": - panic(fmt.Errorf("field amount of message stride.stakeibc.MsgClearBalance is not mutable")) - case "stride.stakeibc.MsgClearBalance.channel": - panic(fmt.Errorf("field channel of message stride.stakeibc.MsgClearBalance is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalance")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalance does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgClearBalance) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgClearBalance.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgClearBalance.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgClearBalance.amount": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgClearBalance.channel": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalance")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalance does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgClearBalance) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgClearBalance", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgClearBalance) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClearBalance) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgClearBalance) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgClearBalance) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgClearBalance) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Channel) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgClearBalance) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Channel) > 0 { - i -= len(x.Channel) - copy(dAtA[i:], x.Channel) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Channel))) - i-- - dAtA[i] = 0x22 - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgClearBalance) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClearBalance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClearBalance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Channel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgClearBalanceResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgClearBalanceResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgClearBalanceResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgClearBalanceResponse)(nil) - -type fastReflection_MsgClearBalanceResponse MsgClearBalanceResponse - -func (x *MsgClearBalanceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgClearBalanceResponse)(x) -} - -func (x *MsgClearBalanceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgClearBalanceResponse_messageType fastReflection_MsgClearBalanceResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgClearBalanceResponse_messageType{} - -type fastReflection_MsgClearBalanceResponse_messageType struct{} - -func (x fastReflection_MsgClearBalanceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgClearBalanceResponse)(nil) -} -func (x fastReflection_MsgClearBalanceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgClearBalanceResponse) -} -func (x fastReflection_MsgClearBalanceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgClearBalanceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgClearBalanceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgClearBalanceResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgClearBalanceResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgClearBalanceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgClearBalanceResponse) New() protoreflect.Message { - return new(fastReflection_MsgClearBalanceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgClearBalanceResponse) Interface() protoreflect.ProtoMessage { - return (*MsgClearBalanceResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgClearBalanceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgClearBalanceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalanceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalanceResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClearBalanceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalanceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalanceResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgClearBalanceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalanceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalanceResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClearBalanceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalanceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalanceResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClearBalanceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalanceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalanceResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgClearBalanceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClearBalanceResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClearBalanceResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgClearBalanceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgClearBalanceResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgClearBalanceResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClearBalanceResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgClearBalanceResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgClearBalanceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgClearBalanceResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgClearBalanceResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgClearBalanceResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClearBalanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClearBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRedeemStake protoreflect.MessageDescriptor - fd_MsgRedeemStake_creator protoreflect.FieldDescriptor - fd_MsgRedeemStake_amount protoreflect.FieldDescriptor - fd_MsgRedeemStake_host_zone protoreflect.FieldDescriptor - fd_MsgRedeemStake_receiver protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgRedeemStake = File_stride_stakeibc_tx_proto.Messages().ByName("MsgRedeemStake") - fd_MsgRedeemStake_creator = md_MsgRedeemStake.Fields().ByName("creator") - fd_MsgRedeemStake_amount = md_MsgRedeemStake.Fields().ByName("amount") - fd_MsgRedeemStake_host_zone = md_MsgRedeemStake.Fields().ByName("host_zone") - fd_MsgRedeemStake_receiver = md_MsgRedeemStake.Fields().ByName("receiver") -} - -var _ protoreflect.Message = (*fastReflection_MsgRedeemStake)(nil) - -type fastReflection_MsgRedeemStake MsgRedeemStake - -func (x *MsgRedeemStake) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRedeemStake)(x) -} - -func (x *MsgRedeemStake) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRedeemStake_messageType fastReflection_MsgRedeemStake_messageType -var _ protoreflect.MessageType = fastReflection_MsgRedeemStake_messageType{} - -type fastReflection_MsgRedeemStake_messageType struct{} - -func (x fastReflection_MsgRedeemStake_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRedeemStake)(nil) -} -func (x fastReflection_MsgRedeemStake_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRedeemStake) -} -func (x fastReflection_MsgRedeemStake_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRedeemStake -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRedeemStake) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRedeemStake -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRedeemStake) Type() protoreflect.MessageType { - return _fastReflection_MsgRedeemStake_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRedeemStake) New() protoreflect.Message { - return new(fastReflection_MsgRedeemStake) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRedeemStake) Interface() protoreflect.ProtoMessage { - return (*MsgRedeemStake)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRedeemStake) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgRedeemStake_creator, value) { - return - } - } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_MsgRedeemStake_amount, value) { - return - } - } - if x.HostZone != "" { - value := protoreflect.ValueOfString(x.HostZone) - if !f(fd_MsgRedeemStake_host_zone, value) { - return - } - } - if x.Receiver != "" { - value := protoreflect.ValueOfString(x.Receiver) - if !f(fd_MsgRedeemStake_receiver, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRedeemStake) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgRedeemStake.creator": - return x.Creator != "" - case "stride.stakeibc.MsgRedeemStake.amount": - return x.Amount != "" - case "stride.stakeibc.MsgRedeemStake.host_zone": - return x.HostZone != "" - case "stride.stakeibc.MsgRedeemStake.receiver": - return x.Receiver != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStake does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRedeemStake) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgRedeemStake.creator": - x.Creator = "" - case "stride.stakeibc.MsgRedeemStake.amount": - x.Amount = "" - case "stride.stakeibc.MsgRedeemStake.host_zone": - x.HostZone = "" - case "stride.stakeibc.MsgRedeemStake.receiver": - x.Receiver = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStake does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRedeemStake) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgRedeemStake.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRedeemStake.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRedeemStake.host_zone": - value := x.HostZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRedeemStake.receiver": - value := x.Receiver - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStake does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRedeemStake) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgRedeemStake.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgRedeemStake.amount": - x.Amount = value.Interface().(string) - case "stride.stakeibc.MsgRedeemStake.host_zone": - x.HostZone = value.Interface().(string) - case "stride.stakeibc.MsgRedeemStake.receiver": - x.Receiver = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStake does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRedeemStake) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgRedeemStake.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgRedeemStake is not mutable")) - case "stride.stakeibc.MsgRedeemStake.amount": - panic(fmt.Errorf("field amount of message stride.stakeibc.MsgRedeemStake is not mutable")) - case "stride.stakeibc.MsgRedeemStake.host_zone": - panic(fmt.Errorf("field host_zone of message stride.stakeibc.MsgRedeemStake is not mutable")) - case "stride.stakeibc.MsgRedeemStake.receiver": - panic(fmt.Errorf("field receiver of message stride.stakeibc.MsgRedeemStake is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStake does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRedeemStake) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgRedeemStake.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRedeemStake.amount": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRedeemStake.host_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRedeemStake.receiver": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStake")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStake does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRedeemStake) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgRedeemStake", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRedeemStake) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRedeemStake) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRedeemStake) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRedeemStake) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRedeemStake) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Receiver) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRedeemStake) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Receiver) > 0 { - i -= len(x.Receiver) - copy(dAtA[i:], x.Receiver) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) - i-- - dAtA[i] = 0x22 - } - if len(x.HostZone) > 0 { - i -= len(x.HostZone) - copy(dAtA[i:], x.HostZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZone))) - i-- - dAtA[i] = 0x1a - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRedeemStake) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRedeemStake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRedeemStake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRedeemStakeResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgRedeemStakeResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgRedeemStakeResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgRedeemStakeResponse)(nil) - -type fastReflection_MsgRedeemStakeResponse MsgRedeemStakeResponse - -func (x *MsgRedeemStakeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRedeemStakeResponse)(x) -} - -func (x *MsgRedeemStakeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRedeemStakeResponse_messageType fastReflection_MsgRedeemStakeResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRedeemStakeResponse_messageType{} - -type fastReflection_MsgRedeemStakeResponse_messageType struct{} - -func (x fastReflection_MsgRedeemStakeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRedeemStakeResponse)(nil) -} -func (x fastReflection_MsgRedeemStakeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRedeemStakeResponse) -} -func (x fastReflection_MsgRedeemStakeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRedeemStakeResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRedeemStakeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRedeemStakeResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRedeemStakeResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRedeemStakeResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRedeemStakeResponse) New() protoreflect.Message { - return new(fastReflection_MsgRedeemStakeResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRedeemStakeResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRedeemStakeResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRedeemStakeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRedeemStakeResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStakeResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRedeemStakeResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStakeResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRedeemStakeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStakeResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRedeemStakeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStakeResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRedeemStakeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStakeResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRedeemStakeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRedeemStakeResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRedeemStakeResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRedeemStakeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgRedeemStakeResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRedeemStakeResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRedeemStakeResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRedeemStakeResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRedeemStakeResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRedeemStakeResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRedeemStakeResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRedeemStakeResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRedeemStakeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRedeemStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRegisterHostZone protoreflect.MessageDescriptor - fd_MsgRegisterHostZone_connection_id protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_bech32prefix protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_host_denom protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_ibc_denom protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_creator protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_transfer_channel_id protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_unbonding_period protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_min_redemption_rate protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_max_redemption_rate protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_lsm_liquid_stake_enabled protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_community_pool_treasury_address protoreflect.FieldDescriptor - fd_MsgRegisterHostZone_max_messages_per_ica_tx protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgRegisterHostZone = File_stride_stakeibc_tx_proto.Messages().ByName("MsgRegisterHostZone") - fd_MsgRegisterHostZone_connection_id = md_MsgRegisterHostZone.Fields().ByName("connection_id") - fd_MsgRegisterHostZone_bech32prefix = md_MsgRegisterHostZone.Fields().ByName("bech32prefix") - fd_MsgRegisterHostZone_host_denom = md_MsgRegisterHostZone.Fields().ByName("host_denom") - fd_MsgRegisterHostZone_ibc_denom = md_MsgRegisterHostZone.Fields().ByName("ibc_denom") - fd_MsgRegisterHostZone_creator = md_MsgRegisterHostZone.Fields().ByName("creator") - fd_MsgRegisterHostZone_transfer_channel_id = md_MsgRegisterHostZone.Fields().ByName("transfer_channel_id") - fd_MsgRegisterHostZone_unbonding_period = md_MsgRegisterHostZone.Fields().ByName("unbonding_period") - fd_MsgRegisterHostZone_min_redemption_rate = md_MsgRegisterHostZone.Fields().ByName("min_redemption_rate") - fd_MsgRegisterHostZone_max_redemption_rate = md_MsgRegisterHostZone.Fields().ByName("max_redemption_rate") - fd_MsgRegisterHostZone_lsm_liquid_stake_enabled = md_MsgRegisterHostZone.Fields().ByName("lsm_liquid_stake_enabled") - fd_MsgRegisterHostZone_community_pool_treasury_address = md_MsgRegisterHostZone.Fields().ByName("community_pool_treasury_address") - fd_MsgRegisterHostZone_max_messages_per_ica_tx = md_MsgRegisterHostZone.Fields().ByName("max_messages_per_ica_tx") -} - -var _ protoreflect.Message = (*fastReflection_MsgRegisterHostZone)(nil) - -type fastReflection_MsgRegisterHostZone MsgRegisterHostZone - -func (x *MsgRegisterHostZone) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterHostZone)(x) -} - -func (x *MsgRegisterHostZone) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRegisterHostZone_messageType fastReflection_MsgRegisterHostZone_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterHostZone_messageType{} - -type fastReflection_MsgRegisterHostZone_messageType struct{} - -func (x fastReflection_MsgRegisterHostZone_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterHostZone)(nil) -} -func (x fastReflection_MsgRegisterHostZone_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterHostZone) -} -func (x fastReflection_MsgRegisterHostZone_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterHostZone -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRegisterHostZone) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterHostZone -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterHostZone) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterHostZone_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterHostZone) New() protoreflect.Message { - return new(fastReflection_MsgRegisterHostZone) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterHostZone) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterHostZone)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRegisterHostZone) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ConnectionId != "" { - value := protoreflect.ValueOfString(x.ConnectionId) - if !f(fd_MsgRegisterHostZone_connection_id, value) { - return - } - } - if x.Bech32Prefix != "" { - value := protoreflect.ValueOfString(x.Bech32Prefix) - if !f(fd_MsgRegisterHostZone_bech32prefix, value) { - return - } - } - if x.HostDenom != "" { - value := protoreflect.ValueOfString(x.HostDenom) - if !f(fd_MsgRegisterHostZone_host_denom, value) { - return - } - } - if x.IbcDenom != "" { - value := protoreflect.ValueOfString(x.IbcDenom) - if !f(fd_MsgRegisterHostZone_ibc_denom, value) { - return - } - } - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgRegisterHostZone_creator, value) { - return - } - } - if x.TransferChannelId != "" { - value := protoreflect.ValueOfString(x.TransferChannelId) - if !f(fd_MsgRegisterHostZone_transfer_channel_id, value) { - return - } - } - if x.UnbondingPeriod != uint64(0) { - value := protoreflect.ValueOfUint64(x.UnbondingPeriod) - if !f(fd_MsgRegisterHostZone_unbonding_period, value) { - return - } - } - if x.MinRedemptionRate != "" { - value := protoreflect.ValueOfString(x.MinRedemptionRate) - if !f(fd_MsgRegisterHostZone_min_redemption_rate, value) { - return - } - } - if x.MaxRedemptionRate != "" { - value := protoreflect.ValueOfString(x.MaxRedemptionRate) - if !f(fd_MsgRegisterHostZone_max_redemption_rate, value) { - return - } - } - if x.LsmLiquidStakeEnabled != false { - value := protoreflect.ValueOfBool(x.LsmLiquidStakeEnabled) - if !f(fd_MsgRegisterHostZone_lsm_liquid_stake_enabled, value) { - return - } - } - if x.CommunityPoolTreasuryAddress != "" { - value := protoreflect.ValueOfString(x.CommunityPoolTreasuryAddress) - if !f(fd_MsgRegisterHostZone_community_pool_treasury_address, value) { - return - } - } - if x.MaxMessagesPerIcaTx != uint64(0) { - value := protoreflect.ValueOfUint64(x.MaxMessagesPerIcaTx) - if !f(fd_MsgRegisterHostZone_max_messages_per_ica_tx, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterHostZone) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgRegisterHostZone.connection_id": - return x.ConnectionId != "" - case "stride.stakeibc.MsgRegisterHostZone.bech32prefix": - return x.Bech32Prefix != "" - case "stride.stakeibc.MsgRegisterHostZone.host_denom": - return x.HostDenom != "" - case "stride.stakeibc.MsgRegisterHostZone.ibc_denom": - return x.IbcDenom != "" - case "stride.stakeibc.MsgRegisterHostZone.creator": - return x.Creator != "" - case "stride.stakeibc.MsgRegisterHostZone.transfer_channel_id": - return x.TransferChannelId != "" - case "stride.stakeibc.MsgRegisterHostZone.unbonding_period": - return x.UnbondingPeriod != uint64(0) - case "stride.stakeibc.MsgRegisterHostZone.min_redemption_rate": - return x.MinRedemptionRate != "" - case "stride.stakeibc.MsgRegisterHostZone.max_redemption_rate": - return x.MaxRedemptionRate != "" - case "stride.stakeibc.MsgRegisterHostZone.lsm_liquid_stake_enabled": - return x.LsmLiquidStakeEnabled != false - case "stride.stakeibc.MsgRegisterHostZone.community_pool_treasury_address": - return x.CommunityPoolTreasuryAddress != "" - case "stride.stakeibc.MsgRegisterHostZone.max_messages_per_ica_tx": - return x.MaxMessagesPerIcaTx != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZone does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterHostZone) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgRegisterHostZone.connection_id": - x.ConnectionId = "" - case "stride.stakeibc.MsgRegisterHostZone.bech32prefix": - x.Bech32Prefix = "" - case "stride.stakeibc.MsgRegisterHostZone.host_denom": - x.HostDenom = "" - case "stride.stakeibc.MsgRegisterHostZone.ibc_denom": - x.IbcDenom = "" - case "stride.stakeibc.MsgRegisterHostZone.creator": - x.Creator = "" - case "stride.stakeibc.MsgRegisterHostZone.transfer_channel_id": - x.TransferChannelId = "" - case "stride.stakeibc.MsgRegisterHostZone.unbonding_period": - x.UnbondingPeriod = uint64(0) - case "stride.stakeibc.MsgRegisterHostZone.min_redemption_rate": - x.MinRedemptionRate = "" - case "stride.stakeibc.MsgRegisterHostZone.max_redemption_rate": - x.MaxRedemptionRate = "" - case "stride.stakeibc.MsgRegisterHostZone.lsm_liquid_stake_enabled": - x.LsmLiquidStakeEnabled = false - case "stride.stakeibc.MsgRegisterHostZone.community_pool_treasury_address": - x.CommunityPoolTreasuryAddress = "" - case "stride.stakeibc.MsgRegisterHostZone.max_messages_per_ica_tx": - x.MaxMessagesPerIcaTx = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZone does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterHostZone) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgRegisterHostZone.connection_id": - value := x.ConnectionId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRegisterHostZone.bech32prefix": - value := x.Bech32Prefix - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRegisterHostZone.host_denom": - value := x.HostDenom - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRegisterHostZone.ibc_denom": - value := x.IbcDenom - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRegisterHostZone.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRegisterHostZone.transfer_channel_id": - value := x.TransferChannelId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRegisterHostZone.unbonding_period": - value := x.UnbondingPeriod - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.MsgRegisterHostZone.min_redemption_rate": - value := x.MinRedemptionRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRegisterHostZone.max_redemption_rate": - value := x.MaxRedemptionRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRegisterHostZone.lsm_liquid_stake_enabled": - value := x.LsmLiquidStakeEnabled - return protoreflect.ValueOfBool(value) - case "stride.stakeibc.MsgRegisterHostZone.community_pool_treasury_address": - value := x.CommunityPoolTreasuryAddress - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRegisterHostZone.max_messages_per_ica_tx": - value := x.MaxMessagesPerIcaTx - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZone does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterHostZone) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgRegisterHostZone.connection_id": - x.ConnectionId = value.Interface().(string) - case "stride.stakeibc.MsgRegisterHostZone.bech32prefix": - x.Bech32Prefix = value.Interface().(string) - case "stride.stakeibc.MsgRegisterHostZone.host_denom": - x.HostDenom = value.Interface().(string) - case "stride.stakeibc.MsgRegisterHostZone.ibc_denom": - x.IbcDenom = value.Interface().(string) - case "stride.stakeibc.MsgRegisterHostZone.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgRegisterHostZone.transfer_channel_id": - x.TransferChannelId = value.Interface().(string) - case "stride.stakeibc.MsgRegisterHostZone.unbonding_period": - x.UnbondingPeriod = value.Uint() - case "stride.stakeibc.MsgRegisterHostZone.min_redemption_rate": - x.MinRedemptionRate = value.Interface().(string) - case "stride.stakeibc.MsgRegisterHostZone.max_redemption_rate": - x.MaxRedemptionRate = value.Interface().(string) - case "stride.stakeibc.MsgRegisterHostZone.lsm_liquid_stake_enabled": - x.LsmLiquidStakeEnabled = value.Bool() - case "stride.stakeibc.MsgRegisterHostZone.community_pool_treasury_address": - x.CommunityPoolTreasuryAddress = value.Interface().(string) - case "stride.stakeibc.MsgRegisterHostZone.max_messages_per_ica_tx": - x.MaxMessagesPerIcaTx = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZone does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterHostZone) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgRegisterHostZone.connection_id": - panic(fmt.Errorf("field connection_id of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.bech32prefix": - panic(fmt.Errorf("field bech32prefix of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.host_denom": - panic(fmt.Errorf("field host_denom of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.ibc_denom": - panic(fmt.Errorf("field ibc_denom of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.transfer_channel_id": - panic(fmt.Errorf("field transfer_channel_id of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.unbonding_period": - panic(fmt.Errorf("field unbonding_period of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.min_redemption_rate": - panic(fmt.Errorf("field min_redemption_rate of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.max_redemption_rate": - panic(fmt.Errorf("field max_redemption_rate of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.lsm_liquid_stake_enabled": - panic(fmt.Errorf("field lsm_liquid_stake_enabled of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.community_pool_treasury_address": - panic(fmt.Errorf("field community_pool_treasury_address of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - case "stride.stakeibc.MsgRegisterHostZone.max_messages_per_ica_tx": - panic(fmt.Errorf("field max_messages_per_ica_tx of message stride.stakeibc.MsgRegisterHostZone is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZone does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterHostZone) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgRegisterHostZone.connection_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRegisterHostZone.bech32prefix": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRegisterHostZone.host_denom": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRegisterHostZone.ibc_denom": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRegisterHostZone.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRegisterHostZone.transfer_channel_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRegisterHostZone.unbonding_period": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.MsgRegisterHostZone.min_redemption_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRegisterHostZone.max_redemption_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRegisterHostZone.lsm_liquid_stake_enabled": - return protoreflect.ValueOfBool(false) - case "stride.stakeibc.MsgRegisterHostZone.community_pool_treasury_address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRegisterHostZone.max_messages_per_ica_tx": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZone does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterHostZone) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgRegisterHostZone", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterHostZone) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterHostZone) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterHostZone) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterHostZone) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterHostZone) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ConnectionId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Bech32Prefix) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.IbcDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TransferChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.UnbondingPeriod != 0 { - n += 1 + runtime.Sov(uint64(x.UnbondingPeriod)) - } - l = len(x.MinRedemptionRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaxRedemptionRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.LsmLiquidStakeEnabled { - n += 2 - } - l = len(x.CommunityPoolTreasuryAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.MaxMessagesPerIcaTx != 0 { - n += 2 + runtime.Sov(uint64(x.MaxMessagesPerIcaTx)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterHostZone) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.MaxMessagesPerIcaTx != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxMessagesPerIcaTx)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if len(x.CommunityPoolTreasuryAddress) > 0 { - i -= len(x.CommunityPoolTreasuryAddress) - copy(dAtA[i:], x.CommunityPoolTreasuryAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommunityPoolTreasuryAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if x.LsmLiquidStakeEnabled { - i-- - if x.LsmLiquidStakeEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x78 - } - if len(x.MaxRedemptionRate) > 0 { - i -= len(x.MaxRedemptionRate) - copy(dAtA[i:], x.MaxRedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxRedemptionRate))) - i-- - dAtA[i] = 0x72 - } - if len(x.MinRedemptionRate) > 0 { - i -= len(x.MinRedemptionRate) - copy(dAtA[i:], x.MinRedemptionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinRedemptionRate))) - i-- - dAtA[i] = 0x6a - } - if len(x.Bech32Prefix) > 0 { - i -= len(x.Bech32Prefix) - copy(dAtA[i:], x.Bech32Prefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) - i-- - dAtA[i] = 0x62 - } - if x.UnbondingPeriod != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.UnbondingPeriod)) - i-- - dAtA[i] = 0x58 - } - if len(x.TransferChannelId) > 0 { - i -= len(x.TransferChannelId) - copy(dAtA[i:], x.TransferChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TransferChannelId))) - i-- - dAtA[i] = 0x52 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0x32 - } - if len(x.IbcDenom) > 0 { - i -= len(x.IbcDenom) - copy(dAtA[i:], x.IbcDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcDenom))) - i-- - dAtA[i] = 0x2a - } - if len(x.HostDenom) > 0 { - i -= len(x.HostDenom) - copy(dAtA[i:], x.HostDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenom))) - i-- - dAtA[i] = 0x22 - } - if len(x.ConnectionId) > 0 { - i -= len(x.ConnectionId) - copy(dAtA[i:], x.ConnectionId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConnectionId))) - i-- - dAtA[i] = 0x12 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterHostZone) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterHostZone: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterHostZone: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.IbcDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnbondingPeriod", wireType) - } - x.UnbondingPeriod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.UnbondingPeriod |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinRedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxRedemptionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LsmLiquidStakeEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.LsmLiquidStakeEnabled = bool(v != 0) - case 16: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolTreasuryAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CommunityPoolTreasuryAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 17: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxMessagesPerIcaTx", wireType) - } - x.MaxMessagesPerIcaTx = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxMessagesPerIcaTx |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRegisterHostZoneResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgRegisterHostZoneResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgRegisterHostZoneResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgRegisterHostZoneResponse)(nil) - -type fastReflection_MsgRegisterHostZoneResponse MsgRegisterHostZoneResponse - -func (x *MsgRegisterHostZoneResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterHostZoneResponse)(x) -} - -func (x *MsgRegisterHostZoneResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRegisterHostZoneResponse_messageType fastReflection_MsgRegisterHostZoneResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterHostZoneResponse_messageType{} - -type fastReflection_MsgRegisterHostZoneResponse_messageType struct{} - -func (x fastReflection_MsgRegisterHostZoneResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterHostZoneResponse)(nil) -} -func (x fastReflection_MsgRegisterHostZoneResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterHostZoneResponse) -} -func (x fastReflection_MsgRegisterHostZoneResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterHostZoneResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRegisterHostZoneResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterHostZoneResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterHostZoneResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterHostZoneResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterHostZoneResponse) New() protoreflect.Message { - return new(fastReflection_MsgRegisterHostZoneResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterHostZoneResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterHostZoneResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRegisterHostZoneResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterHostZoneResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterHostZoneResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterHostZoneResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZoneResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterHostZoneResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterHostZoneResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterHostZoneResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRegisterHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRegisterHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterHostZoneResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgRegisterHostZoneResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterHostZoneResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterHostZoneResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterHostZoneResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterHostZoneResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterHostZoneResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterHostZoneResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterHostZoneResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterHostZoneResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterHostZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgClaimUndelegatedTokens protoreflect.MessageDescriptor - fd_MsgClaimUndelegatedTokens_creator protoreflect.FieldDescriptor - fd_MsgClaimUndelegatedTokens_host_zone_id protoreflect.FieldDescriptor - fd_MsgClaimUndelegatedTokens_epoch protoreflect.FieldDescriptor - fd_MsgClaimUndelegatedTokens_receiver protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgClaimUndelegatedTokens = File_stride_stakeibc_tx_proto.Messages().ByName("MsgClaimUndelegatedTokens") - fd_MsgClaimUndelegatedTokens_creator = md_MsgClaimUndelegatedTokens.Fields().ByName("creator") - fd_MsgClaimUndelegatedTokens_host_zone_id = md_MsgClaimUndelegatedTokens.Fields().ByName("host_zone_id") - fd_MsgClaimUndelegatedTokens_epoch = md_MsgClaimUndelegatedTokens.Fields().ByName("epoch") - fd_MsgClaimUndelegatedTokens_receiver = md_MsgClaimUndelegatedTokens.Fields().ByName("receiver") -} - -var _ protoreflect.Message = (*fastReflection_MsgClaimUndelegatedTokens)(nil) - -type fastReflection_MsgClaimUndelegatedTokens MsgClaimUndelegatedTokens - -func (x *MsgClaimUndelegatedTokens) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgClaimUndelegatedTokens)(x) -} - -func (x *MsgClaimUndelegatedTokens) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgClaimUndelegatedTokens_messageType fastReflection_MsgClaimUndelegatedTokens_messageType -var _ protoreflect.MessageType = fastReflection_MsgClaimUndelegatedTokens_messageType{} - -type fastReflection_MsgClaimUndelegatedTokens_messageType struct{} - -func (x fastReflection_MsgClaimUndelegatedTokens_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgClaimUndelegatedTokens)(nil) -} -func (x fastReflection_MsgClaimUndelegatedTokens_messageType) New() protoreflect.Message { - return new(fastReflection_MsgClaimUndelegatedTokens) -} -func (x fastReflection_MsgClaimUndelegatedTokens_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgClaimUndelegatedTokens -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgClaimUndelegatedTokens) Descriptor() protoreflect.MessageDescriptor { - return md_MsgClaimUndelegatedTokens -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgClaimUndelegatedTokens) Type() protoreflect.MessageType { - return _fastReflection_MsgClaimUndelegatedTokens_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgClaimUndelegatedTokens) New() protoreflect.Message { - return new(fastReflection_MsgClaimUndelegatedTokens) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgClaimUndelegatedTokens) Interface() protoreflect.ProtoMessage { - return (*MsgClaimUndelegatedTokens)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgClaimUndelegatedTokens) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgClaimUndelegatedTokens_creator, value) { - return - } - } - if x.HostZoneId != "" { - value := protoreflect.ValueOfString(x.HostZoneId) - if !f(fd_MsgClaimUndelegatedTokens_host_zone_id, value) { - return - } - } - if x.Epoch != uint64(0) { - value := protoreflect.ValueOfUint64(x.Epoch) - if !f(fd_MsgClaimUndelegatedTokens_epoch, value) { - return - } - } - if x.Receiver != "" { - value := protoreflect.ValueOfString(x.Receiver) - if !f(fd_MsgClaimUndelegatedTokens_receiver, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgClaimUndelegatedTokens) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgClaimUndelegatedTokens.creator": - return x.Creator != "" - case "stride.stakeibc.MsgClaimUndelegatedTokens.host_zone_id": - return x.HostZoneId != "" - case "stride.stakeibc.MsgClaimUndelegatedTokens.epoch": - return x.Epoch != uint64(0) - case "stride.stakeibc.MsgClaimUndelegatedTokens.receiver": - return x.Receiver != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokens")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokens does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClaimUndelegatedTokens) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgClaimUndelegatedTokens.creator": - x.Creator = "" - case "stride.stakeibc.MsgClaimUndelegatedTokens.host_zone_id": - x.HostZoneId = "" - case "stride.stakeibc.MsgClaimUndelegatedTokens.epoch": - x.Epoch = uint64(0) - case "stride.stakeibc.MsgClaimUndelegatedTokens.receiver": - x.Receiver = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokens")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokens does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgClaimUndelegatedTokens) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgClaimUndelegatedTokens.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgClaimUndelegatedTokens.host_zone_id": - value := x.HostZoneId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgClaimUndelegatedTokens.epoch": - value := x.Epoch - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.MsgClaimUndelegatedTokens.receiver": - value := x.Receiver - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokens")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokens does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClaimUndelegatedTokens) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgClaimUndelegatedTokens.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgClaimUndelegatedTokens.host_zone_id": - x.HostZoneId = value.Interface().(string) - case "stride.stakeibc.MsgClaimUndelegatedTokens.epoch": - x.Epoch = value.Uint() - case "stride.stakeibc.MsgClaimUndelegatedTokens.receiver": - x.Receiver = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokens")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokens does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClaimUndelegatedTokens) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgClaimUndelegatedTokens.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgClaimUndelegatedTokens is not mutable")) - case "stride.stakeibc.MsgClaimUndelegatedTokens.host_zone_id": - panic(fmt.Errorf("field host_zone_id of message stride.stakeibc.MsgClaimUndelegatedTokens is not mutable")) - case "stride.stakeibc.MsgClaimUndelegatedTokens.epoch": - panic(fmt.Errorf("field epoch of message stride.stakeibc.MsgClaimUndelegatedTokens is not mutable")) - case "stride.stakeibc.MsgClaimUndelegatedTokens.receiver": - panic(fmt.Errorf("field receiver of message stride.stakeibc.MsgClaimUndelegatedTokens is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokens")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokens does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgClaimUndelegatedTokens) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgClaimUndelegatedTokens.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgClaimUndelegatedTokens.host_zone_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgClaimUndelegatedTokens.epoch": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.MsgClaimUndelegatedTokens.receiver": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokens")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokens does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgClaimUndelegatedTokens) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgClaimUndelegatedTokens", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgClaimUndelegatedTokens) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClaimUndelegatedTokens) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgClaimUndelegatedTokens) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgClaimUndelegatedTokens) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgClaimUndelegatedTokens) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZoneId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Epoch != 0 { - n += 1 + runtime.Sov(uint64(x.Epoch)) - } - l = len(x.Receiver) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgClaimUndelegatedTokens) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Receiver) > 0 { - i -= len(x.Receiver) - copy(dAtA[i:], x.Receiver) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Receiver))) - i-- - dAtA[i] = 0x2a - } - if x.Epoch != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Epoch)) - i-- - dAtA[i] = 0x18 - } - if len(x.HostZoneId) > 0 { - i -= len(x.HostZoneId) - copy(dAtA[i:], x.HostZoneId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZoneId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgClaimUndelegatedTokens) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClaimUndelegatedTokens: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClaimUndelegatedTokens: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - x.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgClaimUndelegatedTokensResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgClaimUndelegatedTokensResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgClaimUndelegatedTokensResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgClaimUndelegatedTokensResponse)(nil) - -type fastReflection_MsgClaimUndelegatedTokensResponse MsgClaimUndelegatedTokensResponse - -func (x *MsgClaimUndelegatedTokensResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgClaimUndelegatedTokensResponse)(x) -} - -func (x *MsgClaimUndelegatedTokensResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgClaimUndelegatedTokensResponse_messageType fastReflection_MsgClaimUndelegatedTokensResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgClaimUndelegatedTokensResponse_messageType{} - -type fastReflection_MsgClaimUndelegatedTokensResponse_messageType struct{} - -func (x fastReflection_MsgClaimUndelegatedTokensResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgClaimUndelegatedTokensResponse)(nil) -} -func (x fastReflection_MsgClaimUndelegatedTokensResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgClaimUndelegatedTokensResponse) -} -func (x fastReflection_MsgClaimUndelegatedTokensResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgClaimUndelegatedTokensResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgClaimUndelegatedTokensResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgClaimUndelegatedTokensResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) New() protoreflect.Message { - return new(fastReflection_MsgClaimUndelegatedTokensResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) Interface() protoreflect.ProtoMessage { - return (*MsgClaimUndelegatedTokensResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokensResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokensResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokensResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokensResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokensResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokensResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokensResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokensResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokensResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokensResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgClaimUndelegatedTokensResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgClaimUndelegatedTokensResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgClaimUndelegatedTokensResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgClaimUndelegatedTokensResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgClaimUndelegatedTokensResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgClaimUndelegatedTokensResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgClaimUndelegatedTokensResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClaimUndelegatedTokensResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClaimUndelegatedTokensResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRebalanceValidators protoreflect.MessageDescriptor - fd_MsgRebalanceValidators_creator protoreflect.FieldDescriptor - fd_MsgRebalanceValidators_host_zone protoreflect.FieldDescriptor - fd_MsgRebalanceValidators_num_rebalance protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgRebalanceValidators = File_stride_stakeibc_tx_proto.Messages().ByName("MsgRebalanceValidators") - fd_MsgRebalanceValidators_creator = md_MsgRebalanceValidators.Fields().ByName("creator") - fd_MsgRebalanceValidators_host_zone = md_MsgRebalanceValidators.Fields().ByName("host_zone") - fd_MsgRebalanceValidators_num_rebalance = md_MsgRebalanceValidators.Fields().ByName("num_rebalance") -} - -var _ protoreflect.Message = (*fastReflection_MsgRebalanceValidators)(nil) - -type fastReflection_MsgRebalanceValidators MsgRebalanceValidators - -func (x *MsgRebalanceValidators) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRebalanceValidators)(x) -} - -func (x *MsgRebalanceValidators) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRebalanceValidators_messageType fastReflection_MsgRebalanceValidators_messageType -var _ protoreflect.MessageType = fastReflection_MsgRebalanceValidators_messageType{} - -type fastReflection_MsgRebalanceValidators_messageType struct{} - -func (x fastReflection_MsgRebalanceValidators_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRebalanceValidators)(nil) -} -func (x fastReflection_MsgRebalanceValidators_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRebalanceValidators) -} -func (x fastReflection_MsgRebalanceValidators_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRebalanceValidators -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRebalanceValidators) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRebalanceValidators -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRebalanceValidators) Type() protoreflect.MessageType { - return _fastReflection_MsgRebalanceValidators_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRebalanceValidators) New() protoreflect.Message { - return new(fastReflection_MsgRebalanceValidators) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRebalanceValidators) Interface() protoreflect.ProtoMessage { - return (*MsgRebalanceValidators)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRebalanceValidators) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgRebalanceValidators_creator, value) { - return - } - } - if x.HostZone != "" { - value := protoreflect.ValueOfString(x.HostZone) - if !f(fd_MsgRebalanceValidators_host_zone, value) { - return - } - } - if x.NumRebalance != uint64(0) { - value := protoreflect.ValueOfUint64(x.NumRebalance) - if !f(fd_MsgRebalanceValidators_num_rebalance, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRebalanceValidators) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgRebalanceValidators.creator": - return x.Creator != "" - case "stride.stakeibc.MsgRebalanceValidators.host_zone": - return x.HostZone != "" - case "stride.stakeibc.MsgRebalanceValidators.num_rebalance": - return x.NumRebalance != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidators does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRebalanceValidators) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgRebalanceValidators.creator": - x.Creator = "" - case "stride.stakeibc.MsgRebalanceValidators.host_zone": - x.HostZone = "" - case "stride.stakeibc.MsgRebalanceValidators.num_rebalance": - x.NumRebalance = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidators does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRebalanceValidators) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgRebalanceValidators.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRebalanceValidators.host_zone": - value := x.HostZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRebalanceValidators.num_rebalance": - value := x.NumRebalance - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidators does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRebalanceValidators) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgRebalanceValidators.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgRebalanceValidators.host_zone": - x.HostZone = value.Interface().(string) - case "stride.stakeibc.MsgRebalanceValidators.num_rebalance": - x.NumRebalance = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidators does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRebalanceValidators) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgRebalanceValidators.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgRebalanceValidators is not mutable")) - case "stride.stakeibc.MsgRebalanceValidators.host_zone": - panic(fmt.Errorf("field host_zone of message stride.stakeibc.MsgRebalanceValidators is not mutable")) - case "stride.stakeibc.MsgRebalanceValidators.num_rebalance": - panic(fmt.Errorf("field num_rebalance of message stride.stakeibc.MsgRebalanceValidators is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidators does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRebalanceValidators) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgRebalanceValidators.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRebalanceValidators.host_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRebalanceValidators.num_rebalance": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidators does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRebalanceValidators) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgRebalanceValidators", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRebalanceValidators) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRebalanceValidators) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRebalanceValidators) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRebalanceValidators) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRebalanceValidators) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.NumRebalance != 0 { - n += 1 + runtime.Sov(uint64(x.NumRebalance)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRebalanceValidators) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.NumRebalance != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.NumRebalance)) - i-- - dAtA[i] = 0x18 - } - if len(x.HostZone) > 0 { - i -= len(x.HostZone) - copy(dAtA[i:], x.HostZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZone))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRebalanceValidators) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRebalanceValidators: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRebalanceValidators: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NumRebalance", wireType) - } - x.NumRebalance = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.NumRebalance |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRebalanceValidatorsResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgRebalanceValidatorsResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgRebalanceValidatorsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgRebalanceValidatorsResponse)(nil) - -type fastReflection_MsgRebalanceValidatorsResponse MsgRebalanceValidatorsResponse - -func (x *MsgRebalanceValidatorsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRebalanceValidatorsResponse)(x) -} - -func (x *MsgRebalanceValidatorsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRebalanceValidatorsResponse_messageType fastReflection_MsgRebalanceValidatorsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRebalanceValidatorsResponse_messageType{} - -type fastReflection_MsgRebalanceValidatorsResponse_messageType struct{} - -func (x fastReflection_MsgRebalanceValidatorsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRebalanceValidatorsResponse)(nil) -} -func (x fastReflection_MsgRebalanceValidatorsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRebalanceValidatorsResponse) -} -func (x fastReflection_MsgRebalanceValidatorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRebalanceValidatorsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRebalanceValidatorsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRebalanceValidatorsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRebalanceValidatorsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRebalanceValidatorsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRebalanceValidatorsResponse) New() protoreflect.Message { - return new(fastReflection_MsgRebalanceValidatorsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRebalanceValidatorsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRebalanceValidatorsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRebalanceValidatorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRebalanceValidatorsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRebalanceValidatorsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRebalanceValidatorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidatorsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRebalanceValidatorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRebalanceValidatorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRebalanceValidatorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRebalanceValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRebalanceValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRebalanceValidatorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgRebalanceValidatorsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRebalanceValidatorsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRebalanceValidatorsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRebalanceValidatorsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRebalanceValidatorsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRebalanceValidatorsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRebalanceValidatorsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRebalanceValidatorsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRebalanceValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRebalanceValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgAddValidators_3_list)(nil) - -type _MsgAddValidators_3_list struct { - list *[]*Validator -} - -func (x *_MsgAddValidators_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgAddValidators_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgAddValidators_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - (*x.list)[i] = concreteValue -} - -func (x *_MsgAddValidators_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Validator) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgAddValidators_3_list) AppendMutable() protoreflect.Value { - v := new(Validator) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgAddValidators_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgAddValidators_3_list) NewElement() protoreflect.Value { - v := new(Validator) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgAddValidators_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgAddValidators protoreflect.MessageDescriptor - fd_MsgAddValidators_creator protoreflect.FieldDescriptor - fd_MsgAddValidators_host_zone protoreflect.FieldDescriptor - fd_MsgAddValidators_validators protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgAddValidators = File_stride_stakeibc_tx_proto.Messages().ByName("MsgAddValidators") - fd_MsgAddValidators_creator = md_MsgAddValidators.Fields().ByName("creator") - fd_MsgAddValidators_host_zone = md_MsgAddValidators.Fields().ByName("host_zone") - fd_MsgAddValidators_validators = md_MsgAddValidators.Fields().ByName("validators") -} - -var _ protoreflect.Message = (*fastReflection_MsgAddValidators)(nil) - -type fastReflection_MsgAddValidators MsgAddValidators - -func (x *MsgAddValidators) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAddValidators)(x) -} - -func (x *MsgAddValidators) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgAddValidators_messageType fastReflection_MsgAddValidators_messageType -var _ protoreflect.MessageType = fastReflection_MsgAddValidators_messageType{} - -type fastReflection_MsgAddValidators_messageType struct{} - -func (x fastReflection_MsgAddValidators_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAddValidators)(nil) -} -func (x fastReflection_MsgAddValidators_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAddValidators) -} -func (x fastReflection_MsgAddValidators_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAddValidators -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgAddValidators) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAddValidators -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgAddValidators) Type() protoreflect.MessageType { - return _fastReflection_MsgAddValidators_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAddValidators) New() protoreflect.Message { - return new(fastReflection_MsgAddValidators) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAddValidators) Interface() protoreflect.ProtoMessage { - return (*MsgAddValidators)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgAddValidators) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgAddValidators_creator, value) { - return - } - } - if x.HostZone != "" { - value := protoreflect.ValueOfString(x.HostZone) - if !f(fd_MsgAddValidators_host_zone, value) { - return - } - } - if len(x.Validators) != 0 { - value := protoreflect.ValueOfList(&_MsgAddValidators_3_list{list: &x.Validators}) - if !f(fd_MsgAddValidators_validators, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgAddValidators) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgAddValidators.creator": - return x.Creator != "" - case "stride.stakeibc.MsgAddValidators.host_zone": - return x.HostZone != "" - case "stride.stakeibc.MsgAddValidators.validators": - return len(x.Validators) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidators does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddValidators) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgAddValidators.creator": - x.Creator = "" - case "stride.stakeibc.MsgAddValidators.host_zone": - x.HostZone = "" - case "stride.stakeibc.MsgAddValidators.validators": - x.Validators = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidators does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgAddValidators) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgAddValidators.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgAddValidators.host_zone": - value := x.HostZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgAddValidators.validators": - if len(x.Validators) == 0 { - return protoreflect.ValueOfList(&_MsgAddValidators_3_list{}) - } - listValue := &_MsgAddValidators_3_list{list: &x.Validators} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidators does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddValidators) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgAddValidators.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgAddValidators.host_zone": - x.HostZone = value.Interface().(string) - case "stride.stakeibc.MsgAddValidators.validators": - lv := value.List() - clv := lv.(*_MsgAddValidators_3_list) - x.Validators = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidators does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddValidators) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgAddValidators.validators": - if x.Validators == nil { - x.Validators = []*Validator{} - } - value := &_MsgAddValidators_3_list{list: &x.Validators} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.MsgAddValidators.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgAddValidators is not mutable")) - case "stride.stakeibc.MsgAddValidators.host_zone": - panic(fmt.Errorf("field host_zone of message stride.stakeibc.MsgAddValidators is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidators does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgAddValidators) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgAddValidators.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgAddValidators.host_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgAddValidators.validators": - list := []*Validator{} - return protoreflect.ValueOfList(&_MsgAddValidators_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidators")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidators does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgAddValidators) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgAddValidators", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgAddValidators) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddValidators) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgAddValidators) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAddValidators) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAddValidators) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Validators) > 0 { - for _, e := range x.Validators { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAddValidators) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Validators) > 0 { - for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Validators[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.HostZone) > 0 { - i -= len(x.HostZone) - copy(dAtA[i:], x.HostZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZone))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAddValidators) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddValidators: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddValidators: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Validators = append(x.Validators, &Validator{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgAddValidatorsResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgAddValidatorsResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgAddValidatorsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgAddValidatorsResponse)(nil) - -type fastReflection_MsgAddValidatorsResponse MsgAddValidatorsResponse - -func (x *MsgAddValidatorsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAddValidatorsResponse)(x) -} - -func (x *MsgAddValidatorsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgAddValidatorsResponse_messageType fastReflection_MsgAddValidatorsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgAddValidatorsResponse_messageType{} - -type fastReflection_MsgAddValidatorsResponse_messageType struct{} - -func (x fastReflection_MsgAddValidatorsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAddValidatorsResponse)(nil) -} -func (x fastReflection_MsgAddValidatorsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAddValidatorsResponse) -} -func (x fastReflection_MsgAddValidatorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAddValidatorsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgAddValidatorsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAddValidatorsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgAddValidatorsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgAddValidatorsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAddValidatorsResponse) New() protoreflect.Message { - return new(fastReflection_MsgAddValidatorsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAddValidatorsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgAddValidatorsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgAddValidatorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgAddValidatorsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddValidatorsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgAddValidatorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidatorsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddValidatorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddValidatorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgAddValidatorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgAddValidatorsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgAddValidatorsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgAddValidatorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgAddValidatorsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgAddValidatorsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAddValidatorsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgAddValidatorsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAddValidatorsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAddValidatorsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAddValidatorsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAddValidatorsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ValidatorWeight protoreflect.MessageDescriptor - fd_ValidatorWeight_address protoreflect.FieldDescriptor - fd_ValidatorWeight_weight protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_ValidatorWeight = File_stride_stakeibc_tx_proto.Messages().ByName("ValidatorWeight") - fd_ValidatorWeight_address = md_ValidatorWeight.Fields().ByName("address") - fd_ValidatorWeight_weight = md_ValidatorWeight.Fields().ByName("weight") -} - -var _ protoreflect.Message = (*fastReflection_ValidatorWeight)(nil) - -type fastReflection_ValidatorWeight ValidatorWeight - -func (x *ValidatorWeight) ProtoReflect() protoreflect.Message { - return (*fastReflection_ValidatorWeight)(x) -} - -func (x *ValidatorWeight) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ValidatorWeight_messageType fastReflection_ValidatorWeight_messageType -var _ protoreflect.MessageType = fastReflection_ValidatorWeight_messageType{} - -type fastReflection_ValidatorWeight_messageType struct{} - -func (x fastReflection_ValidatorWeight_messageType) Zero() protoreflect.Message { - return (*fastReflection_ValidatorWeight)(nil) -} -func (x fastReflection_ValidatorWeight_messageType) New() protoreflect.Message { - return new(fastReflection_ValidatorWeight) -} -func (x fastReflection_ValidatorWeight_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorWeight -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ValidatorWeight) Descriptor() protoreflect.MessageDescriptor { - return md_ValidatorWeight -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ValidatorWeight) Type() protoreflect.MessageType { - return _fastReflection_ValidatorWeight_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ValidatorWeight) New() protoreflect.Message { - return new(fastReflection_ValidatorWeight) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ValidatorWeight) Interface() protoreflect.ProtoMessage { - return (*ValidatorWeight)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ValidatorWeight) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_ValidatorWeight_address, value) { - return - } - } - if x.Weight != uint64(0) { - value := protoreflect.ValueOfUint64(x.Weight) - if !f(fd_ValidatorWeight_weight, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ValidatorWeight) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.ValidatorWeight.address": - return x.Address != "" - case "stride.stakeibc.ValidatorWeight.weight": - return x.Weight != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorWeight")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorWeight does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorWeight) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.ValidatorWeight.address": - x.Address = "" - case "stride.stakeibc.ValidatorWeight.weight": - x.Weight = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorWeight")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorWeight does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ValidatorWeight) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.ValidatorWeight.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "stride.stakeibc.ValidatorWeight.weight": - value := x.Weight - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorWeight")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorWeight does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorWeight) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.ValidatorWeight.address": - x.Address = value.Interface().(string) - case "stride.stakeibc.ValidatorWeight.weight": - x.Weight = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorWeight")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorWeight does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorWeight) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ValidatorWeight.address": - panic(fmt.Errorf("field address of message stride.stakeibc.ValidatorWeight is not mutable")) - case "stride.stakeibc.ValidatorWeight.weight": - panic(fmt.Errorf("field weight of message stride.stakeibc.ValidatorWeight is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorWeight")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorWeight does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ValidatorWeight) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.ValidatorWeight.address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.ValidatorWeight.weight": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.ValidatorWeight")) - } - panic(fmt.Errorf("message stride.stakeibc.ValidatorWeight does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ValidatorWeight) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.ValidatorWeight", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ValidatorWeight) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ValidatorWeight) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ValidatorWeight) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ValidatorWeight) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ValidatorWeight) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Weight != 0 { - n += 1 + runtime.Sov(uint64(x.Weight)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ValidatorWeight) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Weight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Weight)) - i-- - dAtA[i] = 0x10 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ValidatorWeight) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorWeight: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorWeight: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - x.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Weight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgChangeValidatorWeights_3_list)(nil) - -type _MsgChangeValidatorWeights_3_list struct { - list *[]*ValidatorWeight -} - -func (x *_MsgChangeValidatorWeights_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgChangeValidatorWeights_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgChangeValidatorWeights_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorWeight) - (*x.list)[i] = concreteValue -} - -func (x *_MsgChangeValidatorWeights_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ValidatorWeight) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgChangeValidatorWeights_3_list) AppendMutable() protoreflect.Value { - v := new(ValidatorWeight) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgChangeValidatorWeights_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgChangeValidatorWeights_3_list) NewElement() protoreflect.Value { - v := new(ValidatorWeight) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgChangeValidatorWeights_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgChangeValidatorWeights protoreflect.MessageDescriptor - fd_MsgChangeValidatorWeights_creator protoreflect.FieldDescriptor - fd_MsgChangeValidatorWeights_host_zone protoreflect.FieldDescriptor - fd_MsgChangeValidatorWeights_validator_weights protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgChangeValidatorWeights = File_stride_stakeibc_tx_proto.Messages().ByName("MsgChangeValidatorWeights") - fd_MsgChangeValidatorWeights_creator = md_MsgChangeValidatorWeights.Fields().ByName("creator") - fd_MsgChangeValidatorWeights_host_zone = md_MsgChangeValidatorWeights.Fields().ByName("host_zone") - fd_MsgChangeValidatorWeights_validator_weights = md_MsgChangeValidatorWeights.Fields().ByName("validator_weights") -} - -var _ protoreflect.Message = (*fastReflection_MsgChangeValidatorWeights)(nil) - -type fastReflection_MsgChangeValidatorWeights MsgChangeValidatorWeights - -func (x *MsgChangeValidatorWeights) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgChangeValidatorWeights)(x) -} - -func (x *MsgChangeValidatorWeights) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgChangeValidatorWeights_messageType fastReflection_MsgChangeValidatorWeights_messageType -var _ protoreflect.MessageType = fastReflection_MsgChangeValidatorWeights_messageType{} - -type fastReflection_MsgChangeValidatorWeights_messageType struct{} - -func (x fastReflection_MsgChangeValidatorWeights_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgChangeValidatorWeights)(nil) -} -func (x fastReflection_MsgChangeValidatorWeights_messageType) New() protoreflect.Message { - return new(fastReflection_MsgChangeValidatorWeights) -} -func (x fastReflection_MsgChangeValidatorWeights_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgChangeValidatorWeights -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgChangeValidatorWeights) Descriptor() protoreflect.MessageDescriptor { - return md_MsgChangeValidatorWeights -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgChangeValidatorWeights) Type() protoreflect.MessageType { - return _fastReflection_MsgChangeValidatorWeights_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgChangeValidatorWeights) New() protoreflect.Message { - return new(fastReflection_MsgChangeValidatorWeights) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgChangeValidatorWeights) Interface() protoreflect.ProtoMessage { - return (*MsgChangeValidatorWeights)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgChangeValidatorWeights) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgChangeValidatorWeights_creator, value) { - return - } - } - if x.HostZone != "" { - value := protoreflect.ValueOfString(x.HostZone) - if !f(fd_MsgChangeValidatorWeights_host_zone, value) { - return - } - } - if len(x.ValidatorWeights) != 0 { - value := protoreflect.ValueOfList(&_MsgChangeValidatorWeights_3_list{list: &x.ValidatorWeights}) - if !f(fd_MsgChangeValidatorWeights_validator_weights, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgChangeValidatorWeights) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgChangeValidatorWeights.creator": - return x.Creator != "" - case "stride.stakeibc.MsgChangeValidatorWeights.host_zone": - return x.HostZone != "" - case "stride.stakeibc.MsgChangeValidatorWeights.validator_weights": - return len(x.ValidatorWeights) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeights")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeights does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgChangeValidatorWeights) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgChangeValidatorWeights.creator": - x.Creator = "" - case "stride.stakeibc.MsgChangeValidatorWeights.host_zone": - x.HostZone = "" - case "stride.stakeibc.MsgChangeValidatorWeights.validator_weights": - x.ValidatorWeights = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeights")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeights does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgChangeValidatorWeights) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgChangeValidatorWeights.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgChangeValidatorWeights.host_zone": - value := x.HostZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgChangeValidatorWeights.validator_weights": - if len(x.ValidatorWeights) == 0 { - return protoreflect.ValueOfList(&_MsgChangeValidatorWeights_3_list{}) - } - listValue := &_MsgChangeValidatorWeights_3_list{list: &x.ValidatorWeights} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeights")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeights does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgChangeValidatorWeights) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgChangeValidatorWeights.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgChangeValidatorWeights.host_zone": - x.HostZone = value.Interface().(string) - case "stride.stakeibc.MsgChangeValidatorWeights.validator_weights": - lv := value.List() - clv := lv.(*_MsgChangeValidatorWeights_3_list) - x.ValidatorWeights = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeights")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeights does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgChangeValidatorWeights) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgChangeValidatorWeights.validator_weights": - if x.ValidatorWeights == nil { - x.ValidatorWeights = []*ValidatorWeight{} - } - value := &_MsgChangeValidatorWeights_3_list{list: &x.ValidatorWeights} - return protoreflect.ValueOfList(value) - case "stride.stakeibc.MsgChangeValidatorWeights.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgChangeValidatorWeights is not mutable")) - case "stride.stakeibc.MsgChangeValidatorWeights.host_zone": - panic(fmt.Errorf("field host_zone of message stride.stakeibc.MsgChangeValidatorWeights is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeights")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeights does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgChangeValidatorWeights) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgChangeValidatorWeights.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgChangeValidatorWeights.host_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgChangeValidatorWeights.validator_weights": - list := []*ValidatorWeight{} - return protoreflect.ValueOfList(&_MsgChangeValidatorWeights_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeights")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeights does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgChangeValidatorWeights) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgChangeValidatorWeights", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgChangeValidatorWeights) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgChangeValidatorWeights) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgChangeValidatorWeights) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgChangeValidatorWeights) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgChangeValidatorWeights) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.ValidatorWeights) > 0 { - for _, e := range x.ValidatorWeights { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgChangeValidatorWeights) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValidatorWeights) > 0 { - for iNdEx := len(x.ValidatorWeights) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ValidatorWeights[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.HostZone) > 0 { - i -= len(x.HostZone) - copy(dAtA[i:], x.HostZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZone))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgChangeValidatorWeights) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgChangeValidatorWeights: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgChangeValidatorWeights: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorWeights", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorWeights = append(x.ValidatorWeights, &ValidatorWeight{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorWeights[len(x.ValidatorWeights)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgChangeValidatorWeightsResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgChangeValidatorWeightsResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgChangeValidatorWeightsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgChangeValidatorWeightsResponse)(nil) - -type fastReflection_MsgChangeValidatorWeightsResponse MsgChangeValidatorWeightsResponse - -func (x *MsgChangeValidatorWeightsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgChangeValidatorWeightsResponse)(x) -} - -func (x *MsgChangeValidatorWeightsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgChangeValidatorWeightsResponse_messageType fastReflection_MsgChangeValidatorWeightsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgChangeValidatorWeightsResponse_messageType{} - -type fastReflection_MsgChangeValidatorWeightsResponse_messageType struct{} - -func (x fastReflection_MsgChangeValidatorWeightsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgChangeValidatorWeightsResponse)(nil) -} -func (x fastReflection_MsgChangeValidatorWeightsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgChangeValidatorWeightsResponse) -} -func (x fastReflection_MsgChangeValidatorWeightsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgChangeValidatorWeightsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgChangeValidatorWeightsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgChangeValidatorWeightsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) New() protoreflect.Message { - return new(fastReflection_MsgChangeValidatorWeightsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgChangeValidatorWeightsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeightsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeightsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeightsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeightsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeightsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeightsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeightsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeightsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeightsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeightsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgChangeValidatorWeightsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgChangeValidatorWeightsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgChangeValidatorWeightsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgChangeValidatorWeightsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgChangeValidatorWeightsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgChangeValidatorWeightsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgChangeValidatorWeightsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgChangeValidatorWeightsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgChangeValidatorWeightsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgDeleteValidator protoreflect.MessageDescriptor - fd_MsgDeleteValidator_creator protoreflect.FieldDescriptor - fd_MsgDeleteValidator_host_zone protoreflect.FieldDescriptor - fd_MsgDeleteValidator_val_addr protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgDeleteValidator = File_stride_stakeibc_tx_proto.Messages().ByName("MsgDeleteValidator") - fd_MsgDeleteValidator_creator = md_MsgDeleteValidator.Fields().ByName("creator") - fd_MsgDeleteValidator_host_zone = md_MsgDeleteValidator.Fields().ByName("host_zone") - fd_MsgDeleteValidator_val_addr = md_MsgDeleteValidator.Fields().ByName("val_addr") -} - -var _ protoreflect.Message = (*fastReflection_MsgDeleteValidator)(nil) - -type fastReflection_MsgDeleteValidator MsgDeleteValidator - -func (x *MsgDeleteValidator) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDeleteValidator)(x) -} - -func (x *MsgDeleteValidator) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDeleteValidator_messageType fastReflection_MsgDeleteValidator_messageType -var _ protoreflect.MessageType = fastReflection_MsgDeleteValidator_messageType{} - -type fastReflection_MsgDeleteValidator_messageType struct{} - -func (x fastReflection_MsgDeleteValidator_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDeleteValidator)(nil) -} -func (x fastReflection_MsgDeleteValidator_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDeleteValidator) -} -func (x fastReflection_MsgDeleteValidator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeleteValidator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDeleteValidator) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeleteValidator -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgDeleteValidator) Type() protoreflect.MessageType { - return _fastReflection_MsgDeleteValidator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDeleteValidator) New() protoreflect.Message { - return new(fastReflection_MsgDeleteValidator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDeleteValidator) Interface() protoreflect.ProtoMessage { - return (*MsgDeleteValidator)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgDeleteValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgDeleteValidator_creator, value) { - return - } - } - if x.HostZone != "" { - value := protoreflect.ValueOfString(x.HostZone) - if !f(fd_MsgDeleteValidator_host_zone, value) { - return - } - } - if x.ValAddr != "" { - value := protoreflect.ValueOfString(x.ValAddr) - if !f(fd_MsgDeleteValidator_val_addr, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgDeleteValidator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteValidator.creator": - return x.Creator != "" - case "stride.stakeibc.MsgDeleteValidator.host_zone": - return x.HostZone != "" - case "stride.stakeibc.MsgDeleteValidator.val_addr": - return x.ValAddr != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidator")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidator does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteValidator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteValidator.creator": - x.Creator = "" - case "stride.stakeibc.MsgDeleteValidator.host_zone": - x.HostZone = "" - case "stride.stakeibc.MsgDeleteValidator.val_addr": - x.ValAddr = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidator")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidator does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgDeleteValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgDeleteValidator.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgDeleteValidator.host_zone": - value := x.HostZone - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgDeleteValidator.val_addr": - value := x.ValAddr - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidator")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidator does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteValidator.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgDeleteValidator.host_zone": - x.HostZone = value.Interface().(string) - case "stride.stakeibc.MsgDeleteValidator.val_addr": - x.ValAddr = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidator")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidator does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteValidator.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgDeleteValidator is not mutable")) - case "stride.stakeibc.MsgDeleteValidator.host_zone": - panic(fmt.Errorf("field host_zone of message stride.stakeibc.MsgDeleteValidator is not mutable")) - case "stride.stakeibc.MsgDeleteValidator.val_addr": - panic(fmt.Errorf("field val_addr of message stride.stakeibc.MsgDeleteValidator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidator")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidator does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgDeleteValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteValidator.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgDeleteValidator.host_zone": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgDeleteValidator.val_addr": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidator")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidator does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgDeleteValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgDeleteValidator", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgDeleteValidator) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteValidator) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgDeleteValidator) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgDeleteValidator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDeleteValidator) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostZone) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValAddr) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDeleteValidator) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ValAddr) > 0 { - i -= len(x.ValAddr) - copy(dAtA[i:], x.ValAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValAddr))) - i-- - dAtA[i] = 0x1a - } - if len(x.HostZone) > 0 { - i -= len(x.HostZone) - copy(dAtA[i:], x.HostZone) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostZone))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgDeleteValidator) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteValidator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteValidator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgDeleteValidatorResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgDeleteValidatorResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgDeleteValidatorResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgDeleteValidatorResponse)(nil) - -type fastReflection_MsgDeleteValidatorResponse MsgDeleteValidatorResponse - -func (x *MsgDeleteValidatorResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDeleteValidatorResponse)(x) -} - -func (x *MsgDeleteValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDeleteValidatorResponse_messageType fastReflection_MsgDeleteValidatorResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgDeleteValidatorResponse_messageType{} - -type fastReflection_MsgDeleteValidatorResponse_messageType struct{} - -func (x fastReflection_MsgDeleteValidatorResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDeleteValidatorResponse)(nil) -} -func (x fastReflection_MsgDeleteValidatorResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDeleteValidatorResponse) -} -func (x fastReflection_MsgDeleteValidatorResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeleteValidatorResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDeleteValidatorResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeleteValidatorResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgDeleteValidatorResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgDeleteValidatorResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDeleteValidatorResponse) New() protoreflect.Message { - return new(fastReflection_MsgDeleteValidatorResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDeleteValidatorResponse) Interface() protoreflect.ProtoMessage { - return (*MsgDeleteValidatorResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgDeleteValidatorResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgDeleteValidatorResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidatorResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidatorResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteValidatorResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidatorResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidatorResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgDeleteValidatorResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidatorResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidatorResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteValidatorResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidatorResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidatorResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteValidatorResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidatorResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidatorResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgDeleteValidatorResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteValidatorResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteValidatorResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgDeleteValidatorResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgDeleteValidatorResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgDeleteValidatorResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteValidatorResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgDeleteValidatorResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgDeleteValidatorResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDeleteValidatorResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDeleteValidatorResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgDeleteValidatorResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRestoreInterchainAccount protoreflect.MessageDescriptor - fd_MsgRestoreInterchainAccount_creator protoreflect.FieldDescriptor - fd_MsgRestoreInterchainAccount_chain_id protoreflect.FieldDescriptor - fd_MsgRestoreInterchainAccount_connection_id protoreflect.FieldDescriptor - fd_MsgRestoreInterchainAccount_account_owner protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgRestoreInterchainAccount = File_stride_stakeibc_tx_proto.Messages().ByName("MsgRestoreInterchainAccount") - fd_MsgRestoreInterchainAccount_creator = md_MsgRestoreInterchainAccount.Fields().ByName("creator") - fd_MsgRestoreInterchainAccount_chain_id = md_MsgRestoreInterchainAccount.Fields().ByName("chain_id") - fd_MsgRestoreInterchainAccount_connection_id = md_MsgRestoreInterchainAccount.Fields().ByName("connection_id") - fd_MsgRestoreInterchainAccount_account_owner = md_MsgRestoreInterchainAccount.Fields().ByName("account_owner") -} - -var _ protoreflect.Message = (*fastReflection_MsgRestoreInterchainAccount)(nil) - -type fastReflection_MsgRestoreInterchainAccount MsgRestoreInterchainAccount - -func (x *MsgRestoreInterchainAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRestoreInterchainAccount)(x) -} - -func (x *MsgRestoreInterchainAccount) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRestoreInterchainAccount_messageType fastReflection_MsgRestoreInterchainAccount_messageType -var _ protoreflect.MessageType = fastReflection_MsgRestoreInterchainAccount_messageType{} - -type fastReflection_MsgRestoreInterchainAccount_messageType struct{} - -func (x fastReflection_MsgRestoreInterchainAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRestoreInterchainAccount)(nil) -} -func (x fastReflection_MsgRestoreInterchainAccount_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRestoreInterchainAccount) -} -func (x fastReflection_MsgRestoreInterchainAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRestoreInterchainAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRestoreInterchainAccount) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRestoreInterchainAccount -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRestoreInterchainAccount) Type() protoreflect.MessageType { - return _fastReflection_MsgRestoreInterchainAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRestoreInterchainAccount) New() protoreflect.Message { - return new(fastReflection_MsgRestoreInterchainAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRestoreInterchainAccount) Interface() protoreflect.ProtoMessage { - return (*MsgRestoreInterchainAccount)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRestoreInterchainAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgRestoreInterchainAccount_creator, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgRestoreInterchainAccount_chain_id, value) { - return - } - } - if x.ConnectionId != "" { - value := protoreflect.ValueOfString(x.ConnectionId) - if !f(fd_MsgRestoreInterchainAccount_connection_id, value) { - return - } - } - if x.AccountOwner != "" { - value := protoreflect.ValueOfString(x.AccountOwner) - if !f(fd_MsgRestoreInterchainAccount_account_owner, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRestoreInterchainAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgRestoreInterchainAccount.creator": - return x.Creator != "" - case "stride.stakeibc.MsgRestoreInterchainAccount.chain_id": - return x.ChainId != "" - case "stride.stakeibc.MsgRestoreInterchainAccount.connection_id": - return x.ConnectionId != "" - case "stride.stakeibc.MsgRestoreInterchainAccount.account_owner": - return x.AccountOwner != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccount does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRestoreInterchainAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgRestoreInterchainAccount.creator": - x.Creator = "" - case "stride.stakeibc.MsgRestoreInterchainAccount.chain_id": - x.ChainId = "" - case "stride.stakeibc.MsgRestoreInterchainAccount.connection_id": - x.ConnectionId = "" - case "stride.stakeibc.MsgRestoreInterchainAccount.account_owner": - x.AccountOwner = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccount does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRestoreInterchainAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgRestoreInterchainAccount.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRestoreInterchainAccount.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRestoreInterchainAccount.connection_id": - value := x.ConnectionId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgRestoreInterchainAccount.account_owner": - value := x.AccountOwner - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccount does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRestoreInterchainAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgRestoreInterchainAccount.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgRestoreInterchainAccount.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.MsgRestoreInterchainAccount.connection_id": - x.ConnectionId = value.Interface().(string) - case "stride.stakeibc.MsgRestoreInterchainAccount.account_owner": - x.AccountOwner = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccount does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRestoreInterchainAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgRestoreInterchainAccount.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgRestoreInterchainAccount is not mutable")) - case "stride.stakeibc.MsgRestoreInterchainAccount.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.MsgRestoreInterchainAccount is not mutable")) - case "stride.stakeibc.MsgRestoreInterchainAccount.connection_id": - panic(fmt.Errorf("field connection_id of message stride.stakeibc.MsgRestoreInterchainAccount is not mutable")) - case "stride.stakeibc.MsgRestoreInterchainAccount.account_owner": - panic(fmt.Errorf("field account_owner of message stride.stakeibc.MsgRestoreInterchainAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccount does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRestoreInterchainAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgRestoreInterchainAccount.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRestoreInterchainAccount.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRestoreInterchainAccount.connection_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgRestoreInterchainAccount.account_owner": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccount")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccount does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRestoreInterchainAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgRestoreInterchainAccount", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRestoreInterchainAccount) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRestoreInterchainAccount) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRestoreInterchainAccount) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRestoreInterchainAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRestoreInterchainAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ConnectionId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AccountOwner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRestoreInterchainAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AccountOwner) > 0 { - i -= len(x.AccountOwner) - copy(dAtA[i:], x.AccountOwner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountOwner))) - i-- - dAtA[i] = 0x22 - } - if len(x.ConnectionId) > 0 { - i -= len(x.ConnectionId) - copy(dAtA[i:], x.ConnectionId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConnectionId))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRestoreInterchainAccount) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRestoreInterchainAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRestoreInterchainAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountOwner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AccountOwner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRestoreInterchainAccountResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgRestoreInterchainAccountResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgRestoreInterchainAccountResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgRestoreInterchainAccountResponse)(nil) - -type fastReflection_MsgRestoreInterchainAccountResponse MsgRestoreInterchainAccountResponse - -func (x *MsgRestoreInterchainAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRestoreInterchainAccountResponse)(x) -} - -func (x *MsgRestoreInterchainAccountResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRestoreInterchainAccountResponse_messageType fastReflection_MsgRestoreInterchainAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRestoreInterchainAccountResponse_messageType{} - -type fastReflection_MsgRestoreInterchainAccountResponse_messageType struct{} - -func (x fastReflection_MsgRestoreInterchainAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRestoreInterchainAccountResponse)(nil) -} -func (x fastReflection_MsgRestoreInterchainAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRestoreInterchainAccountResponse) -} -func (x fastReflection_MsgRestoreInterchainAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRestoreInterchainAccountResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRestoreInterchainAccountResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRestoreInterchainAccountResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) New() protoreflect.Message { - return new(fastReflection_MsgRestoreInterchainAccountResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRestoreInterchainAccountResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccountResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccountResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccountResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccountResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccountResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccountResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccountResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccountResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccountResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccountResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgRestoreInterchainAccountResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgRestoreInterchainAccountResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgRestoreInterchainAccountResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRestoreInterchainAccountResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRestoreInterchainAccountResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRestoreInterchainAccountResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRestoreInterchainAccountResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRestoreInterchainAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRestoreInterchainAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateValidatorSharesExchRate protoreflect.MessageDescriptor - fd_MsgUpdateValidatorSharesExchRate_creator protoreflect.FieldDescriptor - fd_MsgUpdateValidatorSharesExchRate_chain_id protoreflect.FieldDescriptor - fd_MsgUpdateValidatorSharesExchRate_valoper protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateValidatorSharesExchRate = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateValidatorSharesExchRate") - fd_MsgUpdateValidatorSharesExchRate_creator = md_MsgUpdateValidatorSharesExchRate.Fields().ByName("creator") - fd_MsgUpdateValidatorSharesExchRate_chain_id = md_MsgUpdateValidatorSharesExchRate.Fields().ByName("chain_id") - fd_MsgUpdateValidatorSharesExchRate_valoper = md_MsgUpdateValidatorSharesExchRate.Fields().ByName("valoper") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateValidatorSharesExchRate)(nil) - -type fastReflection_MsgUpdateValidatorSharesExchRate MsgUpdateValidatorSharesExchRate - -func (x *MsgUpdateValidatorSharesExchRate) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateValidatorSharesExchRate)(x) -} - -func (x *MsgUpdateValidatorSharesExchRate) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateValidatorSharesExchRate_messageType fastReflection_MsgUpdateValidatorSharesExchRate_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateValidatorSharesExchRate_messageType{} - -type fastReflection_MsgUpdateValidatorSharesExchRate_messageType struct{} - -func (x fastReflection_MsgUpdateValidatorSharesExchRate_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateValidatorSharesExchRate)(nil) -} -func (x fastReflection_MsgUpdateValidatorSharesExchRate_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateValidatorSharesExchRate) -} -func (x fastReflection_MsgUpdateValidatorSharesExchRate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateValidatorSharesExchRate -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateValidatorSharesExchRate -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateValidatorSharesExchRate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) New() protoreflect.Message { - return new(fastReflection_MsgUpdateValidatorSharesExchRate) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateValidatorSharesExchRate)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgUpdateValidatorSharesExchRate_creator, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgUpdateValidatorSharesExchRate_chain_id, value) { - return - } - } - if x.Valoper != "" { - value := protoreflect.ValueOfString(x.Valoper) - if !f(fd_MsgUpdateValidatorSharesExchRate_valoper, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.creator": - return x.Creator != "" - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.chain_id": - return x.ChainId != "" - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.valoper": - return x.Valoper != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRate does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.creator": - x.Creator = "" - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.chain_id": - x.ChainId = "" - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.valoper": - x.Valoper = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRate does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.valoper": - value := x.Valoper - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRate does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.valoper": - x.Valoper = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRate does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgUpdateValidatorSharesExchRate is not mutable")) - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.MsgUpdateValidatorSharesExchRate is not mutable")) - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.valoper": - panic(fmt.Errorf("field valoper of message stride.stakeibc.MsgUpdateValidatorSharesExchRate is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRate does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateValidatorSharesExchRate.valoper": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRate does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateValidatorSharesExchRate", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateValidatorSharesExchRate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateValidatorSharesExchRate) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Valoper) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateValidatorSharesExchRate) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Valoper) > 0 { - i -= len(x.Valoper) - copy(dAtA[i:], x.Valoper) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Valoper))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateValidatorSharesExchRate) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateValidatorSharesExchRate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateValidatorSharesExchRate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Valoper", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Valoper = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateValidatorSharesExchRateResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateValidatorSharesExchRateResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateValidatorSharesExchRateResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateValidatorSharesExchRateResponse)(nil) - -type fastReflection_MsgUpdateValidatorSharesExchRateResponse MsgUpdateValidatorSharesExchRateResponse - -func (x *MsgUpdateValidatorSharesExchRateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateValidatorSharesExchRateResponse)(x) -} - -func (x *MsgUpdateValidatorSharesExchRateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateValidatorSharesExchRateResponse_messageType fastReflection_MsgUpdateValidatorSharesExchRateResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateValidatorSharesExchRateResponse_messageType{} - -type fastReflection_MsgUpdateValidatorSharesExchRateResponse_messageType struct{} - -func (x fastReflection_MsgUpdateValidatorSharesExchRateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateValidatorSharesExchRateResponse)(nil) -} -func (x fastReflection_MsgUpdateValidatorSharesExchRateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateValidatorSharesExchRateResponse) -} -func (x fastReflection_MsgUpdateValidatorSharesExchRateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateValidatorSharesExchRateResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateValidatorSharesExchRateResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateValidatorSharesExchRateResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateValidatorSharesExchRateResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateValidatorSharesExchRateResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateValidatorSharesExchRateResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateValidatorSharesExchRateResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateValidatorSharesExchRateResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateValidatorSharesExchRateResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateValidatorSharesExchRateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateValidatorSharesExchRateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgCalibrateDelegation protoreflect.MessageDescriptor - fd_MsgCalibrateDelegation_creator protoreflect.FieldDescriptor - fd_MsgCalibrateDelegation_chain_id protoreflect.FieldDescriptor - fd_MsgCalibrateDelegation_valoper protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgCalibrateDelegation = File_stride_stakeibc_tx_proto.Messages().ByName("MsgCalibrateDelegation") - fd_MsgCalibrateDelegation_creator = md_MsgCalibrateDelegation.Fields().ByName("creator") - fd_MsgCalibrateDelegation_chain_id = md_MsgCalibrateDelegation.Fields().ByName("chain_id") - fd_MsgCalibrateDelegation_valoper = md_MsgCalibrateDelegation.Fields().ByName("valoper") -} - -var _ protoreflect.Message = (*fastReflection_MsgCalibrateDelegation)(nil) - -type fastReflection_MsgCalibrateDelegation MsgCalibrateDelegation - -func (x *MsgCalibrateDelegation) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCalibrateDelegation)(x) -} - -func (x *MsgCalibrateDelegation) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCalibrateDelegation_messageType fastReflection_MsgCalibrateDelegation_messageType -var _ protoreflect.MessageType = fastReflection_MsgCalibrateDelegation_messageType{} - -type fastReflection_MsgCalibrateDelegation_messageType struct{} - -func (x fastReflection_MsgCalibrateDelegation_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCalibrateDelegation)(nil) -} -func (x fastReflection_MsgCalibrateDelegation_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCalibrateDelegation) -} -func (x fastReflection_MsgCalibrateDelegation_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCalibrateDelegation -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCalibrateDelegation) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCalibrateDelegation -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgCalibrateDelegation) Type() protoreflect.MessageType { - return _fastReflection_MsgCalibrateDelegation_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCalibrateDelegation) New() protoreflect.Message { - return new(fastReflection_MsgCalibrateDelegation) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCalibrateDelegation) Interface() protoreflect.ProtoMessage { - return (*MsgCalibrateDelegation)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgCalibrateDelegation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgCalibrateDelegation_creator, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgCalibrateDelegation_chain_id, value) { - return - } - } - if x.Valoper != "" { - value := protoreflect.ValueOfString(x.Valoper) - if !f(fd_MsgCalibrateDelegation_valoper, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgCalibrateDelegation) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgCalibrateDelegation.creator": - return x.Creator != "" - case "stride.stakeibc.MsgCalibrateDelegation.chain_id": - return x.ChainId != "" - case "stride.stakeibc.MsgCalibrateDelegation.valoper": - return x.Valoper != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegation does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCalibrateDelegation) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgCalibrateDelegation.creator": - x.Creator = "" - case "stride.stakeibc.MsgCalibrateDelegation.chain_id": - x.ChainId = "" - case "stride.stakeibc.MsgCalibrateDelegation.valoper": - x.Valoper = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegation does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgCalibrateDelegation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgCalibrateDelegation.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCalibrateDelegation.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCalibrateDelegation.valoper": - value := x.Valoper - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegation does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCalibrateDelegation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgCalibrateDelegation.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgCalibrateDelegation.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.MsgCalibrateDelegation.valoper": - x.Valoper = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegation does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCalibrateDelegation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgCalibrateDelegation.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgCalibrateDelegation is not mutable")) - case "stride.stakeibc.MsgCalibrateDelegation.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.MsgCalibrateDelegation is not mutable")) - case "stride.stakeibc.MsgCalibrateDelegation.valoper": - panic(fmt.Errorf("field valoper of message stride.stakeibc.MsgCalibrateDelegation is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegation does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgCalibrateDelegation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgCalibrateDelegation.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCalibrateDelegation.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCalibrateDelegation.valoper": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegation")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegation does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgCalibrateDelegation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgCalibrateDelegation", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgCalibrateDelegation) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCalibrateDelegation) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgCalibrateDelegation) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgCalibrateDelegation) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCalibrateDelegation) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Valoper) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCalibrateDelegation) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Valoper) > 0 { - i -= len(x.Valoper) - copy(dAtA[i:], x.Valoper) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Valoper))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCalibrateDelegation) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCalibrateDelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCalibrateDelegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Valoper", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Valoper = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgCalibrateDelegationResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgCalibrateDelegationResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgCalibrateDelegationResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgCalibrateDelegationResponse)(nil) - -type fastReflection_MsgCalibrateDelegationResponse MsgCalibrateDelegationResponse - -func (x *MsgCalibrateDelegationResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCalibrateDelegationResponse)(x) -} - -func (x *MsgCalibrateDelegationResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCalibrateDelegationResponse_messageType fastReflection_MsgCalibrateDelegationResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCalibrateDelegationResponse_messageType{} - -type fastReflection_MsgCalibrateDelegationResponse_messageType struct{} - -func (x fastReflection_MsgCalibrateDelegationResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCalibrateDelegationResponse)(nil) -} -func (x fastReflection_MsgCalibrateDelegationResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCalibrateDelegationResponse) -} -func (x fastReflection_MsgCalibrateDelegationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCalibrateDelegationResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCalibrateDelegationResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCalibrateDelegationResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgCalibrateDelegationResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCalibrateDelegationResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCalibrateDelegationResponse) New() protoreflect.Message { - return new(fastReflection_MsgCalibrateDelegationResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCalibrateDelegationResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCalibrateDelegationResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgCalibrateDelegationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgCalibrateDelegationResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegationResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegationResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCalibrateDelegationResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegationResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegationResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgCalibrateDelegationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegationResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegationResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCalibrateDelegationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegationResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegationResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCalibrateDelegationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegationResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegationResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgCalibrateDelegationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCalibrateDelegationResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCalibrateDelegationResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgCalibrateDelegationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgCalibrateDelegationResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgCalibrateDelegationResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCalibrateDelegationResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgCalibrateDelegationResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgCalibrateDelegationResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCalibrateDelegationResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCalibrateDelegationResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCalibrateDelegationResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCalibrateDelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCalibrateDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgResumeHostZone protoreflect.MessageDescriptor - fd_MsgResumeHostZone_creator protoreflect.FieldDescriptor - fd_MsgResumeHostZone_chain_id protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgResumeHostZone = File_stride_stakeibc_tx_proto.Messages().ByName("MsgResumeHostZone") - fd_MsgResumeHostZone_creator = md_MsgResumeHostZone.Fields().ByName("creator") - fd_MsgResumeHostZone_chain_id = md_MsgResumeHostZone.Fields().ByName("chain_id") -} - -var _ protoreflect.Message = (*fastReflection_MsgResumeHostZone)(nil) - -type fastReflection_MsgResumeHostZone MsgResumeHostZone - -func (x *MsgResumeHostZone) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgResumeHostZone)(x) -} - -func (x *MsgResumeHostZone) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgResumeHostZone_messageType fastReflection_MsgResumeHostZone_messageType -var _ protoreflect.MessageType = fastReflection_MsgResumeHostZone_messageType{} - -type fastReflection_MsgResumeHostZone_messageType struct{} - -func (x fastReflection_MsgResumeHostZone_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgResumeHostZone)(nil) -} -func (x fastReflection_MsgResumeHostZone_messageType) New() protoreflect.Message { - return new(fastReflection_MsgResumeHostZone) -} -func (x fastReflection_MsgResumeHostZone_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgResumeHostZone -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgResumeHostZone) Descriptor() protoreflect.MessageDescriptor { - return md_MsgResumeHostZone -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgResumeHostZone) Type() protoreflect.MessageType { - return _fastReflection_MsgResumeHostZone_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgResumeHostZone) New() protoreflect.Message { - return new(fastReflection_MsgResumeHostZone) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgResumeHostZone) Interface() protoreflect.ProtoMessage { - return (*MsgResumeHostZone)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgResumeHostZone) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgResumeHostZone_creator, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgResumeHostZone_chain_id, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgResumeHostZone) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgResumeHostZone.creator": - return x.Creator != "" - case "stride.stakeibc.MsgResumeHostZone.chain_id": - return x.ChainId != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZone does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgResumeHostZone) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgResumeHostZone.creator": - x.Creator = "" - case "stride.stakeibc.MsgResumeHostZone.chain_id": - x.ChainId = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZone does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgResumeHostZone) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgResumeHostZone.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgResumeHostZone.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZone does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgResumeHostZone) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgResumeHostZone.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgResumeHostZone.chain_id": - x.ChainId = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZone does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgResumeHostZone) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgResumeHostZone.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgResumeHostZone is not mutable")) - case "stride.stakeibc.MsgResumeHostZone.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.MsgResumeHostZone is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZone does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgResumeHostZone) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgResumeHostZone.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgResumeHostZone.chain_id": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZone")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZone does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgResumeHostZone) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgResumeHostZone", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgResumeHostZone) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgResumeHostZone) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgResumeHostZone) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgResumeHostZone) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgResumeHostZone) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgResumeHostZone) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgResumeHostZone) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgResumeHostZone: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgResumeHostZone: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgResumeHostZoneResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgResumeHostZoneResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgResumeHostZoneResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgResumeHostZoneResponse)(nil) - -type fastReflection_MsgResumeHostZoneResponse MsgResumeHostZoneResponse - -func (x *MsgResumeHostZoneResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgResumeHostZoneResponse)(x) -} - -func (x *MsgResumeHostZoneResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgResumeHostZoneResponse_messageType fastReflection_MsgResumeHostZoneResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgResumeHostZoneResponse_messageType{} - -type fastReflection_MsgResumeHostZoneResponse_messageType struct{} - -func (x fastReflection_MsgResumeHostZoneResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgResumeHostZoneResponse)(nil) -} -func (x fastReflection_MsgResumeHostZoneResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgResumeHostZoneResponse) -} -func (x fastReflection_MsgResumeHostZoneResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgResumeHostZoneResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgResumeHostZoneResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgResumeHostZoneResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgResumeHostZoneResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgResumeHostZoneResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgResumeHostZoneResponse) New() protoreflect.Message { - return new(fastReflection_MsgResumeHostZoneResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgResumeHostZoneResponse) Interface() protoreflect.ProtoMessage { - return (*MsgResumeHostZoneResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgResumeHostZoneResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgResumeHostZoneResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgResumeHostZoneResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgResumeHostZoneResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZoneResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgResumeHostZoneResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgResumeHostZoneResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgResumeHostZoneResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgResumeHostZoneResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgResumeHostZoneResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgResumeHostZoneResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgResumeHostZoneResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgResumeHostZoneResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgResumeHostZoneResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgResumeHostZoneResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgResumeHostZoneResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgResumeHostZoneResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgResumeHostZoneResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgResumeHostZoneResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgResumeHostZoneResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgResumeHostZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgCreateTradeRoute protoreflect.MessageDescriptor - fd_MsgCreateTradeRoute_authority protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_host_chain_id protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_stride_to_reward_connection_id protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_stride_to_trade_connection_id protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_host_to_reward_transfer_channel_id protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_reward_to_trade_transfer_channel_id protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_trade_to_host_transfer_channel_id protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_reward_denom_on_host protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_reward_denom_on_reward protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_reward_denom_on_trade protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_host_denom_on_trade protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_host_denom_on_host protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_pool_id protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_max_allowed_swap_loss_rate protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_min_swap_amount protoreflect.FieldDescriptor - fd_MsgCreateTradeRoute_max_swap_amount protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgCreateTradeRoute = File_stride_stakeibc_tx_proto.Messages().ByName("MsgCreateTradeRoute") - fd_MsgCreateTradeRoute_authority = md_MsgCreateTradeRoute.Fields().ByName("authority") - fd_MsgCreateTradeRoute_host_chain_id = md_MsgCreateTradeRoute.Fields().ByName("host_chain_id") - fd_MsgCreateTradeRoute_stride_to_reward_connection_id = md_MsgCreateTradeRoute.Fields().ByName("stride_to_reward_connection_id") - fd_MsgCreateTradeRoute_stride_to_trade_connection_id = md_MsgCreateTradeRoute.Fields().ByName("stride_to_trade_connection_id") - fd_MsgCreateTradeRoute_host_to_reward_transfer_channel_id = md_MsgCreateTradeRoute.Fields().ByName("host_to_reward_transfer_channel_id") - fd_MsgCreateTradeRoute_reward_to_trade_transfer_channel_id = md_MsgCreateTradeRoute.Fields().ByName("reward_to_trade_transfer_channel_id") - fd_MsgCreateTradeRoute_trade_to_host_transfer_channel_id = md_MsgCreateTradeRoute.Fields().ByName("trade_to_host_transfer_channel_id") - fd_MsgCreateTradeRoute_reward_denom_on_host = md_MsgCreateTradeRoute.Fields().ByName("reward_denom_on_host") - fd_MsgCreateTradeRoute_reward_denom_on_reward = md_MsgCreateTradeRoute.Fields().ByName("reward_denom_on_reward") - fd_MsgCreateTradeRoute_reward_denom_on_trade = md_MsgCreateTradeRoute.Fields().ByName("reward_denom_on_trade") - fd_MsgCreateTradeRoute_host_denom_on_trade = md_MsgCreateTradeRoute.Fields().ByName("host_denom_on_trade") - fd_MsgCreateTradeRoute_host_denom_on_host = md_MsgCreateTradeRoute.Fields().ByName("host_denom_on_host") - fd_MsgCreateTradeRoute_pool_id = md_MsgCreateTradeRoute.Fields().ByName("pool_id") - fd_MsgCreateTradeRoute_max_allowed_swap_loss_rate = md_MsgCreateTradeRoute.Fields().ByName("max_allowed_swap_loss_rate") - fd_MsgCreateTradeRoute_min_swap_amount = md_MsgCreateTradeRoute.Fields().ByName("min_swap_amount") - fd_MsgCreateTradeRoute_max_swap_amount = md_MsgCreateTradeRoute.Fields().ByName("max_swap_amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateTradeRoute)(nil) - -type fastReflection_MsgCreateTradeRoute MsgCreateTradeRoute - -func (x *MsgCreateTradeRoute) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateTradeRoute)(x) -} - -func (x *MsgCreateTradeRoute) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateTradeRoute_messageType fastReflection_MsgCreateTradeRoute_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateTradeRoute_messageType{} - -type fastReflection_MsgCreateTradeRoute_messageType struct{} - -func (x fastReflection_MsgCreateTradeRoute_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateTradeRoute)(nil) -} -func (x fastReflection_MsgCreateTradeRoute_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateTradeRoute) -} -func (x fastReflection_MsgCreateTradeRoute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateTradeRoute -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateTradeRoute) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateTradeRoute -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgCreateTradeRoute) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateTradeRoute_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateTradeRoute) New() protoreflect.Message { - return new(fastReflection_MsgCreateTradeRoute) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateTradeRoute) Interface() protoreflect.ProtoMessage { - return (*MsgCreateTradeRoute)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgCreateTradeRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgCreateTradeRoute_authority, value) { - return - } - } - if x.HostChainId != "" { - value := protoreflect.ValueOfString(x.HostChainId) - if !f(fd_MsgCreateTradeRoute_host_chain_id, value) { - return - } - } - if x.StrideToRewardConnectionId != "" { - value := protoreflect.ValueOfString(x.StrideToRewardConnectionId) - if !f(fd_MsgCreateTradeRoute_stride_to_reward_connection_id, value) { - return - } - } - if x.StrideToTradeConnectionId != "" { - value := protoreflect.ValueOfString(x.StrideToTradeConnectionId) - if !f(fd_MsgCreateTradeRoute_stride_to_trade_connection_id, value) { - return - } - } - if x.HostToRewardTransferChannelId != "" { - value := protoreflect.ValueOfString(x.HostToRewardTransferChannelId) - if !f(fd_MsgCreateTradeRoute_host_to_reward_transfer_channel_id, value) { - return - } - } - if x.RewardToTradeTransferChannelId != "" { - value := protoreflect.ValueOfString(x.RewardToTradeTransferChannelId) - if !f(fd_MsgCreateTradeRoute_reward_to_trade_transfer_channel_id, value) { - return - } - } - if x.TradeToHostTransferChannelId != "" { - value := protoreflect.ValueOfString(x.TradeToHostTransferChannelId) - if !f(fd_MsgCreateTradeRoute_trade_to_host_transfer_channel_id, value) { - return - } - } - if x.RewardDenomOnHost != "" { - value := protoreflect.ValueOfString(x.RewardDenomOnHost) - if !f(fd_MsgCreateTradeRoute_reward_denom_on_host, value) { - return - } - } - if x.RewardDenomOnReward != "" { - value := protoreflect.ValueOfString(x.RewardDenomOnReward) - if !f(fd_MsgCreateTradeRoute_reward_denom_on_reward, value) { - return - } - } - if x.RewardDenomOnTrade != "" { - value := protoreflect.ValueOfString(x.RewardDenomOnTrade) - if !f(fd_MsgCreateTradeRoute_reward_denom_on_trade, value) { - return - } - } - if x.HostDenomOnTrade != "" { - value := protoreflect.ValueOfString(x.HostDenomOnTrade) - if !f(fd_MsgCreateTradeRoute_host_denom_on_trade, value) { - return - } - } - if x.HostDenomOnHost != "" { - value := protoreflect.ValueOfString(x.HostDenomOnHost) - if !f(fd_MsgCreateTradeRoute_host_denom_on_host, value) { - return - } - } - if x.PoolId != uint64(0) { - value := protoreflect.ValueOfUint64(x.PoolId) - if !f(fd_MsgCreateTradeRoute_pool_id, value) { - return - } - } - if x.MaxAllowedSwapLossRate != "" { - value := protoreflect.ValueOfString(x.MaxAllowedSwapLossRate) - if !f(fd_MsgCreateTradeRoute_max_allowed_swap_loss_rate, value) { - return - } - } - if x.MinSwapAmount != "" { - value := protoreflect.ValueOfString(x.MinSwapAmount) - if !f(fd_MsgCreateTradeRoute_min_swap_amount, value) { - return - } - } - if x.MaxSwapAmount != "" { - value := protoreflect.ValueOfString(x.MaxSwapAmount) - if !f(fd_MsgCreateTradeRoute_max_swap_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgCreateTradeRoute) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgCreateTradeRoute.authority": - return x.Authority != "" - case "stride.stakeibc.MsgCreateTradeRoute.host_chain_id": - return x.HostChainId != "" - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_reward_connection_id": - return x.StrideToRewardConnectionId != "" - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_trade_connection_id": - return x.StrideToTradeConnectionId != "" - case "stride.stakeibc.MsgCreateTradeRoute.host_to_reward_transfer_channel_id": - return x.HostToRewardTransferChannelId != "" - case "stride.stakeibc.MsgCreateTradeRoute.reward_to_trade_transfer_channel_id": - return x.RewardToTradeTransferChannelId != "" - case "stride.stakeibc.MsgCreateTradeRoute.trade_to_host_transfer_channel_id": - return x.TradeToHostTransferChannelId != "" - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_host": - return x.RewardDenomOnHost != "" - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_reward": - return x.RewardDenomOnReward != "" - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_trade": - return x.RewardDenomOnTrade != "" - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_trade": - return x.HostDenomOnTrade != "" - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_host": - return x.HostDenomOnHost != "" - case "stride.stakeibc.MsgCreateTradeRoute.pool_id": - return x.PoolId != uint64(0) - case "stride.stakeibc.MsgCreateTradeRoute.max_allowed_swap_loss_rate": - return x.MaxAllowedSwapLossRate != "" - case "stride.stakeibc.MsgCreateTradeRoute.min_swap_amount": - return x.MinSwapAmount != "" - case "stride.stakeibc.MsgCreateTradeRoute.max_swap_amount": - return x.MaxSwapAmount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateTradeRoute) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgCreateTradeRoute.authority": - x.Authority = "" - case "stride.stakeibc.MsgCreateTradeRoute.host_chain_id": - x.HostChainId = "" - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_reward_connection_id": - x.StrideToRewardConnectionId = "" - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_trade_connection_id": - x.StrideToTradeConnectionId = "" - case "stride.stakeibc.MsgCreateTradeRoute.host_to_reward_transfer_channel_id": - x.HostToRewardTransferChannelId = "" - case "stride.stakeibc.MsgCreateTradeRoute.reward_to_trade_transfer_channel_id": - x.RewardToTradeTransferChannelId = "" - case "stride.stakeibc.MsgCreateTradeRoute.trade_to_host_transfer_channel_id": - x.TradeToHostTransferChannelId = "" - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_host": - x.RewardDenomOnHost = "" - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_reward": - x.RewardDenomOnReward = "" - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_trade": - x.RewardDenomOnTrade = "" - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_trade": - x.HostDenomOnTrade = "" - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_host": - x.HostDenomOnHost = "" - case "stride.stakeibc.MsgCreateTradeRoute.pool_id": - x.PoolId = uint64(0) - case "stride.stakeibc.MsgCreateTradeRoute.max_allowed_swap_loss_rate": - x.MaxAllowedSwapLossRate = "" - case "stride.stakeibc.MsgCreateTradeRoute.min_swap_amount": - x.MinSwapAmount = "" - case "stride.stakeibc.MsgCreateTradeRoute.max_swap_amount": - x.MaxSwapAmount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgCreateTradeRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgCreateTradeRoute.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.host_chain_id": - value := x.HostChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_reward_connection_id": - value := x.StrideToRewardConnectionId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_trade_connection_id": - value := x.StrideToTradeConnectionId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.host_to_reward_transfer_channel_id": - value := x.HostToRewardTransferChannelId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.reward_to_trade_transfer_channel_id": - value := x.RewardToTradeTransferChannelId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.trade_to_host_transfer_channel_id": - value := x.TradeToHostTransferChannelId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_host": - value := x.RewardDenomOnHost - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_reward": - value := x.RewardDenomOnReward - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_trade": - value := x.RewardDenomOnTrade - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_trade": - value := x.HostDenomOnTrade - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_host": - value := x.HostDenomOnHost - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.pool_id": - value := x.PoolId - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.MsgCreateTradeRoute.max_allowed_swap_loss_rate": - value := x.MaxAllowedSwapLossRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.min_swap_amount": - value := x.MinSwapAmount - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgCreateTradeRoute.max_swap_amount": - value := x.MaxSwapAmount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRoute does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateTradeRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgCreateTradeRoute.authority": - x.Authority = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.host_chain_id": - x.HostChainId = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_reward_connection_id": - x.StrideToRewardConnectionId = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_trade_connection_id": - x.StrideToTradeConnectionId = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.host_to_reward_transfer_channel_id": - x.HostToRewardTransferChannelId = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.reward_to_trade_transfer_channel_id": - x.RewardToTradeTransferChannelId = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.trade_to_host_transfer_channel_id": - x.TradeToHostTransferChannelId = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_host": - x.RewardDenomOnHost = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_reward": - x.RewardDenomOnReward = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_trade": - x.RewardDenomOnTrade = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_trade": - x.HostDenomOnTrade = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_host": - x.HostDenomOnHost = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.pool_id": - x.PoolId = value.Uint() - case "stride.stakeibc.MsgCreateTradeRoute.max_allowed_swap_loss_rate": - x.MaxAllowedSwapLossRate = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.min_swap_amount": - x.MinSwapAmount = value.Interface().(string) - case "stride.stakeibc.MsgCreateTradeRoute.max_swap_amount": - x.MaxSwapAmount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateTradeRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgCreateTradeRoute.authority": - panic(fmt.Errorf("field authority of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.host_chain_id": - panic(fmt.Errorf("field host_chain_id of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_reward_connection_id": - panic(fmt.Errorf("field stride_to_reward_connection_id of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_trade_connection_id": - panic(fmt.Errorf("field stride_to_trade_connection_id of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.host_to_reward_transfer_channel_id": - panic(fmt.Errorf("field host_to_reward_transfer_channel_id of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.reward_to_trade_transfer_channel_id": - panic(fmt.Errorf("field reward_to_trade_transfer_channel_id of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.trade_to_host_transfer_channel_id": - panic(fmt.Errorf("field trade_to_host_transfer_channel_id of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_host": - panic(fmt.Errorf("field reward_denom_on_host of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_reward": - panic(fmt.Errorf("field reward_denom_on_reward of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_trade": - panic(fmt.Errorf("field reward_denom_on_trade of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_trade": - panic(fmt.Errorf("field host_denom_on_trade of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_host": - panic(fmt.Errorf("field host_denom_on_host of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.pool_id": - panic(fmt.Errorf("field pool_id of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.max_allowed_swap_loss_rate": - panic(fmt.Errorf("field max_allowed_swap_loss_rate of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.min_swap_amount": - panic(fmt.Errorf("field min_swap_amount of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - case "stride.stakeibc.MsgCreateTradeRoute.max_swap_amount": - panic(fmt.Errorf("field max_swap_amount of message stride.stakeibc.MsgCreateTradeRoute is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgCreateTradeRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgCreateTradeRoute.authority": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.host_chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_reward_connection_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.stride_to_trade_connection_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.host_to_reward_transfer_channel_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.reward_to_trade_transfer_channel_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.trade_to_host_transfer_channel_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_host": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_reward": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.reward_denom_on_trade": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_trade": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.host_denom_on_host": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.pool_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.MsgCreateTradeRoute.max_allowed_swap_loss_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.min_swap_amount": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgCreateTradeRoute.max_swap_amount": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgCreateTradeRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgCreateTradeRoute", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgCreateTradeRoute) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateTradeRoute) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgCreateTradeRoute) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgCreateTradeRoute) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateTradeRoute) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.StrideToRewardConnectionId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.StrideToTradeConnectionId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostToRewardTransferChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RewardToTradeTransferChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.TradeToHostTransferChannelId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RewardDenomOnHost) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RewardDenomOnReward) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RewardDenomOnTrade) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenomOnTrade) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenomOnHost) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PoolId != 0 { - n += 1 + runtime.Sov(uint64(x.PoolId)) - } - l = len(x.MaxAllowedSwapLossRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinSwapAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaxSwapAmount) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateTradeRoute) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MaxSwapAmount) > 0 { - i -= len(x.MaxSwapAmount) - copy(dAtA[i:], x.MaxSwapAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxSwapAmount))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if len(x.MinSwapAmount) > 0 { - i -= len(x.MinSwapAmount) - copy(dAtA[i:], x.MinSwapAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinSwapAmount))) - i-- - dAtA[i] = 0x7a - } - if len(x.MaxAllowedSwapLossRate) > 0 { - i -= len(x.MaxAllowedSwapLossRate) - copy(dAtA[i:], x.MaxAllowedSwapLossRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxAllowedSwapLossRate))) - i-- - dAtA[i] = 0x72 - } - if x.PoolId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PoolId)) - i-- - dAtA[i] = 0x68 - } - if len(x.HostDenomOnHost) > 0 { - i -= len(x.HostDenomOnHost) - copy(dAtA[i:], x.HostDenomOnHost) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenomOnHost))) - i-- - dAtA[i] = 0x62 - } - if len(x.HostDenomOnTrade) > 0 { - i -= len(x.HostDenomOnTrade) - copy(dAtA[i:], x.HostDenomOnTrade) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenomOnTrade))) - i-- - dAtA[i] = 0x5a - } - if len(x.RewardDenomOnTrade) > 0 { - i -= len(x.RewardDenomOnTrade) - copy(dAtA[i:], x.RewardDenomOnTrade) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardDenomOnTrade))) - i-- - dAtA[i] = 0x52 - } - if len(x.RewardDenomOnReward) > 0 { - i -= len(x.RewardDenomOnReward) - copy(dAtA[i:], x.RewardDenomOnReward) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardDenomOnReward))) - i-- - dAtA[i] = 0x4a - } - if len(x.RewardDenomOnHost) > 0 { - i -= len(x.RewardDenomOnHost) - copy(dAtA[i:], x.RewardDenomOnHost) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardDenomOnHost))) - i-- - dAtA[i] = 0x42 - } - if len(x.TradeToHostTransferChannelId) > 0 { - i -= len(x.TradeToHostTransferChannelId) - copy(dAtA[i:], x.TradeToHostTransferChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TradeToHostTransferChannelId))) - i-- - dAtA[i] = 0x3a - } - if len(x.RewardToTradeTransferChannelId) > 0 { - i -= len(x.RewardToTradeTransferChannelId) - copy(dAtA[i:], x.RewardToTradeTransferChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardToTradeTransferChannelId))) - i-- - dAtA[i] = 0x32 - } - if len(x.HostToRewardTransferChannelId) > 0 { - i -= len(x.HostToRewardTransferChannelId) - copy(dAtA[i:], x.HostToRewardTransferChannelId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostToRewardTransferChannelId))) - i-- - dAtA[i] = 0x2a - } - if len(x.StrideToTradeConnectionId) > 0 { - i -= len(x.StrideToTradeConnectionId) - copy(dAtA[i:], x.StrideToTradeConnectionId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StrideToTradeConnectionId))) - i-- - dAtA[i] = 0x22 - } - if len(x.StrideToRewardConnectionId) > 0 { - i -= len(x.StrideToRewardConnectionId) - copy(dAtA[i:], x.StrideToRewardConnectionId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StrideToRewardConnectionId))) - i-- - dAtA[i] = 0x1a - } - if len(x.HostChainId) > 0 { - i -= len(x.HostChainId) - copy(dAtA[i:], x.HostChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateTradeRoute) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTradeRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTradeRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StrideToRewardConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.StrideToRewardConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StrideToTradeConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.StrideToTradeConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostToRewardTransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostToRewardTransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardToTradeTransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardToTradeTransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TradeToHostTransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TradeToHostTransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnHost", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardDenomOnHost = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnReward", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardDenomOnReward = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnTrade", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardDenomOnTrade = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnTrade", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenomOnTrade = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnHost", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenomOnHost = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - x.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxAllowedSwapLossRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxAllowedSwapLossRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinSwapAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxSwapAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgCreateTradeRouteResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgCreateTradeRouteResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgCreateTradeRouteResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgCreateTradeRouteResponse)(nil) - -type fastReflection_MsgCreateTradeRouteResponse MsgCreateTradeRouteResponse - -func (x *MsgCreateTradeRouteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgCreateTradeRouteResponse)(x) -} - -func (x *MsgCreateTradeRouteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgCreateTradeRouteResponse_messageType fastReflection_MsgCreateTradeRouteResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgCreateTradeRouteResponse_messageType{} - -type fastReflection_MsgCreateTradeRouteResponse_messageType struct{} - -func (x fastReflection_MsgCreateTradeRouteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgCreateTradeRouteResponse)(nil) -} -func (x fastReflection_MsgCreateTradeRouteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgCreateTradeRouteResponse) -} -func (x fastReflection_MsgCreateTradeRouteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateTradeRouteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgCreateTradeRouteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgCreateTradeRouteResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgCreateTradeRouteResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgCreateTradeRouteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgCreateTradeRouteResponse) New() protoreflect.Message { - return new(fastReflection_MsgCreateTradeRouteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgCreateTradeRouteResponse) Interface() protoreflect.ProtoMessage { - return (*MsgCreateTradeRouteResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgCreateTradeRouteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgCreateTradeRouteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateTradeRouteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgCreateTradeRouteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRouteResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateTradeRouteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateTradeRouteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgCreateTradeRouteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgCreateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgCreateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgCreateTradeRouteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgCreateTradeRouteResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgCreateTradeRouteResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgCreateTradeRouteResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgCreateTradeRouteResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgCreateTradeRouteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgCreateTradeRouteResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateTradeRouteResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgCreateTradeRouteResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTradeRouteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateTradeRouteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgDeleteTradeRoute protoreflect.MessageDescriptor - fd_MsgDeleteTradeRoute_authority protoreflect.FieldDescriptor - fd_MsgDeleteTradeRoute_reward_denom protoreflect.FieldDescriptor - fd_MsgDeleteTradeRoute_host_denom protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgDeleteTradeRoute = File_stride_stakeibc_tx_proto.Messages().ByName("MsgDeleteTradeRoute") - fd_MsgDeleteTradeRoute_authority = md_MsgDeleteTradeRoute.Fields().ByName("authority") - fd_MsgDeleteTradeRoute_reward_denom = md_MsgDeleteTradeRoute.Fields().ByName("reward_denom") - fd_MsgDeleteTradeRoute_host_denom = md_MsgDeleteTradeRoute.Fields().ByName("host_denom") -} - -var _ protoreflect.Message = (*fastReflection_MsgDeleteTradeRoute)(nil) - -type fastReflection_MsgDeleteTradeRoute MsgDeleteTradeRoute - -func (x *MsgDeleteTradeRoute) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDeleteTradeRoute)(x) -} - -func (x *MsgDeleteTradeRoute) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDeleteTradeRoute_messageType fastReflection_MsgDeleteTradeRoute_messageType -var _ protoreflect.MessageType = fastReflection_MsgDeleteTradeRoute_messageType{} - -type fastReflection_MsgDeleteTradeRoute_messageType struct{} - -func (x fastReflection_MsgDeleteTradeRoute_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDeleteTradeRoute)(nil) -} -func (x fastReflection_MsgDeleteTradeRoute_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDeleteTradeRoute) -} -func (x fastReflection_MsgDeleteTradeRoute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeleteTradeRoute -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDeleteTradeRoute) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeleteTradeRoute -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgDeleteTradeRoute) Type() protoreflect.MessageType { - return _fastReflection_MsgDeleteTradeRoute_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDeleteTradeRoute) New() protoreflect.Message { - return new(fastReflection_MsgDeleteTradeRoute) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDeleteTradeRoute) Interface() protoreflect.ProtoMessage { - return (*MsgDeleteTradeRoute)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgDeleteTradeRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgDeleteTradeRoute_authority, value) { - return - } - } - if x.RewardDenom != "" { - value := protoreflect.ValueOfString(x.RewardDenom) - if !f(fd_MsgDeleteTradeRoute_reward_denom, value) { - return - } - } - if x.HostDenom != "" { - value := protoreflect.ValueOfString(x.HostDenom) - if !f(fd_MsgDeleteTradeRoute_host_denom, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgDeleteTradeRoute) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteTradeRoute.authority": - return x.Authority != "" - case "stride.stakeibc.MsgDeleteTradeRoute.reward_denom": - return x.RewardDenom != "" - case "stride.stakeibc.MsgDeleteTradeRoute.host_denom": - return x.HostDenom != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRoute does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteTradeRoute) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteTradeRoute.authority": - x.Authority = "" - case "stride.stakeibc.MsgDeleteTradeRoute.reward_denom": - x.RewardDenom = "" - case "stride.stakeibc.MsgDeleteTradeRoute.host_denom": - x.HostDenom = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRoute does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgDeleteTradeRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgDeleteTradeRoute.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgDeleteTradeRoute.reward_denom": - value := x.RewardDenom - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgDeleteTradeRoute.host_denom": - value := x.HostDenom - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRoute does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteTradeRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteTradeRoute.authority": - x.Authority = value.Interface().(string) - case "stride.stakeibc.MsgDeleteTradeRoute.reward_denom": - x.RewardDenom = value.Interface().(string) - case "stride.stakeibc.MsgDeleteTradeRoute.host_denom": - x.HostDenom = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRoute does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteTradeRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteTradeRoute.authority": - panic(fmt.Errorf("field authority of message stride.stakeibc.MsgDeleteTradeRoute is not mutable")) - case "stride.stakeibc.MsgDeleteTradeRoute.reward_denom": - panic(fmt.Errorf("field reward_denom of message stride.stakeibc.MsgDeleteTradeRoute is not mutable")) - case "stride.stakeibc.MsgDeleteTradeRoute.host_denom": - panic(fmt.Errorf("field host_denom of message stride.stakeibc.MsgDeleteTradeRoute is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRoute does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgDeleteTradeRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgDeleteTradeRoute.authority": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgDeleteTradeRoute.reward_denom": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgDeleteTradeRoute.host_denom": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRoute does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgDeleteTradeRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgDeleteTradeRoute", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgDeleteTradeRoute) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteTradeRoute) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgDeleteTradeRoute) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgDeleteTradeRoute) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDeleteTradeRoute) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RewardDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDeleteTradeRoute) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.HostDenom) > 0 { - i -= len(x.HostDenom) - copy(dAtA[i:], x.HostDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenom))) - i-- - dAtA[i] = 0x1a - } - if len(x.RewardDenom) > 0 { - i -= len(x.RewardDenom) - copy(dAtA[i:], x.RewardDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardDenom))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgDeleteTradeRoute) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteTradeRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteTradeRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgDeleteTradeRouteResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgDeleteTradeRouteResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgDeleteTradeRouteResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgDeleteTradeRouteResponse)(nil) - -type fastReflection_MsgDeleteTradeRouteResponse MsgDeleteTradeRouteResponse - -func (x *MsgDeleteTradeRouteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDeleteTradeRouteResponse)(x) -} - -func (x *MsgDeleteTradeRouteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDeleteTradeRouteResponse_messageType fastReflection_MsgDeleteTradeRouteResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgDeleteTradeRouteResponse_messageType{} - -type fastReflection_MsgDeleteTradeRouteResponse_messageType struct{} - -func (x fastReflection_MsgDeleteTradeRouteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDeleteTradeRouteResponse)(nil) -} -func (x fastReflection_MsgDeleteTradeRouteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDeleteTradeRouteResponse) -} -func (x fastReflection_MsgDeleteTradeRouteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeleteTradeRouteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDeleteTradeRouteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDeleteTradeRouteResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgDeleteTradeRouteResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgDeleteTradeRouteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDeleteTradeRouteResponse) New() protoreflect.Message { - return new(fastReflection_MsgDeleteTradeRouteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDeleteTradeRouteResponse) Interface() protoreflect.ProtoMessage { - return (*MsgDeleteTradeRouteResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgDeleteTradeRouteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgDeleteTradeRouteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteTradeRouteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgDeleteTradeRouteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRouteResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteTradeRouteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteTradeRouteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgDeleteTradeRouteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgDeleteTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgDeleteTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgDeleteTradeRouteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgDeleteTradeRouteResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgDeleteTradeRouteResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDeleteTradeRouteResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgDeleteTradeRouteResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgDeleteTradeRouteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDeleteTradeRouteResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDeleteTradeRouteResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgDeleteTradeRouteResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteTradeRouteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDeleteTradeRouteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateTradeRoute protoreflect.MessageDescriptor - fd_MsgUpdateTradeRoute_authority protoreflect.FieldDescriptor - fd_MsgUpdateTradeRoute_reward_denom protoreflect.FieldDescriptor - fd_MsgUpdateTradeRoute_host_denom protoreflect.FieldDescriptor - fd_MsgUpdateTradeRoute_pool_id protoreflect.FieldDescriptor - fd_MsgUpdateTradeRoute_max_allowed_swap_loss_rate protoreflect.FieldDescriptor - fd_MsgUpdateTradeRoute_min_swap_amount protoreflect.FieldDescriptor - fd_MsgUpdateTradeRoute_max_swap_amount protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateTradeRoute = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateTradeRoute") - fd_MsgUpdateTradeRoute_authority = md_MsgUpdateTradeRoute.Fields().ByName("authority") - fd_MsgUpdateTradeRoute_reward_denom = md_MsgUpdateTradeRoute.Fields().ByName("reward_denom") - fd_MsgUpdateTradeRoute_host_denom = md_MsgUpdateTradeRoute.Fields().ByName("host_denom") - fd_MsgUpdateTradeRoute_pool_id = md_MsgUpdateTradeRoute.Fields().ByName("pool_id") - fd_MsgUpdateTradeRoute_max_allowed_swap_loss_rate = md_MsgUpdateTradeRoute.Fields().ByName("max_allowed_swap_loss_rate") - fd_MsgUpdateTradeRoute_min_swap_amount = md_MsgUpdateTradeRoute.Fields().ByName("min_swap_amount") - fd_MsgUpdateTradeRoute_max_swap_amount = md_MsgUpdateTradeRoute.Fields().ByName("max_swap_amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateTradeRoute)(nil) - -type fastReflection_MsgUpdateTradeRoute MsgUpdateTradeRoute - -func (x *MsgUpdateTradeRoute) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateTradeRoute)(x) -} - -func (x *MsgUpdateTradeRoute) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateTradeRoute_messageType fastReflection_MsgUpdateTradeRoute_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateTradeRoute_messageType{} - -type fastReflection_MsgUpdateTradeRoute_messageType struct{} - -func (x fastReflection_MsgUpdateTradeRoute_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateTradeRoute)(nil) -} -func (x fastReflection_MsgUpdateTradeRoute_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateTradeRoute) -} -func (x fastReflection_MsgUpdateTradeRoute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateTradeRoute -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateTradeRoute) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateTradeRoute -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateTradeRoute) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateTradeRoute_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateTradeRoute) New() protoreflect.Message { - return new(fastReflection_MsgUpdateTradeRoute) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateTradeRoute) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateTradeRoute)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateTradeRoute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateTradeRoute_authority, value) { - return - } - } - if x.RewardDenom != "" { - value := protoreflect.ValueOfString(x.RewardDenom) - if !f(fd_MsgUpdateTradeRoute_reward_denom, value) { - return - } - } - if x.HostDenom != "" { - value := protoreflect.ValueOfString(x.HostDenom) - if !f(fd_MsgUpdateTradeRoute_host_denom, value) { - return - } - } - if x.PoolId != uint64(0) { - value := protoreflect.ValueOfUint64(x.PoolId) - if !f(fd_MsgUpdateTradeRoute_pool_id, value) { - return - } - } - if x.MaxAllowedSwapLossRate != "" { - value := protoreflect.ValueOfString(x.MaxAllowedSwapLossRate) - if !f(fd_MsgUpdateTradeRoute_max_allowed_swap_loss_rate, value) { - return - } - } - if x.MinSwapAmount != "" { - value := protoreflect.ValueOfString(x.MinSwapAmount) - if !f(fd_MsgUpdateTradeRoute_min_swap_amount, value) { - return - } - } - if x.MaxSwapAmount != "" { - value := protoreflect.ValueOfString(x.MaxSwapAmount) - if !f(fd_MsgUpdateTradeRoute_max_swap_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateTradeRoute) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateTradeRoute.authority": - return x.Authority != "" - case "stride.stakeibc.MsgUpdateTradeRoute.reward_denom": - return x.RewardDenom != "" - case "stride.stakeibc.MsgUpdateTradeRoute.host_denom": - return x.HostDenom != "" - case "stride.stakeibc.MsgUpdateTradeRoute.pool_id": - return x.PoolId != uint64(0) - case "stride.stakeibc.MsgUpdateTradeRoute.max_allowed_swap_loss_rate": - return x.MaxAllowedSwapLossRate != "" - case "stride.stakeibc.MsgUpdateTradeRoute.min_swap_amount": - return x.MinSwapAmount != "" - case "stride.stakeibc.MsgUpdateTradeRoute.max_swap_amount": - return x.MaxSwapAmount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateTradeRoute) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateTradeRoute.authority": - x.Authority = "" - case "stride.stakeibc.MsgUpdateTradeRoute.reward_denom": - x.RewardDenom = "" - case "stride.stakeibc.MsgUpdateTradeRoute.host_denom": - x.HostDenom = "" - case "stride.stakeibc.MsgUpdateTradeRoute.pool_id": - x.PoolId = uint64(0) - case "stride.stakeibc.MsgUpdateTradeRoute.max_allowed_swap_loss_rate": - x.MaxAllowedSwapLossRate = "" - case "stride.stakeibc.MsgUpdateTradeRoute.min_swap_amount": - x.MinSwapAmount = "" - case "stride.stakeibc.MsgUpdateTradeRoute.max_swap_amount": - x.MaxSwapAmount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateTradeRoute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgUpdateTradeRoute.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateTradeRoute.reward_denom": - value := x.RewardDenom - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateTradeRoute.host_denom": - value := x.HostDenom - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateTradeRoute.pool_id": - value := x.PoolId - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.MsgUpdateTradeRoute.max_allowed_swap_loss_rate": - value := x.MaxAllowedSwapLossRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateTradeRoute.min_swap_amount": - value := x.MinSwapAmount - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateTradeRoute.max_swap_amount": - value := x.MaxSwapAmount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRoute does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateTradeRoute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateTradeRoute.authority": - x.Authority = value.Interface().(string) - case "stride.stakeibc.MsgUpdateTradeRoute.reward_denom": - x.RewardDenom = value.Interface().(string) - case "stride.stakeibc.MsgUpdateTradeRoute.host_denom": - x.HostDenom = value.Interface().(string) - case "stride.stakeibc.MsgUpdateTradeRoute.pool_id": - x.PoolId = value.Uint() - case "stride.stakeibc.MsgUpdateTradeRoute.max_allowed_swap_loss_rate": - x.MaxAllowedSwapLossRate = value.Interface().(string) - case "stride.stakeibc.MsgUpdateTradeRoute.min_swap_amount": - x.MinSwapAmount = value.Interface().(string) - case "stride.stakeibc.MsgUpdateTradeRoute.max_swap_amount": - x.MaxSwapAmount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateTradeRoute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateTradeRoute.authority": - panic(fmt.Errorf("field authority of message stride.stakeibc.MsgUpdateTradeRoute is not mutable")) - case "stride.stakeibc.MsgUpdateTradeRoute.reward_denom": - panic(fmt.Errorf("field reward_denom of message stride.stakeibc.MsgUpdateTradeRoute is not mutable")) - case "stride.stakeibc.MsgUpdateTradeRoute.host_denom": - panic(fmt.Errorf("field host_denom of message stride.stakeibc.MsgUpdateTradeRoute is not mutable")) - case "stride.stakeibc.MsgUpdateTradeRoute.pool_id": - panic(fmt.Errorf("field pool_id of message stride.stakeibc.MsgUpdateTradeRoute is not mutable")) - case "stride.stakeibc.MsgUpdateTradeRoute.max_allowed_swap_loss_rate": - panic(fmt.Errorf("field max_allowed_swap_loss_rate of message stride.stakeibc.MsgUpdateTradeRoute is not mutable")) - case "stride.stakeibc.MsgUpdateTradeRoute.min_swap_amount": - panic(fmt.Errorf("field min_swap_amount of message stride.stakeibc.MsgUpdateTradeRoute is not mutable")) - case "stride.stakeibc.MsgUpdateTradeRoute.max_swap_amount": - panic(fmt.Errorf("field max_swap_amount of message stride.stakeibc.MsgUpdateTradeRoute is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateTradeRoute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateTradeRoute.authority": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateTradeRoute.reward_denom": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateTradeRoute.host_denom": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateTradeRoute.pool_id": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.MsgUpdateTradeRoute.max_allowed_swap_loss_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateTradeRoute.min_swap_amount": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateTradeRoute.max_swap_amount": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRoute")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRoute does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateTradeRoute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateTradeRoute", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateTradeRoute) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateTradeRoute) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateTradeRoute) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateTradeRoute) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateTradeRoute) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RewardDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.HostDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PoolId != 0 { - n += 1 + runtime.Sov(uint64(x.PoolId)) - } - l = len(x.MaxAllowedSwapLossRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MinSwapAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.MaxSwapAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateTradeRoute) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.MaxSwapAmount) > 0 { - i -= len(x.MaxSwapAmount) - copy(dAtA[i:], x.MaxSwapAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxSwapAmount))) - i-- - dAtA[i] = 0x3a - } - if len(x.MinSwapAmount) > 0 { - i -= len(x.MinSwapAmount) - copy(dAtA[i:], x.MinSwapAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinSwapAmount))) - i-- - dAtA[i] = 0x32 - } - if len(x.MaxAllowedSwapLossRate) > 0 { - i -= len(x.MaxAllowedSwapLossRate) - copy(dAtA[i:], x.MaxAllowedSwapLossRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MaxAllowedSwapLossRate))) - i-- - dAtA[i] = 0x2a - } - if x.PoolId != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PoolId)) - i-- - dAtA[i] = 0x20 - } - if len(x.HostDenom) > 0 { - i -= len(x.HostDenom) - copy(dAtA[i:], x.HostDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.HostDenom))) - i-- - dAtA[i] = 0x1a - } - if len(x.RewardDenom) > 0 { - i -= len(x.RewardDenom) - copy(dAtA[i:], x.RewardDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RewardDenom))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateTradeRoute) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateTradeRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateTradeRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RewardDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RewardDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - x.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxAllowedSwapLossRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxAllowedSwapLossRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MinSwapAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.MaxSwapAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateTradeRouteResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateTradeRouteResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateTradeRouteResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateTradeRouteResponse)(nil) - -type fastReflection_MsgUpdateTradeRouteResponse MsgUpdateTradeRouteResponse - -func (x *MsgUpdateTradeRouteResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateTradeRouteResponse)(x) -} - -func (x *MsgUpdateTradeRouteResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateTradeRouteResponse_messageType fastReflection_MsgUpdateTradeRouteResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateTradeRouteResponse_messageType{} - -type fastReflection_MsgUpdateTradeRouteResponse_messageType struct{} - -func (x fastReflection_MsgUpdateTradeRouteResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateTradeRouteResponse)(nil) -} -func (x fastReflection_MsgUpdateTradeRouteResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateTradeRouteResponse) -} -func (x fastReflection_MsgUpdateTradeRouteResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateTradeRouteResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateTradeRouteResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateTradeRouteResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateTradeRouteResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateTradeRouteResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateTradeRouteResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateTradeRouteResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateTradeRouteResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateTradeRouteResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateTradeRouteResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateTradeRouteResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateTradeRouteResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateTradeRouteResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRouteResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateTradeRouteResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateTradeRouteResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateTradeRouteResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateTradeRouteResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateTradeRouteResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateTradeRouteResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateTradeRouteResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateTradeRouteResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateTradeRouteResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateTradeRouteResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateTradeRouteResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateTradeRouteResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateTradeRouteResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateTradeRouteResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateTradeRouteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateTradeRouteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSetCommunityPoolRebate protoreflect.MessageDescriptor - fd_MsgSetCommunityPoolRebate_creator protoreflect.FieldDescriptor - fd_MsgSetCommunityPoolRebate_chain_id protoreflect.FieldDescriptor - fd_MsgSetCommunityPoolRebate_rebate_rate protoreflect.FieldDescriptor - fd_MsgSetCommunityPoolRebate_liquid_staked_st_token_amount protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgSetCommunityPoolRebate = File_stride_stakeibc_tx_proto.Messages().ByName("MsgSetCommunityPoolRebate") - fd_MsgSetCommunityPoolRebate_creator = md_MsgSetCommunityPoolRebate.Fields().ByName("creator") - fd_MsgSetCommunityPoolRebate_chain_id = md_MsgSetCommunityPoolRebate.Fields().ByName("chain_id") - fd_MsgSetCommunityPoolRebate_rebate_rate = md_MsgSetCommunityPoolRebate.Fields().ByName("rebate_rate") - fd_MsgSetCommunityPoolRebate_liquid_staked_st_token_amount = md_MsgSetCommunityPoolRebate.Fields().ByName("liquid_staked_st_token_amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgSetCommunityPoolRebate)(nil) - -type fastReflection_MsgSetCommunityPoolRebate MsgSetCommunityPoolRebate - -func (x *MsgSetCommunityPoolRebate) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSetCommunityPoolRebate)(x) -} - -func (x *MsgSetCommunityPoolRebate) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSetCommunityPoolRebate_messageType fastReflection_MsgSetCommunityPoolRebate_messageType -var _ protoreflect.MessageType = fastReflection_MsgSetCommunityPoolRebate_messageType{} - -type fastReflection_MsgSetCommunityPoolRebate_messageType struct{} - -func (x fastReflection_MsgSetCommunityPoolRebate_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSetCommunityPoolRebate)(nil) -} -func (x fastReflection_MsgSetCommunityPoolRebate_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSetCommunityPoolRebate) -} -func (x fastReflection_MsgSetCommunityPoolRebate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetCommunityPoolRebate -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSetCommunityPoolRebate) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetCommunityPoolRebate -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSetCommunityPoolRebate) Type() protoreflect.MessageType { - return _fastReflection_MsgSetCommunityPoolRebate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSetCommunityPoolRebate) New() protoreflect.Message { - return new(fastReflection_MsgSetCommunityPoolRebate) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSetCommunityPoolRebate) Interface() protoreflect.ProtoMessage { - return (*MsgSetCommunityPoolRebate)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSetCommunityPoolRebate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgSetCommunityPoolRebate_creator, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgSetCommunityPoolRebate_chain_id, value) { - return - } - } - if x.RebateRate != "" { - value := protoreflect.ValueOfString(x.RebateRate) - if !f(fd_MsgSetCommunityPoolRebate_rebate_rate, value) { - return - } - } - if x.LiquidStakedStTokenAmount != "" { - value := protoreflect.ValueOfString(x.LiquidStakedStTokenAmount) - if !f(fd_MsgSetCommunityPoolRebate_liquid_staked_st_token_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSetCommunityPoolRebate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgSetCommunityPoolRebate.creator": - return x.Creator != "" - case "stride.stakeibc.MsgSetCommunityPoolRebate.chain_id": - return x.ChainId != "" - case "stride.stakeibc.MsgSetCommunityPoolRebate.rebate_rate": - return x.RebateRate != "" - case "stride.stakeibc.MsgSetCommunityPoolRebate.liquid_staked_st_token_amount": - return x.LiquidStakedStTokenAmount != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSetCommunityPoolRebate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgSetCommunityPoolRebate.creator": - x.Creator = "" - case "stride.stakeibc.MsgSetCommunityPoolRebate.chain_id": - x.ChainId = "" - case "stride.stakeibc.MsgSetCommunityPoolRebate.rebate_rate": - x.RebateRate = "" - case "stride.stakeibc.MsgSetCommunityPoolRebate.liquid_staked_st_token_amount": - x.LiquidStakedStTokenAmount = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSetCommunityPoolRebate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgSetCommunityPoolRebate.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgSetCommunityPoolRebate.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgSetCommunityPoolRebate.rebate_rate": - value := x.RebateRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgSetCommunityPoolRebate.liquid_staked_st_token_amount": - value := x.LiquidStakedStTokenAmount - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebate does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSetCommunityPoolRebate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgSetCommunityPoolRebate.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgSetCommunityPoolRebate.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.MsgSetCommunityPoolRebate.rebate_rate": - x.RebateRate = value.Interface().(string) - case "stride.stakeibc.MsgSetCommunityPoolRebate.liquid_staked_st_token_amount": - x.LiquidStakedStTokenAmount = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSetCommunityPoolRebate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgSetCommunityPoolRebate.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgSetCommunityPoolRebate is not mutable")) - case "stride.stakeibc.MsgSetCommunityPoolRebate.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.MsgSetCommunityPoolRebate is not mutable")) - case "stride.stakeibc.MsgSetCommunityPoolRebate.rebate_rate": - panic(fmt.Errorf("field rebate_rate of message stride.stakeibc.MsgSetCommunityPoolRebate is not mutable")) - case "stride.stakeibc.MsgSetCommunityPoolRebate.liquid_staked_st_token_amount": - panic(fmt.Errorf("field liquid_staked_st_token_amount of message stride.stakeibc.MsgSetCommunityPoolRebate is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSetCommunityPoolRebate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgSetCommunityPoolRebate.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgSetCommunityPoolRebate.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgSetCommunityPoolRebate.rebate_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgSetCommunityPoolRebate.liquid_staked_st_token_amount": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebate")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebate does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSetCommunityPoolRebate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgSetCommunityPoolRebate", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSetCommunityPoolRebate) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSetCommunityPoolRebate) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSetCommunityPoolRebate) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSetCommunityPoolRebate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSetCommunityPoolRebate) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.RebateRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.LiquidStakedStTokenAmount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSetCommunityPoolRebate) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.LiquidStakedStTokenAmount) > 0 { - i -= len(x.LiquidStakedStTokenAmount) - copy(dAtA[i:], x.LiquidStakedStTokenAmount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LiquidStakedStTokenAmount))) - i-- - dAtA[i] = 0x22 - } - if len(x.RebateRate) > 0 { - i -= len(x.RebateRate) - copy(dAtA[i:], x.RebateRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RebateRate))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSetCommunityPoolRebate) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCommunityPoolRebate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCommunityPoolRebate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RebateRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RebateRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LiquidStakedStTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LiquidStakedStTokenAmount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgSetCommunityPoolRebateResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgSetCommunityPoolRebateResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgSetCommunityPoolRebateResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgSetCommunityPoolRebateResponse)(nil) - -type fastReflection_MsgSetCommunityPoolRebateResponse MsgSetCommunityPoolRebateResponse - -func (x *MsgSetCommunityPoolRebateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSetCommunityPoolRebateResponse)(x) -} - -func (x *MsgSetCommunityPoolRebateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSetCommunityPoolRebateResponse_messageType fastReflection_MsgSetCommunityPoolRebateResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSetCommunityPoolRebateResponse_messageType{} - -type fastReflection_MsgSetCommunityPoolRebateResponse_messageType struct{} - -func (x fastReflection_MsgSetCommunityPoolRebateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSetCommunityPoolRebateResponse)(nil) -} -func (x fastReflection_MsgSetCommunityPoolRebateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSetCommunityPoolRebateResponse) -} -func (x fastReflection_MsgSetCommunityPoolRebateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetCommunityPoolRebateResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSetCommunityPoolRebateResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSetCommunityPoolRebateResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) New() protoreflect.Message { - return new(fastReflection_MsgSetCommunityPoolRebateResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSetCommunityPoolRebateResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebateResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebateResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebateResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebateResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebateResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgSetCommunityPoolRebateResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgSetCommunityPoolRebateResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgSetCommunityPoolRebateResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSetCommunityPoolRebateResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSetCommunityPoolRebateResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSetCommunityPoolRebateResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSetCommunityPoolRebateResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCommunityPoolRebateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCommunityPoolRebateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgToggleTradeController protoreflect.MessageDescriptor - fd_MsgToggleTradeController_creator protoreflect.FieldDescriptor - fd_MsgToggleTradeController_chain_id protoreflect.FieldDescriptor - fd_MsgToggleTradeController_permission_change protoreflect.FieldDescriptor - fd_MsgToggleTradeController_address protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgToggleTradeController = File_stride_stakeibc_tx_proto.Messages().ByName("MsgToggleTradeController") - fd_MsgToggleTradeController_creator = md_MsgToggleTradeController.Fields().ByName("creator") - fd_MsgToggleTradeController_chain_id = md_MsgToggleTradeController.Fields().ByName("chain_id") - fd_MsgToggleTradeController_permission_change = md_MsgToggleTradeController.Fields().ByName("permission_change") - fd_MsgToggleTradeController_address = md_MsgToggleTradeController.Fields().ByName("address") -} - -var _ protoreflect.Message = (*fastReflection_MsgToggleTradeController)(nil) - -type fastReflection_MsgToggleTradeController MsgToggleTradeController - -func (x *MsgToggleTradeController) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgToggleTradeController)(x) -} - -func (x *MsgToggleTradeController) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgToggleTradeController_messageType fastReflection_MsgToggleTradeController_messageType -var _ protoreflect.MessageType = fastReflection_MsgToggleTradeController_messageType{} - -type fastReflection_MsgToggleTradeController_messageType struct{} - -func (x fastReflection_MsgToggleTradeController_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgToggleTradeController)(nil) -} -func (x fastReflection_MsgToggleTradeController_messageType) New() protoreflect.Message { - return new(fastReflection_MsgToggleTradeController) -} -func (x fastReflection_MsgToggleTradeController_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgToggleTradeController -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgToggleTradeController) Descriptor() protoreflect.MessageDescriptor { - return md_MsgToggleTradeController -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgToggleTradeController) Type() protoreflect.MessageType { - return _fastReflection_MsgToggleTradeController_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgToggleTradeController) New() protoreflect.Message { - return new(fastReflection_MsgToggleTradeController) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgToggleTradeController) Interface() protoreflect.ProtoMessage { - return (*MsgToggleTradeController)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgToggleTradeController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Creator != "" { - value := protoreflect.ValueOfString(x.Creator) - if !f(fd_MsgToggleTradeController_creator, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgToggleTradeController_chain_id, value) { - return - } - } - if x.PermissionChange != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.PermissionChange)) - if !f(fd_MsgToggleTradeController_permission_change, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgToggleTradeController_address, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgToggleTradeController) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgToggleTradeController.creator": - return x.Creator != "" - case "stride.stakeibc.MsgToggleTradeController.chain_id": - return x.ChainId != "" - case "stride.stakeibc.MsgToggleTradeController.permission_change": - return x.PermissionChange != 0 - case "stride.stakeibc.MsgToggleTradeController.address": - return x.Address != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeController")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeController does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgToggleTradeController) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgToggleTradeController.creator": - x.Creator = "" - case "stride.stakeibc.MsgToggleTradeController.chain_id": - x.ChainId = "" - case "stride.stakeibc.MsgToggleTradeController.permission_change": - x.PermissionChange = 0 - case "stride.stakeibc.MsgToggleTradeController.address": - x.Address = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeController")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeController does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgToggleTradeController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgToggleTradeController.creator": - value := x.Creator - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgToggleTradeController.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgToggleTradeController.permission_change": - value := x.PermissionChange - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "stride.stakeibc.MsgToggleTradeController.address": - value := x.Address - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeController")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeController does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgToggleTradeController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgToggleTradeController.creator": - x.Creator = value.Interface().(string) - case "stride.stakeibc.MsgToggleTradeController.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.MsgToggleTradeController.permission_change": - x.PermissionChange = (AuthzPermissionChange)(value.Enum()) - case "stride.stakeibc.MsgToggleTradeController.address": - x.Address = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeController")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeController does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgToggleTradeController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgToggleTradeController.creator": - panic(fmt.Errorf("field creator of message stride.stakeibc.MsgToggleTradeController is not mutable")) - case "stride.stakeibc.MsgToggleTradeController.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.MsgToggleTradeController is not mutable")) - case "stride.stakeibc.MsgToggleTradeController.permission_change": - panic(fmt.Errorf("field permission_change of message stride.stakeibc.MsgToggleTradeController is not mutable")) - case "stride.stakeibc.MsgToggleTradeController.address": - panic(fmt.Errorf("field address of message stride.stakeibc.MsgToggleTradeController is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeController")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeController does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgToggleTradeController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgToggleTradeController.creator": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgToggleTradeController.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgToggleTradeController.permission_change": - return protoreflect.ValueOfEnum(0) - case "stride.stakeibc.MsgToggleTradeController.address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeController")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeController does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgToggleTradeController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgToggleTradeController", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgToggleTradeController) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgToggleTradeController) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgToggleTradeController) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgToggleTradeController) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgToggleTradeController) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Creator) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.PermissionChange != 0 { - n += 1 + runtime.Sov(uint64(x.PermissionChange)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgToggleTradeController) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x22 - } - if x.PermissionChange != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.PermissionChange)) - i-- - dAtA[i] = 0x18 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Creator) > 0 { - i -= len(x.Creator) - copy(dAtA[i:], x.Creator) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Creator))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgToggleTradeController) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgToggleTradeController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgToggleTradeController: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PermissionChange", wireType) - } - x.PermissionChange = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.PermissionChange |= AuthzPermissionChange(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgToggleTradeControllerResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgToggleTradeControllerResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgToggleTradeControllerResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgToggleTradeControllerResponse)(nil) - -type fastReflection_MsgToggleTradeControllerResponse MsgToggleTradeControllerResponse - -func (x *MsgToggleTradeControllerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgToggleTradeControllerResponse)(x) -} - -func (x *MsgToggleTradeControllerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgToggleTradeControllerResponse_messageType fastReflection_MsgToggleTradeControllerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgToggleTradeControllerResponse_messageType{} - -type fastReflection_MsgToggleTradeControllerResponse_messageType struct{} - -func (x fastReflection_MsgToggleTradeControllerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgToggleTradeControllerResponse)(nil) -} -func (x fastReflection_MsgToggleTradeControllerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgToggleTradeControllerResponse) -} -func (x fastReflection_MsgToggleTradeControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgToggleTradeControllerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgToggleTradeControllerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgToggleTradeControllerResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgToggleTradeControllerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgToggleTradeControllerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgToggleTradeControllerResponse) New() protoreflect.Message { - return new(fastReflection_MsgToggleTradeControllerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgToggleTradeControllerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgToggleTradeControllerResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgToggleTradeControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgToggleTradeControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeControllerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgToggleTradeControllerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeControllerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgToggleTradeControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeControllerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeControllerResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgToggleTradeControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeControllerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgToggleTradeControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeControllerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgToggleTradeControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgToggleTradeControllerResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgToggleTradeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgToggleTradeControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgToggleTradeControllerResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgToggleTradeControllerResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgToggleTradeControllerResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgToggleTradeControllerResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgToggleTradeControllerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgToggleTradeControllerResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgToggleTradeControllerResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgToggleTradeControllerResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgToggleTradeControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgToggleTradeControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateHostZoneParams protoreflect.MessageDescriptor - fd_MsgUpdateHostZoneParams_authority protoreflect.FieldDescriptor - fd_MsgUpdateHostZoneParams_chain_id protoreflect.FieldDescriptor - fd_MsgUpdateHostZoneParams_max_messages_per_ica_tx protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateHostZoneParams = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateHostZoneParams") - fd_MsgUpdateHostZoneParams_authority = md_MsgUpdateHostZoneParams.Fields().ByName("authority") - fd_MsgUpdateHostZoneParams_chain_id = md_MsgUpdateHostZoneParams.Fields().ByName("chain_id") - fd_MsgUpdateHostZoneParams_max_messages_per_ica_tx = md_MsgUpdateHostZoneParams.Fields().ByName("max_messages_per_ica_tx") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateHostZoneParams)(nil) - -type fastReflection_MsgUpdateHostZoneParams MsgUpdateHostZoneParams - -func (x *MsgUpdateHostZoneParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateHostZoneParams)(x) -} - -func (x *MsgUpdateHostZoneParams) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateHostZoneParams_messageType fastReflection_MsgUpdateHostZoneParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateHostZoneParams_messageType{} - -type fastReflection_MsgUpdateHostZoneParams_messageType struct{} - -func (x fastReflection_MsgUpdateHostZoneParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateHostZoneParams)(nil) -} -func (x fastReflection_MsgUpdateHostZoneParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateHostZoneParams) -} -func (x fastReflection_MsgUpdateHostZoneParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateHostZoneParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateHostZoneParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateHostZoneParams -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateHostZoneParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateHostZoneParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateHostZoneParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateHostZoneParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateHostZoneParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateHostZoneParams)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateHostZoneParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateHostZoneParams_authority, value) { - return - } - } - if x.ChainId != "" { - value := protoreflect.ValueOfString(x.ChainId) - if !f(fd_MsgUpdateHostZoneParams_chain_id, value) { - return - } - } - if x.MaxMessagesPerIcaTx != uint64(0) { - value := protoreflect.ValueOfUint64(x.MaxMessagesPerIcaTx) - if !f(fd_MsgUpdateHostZoneParams_max_messages_per_ica_tx, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateHostZoneParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateHostZoneParams.authority": - return x.Authority != "" - case "stride.stakeibc.MsgUpdateHostZoneParams.chain_id": - return x.ChainId != "" - case "stride.stakeibc.MsgUpdateHostZoneParams.max_messages_per_ica_tx": - return x.MaxMessagesPerIcaTx != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParams does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateHostZoneParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateHostZoneParams.authority": - x.Authority = "" - case "stride.stakeibc.MsgUpdateHostZoneParams.chain_id": - x.ChainId = "" - case "stride.stakeibc.MsgUpdateHostZoneParams.max_messages_per_ica_tx": - x.MaxMessagesPerIcaTx = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParams does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateHostZoneParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgUpdateHostZoneParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateHostZoneParams.chain_id": - value := x.ChainId - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateHostZoneParams.max_messages_per_ica_tx": - value := x.MaxMessagesPerIcaTx - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParams does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateHostZoneParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateHostZoneParams.authority": - x.Authority = value.Interface().(string) - case "stride.stakeibc.MsgUpdateHostZoneParams.chain_id": - x.ChainId = value.Interface().(string) - case "stride.stakeibc.MsgUpdateHostZoneParams.max_messages_per_ica_tx": - x.MaxMessagesPerIcaTx = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParams does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateHostZoneParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateHostZoneParams.authority": - panic(fmt.Errorf("field authority of message stride.stakeibc.MsgUpdateHostZoneParams is not mutable")) - case "stride.stakeibc.MsgUpdateHostZoneParams.chain_id": - panic(fmt.Errorf("field chain_id of message stride.stakeibc.MsgUpdateHostZoneParams is not mutable")) - case "stride.stakeibc.MsgUpdateHostZoneParams.max_messages_per_ica_tx": - panic(fmt.Errorf("field max_messages_per_ica_tx of message stride.stakeibc.MsgUpdateHostZoneParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParams does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateHostZoneParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateHostZoneParams.authority": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateHostZoneParams.chain_id": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateHostZoneParams.max_messages_per_ica_tx": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParams does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateHostZoneParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateHostZoneParams", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateHostZoneParams) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateHostZoneParams) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateHostZoneParams) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateHostZoneParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateHostZoneParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxMessagesPerIcaTx != 0 { - n += 1 + runtime.Sov(uint64(x.MaxMessagesPerIcaTx)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateHostZoneParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.MaxMessagesPerIcaTx != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxMessagesPerIcaTx)) - i-- - dAtA[i] = 0x18 - } - if len(x.ChainId) > 0 { - i -= len(x.ChainId) - copy(dAtA[i:], x.ChainId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateHostZoneParams) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateHostZoneParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateHostZoneParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxMessagesPerIcaTx", wireType) - } - x.MaxMessagesPerIcaTx = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.MaxMessagesPerIcaTx |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateHostZoneParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateHostZoneParamsResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateHostZoneParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateHostZoneParamsResponse)(nil) - -type fastReflection_MsgUpdateHostZoneParamsResponse MsgUpdateHostZoneParamsResponse - -func (x *MsgUpdateHostZoneParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateHostZoneParamsResponse)(x) -} - -func (x *MsgUpdateHostZoneParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateHostZoneParamsResponse_messageType fastReflection_MsgUpdateHostZoneParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateHostZoneParamsResponse_messageType{} - -type fastReflection_MsgUpdateHostZoneParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateHostZoneParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateHostZoneParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateHostZoneParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateHostZoneParamsResponse) -} -func (x fastReflection_MsgUpdateHostZoneParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateHostZoneParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateHostZoneParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateHostZoneParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateHostZoneParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateHostZoneParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateHostZoneParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateHostZoneParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateHostZoneParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateHostZoneParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateHostZoneParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateHostZoneParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateHostZoneParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateHostZoneParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateHostZoneParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateParams protoreflect.MessageDescriptor - fd_MsgUpdateParams_authority protoreflect.FieldDescriptor - fd_MsgUpdateParams_params protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateParams = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateParams") - fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") - fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) - -type fastReflection_MsgUpdateParams MsgUpdateParams - -func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(x) -} - -func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} - -type fastReflection_MsgUpdateParams_messageType struct{} - -func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(nil) -} -func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} -func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParams)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateParams_authority, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgUpdateParams_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateParams.authority": - return x.Authority != "" - case "stride.stakeibc.MsgUpdateParams.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateParams.authority": - x.Authority = "" - case "stride.stakeibc.MsgUpdateParams.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.MsgUpdateParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "stride.stakeibc.MsgUpdateParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParams does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateParams.authority": - x.Authority = value.Interface().(string) - case "stride.stakeibc.MsgUpdateParams.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateParams.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "stride.stakeibc.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message stride.stakeibc.MsgUpdateParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.MsgUpdateParams.authority": - return protoreflect.ValueOfString("") - case "stride.stakeibc.MsgUpdateParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParams")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateParams", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParams) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_stride_stakeibc_tx_proto_init() - md_MsgUpdateParamsResponse = File_stride_stakeibc_tx_proto.Messages().ByName("MsgUpdateParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) - -type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse - -func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(x) -} - -func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_tx_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} - -type fastReflection_MsgUpdateParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message stride.stakeibc.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.MsgUpdateParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AuthzPermissionChange int32 - -const ( - // Grant the address trade permissions - AuthzPermissionChange_GRANT AuthzPermissionChange = 0 - // Revoke trade permissions from the address - AuthzPermissionChange_REVOKE AuthzPermissionChange = 1 -) - -// Enum value maps for AuthzPermissionChange. -var ( - AuthzPermissionChange_name = map[int32]string{ - 0: "GRANT", - 1: "REVOKE", - } - AuthzPermissionChange_value = map[string]int32{ - "GRANT": 0, - "REVOKE": 1, - } -) - -func (x AuthzPermissionChange) Enum() *AuthzPermissionChange { - p := new(AuthzPermissionChange) - *p = x - return p -} - -func (x AuthzPermissionChange) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AuthzPermissionChange) Descriptor() protoreflect.EnumDescriptor { - return file_stride_stakeibc_tx_proto_enumTypes[0].Descriptor() -} - -func (AuthzPermissionChange) Type() protoreflect.EnumType { - return &file_stride_stakeibc_tx_proto_enumTypes[0] -} - -func (x AuthzPermissionChange) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AuthzPermissionChange.Descriptor instead. -func (AuthzPermissionChange) EnumDescriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{0} -} - -type MsgUpdateInnerRedemptionRateBounds struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - MinInnerRedemptionRate string `protobuf:"bytes,3,opt,name=min_inner_redemption_rate,json=minInnerRedemptionRate,proto3" json:"min_inner_redemption_rate,omitempty"` - MaxInnerRedemptionRate string `protobuf:"bytes,4,opt,name=max_inner_redemption_rate,json=maxInnerRedemptionRate,proto3" json:"max_inner_redemption_rate,omitempty"` -} - -func (x *MsgUpdateInnerRedemptionRateBounds) Reset() { - *x = MsgUpdateInnerRedemptionRateBounds{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateInnerRedemptionRateBounds) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateInnerRedemptionRateBounds) ProtoMessage() {} - -// Deprecated: Use MsgUpdateInnerRedemptionRateBounds.ProtoReflect.Descriptor instead. -func (*MsgUpdateInnerRedemptionRateBounds) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgUpdateInnerRedemptionRateBounds) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgUpdateInnerRedemptionRateBounds) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *MsgUpdateInnerRedemptionRateBounds) GetMinInnerRedemptionRate() string { - if x != nil { - return x.MinInnerRedemptionRate - } - return "" -} - -func (x *MsgUpdateInnerRedemptionRateBounds) GetMaxInnerRedemptionRate() string { - if x != nil { - return x.MaxInnerRedemptionRate - } - return "" -} - -type MsgUpdateInnerRedemptionRateBoundsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateInnerRedemptionRateBoundsResponse) Reset() { - *x = MsgUpdateInnerRedemptionRateBoundsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateInnerRedemptionRateBoundsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateInnerRedemptionRateBoundsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateInnerRedemptionRateBoundsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateInnerRedemptionRateBoundsResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{1} -} - -type MsgLiquidStake struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` - HostDenom string `protobuf:"bytes,3,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` -} - -func (x *MsgLiquidStake) Reset() { - *x = MsgLiquidStake{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgLiquidStake) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgLiquidStake) ProtoMessage() {} - -// Deprecated: Use MsgLiquidStake.ProtoReflect.Descriptor instead. -func (*MsgLiquidStake) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgLiquidStake) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgLiquidStake) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -func (x *MsgLiquidStake) GetHostDenom() string { - if x != nil { - return x.HostDenom - } - return "" -} - -type MsgLiquidStakeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - StToken *v1beta1.Coin `protobuf:"bytes,1,opt,name=st_token,json=stToken,proto3" json:"st_token,omitempty"` -} - -func (x *MsgLiquidStakeResponse) Reset() { - *x = MsgLiquidStakeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgLiquidStakeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgLiquidStakeResponse) ProtoMessage() {} - -// Deprecated: Use MsgLiquidStakeResponse.ProtoReflect.Descriptor instead. -func (*MsgLiquidStakeResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgLiquidStakeResponse) GetStToken() *v1beta1.Coin { - if x != nil { - return x.StToken - } - return nil -} - -type MsgLSMLiquidStake struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` - LsmTokenIbcDenom string `protobuf:"bytes,3,opt,name=lsm_token_ibc_denom,json=lsmTokenIbcDenom,proto3" json:"lsm_token_ibc_denom,omitempty"` -} - -func (x *MsgLSMLiquidStake) Reset() { - *x = MsgLSMLiquidStake{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgLSMLiquidStake) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgLSMLiquidStake) ProtoMessage() {} - -// Deprecated: Use MsgLSMLiquidStake.ProtoReflect.Descriptor instead. -func (*MsgLSMLiquidStake) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgLSMLiquidStake) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgLSMLiquidStake) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -func (x *MsgLSMLiquidStake) GetLsmTokenIbcDenom() string { - if x != nil { - return x.LsmTokenIbcDenom - } - return "" -} - -type MsgLSMLiquidStakeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TransactionComplete bool `protobuf:"varint,1,opt,name=transaction_complete,json=transactionComplete,proto3" json:"transaction_complete,omitempty"` -} - -func (x *MsgLSMLiquidStakeResponse) Reset() { - *x = MsgLSMLiquidStakeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgLSMLiquidStakeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgLSMLiquidStakeResponse) ProtoMessage() {} - -// Deprecated: Use MsgLSMLiquidStakeResponse.ProtoReflect.Descriptor instead. -func (*MsgLSMLiquidStakeResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{5} -} - -func (x *MsgLSMLiquidStakeResponse) GetTransactionComplete() bool { - if x != nil { - return x.TransactionComplete - } - return false -} - -type MsgClearBalance struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` - Channel string `protobuf:"bytes,4,opt,name=channel,proto3" json:"channel,omitempty"` -} - -func (x *MsgClearBalance) Reset() { - *x = MsgClearBalance{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgClearBalance) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgClearBalance) ProtoMessage() {} - -// Deprecated: Use MsgClearBalance.ProtoReflect.Descriptor instead. -func (*MsgClearBalance) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgClearBalance) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgClearBalance) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *MsgClearBalance) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -func (x *MsgClearBalance) GetChannel() string { - if x != nil { - return x.Channel - } - return "" -} - -type MsgClearBalanceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgClearBalanceResponse) Reset() { - *x = MsgClearBalanceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgClearBalanceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgClearBalanceResponse) ProtoMessage() {} - -// Deprecated: Use MsgClearBalanceResponse.ProtoReflect.Descriptor instead. -func (*MsgClearBalanceResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{7} -} - -type MsgRedeemStake struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` - HostZone string `protobuf:"bytes,3,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` -} - -func (x *MsgRedeemStake) Reset() { - *x = MsgRedeemStake{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRedeemStake) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRedeemStake) ProtoMessage() {} - -// Deprecated: Use MsgRedeemStake.ProtoReflect.Descriptor instead. -func (*MsgRedeemStake) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *MsgRedeemStake) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgRedeemStake) GetAmount() string { - if x != nil { - return x.Amount - } - return "" -} - -func (x *MsgRedeemStake) GetHostZone() string { - if x != nil { - return x.HostZone - } - return "" -} - -func (x *MsgRedeemStake) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -type MsgRedeemStakeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgRedeemStakeResponse) Reset() { - *x = MsgRedeemStakeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRedeemStakeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRedeemStakeResponse) ProtoMessage() {} - -// Deprecated: Use MsgRedeemStakeResponse.ProtoReflect.Descriptor instead. -func (*MsgRedeemStakeResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{9} -} - -// next: 15 -type MsgRegisterHostZone struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - Bech32Prefix string `protobuf:"bytes,12,opt,name=bech32prefix,proto3" json:"bech32prefix,omitempty"` - HostDenom string `protobuf:"bytes,4,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` - IbcDenom string `protobuf:"bytes,5,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty"` - Creator string `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"` - TransferChannelId string `protobuf:"bytes,10,opt,name=transfer_channel_id,json=transferChannelId,proto3" json:"transfer_channel_id,omitempty"` - UnbondingPeriod uint64 `protobuf:"varint,11,opt,name=unbonding_period,json=unbondingPeriod,proto3" json:"unbonding_period,omitempty"` - MinRedemptionRate string `protobuf:"bytes,13,opt,name=min_redemption_rate,json=minRedemptionRate,proto3" json:"min_redemption_rate,omitempty"` - MaxRedemptionRate string `protobuf:"bytes,14,opt,name=max_redemption_rate,json=maxRedemptionRate,proto3" json:"max_redemption_rate,omitempty"` - LsmLiquidStakeEnabled bool `protobuf:"varint,15,opt,name=lsm_liquid_stake_enabled,json=lsmLiquidStakeEnabled,proto3" json:"lsm_liquid_stake_enabled,omitempty"` - CommunityPoolTreasuryAddress string `protobuf:"bytes,16,opt,name=community_pool_treasury_address,json=communityPoolTreasuryAddress,proto3" json:"community_pool_treasury_address,omitempty"` - MaxMessagesPerIcaTx uint64 `protobuf:"varint,17,opt,name=max_messages_per_ica_tx,json=maxMessagesPerIcaTx,proto3" json:"max_messages_per_ica_tx,omitempty"` -} - -func (x *MsgRegisterHostZone) Reset() { - *x = MsgRegisterHostZone{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterHostZone) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterHostZone) ProtoMessage() {} - -// Deprecated: Use MsgRegisterHostZone.ProtoReflect.Descriptor instead. -func (*MsgRegisterHostZone) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{10} -} - -func (x *MsgRegisterHostZone) GetConnectionId() string { - if x != nil { - return x.ConnectionId - } - return "" -} - -func (x *MsgRegisterHostZone) GetBech32Prefix() string { - if x != nil { - return x.Bech32Prefix - } - return "" -} - -func (x *MsgRegisterHostZone) GetHostDenom() string { - if x != nil { - return x.HostDenom - } - return "" -} - -func (x *MsgRegisterHostZone) GetIbcDenom() string { - if x != nil { - return x.IbcDenom - } - return "" -} - -func (x *MsgRegisterHostZone) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgRegisterHostZone) GetTransferChannelId() string { - if x != nil { - return x.TransferChannelId - } - return "" -} - -func (x *MsgRegisterHostZone) GetUnbondingPeriod() uint64 { - if x != nil { - return x.UnbondingPeriod - } - return 0 -} - -func (x *MsgRegisterHostZone) GetMinRedemptionRate() string { - if x != nil { - return x.MinRedemptionRate - } - return "" -} - -func (x *MsgRegisterHostZone) GetMaxRedemptionRate() string { - if x != nil { - return x.MaxRedemptionRate - } - return "" -} - -func (x *MsgRegisterHostZone) GetLsmLiquidStakeEnabled() bool { - if x != nil { - return x.LsmLiquidStakeEnabled - } - return false -} - -func (x *MsgRegisterHostZone) GetCommunityPoolTreasuryAddress() string { - if x != nil { - return x.CommunityPoolTreasuryAddress - } - return "" -} - -func (x *MsgRegisterHostZone) GetMaxMessagesPerIcaTx() uint64 { - if x != nil { - return x.MaxMessagesPerIcaTx - } - return 0 -} - -type MsgRegisterHostZoneResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgRegisterHostZoneResponse) Reset() { - *x = MsgRegisterHostZoneResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterHostZoneResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterHostZoneResponse) ProtoMessage() {} - -// Deprecated: Use MsgRegisterHostZoneResponse.ProtoReflect.Descriptor instead. -func (*MsgRegisterHostZoneResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{11} -} - -type MsgClaimUndelegatedTokens struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - // UserUnbondingRecords are keyed on {chain_id}.{epoch}.{receiver} - HostZoneId string `protobuf:"bytes,2,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"` - Receiver string `protobuf:"bytes,5,opt,name=receiver,proto3" json:"receiver,omitempty"` -} - -func (x *MsgClaimUndelegatedTokens) Reset() { - *x = MsgClaimUndelegatedTokens{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgClaimUndelegatedTokens) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgClaimUndelegatedTokens) ProtoMessage() {} - -// Deprecated: Use MsgClaimUndelegatedTokens.ProtoReflect.Descriptor instead. -func (*MsgClaimUndelegatedTokens) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{12} -} - -func (x *MsgClaimUndelegatedTokens) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgClaimUndelegatedTokens) GetHostZoneId() string { - if x != nil { - return x.HostZoneId - } - return "" -} - -func (x *MsgClaimUndelegatedTokens) GetEpoch() uint64 { - if x != nil { - return x.Epoch - } - return 0 -} - -func (x *MsgClaimUndelegatedTokens) GetReceiver() string { - if x != nil { - return x.Receiver - } - return "" -} - -type MsgClaimUndelegatedTokensResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgClaimUndelegatedTokensResponse) Reset() { - *x = MsgClaimUndelegatedTokensResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgClaimUndelegatedTokensResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgClaimUndelegatedTokensResponse) ProtoMessage() {} - -// Deprecated: Use MsgClaimUndelegatedTokensResponse.ProtoReflect.Descriptor instead. -func (*MsgClaimUndelegatedTokensResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{13} -} - -type MsgRebalanceValidators struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - HostZone string `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - NumRebalance uint64 `protobuf:"varint,3,opt,name=num_rebalance,json=numRebalance,proto3" json:"num_rebalance,omitempty"` -} - -func (x *MsgRebalanceValidators) Reset() { - *x = MsgRebalanceValidators{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRebalanceValidators) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRebalanceValidators) ProtoMessage() {} - -// Deprecated: Use MsgRebalanceValidators.ProtoReflect.Descriptor instead. -func (*MsgRebalanceValidators) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{14} -} - -func (x *MsgRebalanceValidators) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgRebalanceValidators) GetHostZone() string { - if x != nil { - return x.HostZone - } - return "" -} - -func (x *MsgRebalanceValidators) GetNumRebalance() uint64 { - if x != nil { - return x.NumRebalance - } - return 0 -} - -type MsgRebalanceValidatorsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgRebalanceValidatorsResponse) Reset() { - *x = MsgRebalanceValidatorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRebalanceValidatorsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRebalanceValidatorsResponse) ProtoMessage() {} - -// Deprecated: Use MsgRebalanceValidatorsResponse.ProtoReflect.Descriptor instead. -func (*MsgRebalanceValidatorsResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{15} -} - -type MsgAddValidators struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - HostZone string `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - Validators []*Validator `protobuf:"bytes,3,rep,name=validators,proto3" json:"validators,omitempty"` -} - -func (x *MsgAddValidators) Reset() { - *x = MsgAddValidators{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAddValidators) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAddValidators) ProtoMessage() {} - -// Deprecated: Use MsgAddValidators.ProtoReflect.Descriptor instead. -func (*MsgAddValidators) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{16} -} - -func (x *MsgAddValidators) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgAddValidators) GetHostZone() string { - if x != nil { - return x.HostZone - } - return "" -} - -func (x *MsgAddValidators) GetValidators() []*Validator { - if x != nil { - return x.Validators - } - return nil -} - -type MsgAddValidatorsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgAddValidatorsResponse) Reset() { - *x = MsgAddValidatorsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgAddValidatorsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgAddValidatorsResponse) ProtoMessage() {} - -// Deprecated: Use MsgAddValidatorsResponse.ProtoReflect.Descriptor instead. -func (*MsgAddValidatorsResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{17} -} - -type ValidatorWeight struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Weight uint64 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` -} - -func (x *ValidatorWeight) Reset() { - *x = ValidatorWeight{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatorWeight) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatorWeight) ProtoMessage() {} - -// Deprecated: Use ValidatorWeight.ProtoReflect.Descriptor instead. -func (*ValidatorWeight) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{18} -} - -func (x *ValidatorWeight) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *ValidatorWeight) GetWeight() uint64 { - if x != nil { - return x.Weight - } - return 0 -} - -type MsgChangeValidatorWeights struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - HostZone string `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - ValidatorWeights []*ValidatorWeight `protobuf:"bytes,3,rep,name=validator_weights,json=validatorWeights,proto3" json:"validator_weights,omitempty"` -} - -func (x *MsgChangeValidatorWeights) Reset() { - *x = MsgChangeValidatorWeights{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgChangeValidatorWeights) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgChangeValidatorWeights) ProtoMessage() {} - -// Deprecated: Use MsgChangeValidatorWeights.ProtoReflect.Descriptor instead. -func (*MsgChangeValidatorWeights) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{19} -} - -func (x *MsgChangeValidatorWeights) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgChangeValidatorWeights) GetHostZone() string { - if x != nil { - return x.HostZone - } - return "" -} - -func (x *MsgChangeValidatorWeights) GetValidatorWeights() []*ValidatorWeight { - if x != nil { - return x.ValidatorWeights - } - return nil -} - -type MsgChangeValidatorWeightsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgChangeValidatorWeightsResponse) Reset() { - *x = MsgChangeValidatorWeightsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgChangeValidatorWeightsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgChangeValidatorWeightsResponse) ProtoMessage() {} - -// Deprecated: Use MsgChangeValidatorWeightsResponse.ProtoReflect.Descriptor instead. -func (*MsgChangeValidatorWeightsResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{20} -} - -type MsgDeleteValidator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - HostZone string `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - ValAddr string `protobuf:"bytes,3,opt,name=val_addr,json=valAddr,proto3" json:"val_addr,omitempty"` -} - -func (x *MsgDeleteValidator) Reset() { - *x = MsgDeleteValidator{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDeleteValidator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDeleteValidator) ProtoMessage() {} - -// Deprecated: Use MsgDeleteValidator.ProtoReflect.Descriptor instead. -func (*MsgDeleteValidator) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{21} -} - -func (x *MsgDeleteValidator) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgDeleteValidator) GetHostZone() string { - if x != nil { - return x.HostZone - } - return "" -} - -func (x *MsgDeleteValidator) GetValAddr() string { - if x != nil { - return x.ValAddr - } - return "" -} - -type MsgDeleteValidatorResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgDeleteValidatorResponse) Reset() { - *x = MsgDeleteValidatorResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDeleteValidatorResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDeleteValidatorResponse) ProtoMessage() {} - -// Deprecated: Use MsgDeleteValidatorResponse.ProtoReflect.Descriptor instead. -func (*MsgDeleteValidatorResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{22} -} - -type MsgRestoreInterchainAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ConnectionId string `protobuf:"bytes,3,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - AccountOwner string `protobuf:"bytes,4,opt,name=account_owner,json=accountOwner,proto3" json:"account_owner,omitempty"` -} - -func (x *MsgRestoreInterchainAccount) Reset() { - *x = MsgRestoreInterchainAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRestoreInterchainAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRestoreInterchainAccount) ProtoMessage() {} - -// Deprecated: Use MsgRestoreInterchainAccount.ProtoReflect.Descriptor instead. -func (*MsgRestoreInterchainAccount) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{23} -} - -func (x *MsgRestoreInterchainAccount) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgRestoreInterchainAccount) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *MsgRestoreInterchainAccount) GetConnectionId() string { - if x != nil { - return x.ConnectionId - } - return "" -} - -func (x *MsgRestoreInterchainAccount) GetAccountOwner() string { - if x != nil { - return x.AccountOwner - } - return "" -} - -type MsgRestoreInterchainAccountResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgRestoreInterchainAccountResponse) Reset() { - *x = MsgRestoreInterchainAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRestoreInterchainAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRestoreInterchainAccountResponse) ProtoMessage() {} - -// Deprecated: Use MsgRestoreInterchainAccountResponse.ProtoReflect.Descriptor instead. -func (*MsgRestoreInterchainAccountResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{24} -} - -type MsgUpdateValidatorSharesExchRate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Valoper string `protobuf:"bytes,3,opt,name=valoper,proto3" json:"valoper,omitempty"` -} - -func (x *MsgUpdateValidatorSharesExchRate) Reset() { - *x = MsgUpdateValidatorSharesExchRate{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateValidatorSharesExchRate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateValidatorSharesExchRate) ProtoMessage() {} - -// Deprecated: Use MsgUpdateValidatorSharesExchRate.ProtoReflect.Descriptor instead. -func (*MsgUpdateValidatorSharesExchRate) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{25} -} - -func (x *MsgUpdateValidatorSharesExchRate) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgUpdateValidatorSharesExchRate) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *MsgUpdateValidatorSharesExchRate) GetValoper() string { - if x != nil { - return x.Valoper - } - return "" -} - -type MsgUpdateValidatorSharesExchRateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateValidatorSharesExchRateResponse) Reset() { - *x = MsgUpdateValidatorSharesExchRateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateValidatorSharesExchRateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateValidatorSharesExchRateResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateValidatorSharesExchRateResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateValidatorSharesExchRateResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{26} -} - -type MsgCalibrateDelegation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Valoper string `protobuf:"bytes,3,opt,name=valoper,proto3" json:"valoper,omitempty"` -} - -func (x *MsgCalibrateDelegation) Reset() { - *x = MsgCalibrateDelegation{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCalibrateDelegation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCalibrateDelegation) ProtoMessage() {} - -// Deprecated: Use MsgCalibrateDelegation.ProtoReflect.Descriptor instead. -func (*MsgCalibrateDelegation) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{27} -} - -func (x *MsgCalibrateDelegation) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgCalibrateDelegation) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *MsgCalibrateDelegation) GetValoper() string { - if x != nil { - return x.Valoper - } - return "" -} - -type MsgCalibrateDelegationResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgCalibrateDelegationResponse) Reset() { - *x = MsgCalibrateDelegationResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCalibrateDelegationResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCalibrateDelegationResponse) ProtoMessage() {} - -// Deprecated: Use MsgCalibrateDelegationResponse.ProtoReflect.Descriptor instead. -func (*MsgCalibrateDelegationResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{28} -} - -type MsgResumeHostZone struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (x *MsgResumeHostZone) Reset() { - *x = MsgResumeHostZone{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgResumeHostZone) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgResumeHostZone) ProtoMessage() {} - -// Deprecated: Use MsgResumeHostZone.ProtoReflect.Descriptor instead. -func (*MsgResumeHostZone) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{29} -} - -func (x *MsgResumeHostZone) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgResumeHostZone) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -type MsgResumeHostZoneResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgResumeHostZoneResponse) Reset() { - *x = MsgResumeHostZoneResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgResumeHostZoneResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgResumeHostZoneResponse) ProtoMessage() {} - -// Deprecated: Use MsgResumeHostZoneResponse.ProtoReflect.Descriptor instead. -func (*MsgResumeHostZoneResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{30} -} - -// Creates a new trade route -type MsgCreateTradeRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // The chain ID of the host zone - HostChainId string `protobuf:"bytes,2,opt,name=host_chain_id,json=hostChainId,proto3" json:"host_chain_id,omitempty"` - // Connection IDs between stride and the other zones - StrideToRewardConnectionId string `protobuf:"bytes,3,opt,name=stride_to_reward_connection_id,json=strideToRewardConnectionId,proto3" json:"stride_to_reward_connection_id,omitempty"` - StrideToTradeConnectionId string `protobuf:"bytes,4,opt,name=stride_to_trade_connection_id,json=strideToTradeConnectionId,proto3" json:"stride_to_trade_connection_id,omitempty"` - // Transfer channels between the host, reward, and trade zones - HostToRewardTransferChannelId string `protobuf:"bytes,5,opt,name=host_to_reward_transfer_channel_id,json=hostToRewardTransferChannelId,proto3" json:"host_to_reward_transfer_channel_id,omitempty"` - RewardToTradeTransferChannelId string `protobuf:"bytes,6,opt,name=reward_to_trade_transfer_channel_id,json=rewardToTradeTransferChannelId,proto3" json:"reward_to_trade_transfer_channel_id,omitempty"` - TradeToHostTransferChannelId string `protobuf:"bytes,7,opt,name=trade_to_host_transfer_channel_id,json=tradeToHostTransferChannelId,proto3" json:"trade_to_host_transfer_channel_id,omitempty"` - // ibc denom for the reward token on the host zone (e.g. ibc/usdc on dYdX) - RewardDenomOnHost string `protobuf:"bytes,8,opt,name=reward_denom_on_host,json=rewardDenomOnHost,proto3" json:"reward_denom_on_host,omitempty"` - // native denom of reward token on the reward zone (e.g. usdc on Noble) - RewardDenomOnReward string `protobuf:"bytes,9,opt,name=reward_denom_on_reward,json=rewardDenomOnReward,proto3" json:"reward_denom_on_reward,omitempty"` - // ibc denom of the reward token on the trade zone (e.g. ibc/usdc on Osmosis) - RewardDenomOnTrade string `protobuf:"bytes,10,opt,name=reward_denom_on_trade,json=rewardDenomOnTrade,proto3" json:"reward_denom_on_trade,omitempty"` - // ibc denom of the host's token on the trade zone (e.g. ibc/dydx on Osmosis) - HostDenomOnTrade string `protobuf:"bytes,11,opt,name=host_denom_on_trade,json=hostDenomOnTrade,proto3" json:"host_denom_on_trade,omitempty"` - // the host zone's native denom (e.g. dydx on dYdX) - HostDenomOnHost string `protobuf:"bytes,12,opt,name=host_denom_on_host,json=hostDenomOnHost,proto3" json:"host_denom_on_host,omitempty"` - // The osmosis pool ID - PoolId uint64 `protobuf:"varint,13,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price on stride - // "0.05" means the output from the trade can be no less than a 5% deviation - // from the current value - MaxAllowedSwapLossRate string `protobuf:"bytes,14,opt,name=max_allowed_swap_loss_rate,json=maxAllowedSwapLossRate,proto3" json:"max_allowed_swap_loss_rate,omitempty"` - // minimum amount of reward tokens to initate a swap - // if not provided, defaults to 0 - MinSwapAmount string `protobuf:"bytes,15,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"` - // maximum amount of reward tokens in a single swap - // if not provided, defaults to 10e24 - MaxSwapAmount string `protobuf:"bytes,16,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"` -} - -func (x *MsgCreateTradeRoute) Reset() { - *x = MsgCreateTradeRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateTradeRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateTradeRoute) ProtoMessage() {} - -// Deprecated: Use MsgCreateTradeRoute.ProtoReflect.Descriptor instead. -func (*MsgCreateTradeRoute) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{31} -} - -func (x *MsgCreateTradeRoute) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgCreateTradeRoute) GetHostChainId() string { - if x != nil { - return x.HostChainId - } - return "" -} - -func (x *MsgCreateTradeRoute) GetStrideToRewardConnectionId() string { - if x != nil { - return x.StrideToRewardConnectionId - } - return "" -} - -func (x *MsgCreateTradeRoute) GetStrideToTradeConnectionId() string { - if x != nil { - return x.StrideToTradeConnectionId - } - return "" -} - -func (x *MsgCreateTradeRoute) GetHostToRewardTransferChannelId() string { - if x != nil { - return x.HostToRewardTransferChannelId - } - return "" -} - -func (x *MsgCreateTradeRoute) GetRewardToTradeTransferChannelId() string { - if x != nil { - return x.RewardToTradeTransferChannelId - } - return "" -} - -func (x *MsgCreateTradeRoute) GetTradeToHostTransferChannelId() string { - if x != nil { - return x.TradeToHostTransferChannelId - } - return "" -} - -func (x *MsgCreateTradeRoute) GetRewardDenomOnHost() string { - if x != nil { - return x.RewardDenomOnHost - } - return "" -} - -func (x *MsgCreateTradeRoute) GetRewardDenomOnReward() string { - if x != nil { - return x.RewardDenomOnReward - } - return "" -} - -func (x *MsgCreateTradeRoute) GetRewardDenomOnTrade() string { - if x != nil { - return x.RewardDenomOnTrade - } - return "" -} - -func (x *MsgCreateTradeRoute) GetHostDenomOnTrade() string { - if x != nil { - return x.HostDenomOnTrade - } - return "" -} - -func (x *MsgCreateTradeRoute) GetHostDenomOnHost() string { - if x != nil { - return x.HostDenomOnHost - } - return "" -} - -func (x *MsgCreateTradeRoute) GetPoolId() uint64 { - if x != nil { - return x.PoolId - } - return 0 -} - -func (x *MsgCreateTradeRoute) GetMaxAllowedSwapLossRate() string { - if x != nil { - return x.MaxAllowedSwapLossRate - } - return "" -} - -func (x *MsgCreateTradeRoute) GetMinSwapAmount() string { - if x != nil { - return x.MinSwapAmount - } - return "" -} - -func (x *MsgCreateTradeRoute) GetMaxSwapAmount() string { - if x != nil { - return x.MaxSwapAmount - } - return "" -} - -type MsgCreateTradeRouteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgCreateTradeRouteResponse) Reset() { - *x = MsgCreateTradeRouteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgCreateTradeRouteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgCreateTradeRouteResponse) ProtoMessage() {} - -// Deprecated: Use MsgCreateTradeRouteResponse.ProtoReflect.Descriptor instead. -func (*MsgCreateTradeRouteResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{32} -} - -// Deletes a trade route -type MsgDeleteTradeRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // The reward denom of the route in it's native form (e.g. usdc) - RewardDenom string `protobuf:"bytes,2,opt,name=reward_denom,json=rewardDenom,proto3" json:"reward_denom,omitempty"` - // The host zone's denom in it's native form (e.g. dydx) - HostDenom string `protobuf:"bytes,3,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` -} - -func (x *MsgDeleteTradeRoute) Reset() { - *x = MsgDeleteTradeRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDeleteTradeRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDeleteTradeRoute) ProtoMessage() {} - -// Deprecated: Use MsgDeleteTradeRoute.ProtoReflect.Descriptor instead. -func (*MsgDeleteTradeRoute) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{33} -} - -func (x *MsgDeleteTradeRoute) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgDeleteTradeRoute) GetRewardDenom() string { - if x != nil { - return x.RewardDenom - } - return "" -} - -func (x *MsgDeleteTradeRoute) GetHostDenom() string { - if x != nil { - return x.HostDenom - } - return "" -} - -type MsgDeleteTradeRouteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgDeleteTradeRouteResponse) Reset() { - *x = MsgDeleteTradeRouteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDeleteTradeRouteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDeleteTradeRouteResponse) ProtoMessage() {} - -// Deprecated: Use MsgDeleteTradeRouteResponse.ProtoReflect.Descriptor instead. -func (*MsgDeleteTradeRouteResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{34} -} - -// Updates the config of a trade route -type MsgUpdateTradeRoute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // The reward denom of the route in it's native form (e.g. usdc) - RewardDenom string `protobuf:"bytes,2,opt,name=reward_denom,json=rewardDenom,proto3" json:"reward_denom,omitempty"` - // The host zone's denom in it's native form (e.g. dydx) - HostDenom string `protobuf:"bytes,3,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` - // The osmosis pool ID - PoolId uint64 `protobuf:"varint,4,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price on stride - // "0.05" means the output from the trade can be no less than a 5% deviation - // from the current value - MaxAllowedSwapLossRate string `protobuf:"bytes,5,opt,name=max_allowed_swap_loss_rate,json=maxAllowedSwapLossRate,proto3" json:"max_allowed_swap_loss_rate,omitempty"` - // minimum amount of reward tokens to initate a swap - // if not provided, defaults to 0 - MinSwapAmount string `protobuf:"bytes,6,opt,name=min_swap_amount,json=minSwapAmount,proto3" json:"min_swap_amount,omitempty"` - // maximum amount of reward tokens in a single swap - // if not provided, defaults to 10e24 - MaxSwapAmount string `protobuf:"bytes,7,opt,name=max_swap_amount,json=maxSwapAmount,proto3" json:"max_swap_amount,omitempty"` -} - -func (x *MsgUpdateTradeRoute) Reset() { - *x = MsgUpdateTradeRoute{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateTradeRoute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateTradeRoute) ProtoMessage() {} - -// Deprecated: Use MsgUpdateTradeRoute.ProtoReflect.Descriptor instead. -func (*MsgUpdateTradeRoute) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{35} -} - -func (x *MsgUpdateTradeRoute) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgUpdateTradeRoute) GetRewardDenom() string { - if x != nil { - return x.RewardDenom - } - return "" -} - -func (x *MsgUpdateTradeRoute) GetHostDenom() string { - if x != nil { - return x.HostDenom - } - return "" -} - -func (x *MsgUpdateTradeRoute) GetPoolId() uint64 { - if x != nil { - return x.PoolId - } - return 0 -} - -func (x *MsgUpdateTradeRoute) GetMaxAllowedSwapLossRate() string { - if x != nil { - return x.MaxAllowedSwapLossRate - } - return "" -} - -func (x *MsgUpdateTradeRoute) GetMinSwapAmount() string { - if x != nil { - return x.MinSwapAmount - } - return "" -} - -func (x *MsgUpdateTradeRoute) GetMaxSwapAmount() string { - if x != nil { - return x.MaxSwapAmount - } - return "" -} - -type MsgUpdateTradeRouteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateTradeRouteResponse) Reset() { - *x = MsgUpdateTradeRouteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateTradeRouteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateTradeRouteResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateTradeRouteResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateTradeRouteResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{36} -} - -// Registers or updates a community pool rebate by specifying the amount liquid -// staked -type MsgSetCommunityPoolRebate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Message signer (admin only) - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - // Chain id of the chain whose community pool has a liquid staking rebate - // arrangement with stride - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Rebate percentage represented as a decimal (e.g. 0.2 for 20%) - RebateRate string `protobuf:"bytes,3,opt,name=rebate_rate,json=rebateRate,proto3" json:"rebate_rate,omitempty"` - // Number of stTokens recieved by the community pool after liquid staking - LiquidStakedStTokenAmount string `protobuf:"bytes,4,opt,name=liquid_staked_st_token_amount,json=liquidStakedStTokenAmount,proto3" json:"liquid_staked_st_token_amount,omitempty"` -} - -func (x *MsgSetCommunityPoolRebate) Reset() { - *x = MsgSetCommunityPoolRebate{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSetCommunityPoolRebate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSetCommunityPoolRebate) ProtoMessage() {} - -// Deprecated: Use MsgSetCommunityPoolRebate.ProtoReflect.Descriptor instead. -func (*MsgSetCommunityPoolRebate) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{37} -} - -func (x *MsgSetCommunityPoolRebate) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgSetCommunityPoolRebate) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *MsgSetCommunityPoolRebate) GetRebateRate() string { - if x != nil { - return x.RebateRate - } - return "" -} - -func (x *MsgSetCommunityPoolRebate) GetLiquidStakedStTokenAmount() string { - if x != nil { - return x.LiquidStakedStTokenAmount - } - return "" -} - -type MsgSetCommunityPoolRebateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgSetCommunityPoolRebateResponse) Reset() { - *x = MsgSetCommunityPoolRebateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSetCommunityPoolRebateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSetCommunityPoolRebateResponse) ProtoMessage() {} - -// Deprecated: Use MsgSetCommunityPoolRebateResponse.ProtoReflect.Descriptor instead. -func (*MsgSetCommunityPoolRebateResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{38} -} - -// Grants or revokes trade permissions to a given address via authz -type MsgToggleTradeController struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Message signer (admin only) - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - // Chain ID of the trade account - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Permission change (either grant or revoke) - PermissionChange AuthzPermissionChange `protobuf:"varint,3,opt,name=permission_change,json=permissionChange,proto3,enum=stride.stakeibc.AuthzPermissionChange" json:"permission_change,omitempty"` - // Address of trade operator - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` -} - -func (x *MsgToggleTradeController) Reset() { - *x = MsgToggleTradeController{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgToggleTradeController) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgToggleTradeController) ProtoMessage() {} - -// Deprecated: Use MsgToggleTradeController.ProtoReflect.Descriptor instead. -func (*MsgToggleTradeController) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{39} -} - -func (x *MsgToggleTradeController) GetCreator() string { - if x != nil { - return x.Creator - } - return "" -} - -func (x *MsgToggleTradeController) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *MsgToggleTradeController) GetPermissionChange() AuthzPermissionChange { - if x != nil { - return x.PermissionChange - } - return AuthzPermissionChange_GRANT -} - -func (x *MsgToggleTradeController) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -type MsgToggleTradeControllerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgToggleTradeControllerResponse) Reset() { - *x = MsgToggleTradeControllerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgToggleTradeControllerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgToggleTradeControllerResponse) ProtoMessage() {} - -// Deprecated: Use MsgToggleTradeControllerResponse.ProtoReflect.Descriptor instead. -func (*MsgToggleTradeControllerResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{40} -} - -// Updates host zone params -type MsgUpdateHostZoneParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Chain ID of the host zone - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Max messages that can be sent in a single ICA message - MaxMessagesPerIcaTx uint64 `protobuf:"varint,3,opt,name=max_messages_per_ica_tx,json=maxMessagesPerIcaTx,proto3" json:"max_messages_per_ica_tx,omitempty"` -} - -func (x *MsgUpdateHostZoneParams) Reset() { - *x = MsgUpdateHostZoneParams{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateHostZoneParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateHostZoneParams) ProtoMessage() {} - -// Deprecated: Use MsgUpdateHostZoneParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateHostZoneParams) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{41} -} - -func (x *MsgUpdateHostZoneParams) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgUpdateHostZoneParams) GetChainId() string { - if x != nil { - return x.ChainId - } - return "" -} - -func (x *MsgUpdateHostZoneParams) GetMaxMessagesPerIcaTx() uint64 { - if x != nil { - return x.MaxMessagesPerIcaTx - } - return 0 -} - -type MsgUpdateHostZoneParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateHostZoneParamsResponse) Reset() { - *x = MsgUpdateHostZoneParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateHostZoneParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateHostZoneParamsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateHostZoneParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateHostZoneParamsResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{42} -} - -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the x/staking parameters to update. - // - // NOTE: All parameters must be supplied. - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParams) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{43} -} - -func (x *MsgUpdateParams) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgUpdateParams) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_tx_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParamsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_tx_proto_rawDescGZIP(), []int{44} -} - -var File_stride_stakeibc_tx_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_tx_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x1a, 0x1f, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, - 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, - 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x02, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x64, 0x12, 0x6c, 0x0a, 0x19, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, - 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, - 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x69, 0x6e, 0x49, 0x6e, - 0x6e, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, - 0x65, 0x12, 0x6c, 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x5f, 0x72, - 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x49, 0x6e, 0x6e, 0x65, - 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x3a, - 0x45, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, - 0x2a, 0x34, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x6e, - 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, - 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x22, 0x2c, 0x0a, 0x2a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x35, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x6f, 0x73, 0x74, - 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, - 0x73, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x3a, 0x31, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x20, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x6f, 0x0a, 0x16, 0x4d, 0x73, - 0x67, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x08, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x42, 0x1f, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x69, - 0x6e, 0x73, 0x52, 0x07, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xc9, 0x01, 0x0a, 0x11, - 0x4d, 0x73, 0x67, 0x4c, 0x53, 0x4d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, - 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, - 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6c, 0x73, 0x6d, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, - 0x69, 0x62, 0x63, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x10, 0x6c, 0x73, 0x6d, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x62, 0x63, 0x44, 0x65, 0x6e, 0x6f, - 0x6d, 0x3a, 0x34, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, - 0xe7, 0xb0, 0x2a, 0x23, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x4c, 0x53, 0x4d, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x22, 0x4e, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x4c, 0x53, - 0x4d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x43, - 0x6c, 0x65, 0x61, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, - 0x12, 0x35, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x3a, 0x32, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, - 0xe7, 0xb0, 0x2a, 0x21, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x42, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, - 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xcd, 0x01, 0x0a, 0x0e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x35, 0x0a, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x3a, 0x31, 0x82, - 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x20, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x53, 0x74, 0x61, 0x6b, 0x65, - 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x53, 0x74, 0x61, - 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcf, 0x06, 0x0a, 0x13, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, - 0x6e, 0x65, 0x12, 0x3d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xf2, 0xde, 0x1f, 0x14, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x22, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x70, - 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x34, 0x0a, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x15, 0xf2, 0xde, 0x1f, 0x11, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x22, - 0x52, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x31, 0x0a, 0x09, 0x69, - 0x62, 0x63, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x14, - 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x69, 0x62, 0x63, 0x5f, 0x64, 0x65, - 0x6e, 0x6f, 0x6d, 0x22, 0x52, 0x08, 0x69, 0x62, 0x63, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x18, - 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4e, 0x0a, 0x13, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x66, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xf2, 0xde, 0x1f, 0x1a, 0x79, 0x61, 0x6d, 0x6c, 0x3a, - 0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x10, 0x75, 0x6e, 0x62, 0x6f, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x04, 0x42, 0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x75, 0x6e, - 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x52, - 0x0f, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x12, 0x61, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, - 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, - 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, - 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x61, 0x74, 0x65, 0x12, 0x61, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x64, 0x65, 0x6d, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, - 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x44, 0x65, 0x63, 0x52, 0x11, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6c, 0x73, 0x6d, 0x5f, 0x6c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x6c, 0x73, 0x6d, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, - 0x45, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x6f, 0x6f, - 0x6c, 0x5f, 0x74, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x54, 0x72, 0x65, 0x61, 0x73, 0x75, 0x72, 0x79, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x63, 0x61, 0x5f, 0x74, - 0x78, 0x18, 0x11, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x73, 0x50, 0x65, 0x72, 0x49, 0x63, 0x61, 0x54, 0x78, 0x3a, 0x3e, 0x88, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x25, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x22, 0x1d, 0x0a, 0x1b, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x5a, - 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcd, 0x01, 0x0a, 0x19, - 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0c, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5a, - 0x6f, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x3a, 0x3c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x2b, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x43, - 0x6c, 0x61, 0x69, 0x6d, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x23, 0x0a, 0x21, 0x4d, - 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xaf, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, - 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, - 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, - 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x62, 0x61, 0x6c, 0x61, - 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6e, 0x75, 0x6d, 0x52, 0x65, - 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x39, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x28, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xba, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, - 0x12, 0x3a, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x3a, 0x33, 0x82, 0xe7, - 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x22, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2f, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x0a, - 0x0f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xdf, 0x01, 0x0a, - 0x19, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, - 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x77, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x10, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, - 0x3a, 0x3c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, - 0xb0, 0x2a, 0x2b, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x22, 0x23, - 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x7a, 0x6f, 0x6e, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, - 0x65, 0x12, 0x33, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x76, - 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x35, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x24, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, - 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, - 0x1a, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xdc, 0x01, 0x0a, 0x1b, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, - 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x3e, 0x82, 0xe7, 0xb0, 0x2a, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x2d, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x25, 0x0a, 0x23, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xb6, 0x01, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x45, 0x78, - 0x63, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x61, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x61, - 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x3a, 0x43, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x32, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, - 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, - 0x65, 0x73, 0x45, 0x78, 0x63, 0x68, 0x52, 0x61, 0x74, 0x65, 0x22, 0x2a, 0x0a, 0x28, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x45, 0x78, 0x63, 0x68, 0x52, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x43, 0x61, - 0x6c, 0x69, 0x62, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x61, 0x6c, 0x6f, 0x70, 0x65, - 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x61, 0x6c, 0x6f, 0x70, 0x65, 0x72, - 0x3a, 0x39, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, - 0xb0, 0x2a, 0x28, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x74, - 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x0a, 0x1e, 0x4d, - 0x73, 0x67, 0x43, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7e, 0x0a, - 0x11, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, - 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x3a, 0x34, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x23, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x73, 0x75, 0x6d, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x22, 0x1b, 0x0a, - 0x19, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, - 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xea, 0x07, 0x0a, 0x13, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x6f, - 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x42, - 0x0a, 0x1e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x54, 0x6f, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x40, 0x0a, 0x1d, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x74, 0x6f, 0x5f, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x19, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x54, 0x6f, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x49, 0x0a, 0x22, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x5f, - 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, - 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x1d, 0x68, 0x6f, 0x73, 0x74, 0x54, 0x6f, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, - 0x4b, 0x0a, 0x23, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x74, 0x72, 0x61, - 0x64, 0x65, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, - 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1e, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x54, 0x6f, 0x54, 0x72, 0x61, 0x64, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x21, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x74, 0x72, 0x61, 0x64, 0x65, 0x54, 0x6f, - 0x48, 0x6f, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, - 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, - 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, - 0x6e, 0x6f, 0x6d, 0x4f, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x31, 0x0a, 0x15, 0x72, - 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x6e, 0x5f, 0x74, - 0x72, 0x61, 0x64, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x72, 0x65, 0x77, 0x61, - 0x72, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x6e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x2d, - 0x0a, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x6e, 0x5f, - 0x74, 0x72, 0x61, 0x64, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x68, 0x6f, 0x73, - 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x6e, 0x54, 0x72, 0x61, 0x64, 0x65, 0x12, 0x2b, 0x0a, - 0x12, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x5f, 0x6f, 0x6e, 0x5f, 0x68, - 0x6f, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x44, - 0x65, 0x6e, 0x6f, 0x6d, 0x4f, 0x6e, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, - 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, - 0x6c, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, - 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x41, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x53, 0x77, 0x61, 0x70, 0x4c, 0x6f, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, - 0x45, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x53, 0x77, 0x61, 0x70, - 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, - 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0d, - 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x38, 0x82, - 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, - 0x2a, 0x25, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, - 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc9, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x36, - 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x6f, 0x73, - 0x74, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, - 0x6f, 0x73, 0x74, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x3a, 0x38, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x25, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xac, 0x03, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x44, - 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x6f, 0x73, 0x74, 0x44, 0x65, - 0x6e, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x70, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x1a, - 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x73, 0x77, 0x61, 0x70, - 0x5f, 0x6c, 0x6f, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x16, 0x6d, 0x61, 0x78, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x53, 0x77, 0x61, 0x70, - 0x4c, 0x6f, 0x73, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, - 0x73, 0x77, 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, - 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x45, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, - 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x38, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x25, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, - 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, - 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xcf, 0x02, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, - 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x12, 0x32, 0x0a, - 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x0b, - 0x72, 0x65, 0x62, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x23, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0x52, 0x0a, 0x72, 0x65, 0x62, 0x61, 0x74, 0x65, 0x52, 0x61, - 0x74, 0x65, 0x12, 0x5f, 0x0a, 0x1d, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, - 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x19, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x64, 0x53, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x41, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x3a, 0x3c, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, - 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x2b, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, - 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x61, 0x74, - 0x65, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, - 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x95, 0x02, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x54, 0x6f, - 0x67, 0x67, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x49, 0x64, 0x12, 0x53, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, - 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x10, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x3a, 0x3b, 0x82, 0xe7, 0xb0, 0x2a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x8a, - 0xe7, 0xb0, 0x2a, 0x2a, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, - 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x22, - 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, - 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, - 0x64, 0x12, 0x34, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x69, 0x63, 0x61, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x50, - 0x65, 0x72, 0x49, 0x63, 0x61, 0x54, 0x78, 0x3a, 0x3c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x29, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, - 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x3a, 0x34, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x8a, 0xe7, 0xb0, 0x2a, 0x21, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x78, 0x2f, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2a, 0x2e, 0x0a, 0x15, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x52, - 0x41, 0x4e, 0x54, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x56, 0x4f, 0x4b, 0x45, 0x10, - 0x01, 0x32, 0xfe, 0x12, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x57, 0x0a, 0x0b, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x1f, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x1a, 0x27, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x60, 0x0a, 0x0e, 0x4c, 0x53, 0x4d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x12, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x53, 0x4d, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x1a, 0x2a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x53, - 0x4d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0b, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x12, 0x1f, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x1a, 0x27, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64, 0x65, 0x65, 0x6d, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, - 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, - 0x65, 0x12, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x48, - 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x1a, 0x2c, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x16, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x55, 0x6e, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, - 0x2a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x1a, 0x32, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, - 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x6f, 0x0a, 0x13, 0x52, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x62, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x1a, - 0x2f, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x5d, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x12, 0x21, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x1a, 0x29, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x56, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x77, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x73, 0x1a, 0x32, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x23, 0x2e, 0x73, 0x74, - 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x1a, 0x2b, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7e, 0x0a, - 0x18, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x2e, 0x73, 0x74, 0x72, 0x69, - 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, - 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x34, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, - 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8d, 0x01, - 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x45, 0x78, 0x63, 0x68, 0x52, 0x61, 0x74, 0x65, 0x12, - 0x31, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x45, 0x78, 0x63, 0x68, 0x52, 0x61, - 0x74, 0x65, 0x1a, 0x39, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x53, 0x68, 0x61, 0x72, 0x65, 0x73, 0x45, 0x78, 0x63, - 0x68, 0x52, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6f, 0x0a, - 0x13, 0x43, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x69, 0x62, 0x72, - 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x2f, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, - 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x74, 0x65, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, - 0x0a, 0x0c, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x20, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, - 0x1a, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x42, 0x61, 0x6c, 0x61, 0x6e, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x1f, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x12, 0x33, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x6e, 0x65, 0x72, 0x52, - 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x75, - 0x6e, 0x64, 0x73, 0x1a, 0x3b, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, - 0x6e, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x64, 0x65, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, - 0x74, 0x65, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x60, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, - 0x6e, 0x65, 0x12, 0x22, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x48, 0x6f, - 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x1a, 0x2a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x75, - 0x6d, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x2c, 0x2e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, - 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x24, - 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, - 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x2c, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x66, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, - 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x24, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x2c, 0x2e, 0x73, - 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x78, 0x0a, 0x16, 0x53, 0x65, - 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, - 0x62, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, - 0x1a, 0x32, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, - 0x74, 0x79, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x65, 0x62, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x15, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x72, - 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x29, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, - 0x4d, 0x73, 0x67, 0x54, 0x6f, 0x67, 0x67, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x31, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x6f, - 0x67, 0x67, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x14, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, - 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, - 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x30, 0x2e, - 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x5a, 0x6f, 0x6e, - 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x5a, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x20, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x1a, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, - 0x69, 0x62, 0x63, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, - 0x2a, 0x01, 0x42, 0xb2, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, - 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xa2, 0x02, 0x03, 0x53, - 0x53, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x69, 0x62, 0x63, 0xca, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, - 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x5c, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x3a, 0x3a, 0x53, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_tx_proto_rawDescOnce sync.Once - file_stride_stakeibc_tx_proto_rawDescData = file_stride_stakeibc_tx_proto_rawDesc -) - -func file_stride_stakeibc_tx_proto_rawDescGZIP() []byte { - file_stride_stakeibc_tx_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_tx_proto_rawDescData) - }) - return file_stride_stakeibc_tx_proto_rawDescData -} - -var file_stride_stakeibc_tx_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_stride_stakeibc_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 45) -var file_stride_stakeibc_tx_proto_goTypes = []interface{}{ - (AuthzPermissionChange)(0), // 0: stride.stakeibc.AuthzPermissionChange - (*MsgUpdateInnerRedemptionRateBounds)(nil), // 1: stride.stakeibc.MsgUpdateInnerRedemptionRateBounds - (*MsgUpdateInnerRedemptionRateBoundsResponse)(nil), // 2: stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse - (*MsgLiquidStake)(nil), // 3: stride.stakeibc.MsgLiquidStake - (*MsgLiquidStakeResponse)(nil), // 4: stride.stakeibc.MsgLiquidStakeResponse - (*MsgLSMLiquidStake)(nil), // 5: stride.stakeibc.MsgLSMLiquidStake - (*MsgLSMLiquidStakeResponse)(nil), // 6: stride.stakeibc.MsgLSMLiquidStakeResponse - (*MsgClearBalance)(nil), // 7: stride.stakeibc.MsgClearBalance - (*MsgClearBalanceResponse)(nil), // 8: stride.stakeibc.MsgClearBalanceResponse - (*MsgRedeemStake)(nil), // 9: stride.stakeibc.MsgRedeemStake - (*MsgRedeemStakeResponse)(nil), // 10: stride.stakeibc.MsgRedeemStakeResponse - (*MsgRegisterHostZone)(nil), // 11: stride.stakeibc.MsgRegisterHostZone - (*MsgRegisterHostZoneResponse)(nil), // 12: stride.stakeibc.MsgRegisterHostZoneResponse - (*MsgClaimUndelegatedTokens)(nil), // 13: stride.stakeibc.MsgClaimUndelegatedTokens - (*MsgClaimUndelegatedTokensResponse)(nil), // 14: stride.stakeibc.MsgClaimUndelegatedTokensResponse - (*MsgRebalanceValidators)(nil), // 15: stride.stakeibc.MsgRebalanceValidators - (*MsgRebalanceValidatorsResponse)(nil), // 16: stride.stakeibc.MsgRebalanceValidatorsResponse - (*MsgAddValidators)(nil), // 17: stride.stakeibc.MsgAddValidators - (*MsgAddValidatorsResponse)(nil), // 18: stride.stakeibc.MsgAddValidatorsResponse - (*ValidatorWeight)(nil), // 19: stride.stakeibc.ValidatorWeight - (*MsgChangeValidatorWeights)(nil), // 20: stride.stakeibc.MsgChangeValidatorWeights - (*MsgChangeValidatorWeightsResponse)(nil), // 21: stride.stakeibc.MsgChangeValidatorWeightsResponse - (*MsgDeleteValidator)(nil), // 22: stride.stakeibc.MsgDeleteValidator - (*MsgDeleteValidatorResponse)(nil), // 23: stride.stakeibc.MsgDeleteValidatorResponse - (*MsgRestoreInterchainAccount)(nil), // 24: stride.stakeibc.MsgRestoreInterchainAccount - (*MsgRestoreInterchainAccountResponse)(nil), // 25: stride.stakeibc.MsgRestoreInterchainAccountResponse - (*MsgUpdateValidatorSharesExchRate)(nil), // 26: stride.stakeibc.MsgUpdateValidatorSharesExchRate - (*MsgUpdateValidatorSharesExchRateResponse)(nil), // 27: stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse - (*MsgCalibrateDelegation)(nil), // 28: stride.stakeibc.MsgCalibrateDelegation - (*MsgCalibrateDelegationResponse)(nil), // 29: stride.stakeibc.MsgCalibrateDelegationResponse - (*MsgResumeHostZone)(nil), // 30: stride.stakeibc.MsgResumeHostZone - (*MsgResumeHostZoneResponse)(nil), // 31: stride.stakeibc.MsgResumeHostZoneResponse - (*MsgCreateTradeRoute)(nil), // 32: stride.stakeibc.MsgCreateTradeRoute - (*MsgCreateTradeRouteResponse)(nil), // 33: stride.stakeibc.MsgCreateTradeRouteResponse - (*MsgDeleteTradeRoute)(nil), // 34: stride.stakeibc.MsgDeleteTradeRoute - (*MsgDeleteTradeRouteResponse)(nil), // 35: stride.stakeibc.MsgDeleteTradeRouteResponse - (*MsgUpdateTradeRoute)(nil), // 36: stride.stakeibc.MsgUpdateTradeRoute - (*MsgUpdateTradeRouteResponse)(nil), // 37: stride.stakeibc.MsgUpdateTradeRouteResponse - (*MsgSetCommunityPoolRebate)(nil), // 38: stride.stakeibc.MsgSetCommunityPoolRebate - (*MsgSetCommunityPoolRebateResponse)(nil), // 39: stride.stakeibc.MsgSetCommunityPoolRebateResponse - (*MsgToggleTradeController)(nil), // 40: stride.stakeibc.MsgToggleTradeController - (*MsgToggleTradeControllerResponse)(nil), // 41: stride.stakeibc.MsgToggleTradeControllerResponse - (*MsgUpdateHostZoneParams)(nil), // 42: stride.stakeibc.MsgUpdateHostZoneParams - (*MsgUpdateHostZoneParamsResponse)(nil), // 43: stride.stakeibc.MsgUpdateHostZoneParamsResponse - (*MsgUpdateParams)(nil), // 44: stride.stakeibc.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 45: stride.stakeibc.MsgUpdateParamsResponse - (*v1beta1.Coin)(nil), // 46: cosmos.base.v1beta1.Coin - (*Validator)(nil), // 47: stride.stakeibc.Validator - (*Params)(nil), // 48: stride.stakeibc.Params -} -var file_stride_stakeibc_tx_proto_depIdxs = []int32{ - 46, // 0: stride.stakeibc.MsgLiquidStakeResponse.st_token:type_name -> cosmos.base.v1beta1.Coin - 47, // 1: stride.stakeibc.MsgAddValidators.validators:type_name -> stride.stakeibc.Validator - 19, // 2: stride.stakeibc.MsgChangeValidatorWeights.validator_weights:type_name -> stride.stakeibc.ValidatorWeight - 0, // 3: stride.stakeibc.MsgToggleTradeController.permission_change:type_name -> stride.stakeibc.AuthzPermissionChange - 48, // 4: stride.stakeibc.MsgUpdateParams.params:type_name -> stride.stakeibc.Params - 3, // 5: stride.stakeibc.Msg.LiquidStake:input_type -> stride.stakeibc.MsgLiquidStake - 5, // 6: stride.stakeibc.Msg.LSMLiquidStake:input_type -> stride.stakeibc.MsgLSMLiquidStake - 9, // 7: stride.stakeibc.Msg.RedeemStake:input_type -> stride.stakeibc.MsgRedeemStake - 11, // 8: stride.stakeibc.Msg.RegisterHostZone:input_type -> stride.stakeibc.MsgRegisterHostZone - 13, // 9: stride.stakeibc.Msg.ClaimUndelegatedTokens:input_type -> stride.stakeibc.MsgClaimUndelegatedTokens - 15, // 10: stride.stakeibc.Msg.RebalanceValidators:input_type -> stride.stakeibc.MsgRebalanceValidators - 17, // 11: stride.stakeibc.Msg.AddValidators:input_type -> stride.stakeibc.MsgAddValidators - 20, // 12: stride.stakeibc.Msg.ChangeValidatorWeight:input_type -> stride.stakeibc.MsgChangeValidatorWeights - 22, // 13: stride.stakeibc.Msg.DeleteValidator:input_type -> stride.stakeibc.MsgDeleteValidator - 24, // 14: stride.stakeibc.Msg.RestoreInterchainAccount:input_type -> stride.stakeibc.MsgRestoreInterchainAccount - 26, // 15: stride.stakeibc.Msg.UpdateValidatorSharesExchRate:input_type -> stride.stakeibc.MsgUpdateValidatorSharesExchRate - 28, // 16: stride.stakeibc.Msg.CalibrateDelegation:input_type -> stride.stakeibc.MsgCalibrateDelegation - 7, // 17: stride.stakeibc.Msg.ClearBalance:input_type -> stride.stakeibc.MsgClearBalance - 1, // 18: stride.stakeibc.Msg.UpdateInnerRedemptionRateBounds:input_type -> stride.stakeibc.MsgUpdateInnerRedemptionRateBounds - 30, // 19: stride.stakeibc.Msg.ResumeHostZone:input_type -> stride.stakeibc.MsgResumeHostZone - 32, // 20: stride.stakeibc.Msg.CreateTradeRoute:input_type -> stride.stakeibc.MsgCreateTradeRoute - 34, // 21: stride.stakeibc.Msg.DeleteTradeRoute:input_type -> stride.stakeibc.MsgDeleteTradeRoute - 36, // 22: stride.stakeibc.Msg.UpdateTradeRoute:input_type -> stride.stakeibc.MsgUpdateTradeRoute - 38, // 23: stride.stakeibc.Msg.SetCommunityPoolRebate:input_type -> stride.stakeibc.MsgSetCommunityPoolRebate - 40, // 24: stride.stakeibc.Msg.ToggleTradeController:input_type -> stride.stakeibc.MsgToggleTradeController - 42, // 25: stride.stakeibc.Msg.UpdateHostZoneParams:input_type -> stride.stakeibc.MsgUpdateHostZoneParams - 44, // 26: stride.stakeibc.Msg.UpdateParams:input_type -> stride.stakeibc.MsgUpdateParams - 4, // 27: stride.stakeibc.Msg.LiquidStake:output_type -> stride.stakeibc.MsgLiquidStakeResponse - 6, // 28: stride.stakeibc.Msg.LSMLiquidStake:output_type -> stride.stakeibc.MsgLSMLiquidStakeResponse - 10, // 29: stride.stakeibc.Msg.RedeemStake:output_type -> stride.stakeibc.MsgRedeemStakeResponse - 12, // 30: stride.stakeibc.Msg.RegisterHostZone:output_type -> stride.stakeibc.MsgRegisterHostZoneResponse - 14, // 31: stride.stakeibc.Msg.ClaimUndelegatedTokens:output_type -> stride.stakeibc.MsgClaimUndelegatedTokensResponse - 16, // 32: stride.stakeibc.Msg.RebalanceValidators:output_type -> stride.stakeibc.MsgRebalanceValidatorsResponse - 18, // 33: stride.stakeibc.Msg.AddValidators:output_type -> stride.stakeibc.MsgAddValidatorsResponse - 21, // 34: stride.stakeibc.Msg.ChangeValidatorWeight:output_type -> stride.stakeibc.MsgChangeValidatorWeightsResponse - 23, // 35: stride.stakeibc.Msg.DeleteValidator:output_type -> stride.stakeibc.MsgDeleteValidatorResponse - 25, // 36: stride.stakeibc.Msg.RestoreInterchainAccount:output_type -> stride.stakeibc.MsgRestoreInterchainAccountResponse - 27, // 37: stride.stakeibc.Msg.UpdateValidatorSharesExchRate:output_type -> stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse - 29, // 38: stride.stakeibc.Msg.CalibrateDelegation:output_type -> stride.stakeibc.MsgCalibrateDelegationResponse - 8, // 39: stride.stakeibc.Msg.ClearBalance:output_type -> stride.stakeibc.MsgClearBalanceResponse - 2, // 40: stride.stakeibc.Msg.UpdateInnerRedemptionRateBounds:output_type -> stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse - 31, // 41: stride.stakeibc.Msg.ResumeHostZone:output_type -> stride.stakeibc.MsgResumeHostZoneResponse - 33, // 42: stride.stakeibc.Msg.CreateTradeRoute:output_type -> stride.stakeibc.MsgCreateTradeRouteResponse - 35, // 43: stride.stakeibc.Msg.DeleteTradeRoute:output_type -> stride.stakeibc.MsgDeleteTradeRouteResponse - 37, // 44: stride.stakeibc.Msg.UpdateTradeRoute:output_type -> stride.stakeibc.MsgUpdateTradeRouteResponse - 39, // 45: stride.stakeibc.Msg.SetCommunityPoolRebate:output_type -> stride.stakeibc.MsgSetCommunityPoolRebateResponse - 41, // 46: stride.stakeibc.Msg.ToggleTradeController:output_type -> stride.stakeibc.MsgToggleTradeControllerResponse - 43, // 47: stride.stakeibc.Msg.UpdateHostZoneParams:output_type -> stride.stakeibc.MsgUpdateHostZoneParamsResponse - 45, // 48: stride.stakeibc.Msg.UpdateParams:output_type -> stride.stakeibc.MsgUpdateParamsResponse - 27, // [27:49] is the sub-list for method output_type - 5, // [5:27] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_tx_proto_init() } -func file_stride_stakeibc_tx_proto_init() { - if File_stride_stakeibc_tx_proto != nil { - return - } - file_stride_stakeibc_validator_proto_init() - file_stride_stakeibc_params_proto_init() - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateInnerRedemptionRateBounds); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateInnerRedemptionRateBoundsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgLiquidStake); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgLiquidStakeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgLSMLiquidStake); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgLSMLiquidStakeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgClearBalance); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgClearBalanceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRedeemStake); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRedeemStakeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRegisterHostZone); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRegisterHostZoneResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgClaimUndelegatedTokens); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgClaimUndelegatedTokensResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRebalanceValidators); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRebalanceValidatorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAddValidators); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAddValidatorsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidatorWeight); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgChangeValidatorWeights); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgChangeValidatorWeightsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDeleteValidator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDeleteValidatorResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRestoreInterchainAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRestoreInterchainAccountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateValidatorSharesExchRate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateValidatorSharesExchRateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCalibrateDelegation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCalibrateDelegationResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgResumeHostZone); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgResumeHostZoneResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateTradeRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgCreateTradeRouteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDeleteTradeRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDeleteTradeRouteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateTradeRoute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateTradeRouteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSetCommunityPoolRebate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSetCommunityPoolRebateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgToggleTradeController); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgToggleTradeControllerResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateHostZoneParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateHostZoneParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stride_stakeibc_tx_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_tx_proto_rawDesc, - NumEnums: 1, - NumMessages: 45, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_stride_stakeibc_tx_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_tx_proto_depIdxs, - EnumInfos: file_stride_stakeibc_tx_proto_enumTypes, - MessageInfos: file_stride_stakeibc_tx_proto_msgTypes, - }.Build() - File_stride_stakeibc_tx_proto = out.File - file_stride_stakeibc_tx_proto_rawDesc = nil - file_stride_stakeibc_tx_proto_goTypes = nil - file_stride_stakeibc_tx_proto_depIdxs = nil -} diff --git a/api/stride/stakeibc/tx_grpc.pb.go b/api/stride/stakeibc/tx_grpc.pb.go deleted file mode 100644 index 37efd92b3..000000000 --- a/api/stride/stakeibc/tx_grpc.pb.go +++ /dev/null @@ -1,923 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: stride/stakeibc/tx.proto - -package stakeibc - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Msg_LiquidStake_FullMethodName = "/stride.stakeibc.Msg/LiquidStake" - Msg_LSMLiquidStake_FullMethodName = "/stride.stakeibc.Msg/LSMLiquidStake" - Msg_RedeemStake_FullMethodName = "/stride.stakeibc.Msg/RedeemStake" - Msg_RegisterHostZone_FullMethodName = "/stride.stakeibc.Msg/RegisterHostZone" - Msg_ClaimUndelegatedTokens_FullMethodName = "/stride.stakeibc.Msg/ClaimUndelegatedTokens" - Msg_RebalanceValidators_FullMethodName = "/stride.stakeibc.Msg/RebalanceValidators" - Msg_AddValidators_FullMethodName = "/stride.stakeibc.Msg/AddValidators" - Msg_ChangeValidatorWeight_FullMethodName = "/stride.stakeibc.Msg/ChangeValidatorWeight" - Msg_DeleteValidator_FullMethodName = "/stride.stakeibc.Msg/DeleteValidator" - Msg_RestoreInterchainAccount_FullMethodName = "/stride.stakeibc.Msg/RestoreInterchainAccount" - Msg_UpdateValidatorSharesExchRate_FullMethodName = "/stride.stakeibc.Msg/UpdateValidatorSharesExchRate" - Msg_CalibrateDelegation_FullMethodName = "/stride.stakeibc.Msg/CalibrateDelegation" - Msg_ClearBalance_FullMethodName = "/stride.stakeibc.Msg/ClearBalance" - Msg_UpdateInnerRedemptionRateBounds_FullMethodName = "/stride.stakeibc.Msg/UpdateInnerRedemptionRateBounds" - Msg_ResumeHostZone_FullMethodName = "/stride.stakeibc.Msg/ResumeHostZone" - Msg_CreateTradeRoute_FullMethodName = "/stride.stakeibc.Msg/CreateTradeRoute" - Msg_DeleteTradeRoute_FullMethodName = "/stride.stakeibc.Msg/DeleteTradeRoute" - Msg_UpdateTradeRoute_FullMethodName = "/stride.stakeibc.Msg/UpdateTradeRoute" - Msg_SetCommunityPoolRebate_FullMethodName = "/stride.stakeibc.Msg/SetCommunityPoolRebate" - Msg_ToggleTradeController_FullMethodName = "/stride.stakeibc.Msg/ToggleTradeController" - Msg_UpdateHostZoneParams_FullMethodName = "/stride.stakeibc.Msg/UpdateHostZoneParams" - Msg_UpdateParams_FullMethodName = "/stride.stakeibc.Msg/UpdateParams" -) - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Msg defines the Msg service. -type MsgClient interface { - LiquidStake(ctx context.Context, in *MsgLiquidStake, opts ...grpc.CallOption) (*MsgLiquidStakeResponse, error) - LSMLiquidStake(ctx context.Context, in *MsgLSMLiquidStake, opts ...grpc.CallOption) (*MsgLSMLiquidStakeResponse, error) - RedeemStake(ctx context.Context, in *MsgRedeemStake, opts ...grpc.CallOption) (*MsgRedeemStakeResponse, error) - RegisterHostZone(ctx context.Context, in *MsgRegisterHostZone, opts ...grpc.CallOption) (*MsgRegisterHostZoneResponse, error) - ClaimUndelegatedTokens(ctx context.Context, in *MsgClaimUndelegatedTokens, opts ...grpc.CallOption) (*MsgClaimUndelegatedTokensResponse, error) - RebalanceValidators(ctx context.Context, in *MsgRebalanceValidators, opts ...grpc.CallOption) (*MsgRebalanceValidatorsResponse, error) - AddValidators(ctx context.Context, in *MsgAddValidators, opts ...grpc.CallOption) (*MsgAddValidatorsResponse, error) - ChangeValidatorWeight(ctx context.Context, in *MsgChangeValidatorWeights, opts ...grpc.CallOption) (*MsgChangeValidatorWeightsResponse, error) - DeleteValidator(ctx context.Context, in *MsgDeleteValidator, opts ...grpc.CallOption) (*MsgDeleteValidatorResponse, error) - RestoreInterchainAccount(ctx context.Context, in *MsgRestoreInterchainAccount, opts ...grpc.CallOption) (*MsgRestoreInterchainAccountResponse, error) - UpdateValidatorSharesExchRate(ctx context.Context, in *MsgUpdateValidatorSharesExchRate, opts ...grpc.CallOption) (*MsgUpdateValidatorSharesExchRateResponse, error) - CalibrateDelegation(ctx context.Context, in *MsgCalibrateDelegation, opts ...grpc.CallOption) (*MsgCalibrateDelegationResponse, error) - ClearBalance(ctx context.Context, in *MsgClearBalance, opts ...grpc.CallOption) (*MsgClearBalanceResponse, error) - UpdateInnerRedemptionRateBounds(ctx context.Context, in *MsgUpdateInnerRedemptionRateBounds, opts ...grpc.CallOption) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) - ResumeHostZone(ctx context.Context, in *MsgResumeHostZone, opts ...grpc.CallOption) (*MsgResumeHostZoneResponse, error) - CreateTradeRoute(ctx context.Context, in *MsgCreateTradeRoute, opts ...grpc.CallOption) (*MsgCreateTradeRouteResponse, error) - DeleteTradeRoute(ctx context.Context, in *MsgDeleteTradeRoute, opts ...grpc.CallOption) (*MsgDeleteTradeRouteResponse, error) - UpdateTradeRoute(ctx context.Context, in *MsgUpdateTradeRoute, opts ...grpc.CallOption) (*MsgUpdateTradeRouteResponse, error) - SetCommunityPoolRebate(ctx context.Context, in *MsgSetCommunityPoolRebate, opts ...grpc.CallOption) (*MsgSetCommunityPoolRebateResponse, error) - ToggleTradeController(ctx context.Context, in *MsgToggleTradeController, opts ...grpc.CallOption) (*MsgToggleTradeControllerResponse, error) - UpdateHostZoneParams(ctx context.Context, in *MsgUpdateHostZoneParams, opts ...grpc.CallOption) (*MsgUpdateHostZoneParamsResponse, error) - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) LiquidStake(ctx context.Context, in *MsgLiquidStake, opts ...grpc.CallOption) (*MsgLiquidStakeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgLiquidStakeResponse) - err := c.cc.Invoke(ctx, Msg_LiquidStake_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) LSMLiquidStake(ctx context.Context, in *MsgLSMLiquidStake, opts ...grpc.CallOption) (*MsgLSMLiquidStakeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgLSMLiquidStakeResponse) - err := c.cc.Invoke(ctx, Msg_LSMLiquidStake_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RedeemStake(ctx context.Context, in *MsgRedeemStake, opts ...grpc.CallOption) (*MsgRedeemStakeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgRedeemStakeResponse) - err := c.cc.Invoke(ctx, Msg_RedeemStake_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RegisterHostZone(ctx context.Context, in *MsgRegisterHostZone, opts ...grpc.CallOption) (*MsgRegisterHostZoneResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgRegisterHostZoneResponse) - err := c.cc.Invoke(ctx, Msg_RegisterHostZone_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ClaimUndelegatedTokens(ctx context.Context, in *MsgClaimUndelegatedTokens, opts ...grpc.CallOption) (*MsgClaimUndelegatedTokensResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgClaimUndelegatedTokensResponse) - err := c.cc.Invoke(ctx, Msg_ClaimUndelegatedTokens_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RebalanceValidators(ctx context.Context, in *MsgRebalanceValidators, opts ...grpc.CallOption) (*MsgRebalanceValidatorsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgRebalanceValidatorsResponse) - err := c.cc.Invoke(ctx, Msg_RebalanceValidators_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) AddValidators(ctx context.Context, in *MsgAddValidators, opts ...grpc.CallOption) (*MsgAddValidatorsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgAddValidatorsResponse) - err := c.cc.Invoke(ctx, Msg_AddValidators_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ChangeValidatorWeight(ctx context.Context, in *MsgChangeValidatorWeights, opts ...grpc.CallOption) (*MsgChangeValidatorWeightsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgChangeValidatorWeightsResponse) - err := c.cc.Invoke(ctx, Msg_ChangeValidatorWeight_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeleteValidator(ctx context.Context, in *MsgDeleteValidator, opts ...grpc.CallOption) (*MsgDeleteValidatorResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgDeleteValidatorResponse) - err := c.cc.Invoke(ctx, Msg_DeleteValidator_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RestoreInterchainAccount(ctx context.Context, in *MsgRestoreInterchainAccount, opts ...grpc.CallOption) (*MsgRestoreInterchainAccountResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgRestoreInterchainAccountResponse) - err := c.cc.Invoke(ctx, Msg_RestoreInterchainAccount_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateValidatorSharesExchRate(ctx context.Context, in *MsgUpdateValidatorSharesExchRate, opts ...grpc.CallOption) (*MsgUpdateValidatorSharesExchRateResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgUpdateValidatorSharesExchRateResponse) - err := c.cc.Invoke(ctx, Msg_UpdateValidatorSharesExchRate_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CalibrateDelegation(ctx context.Context, in *MsgCalibrateDelegation, opts ...grpc.CallOption) (*MsgCalibrateDelegationResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgCalibrateDelegationResponse) - err := c.cc.Invoke(ctx, Msg_CalibrateDelegation_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ClearBalance(ctx context.Context, in *MsgClearBalance, opts ...grpc.CallOption) (*MsgClearBalanceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgClearBalanceResponse) - err := c.cc.Invoke(ctx, Msg_ClearBalance_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateInnerRedemptionRateBounds(ctx context.Context, in *MsgUpdateInnerRedemptionRateBounds, opts ...grpc.CallOption) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgUpdateInnerRedemptionRateBoundsResponse) - err := c.cc.Invoke(ctx, Msg_UpdateInnerRedemptionRateBounds_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ResumeHostZone(ctx context.Context, in *MsgResumeHostZone, opts ...grpc.CallOption) (*MsgResumeHostZoneResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgResumeHostZoneResponse) - err := c.cc.Invoke(ctx, Msg_ResumeHostZone_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CreateTradeRoute(ctx context.Context, in *MsgCreateTradeRoute, opts ...grpc.CallOption) (*MsgCreateTradeRouteResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgCreateTradeRouteResponse) - err := c.cc.Invoke(ctx, Msg_CreateTradeRoute_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeleteTradeRoute(ctx context.Context, in *MsgDeleteTradeRoute, opts ...grpc.CallOption) (*MsgDeleteTradeRouteResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgDeleteTradeRouteResponse) - err := c.cc.Invoke(ctx, Msg_DeleteTradeRoute_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateTradeRoute(ctx context.Context, in *MsgUpdateTradeRoute, opts ...grpc.CallOption) (*MsgUpdateTradeRouteResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgUpdateTradeRouteResponse) - err := c.cc.Invoke(ctx, Msg_UpdateTradeRoute_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SetCommunityPoolRebate(ctx context.Context, in *MsgSetCommunityPoolRebate, opts ...grpc.CallOption) (*MsgSetCommunityPoolRebateResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgSetCommunityPoolRebateResponse) - err := c.cc.Invoke(ctx, Msg_SetCommunityPoolRebate_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ToggleTradeController(ctx context.Context, in *MsgToggleTradeController, opts ...grpc.CallOption) (*MsgToggleTradeControllerResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgToggleTradeControllerResponse) - err := c.cc.Invoke(ctx, Msg_ToggleTradeController_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateHostZoneParams(ctx context.Context, in *MsgUpdateHostZoneParams, opts ...grpc.CallOption) (*MsgUpdateHostZoneParamsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgUpdateHostZoneParamsResponse) - err := c.cc.Invoke(ctx, Msg_UpdateHostZoneParams_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility. -// -// Msg defines the Msg service. -type MsgServer interface { - LiquidStake(context.Context, *MsgLiquidStake) (*MsgLiquidStakeResponse, error) - LSMLiquidStake(context.Context, *MsgLSMLiquidStake) (*MsgLSMLiquidStakeResponse, error) - RedeemStake(context.Context, *MsgRedeemStake) (*MsgRedeemStakeResponse, error) - RegisterHostZone(context.Context, *MsgRegisterHostZone) (*MsgRegisterHostZoneResponse, error) - ClaimUndelegatedTokens(context.Context, *MsgClaimUndelegatedTokens) (*MsgClaimUndelegatedTokensResponse, error) - RebalanceValidators(context.Context, *MsgRebalanceValidators) (*MsgRebalanceValidatorsResponse, error) - AddValidators(context.Context, *MsgAddValidators) (*MsgAddValidatorsResponse, error) - ChangeValidatorWeight(context.Context, *MsgChangeValidatorWeights) (*MsgChangeValidatorWeightsResponse, error) - DeleteValidator(context.Context, *MsgDeleteValidator) (*MsgDeleteValidatorResponse, error) - RestoreInterchainAccount(context.Context, *MsgRestoreInterchainAccount) (*MsgRestoreInterchainAccountResponse, error) - UpdateValidatorSharesExchRate(context.Context, *MsgUpdateValidatorSharesExchRate) (*MsgUpdateValidatorSharesExchRateResponse, error) - CalibrateDelegation(context.Context, *MsgCalibrateDelegation) (*MsgCalibrateDelegationResponse, error) - ClearBalance(context.Context, *MsgClearBalance) (*MsgClearBalanceResponse, error) - UpdateInnerRedemptionRateBounds(context.Context, *MsgUpdateInnerRedemptionRateBounds) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) - ResumeHostZone(context.Context, *MsgResumeHostZone) (*MsgResumeHostZoneResponse, error) - CreateTradeRoute(context.Context, *MsgCreateTradeRoute) (*MsgCreateTradeRouteResponse, error) - DeleteTradeRoute(context.Context, *MsgDeleteTradeRoute) (*MsgDeleteTradeRouteResponse, error) - UpdateTradeRoute(context.Context, *MsgUpdateTradeRoute) (*MsgUpdateTradeRouteResponse, error) - SetCommunityPoolRebate(context.Context, *MsgSetCommunityPoolRebate) (*MsgSetCommunityPoolRebateResponse, error) - ToggleTradeController(context.Context, *MsgToggleTradeController) (*MsgToggleTradeControllerResponse, error) - UpdateHostZoneParams(context.Context, *MsgUpdateHostZoneParams) (*MsgUpdateHostZoneParamsResponse, error) - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMsgServer struct{} - -func (UnimplementedMsgServer) LiquidStake(context.Context, *MsgLiquidStake) (*MsgLiquidStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LiquidStake not implemented") -} -func (UnimplementedMsgServer) LSMLiquidStake(context.Context, *MsgLSMLiquidStake) (*MsgLSMLiquidStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LSMLiquidStake not implemented") -} -func (UnimplementedMsgServer) RedeemStake(context.Context, *MsgRedeemStake) (*MsgRedeemStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RedeemStake not implemented") -} -func (UnimplementedMsgServer) RegisterHostZone(context.Context, *MsgRegisterHostZone) (*MsgRegisterHostZoneResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterHostZone not implemented") -} -func (UnimplementedMsgServer) ClaimUndelegatedTokens(context.Context, *MsgClaimUndelegatedTokens) (*MsgClaimUndelegatedTokensResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClaimUndelegatedTokens not implemented") -} -func (UnimplementedMsgServer) RebalanceValidators(context.Context, *MsgRebalanceValidators) (*MsgRebalanceValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RebalanceValidators not implemented") -} -func (UnimplementedMsgServer) AddValidators(context.Context, *MsgAddValidators) (*MsgAddValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddValidators not implemented") -} -func (UnimplementedMsgServer) ChangeValidatorWeight(context.Context, *MsgChangeValidatorWeights) (*MsgChangeValidatorWeightsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ChangeValidatorWeight not implemented") -} -func (UnimplementedMsgServer) DeleteValidator(context.Context, *MsgDeleteValidator) (*MsgDeleteValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteValidator not implemented") -} -func (UnimplementedMsgServer) RestoreInterchainAccount(context.Context, *MsgRestoreInterchainAccount) (*MsgRestoreInterchainAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RestoreInterchainAccount not implemented") -} -func (UnimplementedMsgServer) UpdateValidatorSharesExchRate(context.Context, *MsgUpdateValidatorSharesExchRate) (*MsgUpdateValidatorSharesExchRateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateValidatorSharesExchRate not implemented") -} -func (UnimplementedMsgServer) CalibrateDelegation(context.Context, *MsgCalibrateDelegation) (*MsgCalibrateDelegationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CalibrateDelegation not implemented") -} -func (UnimplementedMsgServer) ClearBalance(context.Context, *MsgClearBalance) (*MsgClearBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClearBalance not implemented") -} -func (UnimplementedMsgServer) UpdateInnerRedemptionRateBounds(context.Context, *MsgUpdateInnerRedemptionRateBounds) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateInnerRedemptionRateBounds not implemented") -} -func (UnimplementedMsgServer) ResumeHostZone(context.Context, *MsgResumeHostZone) (*MsgResumeHostZoneResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResumeHostZone not implemented") -} -func (UnimplementedMsgServer) CreateTradeRoute(context.Context, *MsgCreateTradeRoute) (*MsgCreateTradeRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTradeRoute not implemented") -} -func (UnimplementedMsgServer) DeleteTradeRoute(context.Context, *MsgDeleteTradeRoute) (*MsgDeleteTradeRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTradeRoute not implemented") -} -func (UnimplementedMsgServer) UpdateTradeRoute(context.Context, *MsgUpdateTradeRoute) (*MsgUpdateTradeRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateTradeRoute not implemented") -} -func (UnimplementedMsgServer) SetCommunityPoolRebate(context.Context, *MsgSetCommunityPoolRebate) (*MsgSetCommunityPoolRebateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetCommunityPoolRebate not implemented") -} -func (UnimplementedMsgServer) ToggleTradeController(context.Context, *MsgToggleTradeController) (*MsgToggleTradeControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ToggleTradeController not implemented") -} -func (UnimplementedMsgServer) UpdateHostZoneParams(context.Context, *MsgUpdateHostZoneParams) (*MsgUpdateHostZoneParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateHostZoneParams not implemented") -} -func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} -func (UnimplementedMsgServer) testEmbeddedByValue() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - // If the following call pancis, it indicates UnimplementedMsgServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_LiquidStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgLiquidStake) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).LiquidStake(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_LiquidStake_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).LiquidStake(ctx, req.(*MsgLiquidStake)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_LSMLiquidStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgLSMLiquidStake) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).LSMLiquidStake(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_LSMLiquidStake_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).LSMLiquidStake(ctx, req.(*MsgLSMLiquidStake)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RedeemStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRedeemStake) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RedeemStake(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_RedeemStake_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RedeemStake(ctx, req.(*MsgRedeemStake)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RegisterHostZone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterHostZone) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RegisterHostZone(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_RegisterHostZone_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterHostZone(ctx, req.(*MsgRegisterHostZone)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ClaimUndelegatedTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgClaimUndelegatedTokens) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ClaimUndelegatedTokens(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_ClaimUndelegatedTokens_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClaimUndelegatedTokens(ctx, req.(*MsgClaimUndelegatedTokens)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RebalanceValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRebalanceValidators) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RebalanceValidators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_RebalanceValidators_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RebalanceValidators(ctx, req.(*MsgRebalanceValidators)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_AddValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAddValidators) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).AddValidators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_AddValidators_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AddValidators(ctx, req.(*MsgAddValidators)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ChangeValidatorWeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgChangeValidatorWeights) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ChangeValidatorWeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_ChangeValidatorWeight_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ChangeValidatorWeight(ctx, req.(*MsgChangeValidatorWeights)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeleteValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeleteValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeleteValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_DeleteValidator_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeleteValidator(ctx, req.(*MsgDeleteValidator)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RestoreInterchainAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRestoreInterchainAccount) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RestoreInterchainAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_RestoreInterchainAccount_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RestoreInterchainAccount(ctx, req.(*MsgRestoreInterchainAccount)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateValidatorSharesExchRate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateValidatorSharesExchRate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateValidatorSharesExchRate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateValidatorSharesExchRate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateValidatorSharesExchRate(ctx, req.(*MsgUpdateValidatorSharesExchRate)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CalibrateDelegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCalibrateDelegation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CalibrateDelegation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_CalibrateDelegation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CalibrateDelegation(ctx, req.(*MsgCalibrateDelegation)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ClearBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgClearBalance) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ClearBalance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_ClearBalance_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClearBalance(ctx, req.(*MsgClearBalance)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateInnerRedemptionRateBounds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateInnerRedemptionRateBounds) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateInnerRedemptionRateBounds(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateInnerRedemptionRateBounds_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateInnerRedemptionRateBounds(ctx, req.(*MsgUpdateInnerRedemptionRateBounds)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ResumeHostZone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgResumeHostZone) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ResumeHostZone(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_ResumeHostZone_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ResumeHostZone(ctx, req.(*MsgResumeHostZone)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CreateTradeRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateTradeRoute) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateTradeRoute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_CreateTradeRoute_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateTradeRoute(ctx, req.(*MsgCreateTradeRoute)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeleteTradeRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeleteTradeRoute) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeleteTradeRoute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_DeleteTradeRoute_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeleteTradeRoute(ctx, req.(*MsgDeleteTradeRoute)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateTradeRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateTradeRoute) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateTradeRoute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateTradeRoute_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateTradeRoute(ctx, req.(*MsgUpdateTradeRoute)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SetCommunityPoolRebate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetCommunityPoolRebate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetCommunityPoolRebate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_SetCommunityPoolRebate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetCommunityPoolRebate(ctx, req.(*MsgSetCommunityPoolRebate)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ToggleTradeController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgToggleTradeController) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ToggleTradeController(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_ToggleTradeController_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ToggleTradeController(ctx, req.(*MsgToggleTradeController)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateHostZoneParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateHostZoneParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateHostZoneParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateHostZoneParams_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateHostZoneParams(ctx, req.(*MsgUpdateHostZoneParams)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateParams_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "stride.stakeibc.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "LiquidStake", - Handler: _Msg_LiquidStake_Handler, - }, - { - MethodName: "LSMLiquidStake", - Handler: _Msg_LSMLiquidStake_Handler, - }, - { - MethodName: "RedeemStake", - Handler: _Msg_RedeemStake_Handler, - }, - { - MethodName: "RegisterHostZone", - Handler: _Msg_RegisterHostZone_Handler, - }, - { - MethodName: "ClaimUndelegatedTokens", - Handler: _Msg_ClaimUndelegatedTokens_Handler, - }, - { - MethodName: "RebalanceValidators", - Handler: _Msg_RebalanceValidators_Handler, - }, - { - MethodName: "AddValidators", - Handler: _Msg_AddValidators_Handler, - }, - { - MethodName: "ChangeValidatorWeight", - Handler: _Msg_ChangeValidatorWeight_Handler, - }, - { - MethodName: "DeleteValidator", - Handler: _Msg_DeleteValidator_Handler, - }, - { - MethodName: "RestoreInterchainAccount", - Handler: _Msg_RestoreInterchainAccount_Handler, - }, - { - MethodName: "UpdateValidatorSharesExchRate", - Handler: _Msg_UpdateValidatorSharesExchRate_Handler, - }, - { - MethodName: "CalibrateDelegation", - Handler: _Msg_CalibrateDelegation_Handler, - }, - { - MethodName: "ClearBalance", - Handler: _Msg_ClearBalance_Handler, - }, - { - MethodName: "UpdateInnerRedemptionRateBounds", - Handler: _Msg_UpdateInnerRedemptionRateBounds_Handler, - }, - { - MethodName: "ResumeHostZone", - Handler: _Msg_ResumeHostZone_Handler, - }, - { - MethodName: "CreateTradeRoute", - Handler: _Msg_CreateTradeRoute_Handler, - }, - { - MethodName: "DeleteTradeRoute", - Handler: _Msg_DeleteTradeRoute_Handler, - }, - { - MethodName: "UpdateTradeRoute", - Handler: _Msg_UpdateTradeRoute_Handler, - }, - { - MethodName: "SetCommunityPoolRebate", - Handler: _Msg_SetCommunityPoolRebate_Handler, - }, - { - MethodName: "ToggleTradeController", - Handler: _Msg_ToggleTradeController_Handler, - }, - { - MethodName: "UpdateHostZoneParams", - Handler: _Msg_UpdateHostZoneParams_Handler, - }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/stakeibc/tx.proto", -} diff --git a/api/stride/stakeibc/validator.pulsar.go b/api/stride/stakeibc/validator.pulsar.go deleted file mode 100644 index ea56baf1d..000000000 --- a/api/stride/stakeibc/validator.pulsar.go +++ /dev/null @@ -1,1142 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package stakeibc - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Validator protoreflect.MessageDescriptor - fd_Validator_name protoreflect.FieldDescriptor - fd_Validator_address protoreflect.FieldDescriptor - fd_Validator_weight protoreflect.FieldDescriptor - fd_Validator_delegation protoreflect.FieldDescriptor - fd_Validator_slash_query_progress_tracker protoreflect.FieldDescriptor - fd_Validator_slash_query_checkpoint protoreflect.FieldDescriptor - fd_Validator_shares_to_tokens_rate protoreflect.FieldDescriptor - fd_Validator_delegation_changes_in_progress protoreflect.FieldDescriptor - fd_Validator_slash_query_in_progress protoreflect.FieldDescriptor -) - -func init() { - file_stride_stakeibc_validator_proto_init() - md_Validator = File_stride_stakeibc_validator_proto.Messages().ByName("Validator") - fd_Validator_name = md_Validator.Fields().ByName("name") - fd_Validator_address = md_Validator.Fields().ByName("address") - fd_Validator_weight = md_Validator.Fields().ByName("weight") - fd_Validator_delegation = md_Validator.Fields().ByName("delegation") - fd_Validator_slash_query_progress_tracker = md_Validator.Fields().ByName("slash_query_progress_tracker") - fd_Validator_slash_query_checkpoint = md_Validator.Fields().ByName("slash_query_checkpoint") - fd_Validator_shares_to_tokens_rate = md_Validator.Fields().ByName("shares_to_tokens_rate") - fd_Validator_delegation_changes_in_progress = md_Validator.Fields().ByName("delegation_changes_in_progress") - fd_Validator_slash_query_in_progress = md_Validator.Fields().ByName("slash_query_in_progress") -} - -var _ protoreflect.Message = (*fastReflection_Validator)(nil) - -type fastReflection_Validator Validator - -func (x *Validator) ProtoReflect() protoreflect.Message { - return (*fastReflection_Validator)(x) -} - -func (x *Validator) slowProtoReflect() protoreflect.Message { - mi := &file_stride_stakeibc_validator_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Validator_messageType fastReflection_Validator_messageType -var _ protoreflect.MessageType = fastReflection_Validator_messageType{} - -type fastReflection_Validator_messageType struct{} - -func (x fastReflection_Validator_messageType) Zero() protoreflect.Message { - return (*fastReflection_Validator)(nil) -} -func (x fastReflection_Validator_messageType) New() protoreflect.Message { - return new(fastReflection_Validator) -} -func (x fastReflection_Validator_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Validator) Descriptor() protoreflect.MessageDescriptor { - return md_Validator -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Validator) Type() protoreflect.MessageType { - return _fastReflection_Validator_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Validator) New() protoreflect.Message { - return new(fastReflection_Validator) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Validator) Interface() protoreflect.ProtoMessage { - return (*Validator)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Validator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Validator_name, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_Validator_address, value) { - return - } - } - if x.Weight != uint64(0) { - value := protoreflect.ValueOfUint64(x.Weight) - if !f(fd_Validator_weight, value) { - return - } - } - if x.Delegation != "" { - value := protoreflect.ValueOfString(x.Delegation) - if !f(fd_Validator_delegation, value) { - return - } - } - if x.SlashQueryProgressTracker != "" { - value := protoreflect.ValueOfString(x.SlashQueryProgressTracker) - if !f(fd_Validator_slash_query_progress_tracker, value) { - return - } - } - if x.SlashQueryCheckpoint != "" { - value := protoreflect.ValueOfString(x.SlashQueryCheckpoint) - if !f(fd_Validator_slash_query_checkpoint, value) { - return - } - } - if x.SharesToTokensRate != "" { - value := protoreflect.ValueOfString(x.SharesToTokensRate) - if !f(fd_Validator_shares_to_tokens_rate, value) { - return - } - } - if x.DelegationChangesInProgress != int64(0) { - value := protoreflect.ValueOfInt64(x.DelegationChangesInProgress) - if !f(fd_Validator_delegation_changes_in_progress, value) { - return - } - } - if x.SlashQueryInProgress != false { - value := protoreflect.ValueOfBool(x.SlashQueryInProgress) - if !f(fd_Validator_slash_query_in_progress, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Validator) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "stride.stakeibc.Validator.name": - return x.Name != "" - case "stride.stakeibc.Validator.address": - return x.Address != "" - case "stride.stakeibc.Validator.weight": - return x.Weight != uint64(0) - case "stride.stakeibc.Validator.delegation": - return x.Delegation != "" - case "stride.stakeibc.Validator.slash_query_progress_tracker": - return x.SlashQueryProgressTracker != "" - case "stride.stakeibc.Validator.slash_query_checkpoint": - return x.SlashQueryCheckpoint != "" - case "stride.stakeibc.Validator.shares_to_tokens_rate": - return x.SharesToTokensRate != "" - case "stride.stakeibc.Validator.delegation_changes_in_progress": - return x.DelegationChangesInProgress != int64(0) - case "stride.stakeibc.Validator.slash_query_in_progress": - return x.SlashQueryInProgress != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Validator")) - } - panic(fmt.Errorf("message stride.stakeibc.Validator does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Validator) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "stride.stakeibc.Validator.name": - x.Name = "" - case "stride.stakeibc.Validator.address": - x.Address = "" - case "stride.stakeibc.Validator.weight": - x.Weight = uint64(0) - case "stride.stakeibc.Validator.delegation": - x.Delegation = "" - case "stride.stakeibc.Validator.slash_query_progress_tracker": - x.SlashQueryProgressTracker = "" - case "stride.stakeibc.Validator.slash_query_checkpoint": - x.SlashQueryCheckpoint = "" - case "stride.stakeibc.Validator.shares_to_tokens_rate": - x.SharesToTokensRate = "" - case "stride.stakeibc.Validator.delegation_changes_in_progress": - x.DelegationChangesInProgress = int64(0) - case "stride.stakeibc.Validator.slash_query_in_progress": - x.SlashQueryInProgress = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Validator")) - } - panic(fmt.Errorf("message stride.stakeibc.Validator does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Validator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "stride.stakeibc.Validator.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "stride.stakeibc.Validator.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "stride.stakeibc.Validator.weight": - value := x.Weight - return protoreflect.ValueOfUint64(value) - case "stride.stakeibc.Validator.delegation": - value := x.Delegation - return protoreflect.ValueOfString(value) - case "stride.stakeibc.Validator.slash_query_progress_tracker": - value := x.SlashQueryProgressTracker - return protoreflect.ValueOfString(value) - case "stride.stakeibc.Validator.slash_query_checkpoint": - value := x.SlashQueryCheckpoint - return protoreflect.ValueOfString(value) - case "stride.stakeibc.Validator.shares_to_tokens_rate": - value := x.SharesToTokensRate - return protoreflect.ValueOfString(value) - case "stride.stakeibc.Validator.delegation_changes_in_progress": - value := x.DelegationChangesInProgress - return protoreflect.ValueOfInt64(value) - case "stride.stakeibc.Validator.slash_query_in_progress": - value := x.SlashQueryInProgress - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Validator")) - } - panic(fmt.Errorf("message stride.stakeibc.Validator does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Validator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "stride.stakeibc.Validator.name": - x.Name = value.Interface().(string) - case "stride.stakeibc.Validator.address": - x.Address = value.Interface().(string) - case "stride.stakeibc.Validator.weight": - x.Weight = value.Uint() - case "stride.stakeibc.Validator.delegation": - x.Delegation = value.Interface().(string) - case "stride.stakeibc.Validator.slash_query_progress_tracker": - x.SlashQueryProgressTracker = value.Interface().(string) - case "stride.stakeibc.Validator.slash_query_checkpoint": - x.SlashQueryCheckpoint = value.Interface().(string) - case "stride.stakeibc.Validator.shares_to_tokens_rate": - x.SharesToTokensRate = value.Interface().(string) - case "stride.stakeibc.Validator.delegation_changes_in_progress": - x.DelegationChangesInProgress = value.Int() - case "stride.stakeibc.Validator.slash_query_in_progress": - x.SlashQueryInProgress = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Validator")) - } - panic(fmt.Errorf("message stride.stakeibc.Validator does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Validator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.Validator.name": - panic(fmt.Errorf("field name of message stride.stakeibc.Validator is not mutable")) - case "stride.stakeibc.Validator.address": - panic(fmt.Errorf("field address of message stride.stakeibc.Validator is not mutable")) - case "stride.stakeibc.Validator.weight": - panic(fmt.Errorf("field weight of message stride.stakeibc.Validator is not mutable")) - case "stride.stakeibc.Validator.delegation": - panic(fmt.Errorf("field delegation of message stride.stakeibc.Validator is not mutable")) - case "stride.stakeibc.Validator.slash_query_progress_tracker": - panic(fmt.Errorf("field slash_query_progress_tracker of message stride.stakeibc.Validator is not mutable")) - case "stride.stakeibc.Validator.slash_query_checkpoint": - panic(fmt.Errorf("field slash_query_checkpoint of message stride.stakeibc.Validator is not mutable")) - case "stride.stakeibc.Validator.shares_to_tokens_rate": - panic(fmt.Errorf("field shares_to_tokens_rate of message stride.stakeibc.Validator is not mutable")) - case "stride.stakeibc.Validator.delegation_changes_in_progress": - panic(fmt.Errorf("field delegation_changes_in_progress of message stride.stakeibc.Validator is not mutable")) - case "stride.stakeibc.Validator.slash_query_in_progress": - panic(fmt.Errorf("field slash_query_in_progress of message stride.stakeibc.Validator is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Validator")) - } - panic(fmt.Errorf("message stride.stakeibc.Validator does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Validator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "stride.stakeibc.Validator.name": - return protoreflect.ValueOfString("") - case "stride.stakeibc.Validator.address": - return protoreflect.ValueOfString("") - case "stride.stakeibc.Validator.weight": - return protoreflect.ValueOfUint64(uint64(0)) - case "stride.stakeibc.Validator.delegation": - return protoreflect.ValueOfString("") - case "stride.stakeibc.Validator.slash_query_progress_tracker": - return protoreflect.ValueOfString("") - case "stride.stakeibc.Validator.slash_query_checkpoint": - return protoreflect.ValueOfString("") - case "stride.stakeibc.Validator.shares_to_tokens_rate": - return protoreflect.ValueOfString("") - case "stride.stakeibc.Validator.delegation_changes_in_progress": - return protoreflect.ValueOfInt64(int64(0)) - case "stride.stakeibc.Validator.slash_query_in_progress": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: stride.stakeibc.Validator")) - } - panic(fmt.Errorf("message stride.stakeibc.Validator does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Validator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in stride.stakeibc.Validator", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Validator) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Validator) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Validator) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Validator) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Weight != 0 { - n += 1 + runtime.Sov(uint64(x.Weight)) - } - l = len(x.Delegation) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SlashQueryProgressTracker) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SlashQueryCheckpoint) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.SharesToTokensRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.DelegationChangesInProgress != 0 { - n += 1 + runtime.Sov(uint64(x.DelegationChangesInProgress)) - } - if x.SlashQueryInProgress { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.SlashQueryInProgress { - i-- - if x.SlashQueryInProgress { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - if len(x.SlashQueryCheckpoint) > 0 { - i -= len(x.SlashQueryCheckpoint) - copy(dAtA[i:], x.SlashQueryCheckpoint) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SlashQueryCheckpoint))) - i-- - dAtA[i] = 0x62 - } - if x.DelegationChangesInProgress != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.DelegationChangesInProgress)) - i-- - dAtA[i] = 0x58 - } - if len(x.SharesToTokensRate) > 0 { - i -= len(x.SharesToTokensRate) - copy(dAtA[i:], x.SharesToTokensRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SharesToTokensRate))) - i-- - dAtA[i] = 0x52 - } - if len(x.SlashQueryProgressTracker) > 0 { - i -= len(x.SlashQueryProgressTracker) - copy(dAtA[i:], x.SlashQueryProgressTracker) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SlashQueryProgressTracker))) - i-- - dAtA[i] = 0x4a - } - if x.Weight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Weight)) - i-- - dAtA[i] = 0x30 - } - if len(x.Delegation) > 0 { - i -= len(x.Delegation) - copy(dAtA[i:], x.Delegation) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Delegation))) - i-- - dAtA[i] = 0x2a - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x12 - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Validator) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - x.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Weight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Delegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Delegation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SlashQueryProgressTracker", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SlashQueryProgressTracker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SlashQueryCheckpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SlashQueryCheckpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SharesToTokensRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SharesToTokensRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegationChangesInProgress", wireType) - } - x.DelegationChangesInProgress = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.DelegationChangesInProgress |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SlashQueryInProgress", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.SlashQueryInProgress = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: stride/stakeibc/validator.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Validator struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - Weight uint64 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty"` - Delegation string `protobuf:"bytes,5,opt,name=delegation,proto3" json:"delegation,omitempty"` - SlashQueryProgressTracker string `protobuf:"bytes,9,opt,name=slash_query_progress_tracker,json=slashQueryProgressTracker,proto3" json:"slash_query_progress_tracker,omitempty"` - SlashQueryCheckpoint string `protobuf:"bytes,12,opt,name=slash_query_checkpoint,json=slashQueryCheckpoint,proto3" json:"slash_query_checkpoint,omitempty"` - SharesToTokensRate string `protobuf:"bytes,10,opt,name=shares_to_tokens_rate,json=sharesToTokensRate,proto3" json:"shares_to_tokens_rate,omitempty"` - DelegationChangesInProgress int64 `protobuf:"varint,11,opt,name=delegation_changes_in_progress,json=delegationChangesInProgress,proto3" json:"delegation_changes_in_progress,omitempty"` - SlashQueryInProgress bool `protobuf:"varint,13,opt,name=slash_query_in_progress,json=slashQueryInProgress,proto3" json:"slash_query_in_progress,omitempty"` -} - -func (x *Validator) Reset() { - *x = Validator{} - if protoimpl.UnsafeEnabled { - mi := &file_stride_stakeibc_validator_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Validator) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Validator) ProtoMessage() {} - -// Deprecated: Use Validator.ProtoReflect.Descriptor instead. -func (*Validator) Descriptor() ([]byte, []int) { - return file_stride_stakeibc_validator_proto_rawDescGZIP(), []int{0} -} - -func (x *Validator) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Validator) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *Validator) GetWeight() uint64 { - if x != nil { - return x.Weight - } - return 0 -} - -func (x *Validator) GetDelegation() string { - if x != nil { - return x.Delegation - } - return "" -} - -func (x *Validator) GetSlashQueryProgressTracker() string { - if x != nil { - return x.SlashQueryProgressTracker - } - return "" -} - -func (x *Validator) GetSlashQueryCheckpoint() string { - if x != nil { - return x.SlashQueryCheckpoint - } - return "" -} - -func (x *Validator) GetSharesToTokensRate() string { - if x != nil { - return x.SharesToTokensRate - } - return "" -} - -func (x *Validator) GetDelegationChangesInProgress() int64 { - if x != nil { - return x.DelegationChangesInProgress - } - return 0 -} - -func (x *Validator) GetSlashQueryInProgress() bool { - if x != nil { - return x.SlashQueryInProgress - } - return false -} - -var File_stride_stakeibc_validator_proto protoreflect.FileDescriptor - -var file_stride_stakeibc_validator_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, - 0x63, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, - 0x62, 0x63, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, - 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x04, 0x0a, 0x09, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x77, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x3d, 0x0a, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, - 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0a, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x5e, 0x0a, 0x1c, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, - 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, - 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x19, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, - 0x12, 0x53, 0x0a, 0x16, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, - 0x63, 0x68, 0x65, 0x63, 0x6b, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x52, - 0x14, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x68, 0x65, 0x63, 0x6b, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x5f, - 0x74, 0x6f, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x12, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x54, - 0x6f, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x61, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x1e, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x73, 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x1b, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x35, 0x0a, 0x17, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, - 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x14, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, - 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x42, - 0xb9, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x42, 0x0e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, - 0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, 0x65, 0x2e, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xca, 0x02, 0x0f, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0xe2, 0x02, 0x1b, 0x53, 0x74, 0x72, - 0x69, 0x64, 0x65, 0x5c, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x53, 0x74, 0x72, 0x69, 0x64, - 0x65, 0x3a, 0x3a, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x69, 0x62, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_stride_stakeibc_validator_proto_rawDescOnce sync.Once - file_stride_stakeibc_validator_proto_rawDescData = file_stride_stakeibc_validator_proto_rawDesc -) - -func file_stride_stakeibc_validator_proto_rawDescGZIP() []byte { - file_stride_stakeibc_validator_proto_rawDescOnce.Do(func() { - file_stride_stakeibc_validator_proto_rawDescData = protoimpl.X.CompressGZIP(file_stride_stakeibc_validator_proto_rawDescData) - }) - return file_stride_stakeibc_validator_proto_rawDescData -} - -var file_stride_stakeibc_validator_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_stride_stakeibc_validator_proto_goTypes = []interface{}{ - (*Validator)(nil), // 0: stride.stakeibc.Validator -} -var file_stride_stakeibc_validator_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_stride_stakeibc_validator_proto_init() } -func file_stride_stakeibc_validator_proto_init() { - if File_stride_stakeibc_validator_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stride_stakeibc_validator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Validator); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stride_stakeibc_validator_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stride_stakeibc_validator_proto_goTypes, - DependencyIndexes: file_stride_stakeibc_validator_proto_depIdxs, - MessageInfos: file_stride_stakeibc_validator_proto_msgTypes, - }.Build() - File_stride_stakeibc_validator_proto = out.File - file_stride_stakeibc_validator_proto_rawDesc = nil - file_stride_stakeibc_validator_proto_goTypes = nil - file_stride_stakeibc_validator_proto_depIdxs = nil -} diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 790dd7236..2b3916628 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -90,13 +90,6 @@ import ( assetskeeper "github.com/milkyway-labs/milkyway/x/assets/keeper" assetstypes "github.com/milkyway-labs/milkyway/x/assets/types" - epochskeeper "github.com/milkyway-labs/milkyway/x/epochs/keeper" - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - "github.com/milkyway-labs/milkyway/x/icacallbacks" - icacallbackskeeper "github.com/milkyway-labs/milkyway/x/icacallbacks/keeper" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - icqkeeper "github.com/milkyway-labs/milkyway/x/interchainquery/keeper" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" "github.com/milkyway-labs/milkyway/x/liquidvesting" liquidvestingkeeper "github.com/milkyway-labs/milkyway/x/liquidvesting/keeper" liquidvestingtypes "github.com/milkyway-labs/milkyway/x/liquidvesting/types" @@ -104,18 +97,12 @@ import ( operatorstypes "github.com/milkyway-labs/milkyway/x/operators/types" poolskeeper "github.com/milkyway-labs/milkyway/x/pools/keeper" poolstypes "github.com/milkyway-labs/milkyway/x/pools/types" - "github.com/milkyway-labs/milkyway/x/records" - recordskeeper "github.com/milkyway-labs/milkyway/x/records/keeper" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" restakingkeeper "github.com/milkyway-labs/milkyway/x/restaking/keeper" restakingtypes "github.com/milkyway-labs/milkyway/x/restaking/types" rewardskeeper "github.com/milkyway-labs/milkyway/x/rewards/keeper" rewardstypes "github.com/milkyway-labs/milkyway/x/rewards/types" serviceskeeper "github.com/milkyway-labs/milkyway/x/services/keeper" servicestypes "github.com/milkyway-labs/milkyway/x/services/types" - "github.com/milkyway-labs/milkyway/x/stakeibc" - stakeibckeeper "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - stakeibctypes "github.com/milkyway-labs/milkyway/x/stakeibc/types" tokenfactorykeeper "github.com/milkyway-labs/milkyway/x/tokenfactory/keeper" tokenfactorytypes "github.com/milkyway-labs/milkyway/x/tokenfactory/types" ) @@ -162,13 +149,6 @@ type AppKeepers struct { // ICS ProviderKeeper icsproviderkeeper.Keeper - // Stride - EpochsKeeper *epochskeeper.Keeper - InterchainQueryKeeper icqkeeper.Keeper - ICACallbacksKeeper *icacallbackskeeper.Keeper - RecordsKeeper *recordskeeper.Keeper - StakeIBCKeeper stakeibckeeper.Keeper - // Custom ServicesKeeper *serviceskeeper.Keeper OperatorsKeeper *operatorskeeper.Keeper @@ -658,51 +638,6 @@ func NewAppKeeper( appKeepers.LiquidVestingKeeper.RestakeRestrictionFn, ) - // ---------------------- // - // --- Stride Keepers --- // - // ---------------------- // - - appKeepers.InterchainQueryKeeper = icqkeeper.NewKeeper( - appCodec, - appKeepers.keys[icqtypes.StoreKey], - appKeepers.IBCKeeper, - ) - - appKeepers.ICACallbacksKeeper = icacallbackskeeper.NewKeeper( - appCodec, - appKeepers.keys[icacallbackstypes.StoreKey], - appKeepers.keys[icacallbackstypes.MemStoreKey], - *appKeepers.IBCKeeper, - ) - - appKeepers.RecordsKeeper = recordskeeper.NewKeeper( - appCodec, - appKeepers.keys[recordstypes.StoreKey], - appKeepers.keys[recordstypes.MemStoreKey], - appKeepers.AccountKeeper, - appKeepers.TransferKeeper, - *appKeepers.IBCKeeper, - *appKeepers.ICACallbacksKeeper, - ) - - appKeepers.StakeIBCKeeper = stakeibckeeper.NewKeeper( - appCodec, - appKeepers.keys[stakeibctypes.StoreKey], - appKeepers.keys[stakeibctypes.MemStoreKey], - runtime.NewKVStoreService(appKeepers.keys[stakeibctypes.StoreKey]), - govAuthority, - appKeepers.AccountKeeper, - appKeepers.BankKeeper, - appKeepers.ICAControllerKeeper, - *appKeepers.IBCKeeper, - appKeepers.InterchainQueryKeeper, - *appKeepers.RecordsKeeper, - *appKeepers.ICACallbacksKeeper, - appKeepers.RateLimitKeeper, - ) - - appKeepers.EpochsKeeper = epochskeeper.NewKeeper(appCodec, appKeepers.keys[epochstypes.StoreKey]) - // Must be called on PFMRouter AFTER TransferKeeper initialized appKeepers.PFMRouterKeeper.SetTransferKeeper(appKeepers.TransferKeeper) @@ -785,10 +720,6 @@ func NewAppKeeper( *appKeepers.RateLimitKeeper, transferStack, ) - transferStack = records.NewIBCModule( - *appKeepers.RecordsKeeper, - transferStack, - ) transferStack = ibcfee.NewIBCMiddleware( transferStack, appKeepers.IBCFeeKeeper, @@ -797,11 +728,8 @@ func NewAppKeeper( // Create ICAHost Stack var icaHostStack porttypes.IBCModule = icahost.NewIBCModule(appKeepers.ICAHostKeeper) - // Create InterChain Callbacks Stack - var icaCallbacksStack porttypes.IBCModule = icacallbacks.NewIBCModule(*appKeepers.ICACallbacksKeeper) - appKeepers.StakeIBCKeeper.SetHooks(stakeibctypes.NewMultiStakeIBCHooks()) - icaCallbacksStack = stakeibc.NewIBCMiddleware(icaCallbacksStack, appKeepers.StakeIBCKeeper) - icaCallbacksStack = icacontroller.NewIBCMiddleware(icaCallbacksStack, appKeepers.ICAControllerKeeper) + var icaControllerStack porttypes.IBCModule + icaControllerStack = icacontroller.NewIBCMiddleware(icaControllerStack, appKeepers.ICAControllerKeeper) var wasmStack porttypes.IBCModule wasmStack = wasm.NewIBCHandler(appKeepers.WasmKeeper, appKeepers.IBCKeeper.ChannelKeeper, appKeepers.IBCFeeKeeper) @@ -810,31 +738,13 @@ func NewAppKeeper( // Create IBC Router & seal ibcRouter := porttypes.NewRouter(). AddRoute(icahosttypes.SubModuleName, icaHostStack). - AddRoute(icacontrollertypes.SubModuleName, icaCallbacksStack). + AddRoute(icacontrollertypes.SubModuleName, icaControllerStack). AddRoute(ibctransfertypes.ModuleName, transferStack). AddRoute(providertypes.ModuleName, appKeepers.ProviderModule). AddRoute(wasmtypes.ModuleName, wasmStack) appKeepers.IBCKeeper.SetRouter(ibcRouter) - appKeepers.EpochsKeeper = appKeepers.EpochsKeeper.SetHooks( - epochstypes.NewMultiEpochHooks( - appKeepers.StakeIBCKeeper.Hooks(), - ), - ) - - // Register ICQ callbacks - err = appKeepers.InterchainQueryKeeper.SetCallbackHandler(stakeibctypes.ModuleName, appKeepers.StakeIBCKeeper.ICQCallbackHandler()) - if err != nil { - panic(err) - } - - // Register IBC callbacks - err = appKeepers.ICACallbacksKeeper.SetICACallbacks(appKeepers.StakeIBCKeeper.Callbacks(), appKeepers.RecordsKeeper.Callbacks()) - if err != nil { - panic(err) - } - return appKeepers } diff --git a/app/keepers/keys.go b/app/keepers/keys.go index f54a356a2..ead41c505 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -35,17 +35,12 @@ import ( wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" assetstypes "github.com/milkyway-labs/milkyway/x/assets/types" - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" liquidvestingtypes "github.com/milkyway-labs/milkyway/x/liquidvesting/types" operatorstypes "github.com/milkyway-labs/milkyway/x/operators/types" poolstypes "github.com/milkyway-labs/milkyway/x/pools/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" restakingtypes "github.com/milkyway-labs/milkyway/x/restaking/types" rewardstypes "github.com/milkyway-labs/milkyway/x/rewards/types" servicestypes "github.com/milkyway-labs/milkyway/x/services/types" - stakeibctypes "github.com/milkyway-labs/milkyway/x/stakeibc/types" tokenfactorytypes "github.com/milkyway-labs/milkyway/x/tokenfactory/types" ) @@ -85,13 +80,6 @@ func (appKeepers *AppKeepers) GenerateKeys() { oracletypes.StoreKey, feemarkettypes.StoreKey, - // Stride - epochstypes.StoreKey, - icqtypes.StoreKey, - icacallbackstypes.StoreKey, - recordstypes.StoreKey, - stakeibctypes.StoreKey, - // Custom modules servicestypes.StoreKey, operatorstypes.StoreKey, diff --git a/app/keepers/modules.go b/app/keepers/modules.go index 3bdf49f30..c031cd864 100644 --- a/app/keepers/modules.go +++ b/app/keepers/modules.go @@ -32,17 +32,12 @@ import ( "github.com/skip-mev/feemarket/x/feemarket" "github.com/milkyway-labs/milkyway/x/assets" - "github.com/milkyway-labs/milkyway/x/epochs" - "github.com/milkyway-labs/milkyway/x/icacallbacks" - "github.com/milkyway-labs/milkyway/x/interchainquery" "github.com/milkyway-labs/milkyway/x/liquidvesting" "github.com/milkyway-labs/milkyway/x/operators" "github.com/milkyway-labs/milkyway/x/pools" - "github.com/milkyway-labs/milkyway/x/records" "github.com/milkyway-labs/milkyway/x/restaking" "github.com/milkyway-labs/milkyway/x/rewards" "github.com/milkyway-labs/milkyway/x/services" - "github.com/milkyway-labs/milkyway/x/stakeibc" ) var AppModuleBasics = module.NewBasicManager( @@ -79,13 +74,6 @@ var AppModuleBasics = module.NewBasicManager( ratelimit.AppModuleBasic{}, icsprovider.AppModuleBasic{}, - // Stride modules - stakeibc.AppModuleBasic{}, - epochs.AppModuleBasic{}, - interchainquery.AppModuleBasic{}, - records.AppModuleBasic{}, - icacallbacks.AppModuleBasic{}, - // MilkyWay modules services.AppModuleBasic{}, operators.AppModuleBasic{}, diff --git a/app/modules.go b/app/modules.go index 9a02f17a2..8c6b824be 100644 --- a/app/modules.go +++ b/app/modules.go @@ -68,28 +68,18 @@ import ( "github.com/milkyway-labs/milkyway/x/assets" assetstypes "github.com/milkyway-labs/milkyway/x/assets/types" - "github.com/milkyway-labs/milkyway/x/epochs" - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - "github.com/milkyway-labs/milkyway/x/icacallbacks" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - "github.com/milkyway-labs/milkyway/x/interchainquery" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" "github.com/milkyway-labs/milkyway/x/liquidvesting" liquidvestingtypes "github.com/milkyway-labs/milkyway/x/liquidvesting/types" "github.com/milkyway-labs/milkyway/x/operators" operatorstypes "github.com/milkyway-labs/milkyway/x/operators/types" "github.com/milkyway-labs/milkyway/x/pools" poolstypes "github.com/milkyway-labs/milkyway/x/pools/types" - "github.com/milkyway-labs/milkyway/x/records" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" "github.com/milkyway-labs/milkyway/x/restaking" restakingtypes "github.com/milkyway-labs/milkyway/x/restaking/types" "github.com/milkyway-labs/milkyway/x/rewards" rewardstypes "github.com/milkyway-labs/milkyway/x/rewards/types" "github.com/milkyway-labs/milkyway/x/services" servicestypes "github.com/milkyway-labs/milkyway/x/services/types" - "github.com/milkyway-labs/milkyway/x/stakeibc" - stakeibctypes "github.com/milkyway-labs/milkyway/x/stakeibc/types" tokenfactorytypes "github.com/milkyway-labs/milkyway/x/tokenfactory/types" ) @@ -112,11 +102,6 @@ var MaccPerms = map[string][]string{ // Skip oracletypes.ModuleName: nil, - // Stride - icqtypes.ModuleName: nil, - stakeibctypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking}, - stakeibctypes.RewardCollectorName: nil, - // MilkyWay permissions rewardstypes.RewardsPoolName: nil, liquidvestingtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, @@ -168,13 +153,6 @@ func appModules( app.RateLimitModule, app.ProviderModule, - // Stride modules - stakeibc.NewAppModule(appCodec, app.StakeIBCKeeper, app.AccountKeeper, app.BankKeeper), - epochs.NewAppModule(appCodec, *app.EpochsKeeper), - interchainquery.NewAppModule(appCodec, app.InterchainQueryKeeper), - records.NewAppModule(appCodec, *app.RecordsKeeper, app.AccountKeeper, app.BankKeeper), - icacallbacks.NewAppModule(appCodec, *app.ICACallbacksKeeper, app.AccountKeeper, app.BankKeeper), - // MilkyWay modules services.NewAppModule(appCodec, app.ServicesKeeper, app.AccountKeeper, app.BankKeeper), operators.NewAppModule(appCodec, app.OperatorsKeeper), @@ -272,17 +250,13 @@ func orderBeginBlockers() []string { providertypes.ModuleName, consensusparamtypes.ModuleName, wasmtypes.ModuleName, + ratelimittypes.ModuleName, // Skip modules oracletypes.ModuleName, marketmaptypes.ModuleName, feemarkettypes.ModuleName, - // Stride modules - stakeibctypes.ModuleName, - epochstypes.ModuleName, - ratelimittypes.ModuleName, - // MilkyWay modules rewardstypes.ModuleName, servicestypes.ModuleName, @@ -333,10 +307,6 @@ func orderEndBlockers() []string { oracletypes.ModuleName, feemarkettypes.ModuleName, - // Stride modules - stakeibctypes.ModuleName, - icqtypes.ModuleName, - // MilkyWay modules servicestypes.ModuleName, operatorstypes.ModuleName, @@ -382,13 +352,6 @@ func orderInitBlockers() []string { oracletypes.ModuleName, marketmaptypes.ModuleName, - // Stride modules - stakeibctypes.ModuleName, - epochstypes.ModuleName, - icqtypes.ModuleName, - recordstypes.ModuleName, - icacallbackstypes.ModuleName, - // MilkyWay modules servicestypes.ModuleName, operatorstypes.ModuleName, diff --git a/proto/stride/epochs/genesis.proto b/proto/stride/epochs/genesis.proto deleted file mode 100755 index 8b29e5d99..000000000 --- a/proto/stride/epochs/genesis.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; -package stride.epochs; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/epochs/types"; - -message EpochInfo { - string identifier = 1; - google.protobuf.Timestamp start_time = 2 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"start_time\"" - ]; - google.protobuf.Duration duration = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration,omitempty", - (gogoproto.moretags) = "yaml:\"duration\"" - ]; - int64 current_epoch = 4; - google.protobuf.Timestamp current_epoch_start_time = 5 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"current_epoch_start_time\"" - ]; - bool epoch_counting_started = 6; - int64 current_epoch_start_height = 7; -} - -// GenesisState defines the epochs module's genesis state. -message GenesisState { - repeated EpochInfo epochs = 1 [ (gogoproto.nullable) = false ]; -} \ No newline at end of file diff --git a/proto/stride/epochs/query.proto b/proto/stride/epochs/query.proto deleted file mode 100644 index dad01cda1..000000000 --- a/proto/stride/epochs/query.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; -package stride.epochs; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "stride/epochs/genesis.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/epochs/types"; - -// Query defines the gRPC querier service. -service Query { - // EpochInfos provide running epochInfos - rpc EpochInfos(QueryEpochsInfoRequest) returns (QueryEpochsInfoResponse) { - option (google.api.http).get = "/Stridelabs/stride/epochs"; - } - // CurrentEpoch provide current epoch of specified identifier - rpc CurrentEpoch(QueryCurrentEpochRequest) - returns (QueryCurrentEpochResponse) { - option (google.api.http).get = "/Stridelabs/stride/epochs/current_epoch"; - } - // CurrentEpoch provide current epoch of specified identifier - rpc EpochInfo(QueryEpochInfoRequest) returns (QueryEpochInfoResponse) { - option (google.api.http).get = "/Stridelabs/stride/epochs/epoch_info"; - } -} - -message QueryEpochsInfoRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -message QueryEpochsInfoResponse { - repeated EpochInfo epochs = 1 [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message QueryCurrentEpochRequest { string identifier = 1; } -message QueryCurrentEpochResponse { int64 current_epoch = 1; } - -message QueryEpochInfoRequest { string identifier = 1; } -message QueryEpochInfoResponse { - EpochInfo epoch = 1 [ (gogoproto.nullable) = false ]; -} - -// syntax = "proto3"; -// package stride.epochs; - -// import "gogoproto/gogo.proto"; -// import "google/api/annotations.proto"; -// import "cosmos/base/query/v1beta1/pagination.proto"; -// import "epochs/params.proto"; -// // this line is used by starport scaffolding # 1 - -// option go_package = "github.com/milkyway-labs/milkyway/x/epochs/types"; - -// // Query defines the gRPC querier service. -// service Query { -// // Parameters queries the parameters of the module. -// rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { -// option (google.api.http).get = "/Stridelabs/stride/epochs/params"; -// } -// // this line is used by starport scaffolding # 2 -// } - -// // QueryParamsRequest is request type for the Query/Params RPC method. -// message QueryParamsRequest {} - -// // QueryParamsResponse is response type for the Query/Params RPC method. -// message QueryParamsResponse { -// // params holds all the parameters of this module. -// Params params = 1 [(gogoproto.nullable) = false]; -// } - -// // this line is used by starport scaffolding # 3 diff --git a/proto/stride/icacallbacks/callback_data.proto b/proto/stride/icacallbacks/callback_data.proto deleted file mode 100755 index 69a37d3d8..000000000 --- a/proto/stride/icacallbacks/callback_data.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; -package stride.icacallbacks; - -option go_package = "github.com/milkyway-labs/milkyway/x/icacallbacks/types"; - -message CallbackData { - string callback_key = 1; - string port_id = 2; - string channel_id = 3; - uint64 sequence = 4; - string callback_id = 5; - bytes callback_args = 6; -} diff --git a/proto/stride/icacallbacks/genesis.proto b/proto/stride/icacallbacks/genesis.proto deleted file mode 100755 index 3f38ec93b..000000000 --- a/proto/stride/icacallbacks/genesis.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package stride.icacallbacks; - -import "gogoproto/gogo.proto"; -import "stride/icacallbacks/params.proto"; -import "stride/icacallbacks/callback_data.proto"; -// this line is used by starport scaffolding # genesis/proto/import - -option go_package = "github.com/milkyway-labs/milkyway/x/icacallbacks/types"; - -// GenesisState defines the icacallbacks module's genesis state. -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - string port_id = 2; - repeated CallbackData callback_data_list = 3 [ (gogoproto.nullable) = false ]; - // this line is used by starport scaffolding # genesis/proto/state -} diff --git a/proto/stride/icacallbacks/packet.proto b/proto/stride/icacallbacks/packet.proto deleted file mode 100755 index 4a149917b..000000000 --- a/proto/stride/icacallbacks/packet.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package stride.icacallbacks; - -// this line is used by starport scaffolding # proto/packet/import - -option go_package = "github.com/milkyway-labs/milkyway/x/icacallbacks/types"; - -message IcacallbacksPacketData { - oneof packet { - NoData no_data = 1; - // this line is used by starport scaffolding # ibc/packet/proto/field - } -} - -message NoData {} - -// this line is used by starport scaffolding # ibc/packet/proto/message diff --git a/proto/stride/icacallbacks/params.proto b/proto/stride/icacallbacks/params.proto deleted file mode 100755 index af4f725f9..000000000 --- a/proto/stride/icacallbacks/params.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package stride.icacallbacks; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/icacallbacks/types"; - -// Params defines the parameters for the module. -message Params { option (gogoproto.goproto_stringer) = false; } diff --git a/proto/stride/icacallbacks/query.proto b/proto/stride/icacallbacks/query.proto deleted file mode 100644 index 66f4622af..000000000 --- a/proto/stride/icacallbacks/query.proto +++ /dev/null @@ -1,60 +0,0 @@ -syntax = "proto3"; -package stride.icacallbacks; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "stride/icacallbacks/params.proto"; -import "stride/icacallbacks/callback_data.proto"; -// this line is used by starport scaffolding # 1 - -option go_package = "github.com/milkyway-labs/milkyway/x/icacallbacks/types"; - -// Query defines the gRPC querier service. -service Query { - // Parameters queries the parameters of the module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/Stride-Labs/stride/icacallbacks/params"; - } - // Queries a CallbackData by index. - rpc CallbackData(QueryGetCallbackDataRequest) - returns (QueryGetCallbackDataResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/icacallbacks/callback_data/{callback_key}"; - } - - // Queries a list of CallbackData items. - rpc CallbackDataAll(QueryAllCallbackDataRequest) - returns (QueryAllCallbackDataResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/icacallbacks/callback_data"; - } - - // this line is used by starport scaffolding # 2 -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryGetCallbackDataRequest { string callback_key = 1; } - -message QueryGetCallbackDataResponse { - CallbackData callback_data = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryAllCallbackDataRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -message QueryAllCallbackDataResponse { - repeated CallbackData callback_data = 1 [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// this line is used by starport scaffolding # 3 diff --git a/proto/stride/icacallbacks/tx.proto b/proto/stride/icacallbacks/tx.proto deleted file mode 100755 index bbadaf214..000000000 --- a/proto/stride/icacallbacks/tx.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package stride.icacallbacks; - -import "cosmos/msg/v1/msg.proto"; - -// this line is used by starport scaffolding # proto/tx/import - -option go_package = "github.com/milkyway-labs/milkyway/x/icacallbacks/types"; - -// Msg defines the Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - // this line is used by starport scaffolding # proto/tx/rpc -} - -// this line is used by starport scaffolding # proto/tx/message diff --git a/proto/stride/interchainquery/v1/genesis.proto b/proto/stride/interchainquery/v1/genesis.proto deleted file mode 100644 index 5eed8c2e4..000000000 --- a/proto/stride/interchainquery/v1/genesis.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; -package stride.interchainquery.v1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/interchainquery/types"; - -enum TimeoutPolicy { - REJECT_QUERY_RESPONSE = 0; - RETRY_QUERY_REQUEST = 1; - EXECUTE_QUERY_CALLBACK = 2; -} - -message Query { - string id = 1; - string connection_id = 2; - string chain_id = 3; - string query_type = 4; - bytes request_data = 5; - string callback_module = 13; - string callback_id = 8; - bytes callback_data = 12; - TimeoutPolicy timeout_policy = 15; - google.protobuf.Duration timeout_duration = 14 - [ (gogoproto.nullable) = false, (gogoproto.stdduration) = true ]; - uint64 timeout_timestamp = 9; - bool request_sent = 11; - uint64 submission_height = 16; -} - -message DataPoint { - string id = 1; - string remote_height = 2 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string local_height = 3 [ - (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - bytes value = 4 [ (gogoproto.jsontag) = "result,omitempty" ]; -} - -// GenesisState defines the epochs module's genesis state. -message GenesisState { - repeated Query queries = 1 [ (gogoproto.nullable) = false ]; -} \ No newline at end of file diff --git a/proto/stride/interchainquery/v1/messages.proto b/proto/stride/interchainquery/v1/messages.proto deleted file mode 100755 index b716aa3b2..000000000 --- a/proto/stride/interchainquery/v1/messages.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; -package stride.interchainquery.v1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/msg/v1/msg.proto"; -import "google/api/annotations.proto"; -import "tendermint/crypto/proof.proto"; -import "amino/amino.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/interchainquery/types"; - -// Msg defines the interchainquery Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - // SubmitQueryResponse defines a method for submit query responses. - rpc SubmitQueryResponse(MsgSubmitQueryResponse) - returns (MsgSubmitQueryResponseResponse) { - option (google.api.http) = { - post : "/interchainquery/tx/v1beta1/submitquery" - body : "*" - }; - }; -} - -// MsgSubmitQueryResponse represents a message type to fulfil a query request. -message MsgSubmitQueryResponse { - option (cosmos.msg.v1.signer) = "from_address"; - option (amino.name) = "stride/x/interchainquery/MsgSubmitQueryResponse"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - string chain_id = 1 [ (gogoproto.moretags) = "yaml:\"chain_id\"" ]; - string query_id = 2 [ (gogoproto.moretags) = "yaml:\"query_id\"" ]; - bytes result = 3 [ (gogoproto.moretags) = "yaml:\"result\"" ]; - tendermint.crypto.ProofOps proof_ops = 4 - [ (gogoproto.moretags) = "yaml:\"proof_ops\"" ]; - int64 height = 5 [ (gogoproto.moretags) = "yaml:\"height\"" ]; - string from_address = 6 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; -} - -// MsgSubmitQueryResponseResponse defines the MsgSubmitQueryResponse response -// type. -message MsgSubmitQueryResponseResponse {} diff --git a/proto/stride/interchainquery/v1/query.proto b/proto/stride/interchainquery/v1/query.proto deleted file mode 100644 index 03d732667..000000000 --- a/proto/stride/interchainquery/v1/query.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package stride.interchainquery.v1; - -import "stride/interchainquery/v1/genesis.proto"; -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/interchainquery/types"; - -service QueryService { - rpc PendingQueries(QueryPendingQueriesRequest) - returns (QueryPendingQueriesResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/interchainquery/pending_queries"; - } -} - -message QueryPendingQueriesRequest {} -message QueryPendingQueriesResponse { - repeated Query pending_queries = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/stride/records/callbacks.proto b/proto/stride/records/callbacks.proto deleted file mode 100644 index 361d6d95c..000000000 --- a/proto/stride/records/callbacks.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; -package stride.records; - -import "stride/records/records.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/records/types"; - -message TransferCallback { uint64 deposit_record_id = 1; } - -message TransferLSMTokenCallback { LSMTokenDeposit deposit = 1; } diff --git a/proto/stride/records/genesis.proto b/proto/stride/records/genesis.proto deleted file mode 100644 index a99b2a59c..000000000 --- a/proto/stride/records/genesis.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package stride.records; - -import "stride/records/params.proto"; -import "stride/records/records.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/records/types"; - -// GenesisState defines the records module's genesis state. -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - string port_id = 2; - repeated UserRedemptionRecord user_redemption_record_list = 3 - [ (gogoproto.nullable) = false ]; - uint64 user_redemption_record_count = 4; - repeated EpochUnbondingRecord epoch_unbonding_record_list = 5 - [ (gogoproto.nullable) = false ]; - repeated DepositRecord deposit_record_list = 7 - [ (gogoproto.nullable) = false ]; - uint64 deposit_record_count = 8; - repeated LSMTokenDeposit lsm_token_deposit_list = 9 - [ (gogoproto.nullable) = false ]; -} diff --git a/proto/stride/records/params.proto b/proto/stride/records/params.proto deleted file mode 100644 index df6bd9ecf..000000000 --- a/proto/stride/records/params.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; -package stride.records; - -option go_package = "github.com/milkyway-labs/milkyway/x/records/types"; - -// Params defines the parameters for the module. -message Params {} \ No newline at end of file diff --git a/proto/stride/records/query.proto b/proto/stride/records/query.proto deleted file mode 100644 index 37a2577ca..000000000 --- a/proto/stride/records/query.proto +++ /dev/null @@ -1,185 +0,0 @@ -syntax = "proto3"; -package stride.records; - -import "stride/records/records.proto"; -import "stride/records/params.proto"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/records/types"; - -// Query defines the gRPC querier service. -service Query { - // Parameters queries the parameters of the module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/StrideLabs/stride/records/params"; - } - // Queries a UserRedemptionRecord by id. - rpc UserRedemptionRecord(QueryGetUserRedemptionRecordRequest) - returns (QueryGetUserRedemptionRecordResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/records/user_redemption_record/{id}"; - } - - // Queries a list of UserRedemptionRecord items. - rpc UserRedemptionRecordAll(QueryAllUserRedemptionRecordRequest) - returns (QueryAllUserRedemptionRecordResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/records/user_redemption_record"; - } - - // Queries a list of UserRedemptionRecord items by chainId / userId pair. - rpc UserRedemptionRecordForUser(QueryAllUserRedemptionRecordForUserRequest) - returns (QueryAllUserRedemptionRecordForUserResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/records/user_redemption_record_for_user/" - "{chain_id}/{day}/{address}/{limit}"; - } - - // Queries a EpochUnbondingRecord by id. - rpc EpochUnbondingRecord(QueryGetEpochUnbondingRecordRequest) - returns (QueryGetEpochUnbondingRecordResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/records/epoch_unbonding_record/{epoch_number}"; - } - - // Queries a list of EpochUnbondingRecord items. - rpc EpochUnbondingRecordAll(QueryAllEpochUnbondingRecordRequest) - returns (QueryAllEpochUnbondingRecordResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/records/epoch_unbonding_record"; - } - - // Queries a DepositRecord by id. - rpc DepositRecord(QueryGetDepositRecordRequest) - returns (QueryGetDepositRecordResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/records/deposit_record/{id}"; - } - - // Queries a list of DepositRecord items. - rpc DepositRecordAll(QueryAllDepositRecordRequest) - returns (QueryAllDepositRecordResponse) { - option (google.api.http).get = "/Stride-Labs/stride/records/deposit_record"; - } - - // Queries a list of DepositRecord items for a given host zone - rpc DepositRecordByHost(QueryDepositRecordByHostRequest) - returns (QueryDepositRecordByHostResponse) { - option (google.api.http).get = "/Stride-Labs/stride/records/" - "deposit_record_by_host_zone/{host_zone_id}"; - } - - // Queries the existing LSMTokenDeposits for one specific deposit - rpc LSMDeposit(QueryLSMDepositRequest) returns (QueryLSMDepositResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/stakeibc/lsm_deposit/{chain_id}/{denom}"; - } - - // Queries the existing LSMTokenDeposits for all which match filters - // intended use: - // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z - rpc LSMDeposits(QueryLSMDepositsRequest) returns (QueryLSMDepositsResponse) { - option (google.api.http).get = "/Stride-Labs/stride/stakeibc/lsm_deposits"; - } -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryGetDepositRecordRequest { uint64 id = 1; } - -message QueryGetDepositRecordResponse { - DepositRecord deposit_record = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryAllDepositRecordRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -message QueryAllDepositRecordResponse { - repeated DepositRecord deposit_record = 1 [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message QueryDepositRecordByHostRequest { string host_zone_id = 1; } - -message QueryDepositRecordByHostResponse { - repeated DepositRecord deposit_record = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryGetUserRedemptionRecordRequest { string id = 1; } - -message QueryGetUserRedemptionRecordResponse { - UserRedemptionRecord user_redemption_record = 1 - [ (gogoproto.nullable) = false ]; -} - -message QueryAllUserRedemptionRecordRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -message QueryAllUserRedemptionRecordResponse { - repeated UserRedemptionRecord user_redemption_record = 1 - [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// Query UserRedemptionRecords by chainId / userId pair -message QueryAllUserRedemptionRecordForUserRequest { - string chain_id = 1; - uint64 day = 2; - string address = 3; - uint64 limit = 4; - cosmos.base.query.v1beta1.PageRequest pagination = 5; -} - -message QueryAllUserRedemptionRecordForUserResponse { - repeated UserRedemptionRecord user_redemption_record = 1 - [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message QueryGetEpochUnbondingRecordRequest { uint64 epoch_number = 1; } - -message QueryGetEpochUnbondingRecordResponse { - EpochUnbondingRecord epoch_unbonding_record = 1 - [ (gogoproto.nullable) = false ]; -} - -message QueryAllEpochUnbondingRecordRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -message QueryAllEpochUnbondingRecordResponse { - repeated EpochUnbondingRecord epoch_unbonding_record = 1 - [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message QueryLSMDepositRequest { - string chain_id = 1; - string denom = 2; -} - -message QueryLSMDepositResponse { - LSMTokenDeposit deposit = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryLSMDepositsRequest { - string chain_id = 1; - string validator_address = 2; - string status = 3; -} - -message QueryLSMDepositsResponse { - repeated LSMTokenDeposit deposits = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/stride/records/records.proto b/proto/stride/records/records.proto deleted file mode 100644 index 7e51cf88b..000000000 --- a/proto/stride/records/records.proto +++ /dev/null @@ -1,111 +0,0 @@ -syntax = "proto3"; -package stride.records; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/records/types"; - -message UserRedemptionRecord { - string id = 1; // {chain_id}.{epoch}.{receiver} - string receiver = 3; - string native_token_amount = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string denom = 5; - string host_zone_id = 6; - uint64 epoch_number = 7; - bool claim_is_pending = 8; - reserved 2; - string st_token_amount = 9 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -message DepositRecord { - uint64 id = 1; - string amount = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string denom = 3; - string host_zone_id = 4; - enum Status { - // in transfer queue to be sent to the delegation ICA - TRANSFER_QUEUE = 0; - // transfer in progress (IBC packet sent, ack not received) - TRANSFER_IN_PROGRESS = 2; - // in staking queue on delegation ICA - DELEGATION_QUEUE = 1; - // staking in progress (ICA packet sent, ack not received) - DELEGATION_IN_PROGRESS = 3; - } - enum Source { - STRIDE = 0; - WITHDRAWAL_ICA = 1; - } - Status status = 6; - uint64 deposit_epoch_number = 7; - Source source = 8; - - reserved 5; -} - -message HostZoneUnbonding { - enum Status { - // tokens bonded on delegate account - UNBONDING_QUEUE = 0; - UNBONDING_IN_PROGRESS = 3; - // unbonding completed on delegate account - EXIT_TRANSFER_QUEUE = 1; - EXIT_TRANSFER_IN_PROGRESS = 4; - // transfer success - CLAIMABLE = 2; - } - string st_token_amount = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string native_token_amount = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string denom = 3; - string host_zone_id = 4; - uint64 unbonding_time = 5; - Status status = 6; - repeated string user_redemption_records = 7; -} - -message EpochUnbondingRecord { - uint64 epoch_number = 1; - repeated HostZoneUnbonding host_zone_unbondings = 3; - reserved 2; -} - -message LSMTokenDeposit { - enum Status { - DEPOSIT_PENDING = 0; - TRANSFER_QUEUE = 1; - TRANSFER_IN_PROGRESS = 2; - TRANSFER_FAILED = 3; - DETOKENIZATION_QUEUE = 4; - DETOKENIZATION_IN_PROGRESS = 5; - DETOKENIZATION_FAILED = 6; - } - - string deposit_id = 1; - string chain_id = 2; - string denom = 3; - string ibc_denom = 4; - string staker_address = 5; - string validator_address = 6; - string amount = 7 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - cosmos.base.v1beta1.Coin st_token = 8 [ (gogoproto.nullable) = false ]; - Status status = 9; -} diff --git a/proto/stride/stakeibc/README.md b/proto/stride/stakeibc/README.md deleted file mode 100755 index 6ab06a4a5..000000000 --- a/proto/stride/stakeibc/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Some of the data structures used in this module were inspired by Quicksilver. - -Specifically, we used their modeling of interchain accounts and zones (although the implementation has since diverged) for the following data structures -- Icaaccount -- HostZone diff --git a/proto/stride/stakeibc/address_unbonding.proto b/proto/stride/stakeibc/address_unbonding.proto deleted file mode 100644 index 65fb801f4..000000000 --- a/proto/stride/stakeibc/address_unbonding.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -message AddressUnbonding { - string address = 1; - string receiver = 2; - string unbonding_estimated_time = 3; - string amount = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string denom = 5; - bool claim_is_pending = 8; - uint64 epoch_number = 9; -} \ No newline at end of file diff --git a/proto/stride/stakeibc/callbacks.proto b/proto/stride/stakeibc/callbacks.proto deleted file mode 100644 index d675244e5..000000000 --- a/proto/stride/stakeibc/callbacks.proto +++ /dev/null @@ -1,93 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "stride/records/records.proto"; -import "stride/stakeibc/host_zone.proto"; -import "stride/stakeibc/validator.proto"; -import "stride/stakeibc/ica_account.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -message SplitDelegation { - string validator = 1; - string amount = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -message DelegateCallback { - string host_zone_id = 1; - uint64 deposit_record_id = 2; - repeated SplitDelegation split_delegations = 3; -} - -message ClaimCallback { - string user_redemption_record_id = 1; - string chain_id = 2; - uint64 epoch_number = 3; -} - -message ReinvestCallback { - cosmos.base.v1beta1.Coin reinvest_amount = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "cosmossdk.io/math.Coin" - ]; - string host_zone_id = 3; -} - -message UndelegateCallback { - string host_zone_id = 1; - repeated SplitDelegation split_delegations = 2; - repeated uint64 epoch_unbonding_record_ids = 3; -} - -message RedemptionCallback { - string host_zone_id = 1; - repeated uint64 epoch_unbonding_record_ids = 2; -} - -message Rebalancing { - string src_validator = 1; - string dst_validator = 2; - string amt = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -message RebalanceCallback { - string host_zone_id = 1; - repeated Rebalancing rebalancings = 2; -} - -message DetokenizeSharesCallback { records.LSMTokenDeposit deposit = 1; } - -message LSMLiquidStake { - records.LSMTokenDeposit deposit = 1; - HostZone host_zone = 2; - Validator validator = 3; -} - -message ValidatorSharesToTokensQueryCallback { - LSMLiquidStake lsm_liquid_stake = 1; -} - -message DelegatorSharesQueryCallback { - // Validator delegation at the time the query is submitted - string initial_validator_delegation = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -message CommunityPoolBalanceQueryCallback { - ICAAccountType ica_type = 1; - string denom = 2; -} - -message TradeRouteCallback { - string reward_denom = 1; - string host_denom = 2; -} diff --git a/proto/stride/stakeibc/epoch_tracker.proto b/proto/stride/stakeibc/epoch_tracker.proto deleted file mode 100755 index d0dbb925c..000000000 --- a/proto/stride/stakeibc/epoch_tracker.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -message EpochTracker { - string epoch_identifier = 1; - uint64 epoch_number = 2; - uint64 next_epoch_start_time = 3; - uint64 duration = 4; -} diff --git a/proto/stride/stakeibc/genesis.proto b/proto/stride/stakeibc/genesis.proto deleted file mode 100644 index e4aa9ea99..000000000 --- a/proto/stride/stakeibc/genesis.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -import "gogoproto/gogo.proto"; -import "stride/stakeibc/params.proto"; -import "stride/stakeibc/host_zone.proto"; -import "stride/stakeibc/epoch_tracker.proto"; -// this line is used by starport scaffolding # genesis/proto/import - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -// GenesisState defines the stakeibc module's genesis state. -message GenesisState { - Params params = 1 [ (gogoproto.nullable) = false ]; - string port_id = 2; - // list of zones that are registered by the protocol - repeated HostZone host_zone_list = 5 [ (gogoproto.nullable) = false ]; - repeated EpochTracker epoch_tracker_list = 10 - [ (gogoproto.nullable) = false ]; - // this line is used by starport scaffolding # genesis/proto/state - reserved 3, 4, 6, 9, 11; -} diff --git a/proto/stride/stakeibc/host_zone.proto b/proto/stride/stakeibc/host_zone.proto deleted file mode 100644 index 6b5e987dc..000000000 --- a/proto/stride/stakeibc/host_zone.proto +++ /dev/null @@ -1,138 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -import "stride/stakeibc/validator.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -// CommunityPoolRebate stores the size of the community pool liquid stake -// (denominated in stTokens) and the rebate rate as a decimal -message CommunityPoolRebate { - // Rebate percentage as a decimal (e.g. 0.2 for 20%) - string rebate_rate = 1 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // Number of stTokens received from the community pool liquid stake - string liquid_staked_st_token_amount = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -// Core data structure to track liquid staking zones -message HostZone { - // Chain ID of the host zone - string chain_id = 1; - // Bech32 prefix of host zone's address - string bech32prefix = 17; - // ConnectionID from Stride to the host zone (ID is on the stride side) - string connection_id = 2; - // Transfer Channel ID from Stride to the host zone (ID is on the stride side) - string transfer_channel_id = 12; - // ibc denom of the host zone's native token on stride - string ibc_denom = 8; - // native denom on host zone - string host_denom = 9; - // The unbonding period in days (e.g. 21) - uint64 unbonding_period = 26; - // List of validators that are delegated to - repeated Validator validators = 3; - // Address that custodies native tokens during a liquid stake - string deposit_address = 18 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // ICA Address on the host zone responsible for collecting rewards - string withdrawal_ica_address = 22 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // ICA Address on the host zone responsible for commission - string fee_ica_address = 23 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // ICA Address on the host zone responsible for staking and unstaking - string delegation_ica_address = 24 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // ICA Address that receives unstaked tokens after they've finished unbonding - string redemption_ica_address = 25 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // ICA Address that receives tokens from a community pool to liquid stake or - // redeem In the case of a liquid stake, the community pool deposits native - // tokens In the case of a redemption, the community pool deposits stTokens - string community_pool_deposit_ica_address = 30 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // ICA Address that distributes tokens back to the community pool during a - // community pool liquid stake or redeem In the case of a liquid stake, the - // return address sends back stTokens In the case of a redemption, the return - // address sends back native tokens - string community_pool_return_ica_address = 31 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // Module account on Stride that receives native tokens from the deposit ICA - // and liquid stakes them - string community_pool_stake_holding_address = 32 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // Module account on Stride that receives stTokens from the deposit ICA and - // redeems them - string community_pool_redeem_holding_address = 33 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // Optional community pool address to send tokens to after a community pool - // liquid stake or redemption If this address is empty, the tokens are sent to - // the main community pool - string community_pool_treasury_address = 35 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // The total delegated balance on the host zone - string total_delegations = 13 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - // The redemption rate from the previous epoch - string last_redemption_rate = 10 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // The current redemption rate - string redemption_rate = 11 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // The min outer redemption rate bound - controlled only be governance - // The min inner bound cannot exceed this bound - string min_redemption_rate = 20 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // The max outer redemption rate bound - controlled only be governance - // The max inner bound cannot exceed this bound - string max_redemption_rate = 21 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // The min minner redemption rate bound - controlled by the admin - // If the redemption rate exceeds this bound, the host zone is halted - string min_inner_redemption_rate = 28 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // The max minner redemption rate bound - controlled by the admin - // If the redemption rate exceeds this bound, the host zone is halted - string max_inner_redemption_rate = 29 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // The max number of messages that can be sent in a delegation - // or undelegation ICA tx - uint64 max_messages_per_ica_tx = 36; - // An optional fee rebate - // If there is no rebate for the host zone, this will be nil - CommunityPoolRebate community_pool_rebate = 34; - // A boolean indicating whether the chain has LSM enabled - bool lsm_liquid_stake_enabled = 27; - // A boolean indicating whether the chain is currently halted - bool halted = 19; - reserved 4, 5, 6, 7, 14, 15, 16; -} diff --git a/proto/stride/stakeibc/ica_account.proto b/proto/stride/stakeibc/ica_account.proto deleted file mode 100644 index 8d41a714f..000000000 --- a/proto/stride/stakeibc/ica_account.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -enum ICAAccountType { - DELEGATION = 0; - FEE = 1; - WITHDRAWAL = 2; - REDEMPTION = 3; - COMMUNITY_POOL_DEPOSIT = 4; - COMMUNITY_POOL_RETURN = 5; - CONVERTER_UNWIND = 6; - CONVERTER_TRADE = 7; -} - -message ICAAccount { - string chain_id = 1; - ICAAccountType type = 2; - string connection_id = 3; - string address = 4; -} diff --git a/proto/stride/stakeibc/packet.proto b/proto/stride/stakeibc/packet.proto deleted file mode 100755 index 07bd4e905..000000000 --- a/proto/stride/stakeibc/packet.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -// this line is used by starport scaffolding # proto/packet/import - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -message StakeibcPacketData { - oneof packet { - NoData no_data = 1; - // this line is used by starport scaffolding # ibc/packet/proto/field - } -} - -message NoData {} - -// this line is used by starport scaffolding # ibc/packet/proto/message \ No newline at end of file diff --git a/proto/stride/stakeibc/params.proto b/proto/stride/stakeibc/params.proto deleted file mode 100755 index d3b054678..000000000 --- a/proto/stride/stakeibc/params.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -// Params defines the parameters for the module. -// next id: 20 -message Params { - option (gogoproto.goproto_stringer) = false; - - // define epoch lengths, in stride_epochs - uint64 rewards_interval = 1; - uint64 delegate_interval = 6; - uint64 deposit_interval = 2; - uint64 redemption_rate_interval = 3; - uint64 stride_commission = 4; - uint64 reinvest_interval = 7; - uint64 ica_timeout_nanos = 9; - uint64 buffer_size = 10; - uint64 ibc_timeout_blocks = 11; - uint64 fee_transfer_timeout_nanos = 12; - uint64 max_stake_ica_calls_per_epoch = 13; - uint64 default_min_redemption_rate_threshold = 14; - uint64 default_max_redemption_rate_threshold = 15; - uint64 ibc_transfer_timeout_nanos = 16; - uint64 validator_slash_query_threshold = 19; - uint64 validator_weight_cap = 20; - - reserved 8, 17, 18; -} \ No newline at end of file diff --git a/proto/stride/stakeibc/query.proto b/proto/stride/stakeibc/query.proto deleted file mode 100644 index 34f1465b4..000000000 --- a/proto/stride/stakeibc/query.proto +++ /dev/null @@ -1,161 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "stride/stakeibc/params.proto"; -import "stride/stakeibc/validator.proto"; -import "stride/stakeibc/host_zone.proto"; -import "stride/stakeibc/epoch_tracker.proto"; -import "stride/stakeibc/address_unbonding.proto"; -import "stride/stakeibc/trade_route.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -// Query defines the gRPC querier service. -service Query { - // Parameters queries the parameters of the module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/Stridelabs/stride/stakeibc/params"; - } - // Queries a Validator by host zone. - rpc Validators(QueryGetValidatorsRequest) - returns (QueryGetValidatorsResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/stakeibc/validators/{chain_id}"; - } - // Queries a HostZone by id. - rpc HostZone(QueryGetHostZoneRequest) returns (QueryGetHostZoneResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/stakeibc/host_zone/{chain_id}"; - } - - // Queries a list of HostZone items. - rpc HostZoneAll(QueryAllHostZoneRequest) returns (QueryAllHostZoneResponse) { - option (google.api.http).get = "/Stride-Labs/stride/stakeibc/host_zone"; - } - - // Queries a list of ModuleAddress items. - rpc ModuleAddress(QueryModuleAddressRequest) - returns (QueryModuleAddressResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/stakeibc/module_address/{name}"; - } - // QueryInterchainAccountFromAddress returns the interchain account for given - // owner address on a given connection pair - rpc InterchainAccountFromAddress(QueryInterchainAccountFromAddressRequest) - returns (QueryInterchainAccountFromAddressResponse); - - // Queries a EpochTracker by index. - rpc EpochTracker(QueryGetEpochTrackerRequest) - returns (QueryGetEpochTrackerResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/stakeibc/epoch_tracker/{epoch_identifier}"; - } - - // Queries a list of EpochTracker items. - rpc EpochTrackerAll(QueryAllEpochTrackerRequest) - returns (QueryAllEpochTrackerResponse) { - option (google.api.http).get = "/Stride-Labs/stride/stakeibc/epoch_tracker"; - } - - // Queries the next packet sequence for one for a given channel - rpc NextPacketSequence(QueryGetNextPacketSequenceRequest) - returns (QueryGetNextPacketSequenceResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/stakeibc/next_packet_sequence/{channel_id}/" - "{port_id}"; - } - - // Queries an address's unbondings - rpc AddressUnbondings(QueryAddressUnbondings) - returns (QueryAddressUnbondingsResponse) { - option (google.api.http).get = - "/Stride-Labs/stride/stakeibc/unbondings/{address}"; - } - - // Queries all trade routes - rpc AllTradeRoutes(QueryAllTradeRoutes) - returns (QueryAllTradeRoutesResponse) { - option (google.api.http).get = "/Stride-Labs/stride/stakeibc/trade_routes"; - } -} - -// QueryInterchainAccountFromAddressRequest is the request type for the -// Query/InterchainAccountAddress RPC -message QueryInterchainAccountFromAddressRequest { - string owner = 1; - string connection_id = 2 [ (gogoproto.moretags) = "yaml:\"connection_id\"" ]; -} - -// QueryInterchainAccountFromAddressResponse the response type for the -// Query/InterchainAccountAddress RPC -message QueryInterchainAccountFromAddressResponse { - string interchain_account_address = 1 - [ (gogoproto.moretags) = "yaml:\"interchain_account_address\"" ]; -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - Params params = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryGetValidatorsRequest { string chain_id = 1; } - -message QueryGetValidatorsResponse { repeated Validator validators = 1; } - -message QueryGetHostZoneRequest { string chain_id = 1; } - -message QueryGetHostZoneResponse { - HostZone host_zone = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryAllHostZoneRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -message QueryAllHostZoneResponse { - repeated HostZone host_zone = 1 [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -message QueryModuleAddressRequest { string name = 1; } - -message QueryModuleAddressResponse { string addr = 1; } - -message QueryGetEpochTrackerRequest { string epoch_identifier = 1; } - -message QueryGetEpochTrackerResponse { - EpochTracker epoch_tracker = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryAllEpochTrackerRequest {} - -message QueryAllEpochTrackerResponse { - repeated EpochTracker epoch_tracker = 1 [ (gogoproto.nullable) = false ]; -} - -message QueryGetNextPacketSequenceRequest { - string channel_id = 1; - string port_id = 2; -} - -message QueryGetNextPacketSequenceResponse { uint64 sequence = 1; } - -message QueryAddressUnbondings { string address = 1; } - -message QueryAddressUnbondingsResponse { - repeated AddressUnbonding address_unbondings = 1 - [ (gogoproto.nullable) = false ]; -} - -message QueryAllTradeRoutes {}; - -message QueryAllTradeRoutesResponse { - repeated TradeRoute trade_routes = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/stride/stakeibc/trade_route.proto b/proto/stride/stakeibc/trade_route.proto deleted file mode 100644 index a2a265932..000000000 --- a/proto/stride/stakeibc/trade_route.proto +++ /dev/null @@ -1,90 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -import "gogoproto/gogo.proto"; -import "stride/stakeibc/ica_account.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -// Stores pool information needed to execute the swap along a trade route -message TradeConfig { - // Currently Osmosis is the only trade chain so this is an osmosis pool id - uint64 pool_id = 1; - - // Spot price in the pool to convert the reward denom to the host denom - // output_tokens = swap_price * input tokens - // This value may be slightly stale as it is updated by an ICQ - string swap_price = 2 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // unix time in seconds that the price was last updated - uint64 price_update_timestamp = 3; - - // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price on stride - // 0.05 means the output from the trade can be no less than a 5% deviation - // from the current value - string max_allowed_swap_loss_rate = 4 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - - // min and max set boundaries of reward denom on trade chain we will swap - // min also decides when reward token transfers are worth it (transfer fees) - string min_swap_amount = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string max_swap_amount = 6 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} - -// TradeRoute represents a round trip including info on transfer and how to do -// the swap. It makes the assumption that the reward token is always foreign to -// the host so therefore the first two hops are to unwind the ibc denom enroute -// to the trade chain and the last hop is the return so funds start/end in the -// withdrawl ICA on hostZone -// The structure is key'd on reward denom and host denom in their native forms -// (i.e. reward_denom_on_reward_zone and host_denom_on_host_zone) -message TradeRoute { - // ibc denom for the reward on the host zone - string reward_denom_on_host_zone = 1; - // should be the native denom for the reward chain - string reward_denom_on_reward_zone = 2; - // ibc denom of the reward on the trade chain, input to the swap - string reward_denom_on_trade_zone = 3; - // ibc of the host denom on the trade chain, output from the swap - string host_denom_on_trade_zone = 4; - // should be the same as the native host denom on the host chain - string host_denom_on_host_zone = 5; - - // ICAAccount on the host zone with the reward tokens - // This is the same as the host zone withdrawal ICA account - ICAAccount host_account = 6 [ (gogoproto.nullable) = false ]; - // ICAAccount on the reward zone that is acts as the intermediate - // receiver of the transfer from host zone to trade zone - ICAAccount reward_account = 7 [ (gogoproto.nullable) = false ]; - // ICAAccount responsible for executing the swap of reward - // tokens for host tokens - ICAAccount trade_account = 8 [ (gogoproto.nullable) = false ]; - - // Channel responsible for the transfer of reward tokens from the host - // zone to the reward zone. This is the channel ID on the host zone side - string host_to_reward_channel_id = 9; - // Channel responsible for the transfer of reward tokens from the reward - // zone to the trade zone. This is the channel ID on the reward zone side - string reward_to_trade_channel_id = 10; - // Channel responsible for the transfer of host tokens from the trade - // zone, back to the host zone. This is the channel ID on the trade zone side - string trade_to_host_channel_id = 11; - - // specifies the configuration needed to execute the swap - // such as pool_id, slippage, min trade amount, etc. - TradeConfig trade_config = 12 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/stride/stakeibc/tx.proto b/proto/stride/stakeibc/tx.proto deleted file mode 100644 index 35543b4d4..000000000 --- a/proto/stride/stakeibc/tx.proto +++ /dev/null @@ -1,453 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; - -import "stride/stakeibc/validator.proto"; - -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/msg/v1/msg.proto"; -import "amino/amino.proto"; -import "stride/stakeibc/params.proto"; - -// Msg defines the Msg service. -service Msg { - option (cosmos.msg.v1.service) = true; - rpc LiquidStake(MsgLiquidStake) returns (MsgLiquidStakeResponse); - rpc LSMLiquidStake(MsgLSMLiquidStake) returns (MsgLSMLiquidStakeResponse); - rpc RedeemStake(MsgRedeemStake) returns (MsgRedeemStakeResponse); - rpc RegisterHostZone(MsgRegisterHostZone) - returns (MsgRegisterHostZoneResponse); - rpc ClaimUndelegatedTokens(MsgClaimUndelegatedTokens) - returns (MsgClaimUndelegatedTokensResponse); - rpc RebalanceValidators(MsgRebalanceValidators) - returns (MsgRebalanceValidatorsResponse); - rpc AddValidators(MsgAddValidators) returns (MsgAddValidatorsResponse); - rpc ChangeValidatorWeight(MsgChangeValidatorWeights) - returns (MsgChangeValidatorWeightsResponse); - rpc DeleteValidator(MsgDeleteValidator) returns (MsgDeleteValidatorResponse); - rpc RestoreInterchainAccount(MsgRestoreInterchainAccount) - returns (MsgRestoreInterchainAccountResponse); - rpc UpdateValidatorSharesExchRate(MsgUpdateValidatorSharesExchRate) - returns (MsgUpdateValidatorSharesExchRateResponse); - rpc CalibrateDelegation(MsgCalibrateDelegation) - returns (MsgCalibrateDelegationResponse); - rpc ClearBalance(MsgClearBalance) returns (MsgClearBalanceResponse); - rpc UpdateInnerRedemptionRateBounds(MsgUpdateInnerRedemptionRateBounds) - returns (MsgUpdateInnerRedemptionRateBoundsResponse); - rpc ResumeHostZone(MsgResumeHostZone) returns (MsgResumeHostZoneResponse); - rpc CreateTradeRoute(MsgCreateTradeRoute) - returns (MsgCreateTradeRouteResponse); - rpc DeleteTradeRoute(MsgDeleteTradeRoute) - returns (MsgDeleteTradeRouteResponse); - rpc UpdateTradeRoute(MsgUpdateTradeRoute) - returns (MsgUpdateTradeRouteResponse); - rpc SetCommunityPoolRebate(MsgSetCommunityPoolRebate) - returns (MsgSetCommunityPoolRebateResponse); - rpc ToggleTradeController(MsgToggleTradeController) - returns (MsgToggleTradeControllerResponse); - rpc UpdateHostZoneParams(MsgUpdateHostZoneParams) - returns (MsgUpdateHostZoneParamsResponse); - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); -} - -message MsgUpdateInnerRedemptionRateBounds { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgUpdateInnerRedemptionRateBounds"; - - string creator = 1; - string chain_id = 2; - string min_inner_redemption_rate = 3 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string max_inner_redemption_rate = 4 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; -} - -message MsgUpdateInnerRedemptionRateBoundsResponse {} - -message MsgLiquidStake { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgLiquidStake"; - - string creator = 1; - string amount = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string host_denom = 3; -} -message MsgLiquidStakeResponse { - cosmos.base.v1beta1.Coin st_token = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "cosmossdk.io/math.Coins" - ]; -} - -message MsgLSMLiquidStake { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgLSMLiquidStake"; - - string creator = 1; - string amount = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string lsm_token_ibc_denom = 3; -} -message MsgLSMLiquidStakeResponse { bool transaction_complete = 1; } - -message MsgClearBalance { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgClearBalance"; - - string creator = 1; - string chain_id = 2; - string amount = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string channel = 4; -} -message MsgClearBalanceResponse {} - -message MsgRedeemStake { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgRedeemStake"; - - string creator = 1; - string amount = 2 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string host_zone = 3; - string receiver = 4; -} -message MsgRedeemStakeResponse {} - -// next: 15 -message MsgRegisterHostZone { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgRegisterHostZone"; - - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string connection_id = 2 [ (gogoproto.moretags) = "yaml:\"connection_id\"" ]; - string bech32prefix = 12; - string host_denom = 4 [ (gogoproto.moretags) = "yaml:\"host_denom\"" ]; - string ibc_denom = 5 [ (gogoproto.moretags) = "yaml:\"ibc_denom\"" ]; - string creator = 6; - string transfer_channel_id = 10 - [ (gogoproto.moretags) = "yaml:\"transfer_channel_id\"" ]; - uint64 unbonding_period = 11 - [ (gogoproto.moretags) = "yaml:\"unbonding_period\"" ]; - string min_redemption_rate = 13 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - string max_redemption_rate = 14 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - bool lsm_liquid_stake_enabled = 15; - string community_pool_treasury_address = 16; - uint64 max_messages_per_ica_tx = 17; -} -message MsgRegisterHostZoneResponse {} - -message MsgClaimUndelegatedTokens { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgClaimUndelegatedTokens"; - - string creator = 1; - // UserUnbondingRecords are keyed on {chain_id}.{epoch}.{receiver} - string host_zone_id = 2; - uint64 epoch = 3; - string receiver = 5; - reserved 4; -} -message MsgClaimUndelegatedTokensResponse {} - -message MsgRebalanceValidators { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgRebalanceValidators"; - - string creator = 1; - string host_zone = 2; - uint64 num_rebalance = 3; -} -message MsgRebalanceValidatorsResponse {} - -message MsgAddValidators { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgAddValidators"; - - string creator = 1; - string host_zone = 2; - repeated Validator validators = 3; -} -message MsgAddValidatorsResponse {} - -message ValidatorWeight { - string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - uint64 weight = 2; -} -message MsgChangeValidatorWeights { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgChangeValidatorWeights"; - - string creator = 1; - string host_zone = 2; - repeated ValidatorWeight validator_weights = 3; -} -message MsgChangeValidatorWeightsResponse {} - -message MsgDeleteValidator { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgDeleteValidator"; - - string creator = 1; - string host_zone = 2; - string val_addr = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; -} -message MsgDeleteValidatorResponse {} - -message MsgRestoreInterchainAccount { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgRestoreInterchainAccount"; - - string creator = 1; - string chain_id = 2; - string connection_id = 3; - string account_owner = 4; -} -message MsgRestoreInterchainAccountResponse {} - -message MsgUpdateValidatorSharesExchRate { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgUpdateValidatorSharesExchRate"; - - string creator = 1; - string chain_id = 2; - string valoper = 3; -} -message MsgUpdateValidatorSharesExchRateResponse {} - -message MsgCalibrateDelegation { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgCalibrateDelegation"; - - string creator = 1; - string chain_id = 2; - string valoper = 3; -} -message MsgCalibrateDelegationResponse {} - -message MsgResumeHostZone { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgResumeHostZone"; - - string creator = 1; - string chain_id = 2; -} -message MsgResumeHostZoneResponse {} - -// Creates a new trade route -message MsgCreateTradeRoute { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "stride/x/stakeibc/MsgCreateTradeRoute"; - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // The chain ID of the host zone - string host_chain_id = 2; - - // Connection IDs between stride and the other zones - string stride_to_reward_connection_id = 3; - string stride_to_trade_connection_id = 4; - - // Transfer channels between the host, reward, and trade zones - string host_to_reward_transfer_channel_id = 5; - string reward_to_trade_transfer_channel_id = 6; - string trade_to_host_transfer_channel_id = 7; - - // ibc denom for the reward token on the host zone (e.g. ibc/usdc on dYdX) - string reward_denom_on_host = 8; - // native denom of reward token on the reward zone (e.g. usdc on Noble) - string reward_denom_on_reward = 9; - // ibc denom of the reward token on the trade zone (e.g. ibc/usdc on Osmosis) - string reward_denom_on_trade = 10; - // ibc denom of the host's token on the trade zone (e.g. ibc/dydx on Osmosis) - string host_denom_on_trade = 11; - // the host zone's native denom (e.g. dydx on dYdX) - string host_denom_on_host = 12; - - // The osmosis pool ID - uint64 pool_id = 13; - - // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price on stride - // "0.05" means the output from the trade can be no less than a 5% deviation - // from the current value - string max_allowed_swap_loss_rate = 14; - - // minimum amount of reward tokens to initate a swap - // if not provided, defaults to 0 - string min_swap_amount = 15 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - // maximum amount of reward tokens in a single swap - // if not provided, defaults to 10e24 - string max_swap_amount = 16 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} -message MsgCreateTradeRouteResponse {} - -// Deletes a trade route -message MsgDeleteTradeRoute { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "stride/x/stakeibc/MsgDeleteTradeRoute"; - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // The reward denom of the route in it's native form (e.g. usdc) - string reward_denom = 2; - // The host zone's denom in it's native form (e.g. dydx) - string host_denom = 3; -} -message MsgDeleteTradeRouteResponse {} - -// Updates the config of a trade route -message MsgUpdateTradeRoute { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "stride/x/stakeibc/MsgUpdateTradeRoute"; - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // The reward denom of the route in it's native form (e.g. usdc) - string reward_denom = 2; - // The host zone's denom in it's native form (e.g. dydx) - string host_denom = 3; - - // The osmosis pool ID - uint64 pool_id = 4; - - // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price on stride - // "0.05" means the output from the trade can be no less than a 5% deviation - // from the current value - string max_allowed_swap_loss_rate = 5; - - // minimum amount of reward tokens to initate a swap - // if not provided, defaults to 0 - string min_swap_amount = 6 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - // maximum amount of reward tokens in a single swap - // if not provided, defaults to 10e24 - string max_swap_amount = 7 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} -message MsgUpdateTradeRouteResponse {} - -// Registers or updates a community pool rebate by specifying the amount liquid -// staked -message MsgSetCommunityPoolRebate { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgSetCommunityPoolRebate"; - - // Message signer (admin only) - string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // Chain id of the chain whose community pool has a liquid staking rebate - // arrangement with stride - string chain_id = 2; - // Rebate percentage represented as a decimal (e.g. 0.2 for 20%) - string rebate_rate = 3 [ - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - // Number of stTokens recieved by the community pool after liquid staking - string liquid_staked_st_token_amount = 4 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; -} -message MsgSetCommunityPoolRebateResponse {} - -enum AuthzPermissionChange { - // Grant the address trade permissions - GRANT = 0; - // Revoke trade permissions from the address - REVOKE = 1; -} - -// Grants or revokes trade permissions to a given address via authz -message MsgToggleTradeController { - option (cosmos.msg.v1.signer) = "creator"; - option (amino.name) = "stride/x/stakeibc/MsgToggleTradeController"; - - // Message signer (admin only) - string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // Chain ID of the trade account - string chain_id = 2; - // Permission change (either grant or revoke) - AuthzPermissionChange permission_change = 3; - // Address of trade operator - string address = 4; -} -message MsgToggleTradeControllerResponse {} - -// Updates host zone params -message MsgUpdateHostZoneParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "stride/x/stakeibc/MsgUpdateHostZoneParams"; - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // Chain ID of the host zone - string chain_id = 2; - // Max messages that can be sent in a single ICA message - uint64 max_messages_per_ica_tx = 3; -} -message MsgUpdateHostZoneParamsResponse {} - -// MsgUpdateParams is the Msg/UpdateParams request type. -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "stride/x/stakeibc/MsgUpdateParams"; - - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // params defines the x/staking parameters to update. - // - // NOTE: All parameters must be supplied. - Params params = 2 - [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -message MsgUpdateParamsResponse {} \ No newline at end of file diff --git a/proto/stride/stakeibc/validator.proto b/proto/stride/stakeibc/validator.proto deleted file mode 100644 index 22047bf50..000000000 --- a/proto/stride/stakeibc/validator.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package stride.stakeibc; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -option go_package = "github.com/milkyway-labs/milkyway/x/stakeibc/types"; - -message Validator { - string name = 1; - string address = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - uint64 weight = 6; - string delegation = 5 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string slash_query_progress_tracker = 9 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string slash_query_checkpoint = 12 [ - (gogoproto.customtype) = "cosmossdk.io/math.Int", - (gogoproto.nullable) = false - ]; - string shares_to_tokens_rate = 10 [ - (cosmos_proto.scalar) = "cosmos.Dec", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false - ]; - int64 delegation_changes_in_progress = 11; - bool slash_query_in_progress = 13; - reserved 3, 4, 7, 8; -} diff --git a/scripts/protoc-swagger-gen.sh b/scripts/protoc-swagger-gen.sh index e879c8e8f..f5e52b1df 100755 --- a/scripts/protoc-swagger-gen.sh +++ b/scripts/protoc-swagger-gen.sh @@ -38,7 +38,6 @@ mkdir -p ./tmp-swagger-gen cd proto proto_dirs=$(find \ ./milkyway \ - ./stride \ ../third_party/cosmos-sdk/proto/cosmos \ ../third_party/ibc-go/proto/ibc \ ../third_party/initia/proto \ diff --git a/scripts/protocgen-pulsar.sh b/scripts/protocgen-pulsar.sh index d068a997b..c539613bc 100644 --- a/scripts/protocgen-pulsar.sh +++ b/scripts/protocgen-pulsar.sh @@ -34,5 +34,4 @@ generate_api() { # exclude ibc modules cd proto generate_api "./milkyway" -generate_api "./stride" cd .. diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 22fd4cc56..e05d3e118 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -25,7 +25,6 @@ echo "Generating gogo proto code" cd proto generate_proto "./milkyway" -generate_proto "./stride" cd .. diff --git a/utils/utils.go b/utils/utils.go index 9ca475be9..19699aa77 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -1,228 +1,13 @@ package utils import ( - "encoding/hex" "encoding/json" - "errors" - "fmt" - "sort" - "strconv" "strings" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/address" - "github.com/cosmos/cosmos-sdk/types/bech32" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - - errorsmod "cosmossdk.io/errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - icacallbacktypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" ) -func FilterDepositRecords(arr []recordstypes.DepositRecord, condition func(recordstypes.DepositRecord) bool) (ret []recordstypes.DepositRecord) { - for _, elem := range arr { - if condition(elem) { - ret = append(ret, elem) - } - } - return ret -} - -func Min(a int, b int) int { - if a < b { - return a - } - return b -} - -func StringMapKeys[V any](m map[string]V) []string { - keys := make([]string, 0, len(m)) - for k := range m { - keys = append(keys, k) - } - sort.Strings(keys) - return keys -} - -// ============================== ADDRESS VERIFICATION UTILS ================================ -// ref: https://github.com/cosmos/cosmos-sdk/blob/b75c2ebcfab1a6b535723f1ac2889a2fc2509520/types/address.go#L177 - -var errBech32EmptyAddress = errors.New("decoding Bech32 address failed: must provide a non empty address") - -// GetFromBech32 decodes a bytestring from a Bech32 encoded string. -func GetFromBech32(bech32str, prefix string) ([]byte, error) { - if len(bech32str) == 0 { - return nil, errBech32EmptyAddress - } - - hrp, bz, err := bech32.DecodeAndConvert(bech32str) - if err != nil { - return nil, err - } - - if hrp != prefix { - return nil, fmt.Errorf("invalid Bech32 prefix; expected %s, got %s", prefix, hrp) - } - - return bz, nil -} - -// VerifyAddressFormat verifies that the provided bytes form a valid address -// according to the default address rules or a custom address verifier set by -// GetConfig().SetAddressVerifier(). -// TODO make an issue to get rid of global Config -// ref: https://github.com/cosmos/cosmos-sdk/issues/9690 -func VerifyAddressFormat(bz []byte) error { - verifier := func(bz []byte) error { - n := len(bz) - // Base accounts are length 20, module/ICA accounts are length 32 - if n == 20 || n == 32 { - return nil - } - return fmt.Errorf("incorrect address length %d", n) - } - if verifier(bz) != nil { - return verifier(bz) - } - - if len(bz) == 0 { - return errorsmod.Wrap(sdkerrors.ErrUnknownAddress, "addresses cannot be empty") - } - - if len(bz) > address.MaxAddrLen { - return errorsmod.Wrapf(sdkerrors.ErrUnknownAddress, "address max length is %d, got %d", address.MaxAddrLen, len(bz)) - } - - return nil -} - -// AccAddress a wrapper around bytes meant to represent an account address. -// When marshaled to a string or JSON, it uses Bech32. -type AccAddress []byte - -// AccAddressFromBech32 creates an AccAddress from a Bech32 string. -func AccAddressFromBech32(address string, bech32prefix string) (addr AccAddress, err error) { - if len(strings.TrimSpace(address)) == 0 { - return AccAddress{}, errors.New("empty address string is not allowed") - } - - bz, err := GetFromBech32(address, bech32prefix) - if err != nil { - return nil, err - } - - err = VerifyAddressFormat(bz) - if err != nil { - return nil, err - } - - return AccAddress(bz), nil -} - -// LogWithHostZone returns a log string with a chainId and tab as the prefix -// Ex: -// -// | COSMOSHUB-4 | string -func LogWithHostZone(chainID string, s string, a ...any) string { - msg := fmt.Sprintf(s, a...) - return fmt.Sprintf("| %-13s | %s", strings.ToUpper(chainID), msg) -} - -// Returns a log string with a chain Id and callback as a prefix -// callbackType is either ICACALLBACK or ICQCALLBACK -// Format: -// -// | CHAIN-ID | {CALLBACK_ID} {CALLBACK_TYPE} | string -func logCallbackWithHostZone(chainID string, callbackID string, callbackType string, s string, a ...any) string { - msg := fmt.Sprintf(s, a...) - return fmt.Sprintf("| %-13s | %s %s | %s", strings.ToUpper(chainID), strings.ToUpper(callbackID), callbackType, msg) -} - -// LogICACallbackWithHostZone returns a log string with a chain Id and icacallback as a prefix -// Ex: -// -// | COSMOSHUB-4 | DELEGATE ICACALLBACK | string -func LogICACallbackWithHostZone(chainID string, callbackID string, s string, a ...any) string { - return logCallbackWithHostZone(chainID, callbackID, "ICACALLBACK", s, a...) -} - -// LogICACallbackStatusWithHostZone returns a log string with a chain Id and icacallback as a prefix, and status of the callback -// Ex: -// -// | COSMOSHUB-4 | DELEGATE ICACALLBACK | ICA SUCCESS, Packet: ... -func LogICACallbackStatusWithHostZone(chainID string, callbackID string, status icacallbacktypes.AckResponseStatus, packet channeltypes.Packet) string { - var statusMsg string - switch status { - case icacallbacktypes.AckResponseStatus_SUCCESS: - statusMsg = "ICA SUCCESSFUL" - case icacallbacktypes.AckResponseStatus_TIMEOUT: - statusMsg = "ICA TIMEOUT" - default: - statusMsg = "ICA FAILED (ack error)" - } - return logCallbackWithHostZone(chainID, callbackID, "ICACALLBACK", "%s, Packet: %+v", statusMsg, packet) -} - -// LogICQCallbackWithHostZone returns a log string with a chain Id and icqcallback as a prefix -// Ex: -// -// | COSMOSHUB-4 | WITHDRAWALHOSTBALANCE ICQCALLBACK | string -func LogICQCallbackWithHostZone(chainID string, callbackID string, s string, a ...any) string { - return logCallbackWithHostZone(chainID, callbackID, "ICQCALLBACK", s, a...) -} - -// LogHeader returns a log header string with a dash padding on either side -// Ex: -// -// ------------------------------ string ------------------------------ -func LogHeader(s string, a ...any) string { - lineLength := 120 - header := fmt.Sprintf(s, a...) - pad := strings.Repeat("-", (lineLength-len(header))/2) - return fmt.Sprintf("%s %s %s", pad, header, pad) -} - -// StAssetDenomFromHostZoneDenom returns the stDenom from a native denom by appending a st prefix -func StAssetDenomFromHostZoneDenom(hostZoneDenom string) string { - return "milk" + hostZoneDenom -} - -// VerifyTxHash verifies a tx hash is valid -func VerifyTxHash(txHash string) (err error) { - if txHash == "" { - return errorsmod.Wrapf(sdkerrors.ErrTxDecode, "tx hash is empty") - } - _, err = hex.DecodeString(txHash) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrTxDecode, "tx hash is invalid %s", txHash) - } - return nil -} - -func ParseUint32Slice(s string) ([]uint32, error) { - ss := strings.Split(s, ",") - out := make([]uint32, len(ss)) - for i, d := range ss { - u, err := strconv.ParseUint(d, 10, 32) - if err != nil { - return nil, err - } - out[i] = uint32(u) - } - return out, nil -} - -func FormatUint32Slice(s []uint32) string { - ss := make([]string, len(s)) - for i, u := range s { - ss[i] = fmt.Sprint(u) - } - return strings.Join(ss, ",") -} - func MustParseCoin(s string) sdk.Coin { c, err := sdk.ParseCoinNormalized(strings.ReplaceAll(s, "_", "")) if err != nil { diff --git a/x/epochs/LICENSE b/x/epochs/LICENSE deleted file mode 100644 index 6be77924c..000000000 --- a/x/epochs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright attributed to 2021 Sikka Research Pte. Ltd. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/x/epochs/README.md b/x/epochs/README.md deleted file mode 100644 index 6c55b3f51..000000000 --- a/x/epochs/README.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -title: "Epochs" -excerpt: "" -category: 6392913957c533007128548e ---- - - -# Epochs - -## Abstract
- -While using the SDK, we often want to run certain code periodically. The `epochs` module allows other modules to be configured such that they are signaled once every period. So another module can specify it wants to execute code once a week, starting at UTC-time = x. `epochs` creates a generalized epoch interface to other modules so that they can easily be signalled upon such events. - -## Contents - -1. **[Concepts](#concepts)** -2. **[State](#state)** -3. **[Events](#events)** -4. **[Keeper](#keeper)** -5. **[Hooks](#hooks)** -6. **[Queries](#queries)** -7. **[Future Improvements](#future-improvements)** - -## Concepts - -Epochs are on-chain timers that have timer ticks at specific time intervals, triggering the execution of certain logic that is constrained by a specific epoch. The purpose of the `epochs` module is to provide a generalized epoch interface to other modules so that they can easily implement epochs without keeping their own code for epochs. - -Every epoch has a unique identifier. Every epoch will have a start time, and an end time, where `end_time = start_time + duration`. -When an epoch triggers the execution of code, that code is executed at the first block whose blocktime is greater than `end_time`. It follows that the `start_time` of the following epoch will be the `end_time` of the previous epoch. - -Stride uses three epoch identifiers as found in `x/epochs/genesis.go` - -1. `DAY_EPOCH`: this identifies an epoch that lasts 24 hours. -2. `STRIDE_EPOCH`: this identifies an epoch that lasts 5 minutes on local mode testnet (although this may be changed) and longer on public testnet and mainnet, and is used in the `x/stakeibc/` module as a time interval in accordance with which the Stride app chain performs certain functions, such as autocompound staking rewards. - -## State - -The `epochs` module keeps `EpochInfo` objects and modifies the information as epoch info changes. -Epochs are initialized as part of genesis initialization, and modified on begin blockers or end blockers. - -### Epoch information type - -```protobuf -message EpochInfo { - string identifier = 1; - google.protobuf.Timestamp start_time = 2 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"start_time\"" - ]; - google.protobuf.Duration duration = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "duration,omitempty", - (gogoproto.moretags) = "yaml:\"duration\"" - ]; - int64 current_epoch = 4; - google.protobuf.Timestamp current_epoch_start_time = 5 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"current_epoch_start_time\"" - ]; - bool epoch_counting_started = 6; - reserved 7; - int64 current_epoch_start_height = 8; -} -``` - -`EpochInfo` keeps `identifier`, `start_time`,`duration`, `current_epoch`, `current_epoch_start_time`, `epoch_counting_started`, `current_epoch_start_height`. - -1. `identifier` keeps epoch identification string. -2. `start_time` keeps epoch counting start time, if block time passes `start_time`, `epoch_counting_started` is set. -3. `duration` keeps target epoch duration. -4. `current_epoch` keeps current active epoch number. -5. `current_epoch_start_time` keeps the start time of current epoch. -6. `epoch_number` is counted only when `epoch_counting_started` flag is set. -7. `current_epoch_start_height` keeps the start block height of current epoch. - ---- - -## Events - -The `epochs` module emits the following events: - -### BeginBlocker - -| Type | Attribute Key | Attribute Value | -| ----------- | ------------- | --------------- | -| epoch_start | epoch_number | {epoch_number} | -| epoch_start | start_time | {start_time} | - -### EndBlocker - -| Type | Attribute Key | Attribute Value | -| --------- | ------------- | --------------- | -| epoch_end | epoch_number | {epoch_number} | - -## Keeper - -### Keeper Functions - -`epochs/keeper/` module provides utility functions to manage epochs. - -```go -// Keeper is the interface for lockup module keeper -type Keeper interface { - // GetEpochInfo returns epoch info by identifier - GetEpochInfo(ctx sdk.Context, identifier string) types.EpochInfo - // SetEpochInfo set epoch info - SetEpochInfo(ctx sdk.Context, epoch types.EpochInfo) - // DeleteEpochInfo delete epoch info - DeleteEpochInfo(ctx sdk.Context, identifier string) - // IterateEpochInfo iterate through epochs - IterateEpochInfo(ctx sdk.Context, fn func(index int64, epochInfo types.EpochInfo) (stop bool)) - // Get all epoch infos - AllEpochInfos(ctx sdk.Context) []types.EpochInfo -} -``` - -## Hooks - -```go - // the first block whose timestamp is after the duration is counted as the end of the epoch - AfterEpochEnd(ctx sdk.Context, epochIdentifier string, epochNumber int64) - // new epoch is next block of epoch end block - BeforeEpochStart(ctx sdk.Context, epochIdentifier string, epochNumber int64) -``` - -The `BeforeEpochStart` hook does different things depending on the identifier. - -If in a `day` identifier it: - -1. begins unbondings -2. sweeps unbonded tokens to the redemption account -3. cleans up old records -4. creates empty epoch unbonding records for the next day - -If in a `stride_epoch` identifier it: 5. creates and deposits records on each host zone 6. sets withdrawal addresses 7. updates redemption rates (if the epoch coincides with the correct interval) 8. processes `TRANSFER_QUEUE` deposit records to the delegation Interchain Account (if the epoch coincides with the correct interval) 9. processes `DELEGATION_QUEUE` deposit records to the delegation Interchain Account (if the epoch coincides with the correct interval) 10. Query the rewards account using interchain queries, with the transfer callback to a delegation account as a staked record (if at proper interval) - -### How modules receive hooks - -On the hook receiver functions of other modules, they need to filter `epochIdentifier` and execute for only a specific `epochIdentifier`. -Filtering `epochIdentifier` could be in `Params` of other modules so that they can be modified by governance. -Governance can change an epoch from `week` to `day` as needed. - -## Queries - -`epochs` module provides the below queries to check the module's state - -```protobuf -service Query { - // EpochInfos provide running epochInfos - rpc EpochInfos(QueryEpochsInfoRequest) returns (QueryEpochsInfoResponse) {} - // CurrentEpoch provide current epoch of specified identifier - rpc CurrentEpoch(QueryCurrentEpochRequest) returns (QueryCurrentEpochResponse) {} -} -``` - -## Future Improvements - -### Lack point using this module - -In current design each epoch should be at least 2 blocks as start block should be different from endblock. -Because of this, each epoch time will be `max(blocks_time x 2, epoch_duration)`. -If epoch_duration is set to `1s`, and `block_time` is `5s`, actual epoch time should be `10s`. -We definitely recommend configure epoch_duration as more than 2x block_time, to use this module correctly. -If you enforce to set it to 1s, it's same as 10s - could make module logic invalid. - -TODO for postlaunch: We should see if we can architect things such that the receiver doesn't have to do this filtering, and the epochs module would pre-filter for them. - -### Block-time drifts problem - -This implementation has block time drift based on block time. -For instance, we have an epoch of 100 units that ends at t=100, if we have a block at t=97 and a block at t=104 and t=110, this epoch ends at t=104. -And new epoch start at t=110. There are time drifts here, for around 1-2 blocks time. -It will slow down epochs. - -It's going to slow down epoch by 10-20s per week when epoch duration is 1 week. This should be resolved after launch. diff --git a/x/epochs/client/cli/query.go b/x/epochs/client/cli/query.go deleted file mode 100644 index a78324d2f..000000000 --- a/x/epochs/client/cli/query.go +++ /dev/null @@ -1,159 +0,0 @@ -package cli - -import ( - "fmt" - "strconv" - "strings" - "time" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/version" - "github.com/spf13/cast" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd() *cobra.Command { - // Group epochs queries under a subcommand - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - GetCmdEpochsInfos(), - GetCmdCurrentEpoch(), - GetCmdSecondsRemaining(), - ) - - return cmd -} - -// GetCmdEpochsInfos provide running epochInfos -func GetCmdEpochsInfos() *cobra.Command { - cmd := &cobra.Command{ - Use: "epoch-infos", - Short: "Query running epochInfos", - Example: strings.TrimSpace( - fmt.Sprintf(`$ %s query epochs epoch-infos`, - version.AppName, - ), - ), - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, _ []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - req := &types.QueryEpochsInfoRequest{ - Pagination: pageReq, - } - - res, err := queryClient.EpochInfos(cmd.Context(), req) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdCurrentEpoch provides current epoch by specified identifier -func GetCmdCurrentEpoch() *cobra.Command { - cmd := &cobra.Command{ - Use: "current-epoch", - Short: "Query current epoch by specified identifier", - Example: strings.TrimSpace( - fmt.Sprintf(`$ %s query epochs current-epoch week`, - version.AppName, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.CurrentEpoch(cmd.Context(), &types.QueryCurrentEpochRequest{ - Identifier: args[0], - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdSecondsRemaining provides seconds-remaining by specified identifier -func GetCmdSecondsRemaining() *cobra.Command { - cmd := &cobra.Command{ - Use: "seconds-remaining", - Short: "Query seconds remaining by specified identifier", - Example: strings.TrimSpace( - fmt.Sprintf(`$ %s query epochs seconds-remaining week`, - version.AppName, - ), - ), - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.EpochInfo(cmd.Context(), &types.QueryEpochInfoRequest{ - Identifier: args[0], - }) - if err != nil { - return err - } - - // duration: seconds - duration, err := cast.ToInt64E(res.Epoch.Duration.Seconds()) - if err != nil { - return err - } - // current epoch start time - startTime := res.Epoch.CurrentEpochStartTime.Unix() - // diff in seconds - currTime := time.Now().Unix() - // 60 - (100 - 80) - remaining := duration - (currTime - startTime) - - return clientCtx.PrintString(strconv.FormatInt(remaining, 10)) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/epochs/genesis.go b/x/epochs/genesis.go deleted file mode 100644 index 8b4d9aad8..000000000 --- a/x/epochs/genesis.go +++ /dev/null @@ -1,41 +0,0 @@ -package epochs - -import ( - "time" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/epochs/keeper" - "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -// InitGenesis initializes the capability module's state from a provided genesis -// state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - // set epoch info from genesis - for _, epoch := range genState.Epochs { - // Initialize empty epoch values via Cosmos SDK - if epoch.StartTime.Equal(time.Time{}) { - epoch.StartTime = ctx.BlockTime() - } - - if epoch.CurrentEpoch < 0 { - panic("current epoch should NOT be negative") - } - - if epoch.CurrentEpochStartHeight < 0 { - panic("current epoch start height should NOT be negative") - } - - epoch.CurrentEpochStartHeight = ctx.BlockHeight() - - k.SetEpochInfo(ctx, epoch) - } -} - -// ExportGenesis returns the capability module's exported genesis. -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { - return &types.GenesisState{ - Epochs: k.AllEpochInfos(ctx), - } -} diff --git a/x/epochs/keeper/abci.go b/x/epochs/keeper/abci.go deleted file mode 100644 index 1d66dbe19..000000000 --- a/x/epochs/keeper/abci.go +++ /dev/null @@ -1,80 +0,0 @@ -package keeper - -import ( - "fmt" - "strconv" - "strings" - "time" - - "github.com/cosmos/cosmos-sdk/telemetry" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/utils" - "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -// BeginBlocker of epochs module -func (k Keeper) BeginBlocker(ctx sdk.Context) { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) - logger := k.Logger(ctx) - k.IterateEpochInfo(ctx, func(_ int64, epochInfo types.EpochInfo) (stop bool) { - // Has it not started, and is the block time > initial epoch start time - shouldInitialEpochStart := !epochInfo.EpochCountingStarted && !epochInfo.StartTime.After(ctx.BlockTime()) - - epochEndTime := epochInfo.CurrentEpochStartTime.Add(epochInfo.Duration) - shouldEpochStart := ctx.BlockTime().After(epochEndTime) && !shouldInitialEpochStart && !epochInfo.StartTime.After(ctx.BlockTime()) - - epochInfo.CurrentEpochStartHeight = ctx.BlockHeight() - - switch { - case shouldInitialEpochStart: - epochInfo = startInitialEpoch(epochInfo) - logger.Info(fmt.Sprintf("initial %s epoch", epochInfo.Identifier)) - case shouldEpochStart: - epochInfo = endEpoch(epochInfo) - - // Capitalize the epoch identifier for the logs - epochAlias := strings.ToUpper(strings.ReplaceAll(epochInfo.Identifier, "_epoch", "")) - logger.Info(utils.LogHeader("%s EPOCH %d", epochAlias, epochInfo.CurrentEpoch)) - logger.Info(utils.LogHeader("Epoch Start Time: %s", epochInfo.CurrentEpochStartTime)) - - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeEpochEnd, - sdk.NewAttribute(types.AttributeEpochNumber, strconv.FormatInt(epochInfo.CurrentEpoch, 10)), - ), - ) - k.AfterEpochEnd(ctx, epochInfo) - default: - // continue - return false - } - - k.SetEpochInfo(ctx, epochInfo) - - k.BeforeEpochStart(ctx, epochInfo) - - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeEpochStart, - sdk.NewAttribute(types.AttributeEpochNumber, strconv.FormatInt(epochInfo.CurrentEpoch, 10)), - sdk.NewAttribute(types.AttributeEpochStartTime, strconv.FormatInt(epochInfo.CurrentEpochStartTime.Unix(), 10)), - ), - ) - - return false - }) -} - -func startInitialEpoch(epochInfo types.EpochInfo) types.EpochInfo { - epochInfo.EpochCountingStarted = true - epochInfo.CurrentEpoch = 1 - epochInfo.CurrentEpochStartTime = epochInfo.StartTime - return epochInfo -} - -func endEpoch(epochInfo types.EpochInfo) types.EpochInfo { - epochInfo.CurrentEpoch++ - epochInfo.CurrentEpochStartTime = epochInfo.CurrentEpochStartTime.Add(epochInfo.Duration) - return epochInfo -} diff --git a/x/epochs/keeper/epoch.go b/x/epochs/keeper/epoch.go deleted file mode 100644 index b0ee0d5a3..000000000 --- a/x/epochs/keeper/epoch.go +++ /dev/null @@ -1,67 +0,0 @@ -package keeper - -import ( - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -// GetEpochInfo returns epoch info by identifier -func (k Keeper) GetEpochInfo(ctx sdk.Context, identifier string) (types.EpochInfo, bool) { - epoch := types.EpochInfo{} - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixEpoch) - bz := store.Get([]byte(identifier)) - if len(bz) == 0 { - return epoch, false - } - - k.cdc.MustUnmarshal(bz, &epoch) - return epoch, true -} - -// SetEpochInfo set epoch info -func (k Keeper) SetEpochInfo(ctx sdk.Context, epoch types.EpochInfo) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixEpoch) - bz := k.cdc.MustMarshal(&epoch) - store.Set([]byte(epoch.Identifier), bz) -} - -// DeleteEpochInfo delete epoch info -func (k Keeper) DeleteEpochInfo(ctx sdk.Context, identifier string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixEpoch) - store.Delete([]byte(identifier)) -} - -// IterateEpochInfo iterate through epochs -func (k Keeper) IterateEpochInfo(ctx sdk.Context, fn func(index int64, epochInfo types.EpochInfo) (stop bool)) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixEpoch) - - iterator := storetypes.KVStorePrefixIterator(store, nil) - defer iterator.Close() - - i := int64(0) - - for ; iterator.Valid(); iterator.Next() { - epoch := types.EpochInfo{} - k.cdc.MustUnmarshal(iterator.Value(), &epoch) - - stop := fn(i, epoch) - - if stop { - break - } - i++ - } -} - -// AllEpochInfos returns every epochInfo in the store -func (k Keeper) AllEpochInfos(ctx sdk.Context) []types.EpochInfo { - epochs := []types.EpochInfo{} - k.IterateEpochInfo(ctx, func(_ int64, epochInfo types.EpochInfo) (stop bool) { - epochs = append(epochs, epochInfo) - return false - }) - return epochs -} diff --git a/x/epochs/keeper/grpc_query.go b/x/epochs/keeper/grpc_query.go deleted file mode 100644 index 3b1de8f5d..000000000 --- a/x/epochs/keeper/grpc_query.go +++ /dev/null @@ -1,77 +0,0 @@ -package keeper - -import ( - "context" - - "cosmossdk.io/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -var _ types.QueryServer = Keeper{} - -// EpochInfos provide running epochInfos -func (k Keeper) EpochInfos(c context.Context, req *types.QueryEpochsInfoRequest) (*types.QueryEpochsInfoResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - ctx := sdk.UnwrapSDKContext(c) - - var epochs []types.EpochInfo - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixEpoch) - - pageRes, err := query.Paginate(store, req.Pagination, func(_, value []byte) error { - var epoch types.EpochInfo - if err := k.cdc.Unmarshal(value, &epoch); err != nil { - return err - } - epochs = append(epochs, epoch) - return nil - }) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryEpochsInfoResponse{ - Epochs: epochs, - Pagination: pageRes, - }, nil -} - -// CurrentEpoch provides current epoch of specified identifier -func (k Keeper) CurrentEpoch(c context.Context, req *types.QueryCurrentEpochRequest) (*types.QueryCurrentEpochResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - ctx := sdk.UnwrapSDKContext(c) - - info, _ := k.GetEpochInfo(ctx, req.Identifier) - - return &types.QueryCurrentEpochResponse{ - CurrentEpoch: info.CurrentEpoch, - }, nil -} - -// CurrentEpoch provides current epoch of specified identifier -func (k Keeper) EpochInfo(c context.Context, req *types.QueryEpochInfoRequest) (*types.QueryEpochInfoResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "empty request") - } - - ctx := sdk.UnwrapSDKContext(c) - - info, found := k.GetEpochInfo(ctx, req.Identifier) - if !found { - return nil, status.Error(codes.NotFound, "epoch info not found") - } - - return &types.QueryEpochInfoResponse{ - Epoch: info, - }, nil -} diff --git a/x/epochs/keeper/hooks.go b/x/epochs/keeper/hooks.go deleted file mode 100644 index 767b593f2..000000000 --- a/x/epochs/keeper/hooks.go +++ /dev/null @@ -1,17 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -// AfterEpochEnd executes the indicated hook after epochs ends -func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochInfo types.EpochInfo) { - k.hooks.AfterEpochEnd(ctx, epochInfo) -} - -// BeforeEpochStart executes the indicated hook before the epochs -func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo types.EpochInfo) { - k.hooks.BeforeEpochStart(ctx, epochInfo) -} diff --git a/x/epochs/keeper/keeper.go b/x/epochs/keeper/keeper.go deleted file mode 100644 index 3f6e449ff..000000000 --- a/x/epochs/keeper/keeper.go +++ /dev/null @@ -1,43 +0,0 @@ -package keeper - -import ( - "fmt" - - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -// Keeper of this module maintains collections of epochs and hooks. -type Keeper struct { - cdc codec.Codec - storeKey storetypes.StoreKey - hooks types.EpochHooks -} - -// NewKeeper returns a new instance of epochs Keeper -func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey) *Keeper { - return &Keeper{ - cdc: cdc, - storeKey: storeKey, - } -} - -// SetHooks set the epoch hooks -func (k *Keeper) SetHooks(eh types.EpochHooks) *Keeper { - if k.hooks != nil { - panic("cannot set epochs hooks twice") - } - - k.hooks = eh - - return k -} - -// Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} diff --git a/x/epochs/module.go b/x/epochs/module.go deleted file mode 100644 index fd02441db..000000000 --- a/x/epochs/module.go +++ /dev/null @@ -1,184 +0,0 @@ -package epochs - -import ( - "context" - "encoding/json" - "fmt" - "math/rand" - - "cosmossdk.io/core/appmodule" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - - "github.com/milkyway-labs/milkyway/x/epochs/client/cli" - "github.com/milkyway-labs/milkyway/x/epochs/keeper" - "github.com/milkyway-labs/milkyway/x/epochs/simulation" - "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -var ( - _ appmodule.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} -) - -// ---------------------------------------------------------------------------- -// AppModuleBasic -// ---------------------------------------------------------------------------- - -// AppModuleBasic implements the AppModuleBasic interface for the capability module. -type AppModuleBasic struct { - cdc codec.Codec -} - -// NewAppModuleBasic return a new AppModuleBasic -func NewAppModuleBasic(cdc codec.Codec) AppModuleBasic { - return AppModuleBasic{cdc: cdc} -} - -// Name returns the capability module's name. -func (AppModuleBasic) Name() string { - return types.ModuleName -} - -// RegisterLegacyAminoCodec registers a legacy amino codec -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} - -// RegisterInterfaces registers the module's interface types -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {} - -// DefaultGenesis returns the capability module's default genesis state. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesis()) -} - -// ValidateGenesis performs genesis state validation for the capability module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { - var genState types.GenesisState - if err := cdc.UnmarshalJSON(bz, &genState); err != nil { - return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) - } - return genState.Validate() -} - -// RegisterRESTRoutes registers the capability module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) - if err != nil { - panic(err) - } -} - -// GetTxCmd returns the capability module's root tx command. -func (a AppModuleBasic) GetTxCmd() *cobra.Command { - return nil -} - -// GetQueryCmd returns the capability module's root query command. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - -// ---------------------------------------------------------------------------- -// AppModule -// ---------------------------------------------------------------------------- - -// AppModule implements the AppModule interface for the capability module. -type AppModule struct { - AppModuleBasic - - keeper keeper.Keeper -} - -// NewAppModule return a new AppModule -func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule { - return AppModule{ - AppModuleBasic: NewAppModuleBasic(cdc), - keeper: keeper, - } -} - -// Name returns the capability module's name. -func (am AppModule) Name() string { - return am.AppModuleBasic.Name() -} - -// QuerierRoute returns the capability module's query routing key. -func (AppModule) QuerierRoute() string { return types.QuerierRoute } - -// RegisterServices registers a GRPC query service to respond to the -// module-specific GRPC queries. -func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterQueryServer(cfg.QueryServer(), am.keeper) -} - -// RegisterInvariants registers the capability module's invariants. -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - -// InitGenesis performs the capability module's genesis initialization It returns -// no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { - var genState types.GenesisState - // Initialize global index to index in genesis state - cdc.MustUnmarshalJSON(gs, &genState) - - InitGenesis(ctx, am.keeper, genState) - return []abci.ValidatorUpdate{} -} - -// ExportGenesis returns the capability module's exported genesis state as raw JSON bytes. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - genState := ExportGenesis(ctx, am.keeper) - return cdc.MustMarshalJSON(genState) -} - -// BeginBlock executes all ABCI BeginBlock logic respective to the capability module. -func (am AppModule) BeginBlock(ctx context.Context) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - am.keeper.BeginBlocker(sdkCtx) - return nil -} - -// ___________________________________________________________________________ - -// AppModuleSimulation functions - -// GenerateGenesisState creates a randomized GenState of the pool-incentives module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) { - simulation.RandomizedGenState(simState) -} - -// ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalMsg { - return nil -} - -// RandomizedParams creates randomized pool-incentives param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.LegacyParamChange { - return nil -} - -// WeightedOperations returns the all the gov module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { - return nil // TODO -} - -// ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 1 } - -func (am AppModule) IsOnePerModuleType() {} - -func (am AppModule) IsAppModule() {} diff --git a/x/epochs/simulation/genesis.go b/x/epochs/simulation/genesis.go deleted file mode 100644 index 968dd5e35..000000000 --- a/x/epochs/simulation/genesis.go +++ /dev/null @@ -1,47 +0,0 @@ -package simulation - -// DONTCOVER - -import ( - "encoding/json" - "fmt" - "time" - - "github.com/cosmos/cosmos-sdk/types/module" - - "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -// RandomizedGenState generates a random GenesisState for mint -func RandomizedGenState(simState *module.SimulationState) { - epochs := []types.EpochInfo{ - { - Identifier: "day", - StartTime: time.Time{}, - Duration: time.Hour * 24, - CurrentEpoch: 0, - CurrentEpochStartHeight: 0, - CurrentEpochStartTime: time.Time{}, - EpochCountingStarted: false, - }, - { - Identifier: "hour", - StartTime: time.Time{}, - Duration: time.Hour, - CurrentEpoch: 0, - CurrentEpochStartHeight: 0, - CurrentEpochStartTime: time.Time{}, - EpochCountingStarted: false, - }, - } - epochGenesis := types.NewGenesisState(epochs) - - bz, err := json.MarshalIndent(&epochGenesis, "", " ") - if err != nil { - panic(err) - } - - // TODO: Do some randomization later - fmt.Printf("Selected deterministically generated epoch parameters:\n%s\n", bz) - simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(epochGenesis) -} diff --git a/x/epochs/testutil/hooks_mocks.go b/x/epochs/testutil/hooks_mocks.go deleted file mode 100644 index 77c0120b2..000000000 --- a/x/epochs/testutil/hooks_mocks.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: ./x/epochs/types/hooks.go -// -// Generated by this command: -// -// mockgen -source ./x/epochs/types/hooks.go -package testutil -destination ./x/epochs/testutil/hooks_mocks.go -// - -// Package testutil is a generated GoMock package. -package testutil - -import ( - reflect "reflect" - - types "github.com/cosmos/cosmos-sdk/types" - gomock "go.uber.org/mock/gomock" - - types0 "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -// MockEpochHooks is a mock of EpochHooks interface. -type MockEpochHooks struct { - ctrl *gomock.Controller - recorder *MockEpochHooksMockRecorder -} - -// MockEpochHooksMockRecorder is the mock recorder for MockEpochHooks. -type MockEpochHooksMockRecorder struct { - mock *MockEpochHooks -} - -// NewMockEpochHooks creates a new mock instance. -func NewMockEpochHooks(ctrl *gomock.Controller) *MockEpochHooks { - mock := &MockEpochHooks{ctrl: ctrl} - mock.recorder = &MockEpochHooksMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockEpochHooks) EXPECT() *MockEpochHooksMockRecorder { - return m.recorder -} - -// AfterEpochEnd mocks base method. -func (m *MockEpochHooks) AfterEpochEnd(ctx types.Context, epochInfo types0.EpochInfo) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "AfterEpochEnd", ctx, epochInfo) -} - -// AfterEpochEnd indicates an expected call of AfterEpochEnd. -func (mr *MockEpochHooksMockRecorder) AfterEpochEnd(ctx, epochInfo any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AfterEpochEnd", reflect.TypeOf((*MockEpochHooks)(nil).AfterEpochEnd), ctx, epochInfo) -} - -// BeforeEpochStart mocks base method. -func (m *MockEpochHooks) BeforeEpochStart(ctx types.Context, epochInfo types0.EpochInfo) { - m.ctrl.T.Helper() - m.ctrl.Call(m, "BeforeEpochStart", ctx, epochInfo) -} - -// BeforeEpochStart indicates an expected call of BeforeEpochStart. -func (mr *MockEpochHooksMockRecorder) BeforeEpochStart(ctx, epochInfo any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeforeEpochStart", reflect.TypeOf((*MockEpochHooks)(nil).BeforeEpochStart), ctx, epochInfo) -} diff --git a/x/epochs/types/codec.go b/x/epochs/types/codec.go deleted file mode 100644 index 010f067a3..000000000 --- a/x/epochs/types/codec.go +++ /dev/null @@ -1,8 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" -) - -var ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) diff --git a/x/epochs/types/events.go b/x/epochs/types/events.go deleted file mode 100644 index da0ac836e..000000000 --- a/x/epochs/types/events.go +++ /dev/null @@ -1,9 +0,0 @@ -package types - -const ( - EventTypeEpochEnd = "epoch_end" - EventTypeEpochStart = "epoch_start" - - AttributeEpochNumber = "epoch_number" - AttributeEpochStartTime = "start_time" -) diff --git a/x/epochs/types/genesis.go b/x/epochs/types/genesis.go deleted file mode 100644 index ce0062278..000000000 --- a/x/epochs/types/genesis.go +++ /dev/null @@ -1,96 +0,0 @@ -package types - -import ( - "errors" - "time" -) - -func NewGenesisState(epochs []EpochInfo) *GenesisState { - return &GenesisState{Epochs: epochs} -} - -var ( - HOUR_EPOCH = "hour" - DAY_EPOCH = "day" - WEEK_EPOCH = "week" - STRIDE_EPOCH = "stride_epoch" - MINT_EPOCH = "mint" -) - -// DefaultGenesis returns the default Capability genesis state -// The hour epoch was not included in the mainnet genesis config, -// -// but has been included here for local testing -func DefaultGenesis() *GenesisState { - epochs := []EpochInfo{ - { - Identifier: WEEK_EPOCH, - StartTime: time.Time{}, - Duration: time.Hour * 24 * 7, - CurrentEpoch: 0, - CurrentEpochStartHeight: 0, - CurrentEpochStartTime: time.Time{}, - EpochCountingStarted: false, - }, - { - Identifier: DAY_EPOCH, - StartTime: time.Time{}, - Duration: time.Hour * 24, - CurrentEpoch: 0, - CurrentEpochStartHeight: 0, - CurrentEpochStartTime: time.Time{}, - EpochCountingStarted: false, - }, - { - Identifier: STRIDE_EPOCH, - StartTime: time.Time{}, - Duration: time.Hour * 6, - CurrentEpoch: 0, - CurrentEpochStartHeight: 0, - CurrentEpochStartTime: time.Time{}, - EpochCountingStarted: false, - }, - { - Identifier: MINT_EPOCH, - StartTime: time.Time{}, - Duration: time.Minute * 60, - CurrentEpoch: 0, - CurrentEpochStartHeight: 0, - CurrentEpochStartTime: time.Time{}, - EpochCountingStarted: false, - }, - { - Identifier: HOUR_EPOCH, - StartTime: time.Time{}, - Duration: time.Hour, - CurrentEpoch: 0, - CurrentEpochStartHeight: 0, - CurrentEpochStartTime: time.Time{}, - EpochCountingStarted: false, - }, - } - return NewGenesisState(epochs) -} - -// Validate performs basic genesis state validation returning an error upon any -// failure. -func (gs GenesisState) Validate() error { - epochIdentifiers := map[string]bool{} - for _, epoch := range gs.Epochs { - if epoch.Identifier == "" { - return errors.New("epoch identifier should NOT be empty") - } - if epochIdentifiers[epoch.Identifier] { - return errors.New("epoch identifier should be unique") - } - if epoch.Duration == 0 { - return errors.New("epoch duration should NOT be 0") - } - // enforce EpochCountingStarted is false for all epochs - if epoch.EpochCountingStarted { - return errors.New("epoch counting should NOT be started at genesis") - } - epochIdentifiers[epoch.Identifier] = true - } - return nil -} diff --git a/x/epochs/types/genesis.pb.go b/x/epochs/types/genesis.pb.go deleted file mode 100644 index 8069c111f..000000000 --- a/x/epochs/types/genesis.pb.go +++ /dev/null @@ -1,786 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/epochs/genesis.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/durationpb" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type EpochInfo struct { - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` - StartTime time.Time `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time" yaml:"start_time"` - Duration time.Duration `protobuf:"bytes,3,opt,name=duration,proto3,stdduration" json:"duration,omitempty" yaml:"duration"` - CurrentEpoch int64 `protobuf:"varint,4,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` - CurrentEpochStartTime time.Time `protobuf:"bytes,5,opt,name=current_epoch_start_time,json=currentEpochStartTime,proto3,stdtime" json:"current_epoch_start_time" yaml:"current_epoch_start_time"` - EpochCountingStarted bool `protobuf:"varint,6,opt,name=epoch_counting_started,json=epochCountingStarted,proto3" json:"epoch_counting_started,omitempty"` - CurrentEpochStartHeight int64 `protobuf:"varint,7,opt,name=current_epoch_start_height,json=currentEpochStartHeight,proto3" json:"current_epoch_start_height,omitempty"` -} - -func (m *EpochInfo) Reset() { *m = EpochInfo{} } -func (m *EpochInfo) String() string { return proto.CompactTextString(m) } -func (*EpochInfo) ProtoMessage() {} -func (*EpochInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_92af8154b2eb736d, []int{0} -} -func (m *EpochInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EpochInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EpochInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EpochInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_EpochInfo.Merge(m, src) -} -func (m *EpochInfo) XXX_Size() int { - return m.Size() -} -func (m *EpochInfo) XXX_DiscardUnknown() { - xxx_messageInfo_EpochInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_EpochInfo proto.InternalMessageInfo - -func (m *EpochInfo) GetIdentifier() string { - if m != nil { - return m.Identifier - } - return "" -} - -func (m *EpochInfo) GetStartTime() time.Time { - if m != nil { - return m.StartTime - } - return time.Time{} -} - -func (m *EpochInfo) GetDuration() time.Duration { - if m != nil { - return m.Duration - } - return 0 -} - -func (m *EpochInfo) GetCurrentEpoch() int64 { - if m != nil { - return m.CurrentEpoch - } - return 0 -} - -func (m *EpochInfo) GetCurrentEpochStartTime() time.Time { - if m != nil { - return m.CurrentEpochStartTime - } - return time.Time{} -} - -func (m *EpochInfo) GetEpochCountingStarted() bool { - if m != nil { - return m.EpochCountingStarted - } - return false -} - -func (m *EpochInfo) GetCurrentEpochStartHeight() int64 { - if m != nil { - return m.CurrentEpochStartHeight - } - return 0 -} - -// GenesisState defines the epochs module's genesis state. -type GenesisState struct { - Epochs []EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_92af8154b2eb736d, []int{1} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetEpochs() []EpochInfo { - if m != nil { - return m.Epochs - } - return nil -} - -func init() { - proto.RegisterType((*EpochInfo)(nil), "stride.epochs.EpochInfo") - proto.RegisterType((*GenesisState)(nil), "stride.epochs.GenesisState") -} - -func init() { proto.RegisterFile("stride/epochs/genesis.proto", fileDescriptor_92af8154b2eb736d) } - -var fileDescriptor_92af8154b2eb736d = []byte{ - // 466 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xbf, 0x8f, 0xd3, 0x30, - 0x14, 0xc7, 0x6b, 0x5a, 0xca, 0xd5, 0x77, 0x27, 0x84, 0x75, 0x80, 0x29, 0x22, 0x89, 0xc2, 0x12, - 0x09, 0x48, 0xe0, 0x40, 0x0c, 0xb0, 0x95, 0xdf, 0x8c, 0x29, 0x03, 0x62, 0xa9, 0xd2, 0xd6, 0x75, - 0x2c, 0x9a, 0x38, 0x8a, 0x5f, 0x04, 0xd9, 0x98, 0x99, 0x6e, 0xe4, 0x4f, 0xba, 0xf1, 0x46, 0xa6, - 0x82, 0xda, 0x8d, 0xf1, 0xfe, 0x02, 0x14, 0x3b, 0x29, 0x3d, 0x0a, 0xba, 0x2d, 0xf6, 0xe7, 0xfb, - 0xbe, 0x5f, 0xbf, 0xa7, 0x17, 0x7c, 0x53, 0x41, 0x2e, 0xa6, 0x2c, 0x60, 0x99, 0x9c, 0xc4, 0x2a, - 0xe0, 0x2c, 0x65, 0x4a, 0x28, 0x3f, 0xcb, 0x25, 0x48, 0xb2, 0x6f, 0xa0, 0x6f, 0x60, 0xff, 0x80, - 0x4b, 0x2e, 0x35, 0x09, 0xaa, 0x2f, 0x23, 0xea, 0x5b, 0x5c, 0x4a, 0x3e, 0x67, 0x81, 0x3e, 0x8d, - 0x8b, 0x59, 0x30, 0x2d, 0xf2, 0x08, 0x84, 0x4c, 0x6b, 0x6e, 0xff, 0xcd, 0x41, 0x24, 0x4c, 0x41, - 0x94, 0x64, 0x46, 0xe0, 0x7e, 0xed, 0xe0, 0xde, 0x8b, 0x2a, 0xe1, 0x4d, 0x3a, 0x93, 0xc4, 0xc2, - 0x58, 0x4c, 0x59, 0x0a, 0x62, 0x26, 0x58, 0x4e, 0x91, 0x83, 0xbc, 0x5e, 0xb8, 0x71, 0x43, 0xde, - 0x63, 0xac, 0x20, 0xca, 0x61, 0x54, 0xd9, 0xd0, 0x0b, 0x0e, 0xf2, 0x76, 0x0f, 0xfb, 0xbe, 0xc9, - 0xf0, 0x9b, 0x0c, 0xff, 0x5d, 0x93, 0x31, 0xb8, 0x75, 0xbc, 0xb0, 0x5b, 0xa7, 0x0b, 0xfb, 0x4a, - 0x19, 0x25, 0xf3, 0x27, 0xee, 0x9f, 0x5a, 0xf7, 0xe8, 0x87, 0x8d, 0xc2, 0x9e, 0xbe, 0xa8, 0xe4, - 0x24, 0xc6, 0x3b, 0xcd, 0xd3, 0x69, 0x5b, 0xfb, 0xde, 0xd8, 0xf2, 0x7d, 0x5e, 0x0b, 0x06, 0x0f, - 0x2a, 0xdb, 0x5f, 0x0b, 0x9b, 0x34, 0x25, 0x77, 0x65, 0x22, 0x80, 0x25, 0x19, 0x94, 0xa7, 0x0b, - 0xfb, 0xb2, 0x09, 0x6b, 0x98, 0xfb, 0xad, 0x8a, 0x5a, 0xbb, 0x93, 0xdb, 0x78, 0x7f, 0x52, 0xe4, - 0x39, 0x4b, 0x61, 0xa4, 0x47, 0x4b, 0x3b, 0x0e, 0xf2, 0xda, 0xe1, 0x5e, 0x7d, 0xa9, 0x87, 0x41, - 0xbe, 0x20, 0x4c, 0xcf, 0xa8, 0x46, 0x1b, 0x7d, 0x5f, 0x3c, 0xb7, 0xef, 0x3b, 0x75, 0xdf, 0xb6, - 0x79, 0xca, 0xff, 0x9c, 0xcc, 0x14, 0xae, 0x6e, 0x26, 0x0f, 0xd7, 0x13, 0x79, 0x84, 0xaf, 0x19, - 0xfd, 0x44, 0x16, 0x29, 0x88, 0x94, 0x9b, 0x42, 0x36, 0xa5, 0x5d, 0x07, 0x79, 0x3b, 0xe1, 0x81, - 0xa6, 0xcf, 0x6a, 0x38, 0x34, 0x8c, 0x3c, 0xc5, 0xfd, 0x7f, 0xa5, 0xc5, 0x4c, 0xf0, 0x18, 0xe8, - 0x25, 0xdd, 0xea, 0xf5, 0xad, 0xc0, 0xd7, 0x1a, 0xbb, 0x2f, 0xf1, 0xde, 0x2b, 0xb3, 0x83, 0x43, - 0x88, 0x80, 0x91, 0xc7, 0xb8, 0x6b, 0xb6, 0x8f, 0x22, 0xa7, 0xed, 0xed, 0x1e, 0x52, 0xff, 0xcc, - 0x4e, 0xfa, 0xeb, 0xc5, 0x19, 0x74, 0xaa, 0x86, 0xc3, 0x5a, 0x3d, 0x78, 0x7b, 0xbc, 0xb4, 0xd0, - 0xc9, 0xd2, 0x42, 0x3f, 0x97, 0x16, 0x3a, 0x5a, 0x59, 0xad, 0x93, 0x95, 0xd5, 0xfa, 0xbe, 0xb2, - 0x5a, 0x1f, 0xee, 0x73, 0x01, 0x71, 0x31, 0xf6, 0x27, 0x32, 0x09, 0x12, 0x31, 0xff, 0x58, 0x7e, - 0x8a, 0xca, 0x7b, 0xf3, 0x68, 0xac, 0xd6, 0xa7, 0xe0, 0x73, 0xf3, 0x3b, 0x40, 0x99, 0x31, 0x35, - 0xee, 0xea, 0xf1, 0x3e, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xe2, 0xf0, 0x1e, 0xc0, 0x2c, 0x03, - 0x00, 0x00, -} - -func (m *EpochInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EpochInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EpochInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CurrentEpochStartHeight != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.CurrentEpochStartHeight)) - i-- - dAtA[i] = 0x38 - } - if m.EpochCountingStarted { - i-- - if m.EpochCountingStarted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CurrentEpochStartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentEpochStartTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintGenesis(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x2a - if m.CurrentEpoch != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.CurrentEpoch)) - i-- - dAtA[i] = 0x20 - } - n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintGenesis(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x1a - n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.StartTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintGenesis(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x12 - if len(m.Identifier) > 0 { - i -= len(m.Identifier) - copy(dAtA[i:], m.Identifier) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Identifier))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Epochs) > 0 { - for iNdEx := len(m.Epochs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Epochs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EpochInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identifier) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.StartTime) - n += 1 + l + sovGenesis(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.Duration) - n += 1 + l + sovGenesis(uint64(l)) - if m.CurrentEpoch != 0 { - n += 1 + sovGenesis(uint64(m.CurrentEpoch)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CurrentEpochStartTime) - n += 1 + l + sovGenesis(uint64(l)) - if m.EpochCountingStarted { - n += 2 - } - if m.CurrentEpochStartHeight != 0 { - n += 1 + sovGenesis(uint64(m.CurrentEpochStartHeight)) - } - return n -} - -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Epochs) > 0 { - for _, e := range m.Epochs { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EpochInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EpochInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EpochInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.StartTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentEpoch", wireType) - } - m.CurrentEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CurrentEpoch |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentEpochStartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.CurrentEpochStartTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochCountingStarted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EpochCountingStarted = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentEpochStartHeight", wireType) - } - m.CurrentEpochStartHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CurrentEpochStartHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Epochs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Epochs = append(m.Epochs, EpochInfo{}) - if err := m.Epochs[len(m.Epochs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/epochs/types/hooks.go b/x/epochs/types/hooks.go deleted file mode 100644 index eb7c622d5..000000000 --- a/x/epochs/types/hooks.go +++ /dev/null @@ -1,35 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type EpochHooks interface { - // the first block whose timestamp is after the duration is counted as the end of the epoch - AfterEpochEnd(ctx sdk.Context, epochInfo EpochInfo) - // new epoch is next block of epoch end block - BeforeEpochStart(ctx sdk.Context, epochInfo EpochInfo) -} - -var _ EpochHooks = MultiEpochHooks{} - -// combine multiple gamm hooks, all hook functions are run in array sequence -type MultiEpochHooks []EpochHooks - -func NewMultiEpochHooks(hooks ...EpochHooks) MultiEpochHooks { - return hooks -} - -// AfterEpochEnd is called when epoch is going to be ended, epochNumber is the number of epoch that is ending -func (h MultiEpochHooks) AfterEpochEnd(ctx sdk.Context, epochInfo EpochInfo) { - for i := range h { - h[i].AfterEpochEnd(ctx, epochInfo) - } -} - -// BeforeEpochStart is called when epoch is going to be started, epochNumber is the number of epoch that is starting -func (h MultiEpochHooks) BeforeEpochStart(ctx sdk.Context, epochInfo EpochInfo) { - for i := range h { - h[i].BeforeEpochStart(ctx, epochInfo) - } -} diff --git a/x/epochs/types/identifier.go b/x/epochs/types/identifier.go deleted file mode 100644 index ae0712dfc..000000000 --- a/x/epochs/types/identifier.go +++ /dev/null @@ -1,26 +0,0 @@ -package types - -import ( - "fmt" - "strings" -) - -func ValidateEpochIdentifierInterface(i interface{}) error { - v, ok := i.(string) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - if err := ValidateEpochIdentifierString(v); err != nil { - return err - } - - return nil -} - -func ValidateEpochIdentifierString(s string) error { - s = strings.TrimSpace(s) - if s == "" { - return fmt.Errorf("blank epoch identifier: %s", s) - } - return nil -} diff --git a/x/epochs/types/keys.go b/x/epochs/types/keys.go deleted file mode 100644 index d5d8a10d9..000000000 --- a/x/epochs/types/keys.go +++ /dev/null @@ -1,27 +0,0 @@ -package types - -const ( - // ModuleName defines the module name - ModuleName = "epochs" - - // StoreKey defines the primary module store key - StoreKey = ModuleName - - // RouterKey is the message route for slashing - RouterKey = ModuleName - - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName -) - -// prefix bytes for the epoch persistent store -const ( - prefixEpoch = iota + 1 -) - -// KeyPrefixEpoch defines prefix key for storing epochs -var KeyPrefixEpoch = []byte{prefixEpoch} - -func KeyPrefix(p string) []byte { - return []byte(p) -} diff --git a/x/epochs/types/query.pb.go b/x/epochs/types/query.pb.go deleted file mode 100644 index 858a19e9f..000000000 --- a/x/epochs/types/query.pb.go +++ /dev/null @@ -1,1419 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/epochs/query.proto - -package types - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type QueryEpochsInfoRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryEpochsInfoRequest) Reset() { *m = QueryEpochsInfoRequest{} } -func (m *QueryEpochsInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryEpochsInfoRequest) ProtoMessage() {} -func (*QueryEpochsInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_de81e87fff8f1327, []int{0} -} -func (m *QueryEpochsInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryEpochsInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryEpochsInfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryEpochsInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryEpochsInfoRequest.Merge(m, src) -} -func (m *QueryEpochsInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryEpochsInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryEpochsInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryEpochsInfoRequest proto.InternalMessageInfo - -func (m *QueryEpochsInfoRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryEpochsInfoResponse struct { - Epochs []EpochInfo `protobuf:"bytes,1,rep,name=epochs,proto3" json:"epochs"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryEpochsInfoResponse) Reset() { *m = QueryEpochsInfoResponse{} } -func (m *QueryEpochsInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryEpochsInfoResponse) ProtoMessage() {} -func (*QueryEpochsInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_de81e87fff8f1327, []int{1} -} -func (m *QueryEpochsInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryEpochsInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryEpochsInfoResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryEpochsInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryEpochsInfoResponse.Merge(m, src) -} -func (m *QueryEpochsInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryEpochsInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryEpochsInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryEpochsInfoResponse proto.InternalMessageInfo - -func (m *QueryEpochsInfoResponse) GetEpochs() []EpochInfo { - if m != nil { - return m.Epochs - } - return nil -} - -func (m *QueryEpochsInfoResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryCurrentEpochRequest struct { - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` -} - -func (m *QueryCurrentEpochRequest) Reset() { *m = QueryCurrentEpochRequest{} } -func (m *QueryCurrentEpochRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCurrentEpochRequest) ProtoMessage() {} -func (*QueryCurrentEpochRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_de81e87fff8f1327, []int{2} -} -func (m *QueryCurrentEpochRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCurrentEpochRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCurrentEpochRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCurrentEpochRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCurrentEpochRequest.Merge(m, src) -} -func (m *QueryCurrentEpochRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryCurrentEpochRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCurrentEpochRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCurrentEpochRequest proto.InternalMessageInfo - -func (m *QueryCurrentEpochRequest) GetIdentifier() string { - if m != nil { - return m.Identifier - } - return "" -} - -type QueryCurrentEpochResponse struct { - CurrentEpoch int64 `protobuf:"varint,1,opt,name=current_epoch,json=currentEpoch,proto3" json:"current_epoch,omitempty"` -} - -func (m *QueryCurrentEpochResponse) Reset() { *m = QueryCurrentEpochResponse{} } -func (m *QueryCurrentEpochResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCurrentEpochResponse) ProtoMessage() {} -func (*QueryCurrentEpochResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_de81e87fff8f1327, []int{3} -} -func (m *QueryCurrentEpochResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCurrentEpochResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCurrentEpochResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCurrentEpochResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCurrentEpochResponse.Merge(m, src) -} -func (m *QueryCurrentEpochResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryCurrentEpochResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCurrentEpochResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCurrentEpochResponse proto.InternalMessageInfo - -func (m *QueryCurrentEpochResponse) GetCurrentEpoch() int64 { - if m != nil { - return m.CurrentEpoch - } - return 0 -} - -type QueryEpochInfoRequest struct { - Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` -} - -func (m *QueryEpochInfoRequest) Reset() { *m = QueryEpochInfoRequest{} } -func (m *QueryEpochInfoRequest) String() string { return proto.CompactTextString(m) } -func (*QueryEpochInfoRequest) ProtoMessage() {} -func (*QueryEpochInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_de81e87fff8f1327, []int{4} -} -func (m *QueryEpochInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryEpochInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryEpochInfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryEpochInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryEpochInfoRequest.Merge(m, src) -} -func (m *QueryEpochInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryEpochInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryEpochInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryEpochInfoRequest proto.InternalMessageInfo - -func (m *QueryEpochInfoRequest) GetIdentifier() string { - if m != nil { - return m.Identifier - } - return "" -} - -type QueryEpochInfoResponse struct { - Epoch EpochInfo `protobuf:"bytes,1,opt,name=epoch,proto3" json:"epoch"` -} - -func (m *QueryEpochInfoResponse) Reset() { *m = QueryEpochInfoResponse{} } -func (m *QueryEpochInfoResponse) String() string { return proto.CompactTextString(m) } -func (*QueryEpochInfoResponse) ProtoMessage() {} -func (*QueryEpochInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_de81e87fff8f1327, []int{5} -} -func (m *QueryEpochInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryEpochInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryEpochInfoResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryEpochInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryEpochInfoResponse.Merge(m, src) -} -func (m *QueryEpochInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryEpochInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryEpochInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryEpochInfoResponse proto.InternalMessageInfo - -func (m *QueryEpochInfoResponse) GetEpoch() EpochInfo { - if m != nil { - return m.Epoch - } - return EpochInfo{} -} - -func init() { - proto.RegisterType((*QueryEpochsInfoRequest)(nil), "stride.epochs.QueryEpochsInfoRequest") - proto.RegisterType((*QueryEpochsInfoResponse)(nil), "stride.epochs.QueryEpochsInfoResponse") - proto.RegisterType((*QueryCurrentEpochRequest)(nil), "stride.epochs.QueryCurrentEpochRequest") - proto.RegisterType((*QueryCurrentEpochResponse)(nil), "stride.epochs.QueryCurrentEpochResponse") - proto.RegisterType((*QueryEpochInfoRequest)(nil), "stride.epochs.QueryEpochInfoRequest") - proto.RegisterType((*QueryEpochInfoResponse)(nil), "stride.epochs.QueryEpochInfoResponse") -} - -func init() { proto.RegisterFile("stride/epochs/query.proto", fileDescriptor_de81e87fff8f1327) } - -var fileDescriptor_de81e87fff8f1327 = []byte{ - // 516 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x31, 0x6f, 0xd3, 0x4e, - 0x18, 0xc6, 0xe3, 0xe6, 0xdf, 0x4a, 0x7d, 0xdb, 0x2e, 0xa7, 0x3f, 0x90, 0xa4, 0xc8, 0x14, 0xd3, - 0x26, 0x01, 0xc1, 0x1d, 0x0d, 0x08, 0x24, 0x26, 0x04, 0x02, 0x04, 0x03, 0x02, 0xb3, 0xb1, 0x94, - 0xb3, 0x7b, 0x75, 0x4f, 0x24, 0x77, 0xae, 0xef, 0x02, 0x64, 0x61, 0x60, 0x60, 0x46, 0xb0, 0xb1, - 0xf3, 0x5d, 0x3a, 0x56, 0x62, 0x61, 0x42, 0x28, 0xe1, 0x83, 0x20, 0xdf, 0x5d, 0x1a, 0x1b, 0x12, - 0x79, 0x4a, 0xe2, 0xf7, 0x79, 0xde, 0xe7, 0x77, 0xcf, 0x59, 0x81, 0xa6, 0xd2, 0x19, 0xdf, 0x67, - 0x84, 0xa5, 0x32, 0x3e, 0x54, 0xe4, 0x68, 0xc8, 0xb2, 0x11, 0x4e, 0x33, 0xa9, 0x25, 0xda, 0xb0, - 0x23, 0x6c, 0x47, 0xad, 0xff, 0x13, 0x99, 0x48, 0x33, 0x21, 0xf9, 0x37, 0x2b, 0x6a, 0x9d, 0x4f, - 0xa4, 0x4c, 0xfa, 0x8c, 0xd0, 0x94, 0x13, 0x2a, 0x84, 0xd4, 0x54, 0x73, 0x29, 0x94, 0x9b, 0x5e, - 0x89, 0xa5, 0x1a, 0x48, 0x45, 0x22, 0xaa, 0x98, 0xdd, 0x4d, 0xde, 0xec, 0x46, 0x4c, 0xd3, 0x5d, - 0x92, 0xd2, 0x84, 0x0b, 0x23, 0x76, 0xda, 0xcd, 0x32, 0x49, 0xc2, 0x04, 0x53, 0xdc, 0x2d, 0x0a, - 0x5e, 0xc1, 0xd9, 0xe7, 0xb9, 0xfd, 0x81, 0x19, 0x3e, 0x16, 0x07, 0x32, 0x64, 0x47, 0x43, 0xa6, - 0x34, 0x7a, 0x08, 0x30, 0x5b, 0xd5, 0xf0, 0xb6, 0xbc, 0xee, 0x5a, 0xaf, 0x8d, 0x6d, 0x2e, 0xce, - 0x73, 0xb1, 0x3d, 0x93, 0xcb, 0xc5, 0xcf, 0x68, 0xc2, 0x9c, 0x37, 0x2c, 0x38, 0x83, 0xaf, 0x1e, - 0x9c, 0xfb, 0x27, 0x42, 0xa5, 0x52, 0x28, 0x86, 0x6e, 0xc1, 0x8a, 0xa5, 0x6a, 0x78, 0x5b, 0xf5, - 0xee, 0x5a, 0xaf, 0x81, 0x4b, 0xd5, 0x60, 0x63, 0xc9, 0x1d, 0xf7, 0xfe, 0x3b, 0xfe, 0x79, 0xa1, - 0x16, 0x3a, 0x35, 0x7a, 0x54, 0x62, 0x5b, 0x32, 0x6c, 0x9d, 0x4a, 0x36, 0x1b, 0x5a, 0x82, 0xbb, - 0x03, 0x0d, 0xc3, 0x76, 0x7f, 0x98, 0x65, 0x4c, 0x68, 0x93, 0x37, 0x2d, 0xc0, 0x07, 0xe0, 0xfb, - 0x4c, 0x68, 0x7e, 0xc0, 0x59, 0x66, 0x0a, 0x58, 0x0d, 0x0b, 0x4f, 0x82, 0xbb, 0xd0, 0x9c, 0xe3, - 0x75, 0x27, 0xbb, 0x04, 0x1b, 0xb1, 0x7d, 0xbe, 0x67, 0x98, 0x8d, 0xbf, 0x1e, 0xae, 0xc7, 0x05, - 0x71, 0x70, 0x1b, 0xce, 0xcc, 0x9a, 0x29, 0x76, 0x5f, 0x15, 0xfd, 0xb4, 0x78, 0x6b, 0xa5, 0x46, - 0x6f, 0xc2, 0xf2, 0x2c, 0xaf, 0xba, 0x50, 0x2b, 0xee, 0x7d, 0xab, 0xc3, 0xb2, 0x59, 0x88, 0xde, - 0x03, 0x9c, 0x6a, 0x14, 0xda, 0xf9, 0xcb, 0x3e, 0xff, 0x55, 0x69, 0xb5, 0xab, 0x64, 0x16, 0x2e, - 0xb8, 0xf8, 0xe1, 0xfb, 0xef, 0x2f, 0x4b, 0x9b, 0xa8, 0x49, 0x5e, 0x18, 0x7d, 0x9f, 0x46, 0x8a, - 0x94, 0xde, 0x4e, 0xf4, 0xd9, 0x83, 0xf5, 0x62, 0xa1, 0xa8, 0x33, 0x6f, 0xf7, 0x9c, 0xeb, 0x6a, - 0x75, 0xab, 0x85, 0x0e, 0x83, 0x18, 0x8c, 0xcb, 0xa8, 0xb3, 0x10, 0x83, 0x94, 0xee, 0x0e, 0x7d, - 0xf4, 0x60, 0xf5, 0xb4, 0x15, 0xb4, 0xbd, 0xf0, 0xb4, 0xc5, 0x4e, 0x76, 0x2a, 0x54, 0x8e, 0xe5, - 0xaa, 0x61, 0x69, 0xa3, 0xed, 0xc5, 0x2c, 0xe6, 0x63, 0x8f, 0xe7, 0x97, 0xf6, 0xe4, 0x78, 0xec, - 0x7b, 0x27, 0x63, 0xdf, 0xfb, 0x35, 0xf6, 0xbd, 0x4f, 0x13, 0xbf, 0x76, 0x32, 0xf1, 0x6b, 0x3f, - 0x26, 0x7e, 0xed, 0xe5, 0xf5, 0x84, 0xeb, 0xc3, 0x61, 0x84, 0x63, 0x39, 0x20, 0x03, 0xde, 0x7f, - 0x3d, 0x7a, 0x4b, 0x47, 0xd7, 0xcc, 0xb2, 0xe9, 0x2f, 0xf2, 0x6e, 0xba, 0x50, 0x8f, 0x52, 0xa6, - 0xa2, 0x15, 0xf3, 0x07, 0x70, 0xe3, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x0f, 0x58, 0xb3, - 0xa9, 0x04, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // EpochInfos provide running epochInfos - EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) - // CurrentEpoch provide current epoch of specified identifier - CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) - // CurrentEpoch provide current epoch of specified identifier - EpochInfo(ctx context.Context, in *QueryEpochInfoRequest, opts ...grpc.CallOption) (*QueryEpochInfoResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) EpochInfos(ctx context.Context, in *QueryEpochsInfoRequest, opts ...grpc.CallOption) (*QueryEpochsInfoResponse, error) { - out := new(QueryEpochsInfoResponse) - err := c.cc.Invoke(ctx, "/stride.epochs.Query/EpochInfos", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CurrentEpoch(ctx context.Context, in *QueryCurrentEpochRequest, opts ...grpc.CallOption) (*QueryCurrentEpochResponse, error) { - out := new(QueryCurrentEpochResponse) - err := c.cc.Invoke(ctx, "/stride.epochs.Query/CurrentEpoch", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochInfo(ctx context.Context, in *QueryEpochInfoRequest, opts ...grpc.CallOption) (*QueryEpochInfoResponse, error) { - out := new(QueryEpochInfoResponse) - err := c.cc.Invoke(ctx, "/stride.epochs.Query/EpochInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // EpochInfos provide running epochInfos - EpochInfos(context.Context, *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) - // CurrentEpoch provide current epoch of specified identifier - CurrentEpoch(context.Context, *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) - // CurrentEpoch provide current epoch of specified identifier - EpochInfo(context.Context, *QueryEpochInfoRequest) (*QueryEpochInfoResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) EpochInfos(ctx context.Context, req *QueryEpochsInfoRequest) (*QueryEpochsInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochInfos not implemented") -} -func (*UnimplementedQueryServer) CurrentEpoch(ctx context.Context, req *QueryCurrentEpochRequest) (*QueryCurrentEpochResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CurrentEpoch not implemented") -} -func (*UnimplementedQueryServer) EpochInfo(ctx context.Context, req *QueryEpochInfoRequest) (*QueryEpochInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochInfo not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_EpochInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEpochsInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochInfos(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.epochs.Query/EpochInfos", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochInfos(ctx, req.(*QueryEpochsInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CurrentEpoch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCurrentEpochRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CurrentEpoch(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.epochs.Query/CurrentEpoch", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CurrentEpoch(ctx, req.(*QueryCurrentEpochRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryEpochInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.epochs.Query/EpochInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochInfo(ctx, req.(*QueryEpochInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "stride.epochs.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "EpochInfos", - Handler: _Query_EpochInfos_Handler, - }, - { - MethodName: "CurrentEpoch", - Handler: _Query_CurrentEpoch_Handler, - }, - { - MethodName: "EpochInfo", - Handler: _Query_EpochInfo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/epochs/query.proto", -} - -func (m *QueryEpochsInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryEpochsInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryEpochsInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryEpochsInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryEpochsInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryEpochsInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Epochs) > 0 { - for iNdEx := len(m.Epochs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Epochs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryCurrentEpochRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCurrentEpochRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCurrentEpochRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Identifier) > 0 { - i -= len(m.Identifier) - copy(dAtA[i:], m.Identifier) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Identifier))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryCurrentEpochResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCurrentEpochResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCurrentEpochResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CurrentEpoch != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.CurrentEpoch)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryEpochInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryEpochInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryEpochInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Identifier) > 0 { - i -= len(m.Identifier) - copy(dAtA[i:], m.Identifier) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Identifier))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryEpochInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryEpochInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryEpochInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Epoch.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryEpochsInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryEpochsInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Epochs) > 0 { - for _, e := range m.Epochs { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCurrentEpochRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identifier) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryCurrentEpochResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CurrentEpoch != 0 { - n += 1 + sovQuery(uint64(m.CurrentEpoch)) - } - return n -} - -func (m *QueryEpochInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Identifier) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryEpochInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Epoch.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryEpochsInfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryEpochsInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochsInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryEpochsInfoResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryEpochsInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochsInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Epochs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Epochs = append(m.Epochs, EpochInfo{}) - if err := m.Epochs[len(m.Epochs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCurrentEpochRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentEpochRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentEpochRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCurrentEpochResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCurrentEpochResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCurrentEpochResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CurrentEpoch", wireType) - } - m.CurrentEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CurrentEpoch |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryEpochInfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryEpochInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryEpochInfoResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryEpochInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryEpochInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Epoch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/epochs/types/query.pb.gw.go b/x/epochs/types/query.pb.gw.go deleted file mode 100644 index 4a7561cea..000000000 --- a/x/epochs/types/query.pb.gw.go +++ /dev/null @@ -1,337 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: stride/epochs/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -var ( - filter_Query_EpochInfos_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_EpochInfos_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryEpochsInfoRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EpochInfos_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.EpochInfos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EpochInfos_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryEpochsInfoRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EpochInfos_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.EpochInfos(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_CurrentEpoch_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_CurrentEpoch_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCurrentEpochRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CurrentEpoch_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CurrentEpoch(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_CurrentEpoch_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCurrentEpochRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CurrentEpoch_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CurrentEpoch(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_EpochInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_EpochInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryEpochInfoRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EpochInfo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.EpochInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EpochInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryEpochInfoRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EpochInfo_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.EpochInfo(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_EpochInfos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EpochInfos_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CurrentEpoch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_CurrentEpoch_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CurrentEpoch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EpochInfo_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_EpochInfos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EpochInfos_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CurrentEpoch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_CurrentEpoch_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CurrentEpoch_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EpochInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_EpochInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"Stridelabs", "stride", "epochs"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_CurrentEpoch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stridelabs", "stride", "epochs", "current_epoch"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_EpochInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stridelabs", "stride", "epochs", "epoch_info"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_EpochInfos_0 = runtime.ForwardResponseMessage - - forward_Query_CurrentEpoch_0 = runtime.ForwardResponseMessage - - forward_Query_EpochInfo_0 = runtime.ForwardResponseMessage -) diff --git a/x/icacallbacks/README.md b/x/icacallbacks/README.md deleted file mode 100644 index 590b6b758..000000000 --- a/x/icacallbacks/README.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: "Icacallbacks" -excerpt: "" -category: 6392913957c533007128548e ---- - -# The ICACallbacks Module - -Add `icacallbacks` module. Interchain accounts are very useful, but ICA calls triggered by automated logic on Stride are limited in functionality and difficult to work with due to a lack of callbacks. Most of Stride's interchain account logic is triggered epochly from the `BeginBlocker`, and state updates on Stride must be made after ICA calls are issued, based on the success / failure of those calls. - -The challenges faced before creating the icacallbacks modules were: -(1) Messages must be handled one-off (by matching on message type) - really what we want to do is update state in acks based on the _transaction_ sent -(2) Message responses are almost always empty, e.g. `MsgDelegateResponse`, which leads to -(3) Matching processed messages to state on the controller is very challenging (sometimes impossible) based on the attributes of the message sent. For example, given the following type - -``` -type Gift struct { - from string - to string - amount int - reason string -} -``` - -two ICA bank sends associated with gifts that have the same `from`, `to` and `amount` but _different_ `reasons` are indistinguishable today in acks. - -`icacontroller` solves the issues as follows - -- Callbacks can be registered to process data associated with a particular IBC packet, per module (solves 1) -- ICA auth modules can store callback data using `icacallbacks`, passing in both a callback and args -- Arguments to the callback can be (un)marshaled and contain arbitrary keys, allowing for updates to data on the controller chain based on the success / failure of the ICA call (solves 2 / 3) - -### Technical notes - -- Callbacks are uniquely identifiable through `portId/channelId/sequence` keys -- Only modules that have registered callbacks can invoke them -- `icacallbacks` doesn't have a message server / handler (it can only be called by other modules) -- `icacallbacks` does authentication by fetching the module associated with a packet (containing the registered callbacks) by calling `ChannelKeeper.LookupModuleByChannel` (it's permissioned at the module level) -- `icacallbacks` is an interchain account auth module, although it's possible this design could be generalized to work with other IBC modules -- in case of a timeout, callbacks are still executed with the ack set to an empty byte array -- We're using protos to serialize / deserialize callback arguments - -The flow to add callbacks is to call `ICACallbacksKeeper.SetCallbackData` after sending an IBC transaction. When the ack returns - -- the callback is fetched using the callback key -- the module is fetched using the portId / channelId -and the callback is invoked and deleted. - -The middleware structure is as follows -![middleware](https://user-images.githubusercontent.com/1331345/183272460-5225d67d-95ee-47e2-8200-11de013a0695.png) - -### Invariants - -- `portId, channelId` pair map to a unique module (important for fetching the correct `CallbackHandler` from a received packet) -- callback ids are unique within modules (they don't have to be unique between modules, because `CallICACallback` is scoped to a module) - -## Keeper functions - -- `CallRegisteredICACallback()`: invokes the relevant callback associated with an ICA - -## State - -- `CallbackData`: stores the callback type, arguments and associated packet -- `CallbackHandler` -- `Callbacks` -- `Callback` - -## Events - -The `icacallbacks` module does not currently emit any events. diff --git a/x/icacallbacks/client/cli/query.go b/x/icacallbacks/client/cli/query.go deleted file mode 100644 index 5055f5adb..000000000 --- a/x/icacallbacks/client/cli/query.go +++ /dev/null @@ -1,33 +0,0 @@ -package cli - -import ( - "fmt" - // "strings" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" - // sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(queryRoute string) *cobra.Command { - // Group icacallbacks queries under a subcommand - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand(CmdQueryParams()) - cmd.AddCommand(CmdListCallbackData()) - cmd.AddCommand(CmdShowCallbackData()) - // this line is used by starport scaffolding # 1 - - return cmd -} diff --git a/x/icacallbacks/client/cli/query_callback_data.go b/x/icacallbacks/client/cli/query_callback_data.go deleted file mode 100644 index 8c9876373..000000000 --- a/x/icacallbacks/client/cli/query_callback_data.go +++ /dev/null @@ -1,74 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -func CmdListCallbackData() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-callback-data", - Short: "list all callback-data", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllCallbackDataRequest{ - Pagination: pageReq, - } - - res, err := queryClient.CallbackDataAll(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, cmd.Use) - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdShowCallbackData() *cobra.Command { - cmd := &cobra.Command{ - Use: "show-callback-data [callback-key]", - Short: "shows a callback-data", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - argCallbackKey := args[0] - - params := &types.QueryGetCallbackDataRequest{ - CallbackKey: argCallbackKey, - } - - res, err := queryClient.CallbackData(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/icacallbacks/client/cli/query_params.go b/x/icacallbacks/client/cli/query_params.go deleted file mode 100644 index 7e490d083..000000000 --- a/x/icacallbacks/client/cli/query_params.go +++ /dev/null @@ -1,35 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -func CmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "shows the parameters of the module", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/icacallbacks/client/cli/tx.go b/x/icacallbacks/client/cli/tx.go deleted file mode 100644 index d2fc32491..000000000 --- a/x/icacallbacks/client/cli/tx.go +++ /dev/null @@ -1,26 +0,0 @@ -package cli - -import ( - "fmt" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -// GetTxCmd returns the transaction commands for this module -func GetTxCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - // this line is used by starport scaffolding # 1 - - return cmd -} diff --git a/x/icacallbacks/genesis.go b/x/icacallbacks/genesis.go deleted file mode 100644 index 65dc8e308..000000000 --- a/x/icacallbacks/genesis.go +++ /dev/null @@ -1,28 +0,0 @@ -package icacallbacks - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/keeper" - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -// InitGenesis initializes the capability module's state from a provided genesis -// state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - // Set all the callbackData - for _, elem := range genState.CallbackDataList { - k.SetCallbackData(ctx, elem) - } - k.SetParams(ctx, genState.Params) -} - -// ExportGenesis returns the capability module's exported genesis. -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { - genesis := types.DefaultGenesis() - genesis.Params = k.GetParams(ctx) - - genesis.CallbackDataList = k.GetAllCallbackData(ctx) - - return genesis -} diff --git a/x/icacallbacks/ibc_module.go b/x/icacallbacks/ibc_module.go deleted file mode 100644 index 4e2ef9c44..000000000 --- a/x/icacallbacks/ibc_module.go +++ /dev/null @@ -1,173 +0,0 @@ -package icacallbacks - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/keeper" - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -var _ porttypes.IBCModule = &IBCModule{} - -type IBCModule struct { - keeper keeper.Keeper -} - -func NewIBCModule(k keeper.Keeper) IBCModule { - return IBCModule{ - keeper: k, - } -} - -// No custom logic is necessary in OnChanOpenInit -func (im IBCModule) OnChanOpenInit( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID string, - channelID string, - channelCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version string, -) (string, error) { - return version, nil -} - -// OnChanOpenTry should not be executed in the ICA stack -func (im IBCModule) OnChanOpenTry( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - counterpartyVersion string, -) (string, error) { - panic("UNIMPLEMENTED") -} - -// No custom logic is necessary in OnChanOpenAck -func (im IBCModule) OnChanOpenAck( - ctx sdk.Context, - portID, - channelID string, - counterpartyChannelID string, - counterpartyVersion string, -) error { - return nil -} - -// OnChanOpenConfirm should not be executed in the ICA stack -func (im IBCModule) OnChanOpenConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - panic("UNIMPLEMENTED") -} - -// OnChanCloseInit should not be executed in the ICA stack -func (im IBCModule) OnChanCloseInit( - ctx sdk.Context, - portID, - channelID string, -) error { - panic("UNIMPLEMENTED") -} - -// No custom logic is necessary in OnChanCloseConfirm -func (im IBCModule) OnChanCloseConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - return nil -} - -// OnChanOpenAck routes the packet to the relevant callback function -func (im IBCModule) OnAcknowledgementPacket( - ctx sdk.Context, - modulePacket channeltypes.Packet, - acknowledgement []byte, - relayer sdk.AccAddress, -) error { - im.keeper.Logger(ctx).Info(fmt.Sprintf("OnAcknowledgementPacket (ICACallbacks) - packet: %+v, relayer: %v", modulePacket, relayer)) - - ackResponse, err := UnpackAcknowledgementResponse(ctx, im.keeper.Logger(ctx), acknowledgement, true) - if err != nil { - errMsg := fmt.Sprintf("Unable to unpack message data from acknowledgement, Sequence %d, from %s %s, to %s %s: %s", - modulePacket.Sequence, modulePacket.SourceChannel, modulePacket.SourcePort, modulePacket.DestinationChannel, modulePacket.DestinationPort, err.Error()) - im.keeper.Logger(ctx).Error(errMsg) - return errorsmod.Wrapf(types.ErrInvalidAcknowledgement, errMsg) - } - - ackInfo := fmt.Sprintf("sequence #%d, from %s %s, to %s %s", - modulePacket.Sequence, modulePacket.SourceChannel, modulePacket.SourcePort, modulePacket.DestinationChannel, modulePacket.DestinationPort) - im.keeper.Logger(ctx).Info(fmt.Sprintf("Acknowledgement was successfully unmarshalled: ackInfo: %s", ackInfo)) - - eventType := "ack" - ctx.EventManager().EmitEvent( - sdk.NewEvent( - eventType, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyAck, ackInfo), - ), - ) - - if err := im.keeper.CallRegisteredICACallback(ctx, modulePacket, ackResponse); err != nil { - errMsg := fmt.Sprintf("Unable to call registered ICACallback from OnAcknowledgePacket | Sequence %d, from %s %s, to %s %s", - modulePacket.Sequence, modulePacket.SourceChannel, modulePacket.SourcePort, modulePacket.DestinationChannel, modulePacket.DestinationPort) - im.keeper.Logger(ctx).Error(errMsg) - return errorsmod.Wrapf(types.ErrCallbackFailed, errMsg) - } - return nil -} - -// OnTimeoutPacket routes the timeout to the relevant callback function -func (im IBCModule) OnTimeoutPacket( - ctx sdk.Context, - packet channeltypes.Packet, - relayer sdk.AccAddress, -) error { - im.keeper.Logger(ctx).Info(fmt.Sprintf("OnTimeoutPacket (ICACallbacks): packet %v, relayer %v", packet, relayer)) - - ackResponse := types.AcknowledgementResponse{ - Status: types.AckResponseStatus_TIMEOUT, - } - - if err := im.keeper.CallRegisteredICACallback(ctx, packet, &ackResponse); err != nil { - errMsg := fmt.Sprintf("Unable to call registered ICACallback from OnTimeoutPacket, Packet: %+v", packet) - im.keeper.Logger(ctx).Error(errMsg) - return errorsmod.Wrapf(types.ErrCallbackFailed, errMsg) - } - return nil -} - -// OnRecvPacket should not be executed in the ICA stack -func (im IBCModule) OnRecvPacket( - ctx sdk.Context, - modulePacket channeltypes.Packet, - relayer sdk.AccAddress, -) ibcexported.Acknowledgement { - panic("UNIMPLEMENTED") -} - -// No custom logic required in NegotiateAppVersion -func (im IBCModule) NegotiateAppVersion( - ctx sdk.Context, - order channeltypes.Order, - connectionID string, - portID string, - counterparty channeltypes.Counterparty, - proposedVersion string, -) (version string, err error) { - return proposedVersion, nil -} diff --git a/x/icacallbacks/icacallbacks.go b/x/icacallbacks/icacallbacks.go deleted file mode 100644 index 9d120bfd3..000000000 --- a/x/icacallbacks/icacallbacks.go +++ /dev/null @@ -1,88 +0,0 @@ -package icacallbacks - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/log" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -// Parses ICA tx responses and returns a list of each serialized response -// The format of the raw ack differs depending on which version of ibc-go is used -// For v4 and prior, the message responses are stored under the `Data` attribute of TxMsgData -// For v5 and later, the message responses are stored under the `MsgResponse` attribute of TxMsgdata -func ParseTxMsgData(acknowledgementResult []byte) ([][]byte, error) { - txMsgData := &sdk.TxMsgData{} - if err := proto.Unmarshal(acknowledgementResult, txMsgData); err != nil { - return nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-27 tx message data: %s", err.Error()) - } - - // Unpack all the message responses based on the sdk version (determined from the length of txMsgData.Data) - switch len(txMsgData.Data) { - case 0: - // for SDK 0.46 and above - msgResponses := make([][]byte, len(txMsgData.MsgResponses)) - for i, msgResponse := range txMsgData.MsgResponses { - msgResponses[i] = msgResponse.GetValue() - } - return msgResponses, nil - default: - // for SDK 0.45 and below - var msgResponses = make([][]byte, len(txMsgData.Data)) - for i, msgData := range txMsgData.Data { - msgResponses[i] = msgData.Data - } - return msgResponses, nil - } -} - -// UnpackAcknowledgementResponse unmarshals IBC Acknowledgements, determines the status of the -// acknowledgement (success or failure), and, if applicable, assembles the message responses -// -// ICA transactions have associated messages responses. IBC transfer do not. -// -// With ICA transactions, the schema of the response differs depending on the version of ibc-go used, -// however, this function unifies the format into a common response (a slice of byte arrays) -func UnpackAcknowledgementResponse(ctx sdk.Context, logger log.Logger, ack []byte, isICA bool) (*types.AcknowledgementResponse, error) { - // Unmarshal the raw ack response - var acknowledgement channeltypes.Acknowledgement - if err := ibctransfertypes.ModuleCdc.UnmarshalJSON(ack, &acknowledgement); err != nil { - return nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-20 transfer packet acknowledgement: %s", err.Error()) - } - - // The ack can come back as either AcknowledgementResult or AcknowledgementError - // If it comes back as AcknowledgementResult, the messages are encoded differently depending on the SDK version - switch response := acknowledgement.Response.(type) { - case *channeltypes.Acknowledgement_Result: - if len(response.Result) == 0 { - return nil, errorsmod.Wrapf(channeltypes.ErrInvalidAcknowledgement, "acknowledgement result cannot be empty") - } - - // If this is an ack from a non-ICA transaction (e.g. an IBC transfer), there is no need to decode the data field - if !isICA { - logger.Info(fmt.Sprintf("IBC transfer acknowledgement success: %+v", response)) - return &types.AcknowledgementResponse{Status: types.AckResponseStatus_SUCCESS}, nil - } - - // Otherwise, if this ack is from an ICA, unmarshal the message data from within the ack - msgResponses, err := ParseTxMsgData(acknowledgement.GetResult()) - if err != nil { - return nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "cannot parse TxMsgData from ICA acknowledgement packet: %s", err.Error()) - } - return &types.AcknowledgementResponse{Status: types.AckResponseStatus_SUCCESS, MsgResponses: msgResponses}, nil - - case *channeltypes.Acknowledgement_Error: - logger.Error(fmt.Sprintf("acknowledgement error: %s", response.Error)) - return &types.AcknowledgementResponse{Status: types.AckResponseStatus_FAILURE, Error: response.Error}, nil - - default: - return nil, errorsmod.Wrapf(channeltypes.ErrInvalidAcknowledgement, "unsupported acknowledgement response field type %T", response) - } -} diff --git a/x/icacallbacks/keeper/callback_data.go b/x/icacallbacks/keeper/callback_data.go deleted file mode 100644 index bcd162d39..000000000 --- a/x/icacallbacks/keeper/callback_data.go +++ /dev/null @@ -1,63 +0,0 @@ -package keeper - -import ( - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -// SetCallbackData set a specific callbackData in the store from its index -func (k Keeper) SetCallbackData(ctx sdk.Context, callbackData types.CallbackData) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.CallbackDataKeyPrefix)) - b := k.cdc.MustMarshal(&callbackData) - store.Set(types.CallbackDataKey( - callbackData.CallbackKey, - ), b) -} - -// GetCallbackData returns a callbackData from its index -func (k Keeper) GetCallbackData( - ctx sdk.Context, - callbackKey string, -) (val types.CallbackData, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.CallbackDataKeyPrefix)) - - b := store.Get(types.CallbackDataKey( - callbackKey, - )) - if b == nil { - return val, false - } - - k.cdc.MustUnmarshal(b, &val) - return val, true -} - -// RemoveCallbackData removes a callbackData from the store -func (k Keeper) RemoveCallbackData( - ctx sdk.Context, - callbackKey string, -) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.CallbackDataKeyPrefix)) - store.Delete(types.CallbackDataKey( - callbackKey, - )) -} - -// GetAllCallbackData returns all callbackData -func (k Keeper) GetAllCallbackData(ctx sdk.Context) (list []types.CallbackData) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.CallbackDataKeyPrefix)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.CallbackData - k.cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} diff --git a/x/icacallbacks/keeper/grpc_query.go b/x/icacallbacks/keeper/grpc_query.go deleted file mode 100644 index 45f8428f0..000000000 --- a/x/icacallbacks/keeper/grpc_query.go +++ /dev/null @@ -1,7 +0,0 @@ -package keeper - -import ( - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -var _ types.QueryServer = Keeper{} diff --git a/x/icacallbacks/keeper/grpc_query_callback_data.go b/x/icacallbacks/keeper/grpc_query_callback_data.go deleted file mode 100644 index 0e04fbe6c..000000000 --- a/x/icacallbacks/keeper/grpc_query_callback_data.go +++ /dev/null @@ -1,57 +0,0 @@ -package keeper - -import ( - "context" - - "cosmossdk.io/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/query" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -func (k Keeper) CallbackDataAll(c context.Context, req *types.QueryAllCallbackDataRequest) (*types.QueryAllCallbackDataResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var callbackDatas []types.CallbackData - ctx := sdk.UnwrapSDKContext(c) - - store := ctx.KVStore(k.storeKey) - callbackDataStore := prefix.NewStore(store, types.KeyPrefix(types.CallbackDataKeyPrefix)) - - pageRes, err := query.Paginate(callbackDataStore, req.Pagination, func(key []byte, value []byte) error { - var callbackData types.CallbackData - if err := k.cdc.Unmarshal(value, &callbackData); err != nil { - return err - } - - callbackDatas = append(callbackDatas, callbackData) - return nil - }) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryAllCallbackDataResponse{CallbackData: callbackDatas, Pagination: pageRes}, nil -} - -func (k Keeper) CallbackData(c context.Context, req *types.QueryGetCallbackDataRequest) (*types.QueryGetCallbackDataResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(c) - - val, found := k.GetCallbackData( - ctx, - req.CallbackKey, - ) - if !found { - return nil, status.Error(codes.NotFound, "not found") - } - - return &types.QueryGetCallbackDataResponse{CallbackData: val}, nil -} diff --git a/x/icacallbacks/keeper/grpc_query_params.go b/x/icacallbacks/keeper/grpc_query_params.go deleted file mode 100644 index d6cb7571c..000000000 --- a/x/icacallbacks/keeper/grpc_query_params.go +++ /dev/null @@ -1,20 +0,0 @@ -package keeper - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(c) - - return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil -} diff --git a/x/icacallbacks/keeper/keeper.go b/x/icacallbacks/keeper/keeper.go deleted file mode 100644 index 8948e4ea1..000000000 --- a/x/icacallbacks/keeper/keeper.go +++ /dev/null @@ -1,83 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -type ( - Keeper struct { - cdc codec.BinaryCodec - storeKey storetypes.StoreKey - memKey storetypes.StoreKey - icacallbacks map[string]types.ICACallback - IBCKeeper ibckeeper.Keeper - } -) - -func NewKeeper( - cdc codec.BinaryCodec, - storeKey, - memKey storetypes.StoreKey, - ibcKeeper ibckeeper.Keeper, -) *Keeper { - return &Keeper{ - cdc: cdc, - storeKey: storeKey, - memKey: memKey, - icacallbacks: make(map[string]types.ICACallback), - IBCKeeper: ibcKeeper, - } -} - -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} - -func (k Keeper) SetICACallbacks(moduleCallbacks ...types.ModuleCallbacks) error { - for _, callbacks := range moduleCallbacks { - for _, callback := range callbacks { - if _, found := k.icacallbacks[callback.CallbackId]; found { - return fmt.Errorf("callback for ID %s already registered", callback.CallbackId) - } - k.icacallbacks[callback.CallbackId] = callback - } - } - return nil -} - -func (k Keeper) CallRegisteredICACallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *types.AcknowledgementResponse) error { - // Get the callback key and associated callback data from the packet - callbackDataKey := types.PacketID(packet.GetSourcePort(), packet.GetSourceChannel(), packet.Sequence) - callbackData, found := k.GetCallbackData(ctx, callbackDataKey) - if !found { - k.Logger(ctx).Info(fmt.Sprintf("callback data not found for portID: %s, channelID: %s, sequence: %d", - packet.SourcePort, packet.SourceChannel, packet.Sequence)) - return nil - } - - // If there's an associated callback function, execute it - callback, found := k.icacallbacks[callbackData.CallbackId] - if !found { - k.Logger(ctx).Info(fmt.Sprintf("No associated callback with callback data %v", callbackData)) - return nil - } - if err := callback.CallbackFunc(ctx, packet, ackResponse, callbackData.CallbackArgs); err != nil { - errMsg := fmt.Sprintf("Error occurred while calling ICACallback (%s) | err: %s", callbackData.CallbackId, err.Error()) - k.Logger(ctx).Error(errMsg) - return errorsmod.Wrapf(types.ErrCallbackFailed, errMsg) - } - - // remove the callback data - k.RemoveCallbackData(ctx, callbackDataKey) - return nil -} diff --git a/x/icacallbacks/keeper/msg_server.go b/x/icacallbacks/keeper/msg_server.go deleted file mode 100644 index 3bc0a9f3e..000000000 --- a/x/icacallbacks/keeper/msg_server.go +++ /dev/null @@ -1,17 +0,0 @@ -package keeper - -import ( - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -type msgServer struct { - Keeper -} - -// NewMsgServerImpl returns an implementation of the MsgServer interface -// for the provided Keeper. -func NewMsgServerImpl(keeper Keeper) types.MsgServer { - return &msgServer{Keeper: keeper} -} - -var _ types.MsgServer = msgServer{} diff --git a/x/icacallbacks/keeper/params.go b/x/icacallbacks/keeper/params.go deleted file mode 100644 index 8c524f34f..000000000 --- a/x/icacallbacks/keeper/params.go +++ /dev/null @@ -1,16 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -// GetParams get all parameters as types.Params -func (k Keeper) GetParams(ctx sdk.Context) types.Params { - return types.NewParams() -} - -// SetParams set the params -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { -} diff --git a/x/icacallbacks/module.go b/x/icacallbacks/module.go deleted file mode 100644 index 5f3cb3e8a..000000000 --- a/x/icacallbacks/module.go +++ /dev/null @@ -1,165 +0,0 @@ -package icacallbacks - -import ( - "context" - "encoding/json" - "fmt" - - "cosmossdk.io/core/appmodule" - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - - "github.com/milkyway-labs/milkyway/x/icacallbacks/client/cli" - "github.com/milkyway-labs/milkyway/x/icacallbacks/keeper" - "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -var ( - _ appmodule.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} -) - -// ---------------------------------------------------------------------------- -// AppModuleBasic -// ---------------------------------------------------------------------------- - -// AppModuleBasic implements the AppModuleBasic interface for the capability module. -type AppModuleBasic struct { - cdc codec.BinaryCodec -} - -func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { - return AppModuleBasic{cdc: cdc} -} - -// Name returns the capability module's name. -func (AppModuleBasic) Name() string { - return types.ModuleName -} - -func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) { - types.RegisterCodec(cdc) -} - -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - types.RegisterCodec(cdc) -} - -// RegisterInterfaces registers the module's interface types -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { - types.RegisterInterfaces(reg) -} - -// DefaultGenesis returns the capability module's default genesis state. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesis()) -} - -// ValidateGenesis performs genesis state validation for the capability module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { - var genState types.GenesisState - if err := cdc.UnmarshalJSON(bz, &genState); err != nil { - return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) - } - return genState.Validate() -} - -// RegisterRESTRoutes registers the capability module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { -} - -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) - if err != nil { - panic(err) - } -} - -// GetTxCmd returns the capability module's root tx command. -func (a AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.GetTxCmd() -} - -// GetQueryCmd returns the capability module's root query command. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(types.StoreKey) -} - -// ---------------------------------------------------------------------------- -// AppModule -// ---------------------------------------------------------------------------- - -// AppModule implements the AppModule interface for the capability module. -type AppModule struct { - AppModuleBasic - - keeper keeper.Keeper - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper -} - -func NewAppModule( - cdc codec.Codec, - keeper keeper.Keeper, - accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, -) AppModule { - return AppModule{ - AppModuleBasic: NewAppModuleBasic(cdc), - keeper: keeper, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - } -} - -// Name returns the capability module's name. -func (am AppModule) Name() string { - return am.AppModuleBasic.Name() -} - -// QuerierRoute returns the capability module's query routing key. -func (AppModule) QuerierRoute() string { return types.QuerierRoute } - -// RegisterServices registers a GRPC query service to respond to the -// module-specific GRPC queries. -func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterQueryServer(cfg.QueryServer(), am.keeper) -} - -// RegisterInvariants registers the capability module's invariants. -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - -// InitGenesis performs the capability module's genesis initialization It returns -// no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { - var genState types.GenesisState - // Initialize global index to index in genesis state - cdc.MustUnmarshalJSON(gs, &genState) - - InitGenesis(ctx, am.keeper, genState) - - return []abci.ValidatorUpdate{} -} - -// ExportGenesis returns the capability module's exported genesis state as raw JSON bytes. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - genState := ExportGenesis(ctx, am.keeper) - return cdc.MustMarshalJSON(genState) -} - -// ConsensusVersion implements ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 2 } - -func (am AppModule) IsOnePerModuleType() {} - -func (am AppModule) IsAppModule() {} diff --git a/x/icacallbacks/module_simulation.go b/x/icacallbacks/module_simulation.go deleted file mode 100644 index 4e8f23065..000000000 --- a/x/icacallbacks/module_simulation.go +++ /dev/null @@ -1,51 +0,0 @@ -package icacallbacks - -// XXX -//// avoid unused import issue -//var ( -// _ = sample.AccAddress -// _ = icacallbackssimulation.FindAccount -// _ = simappparams.StakePerAccount -// _ = simulation.MsgEntryKind -// _ = baseapp.Paramspace -//) -// -//const ( -//// this line is used by starport scaffolding # simapp/module/const -//) -// -//// GenerateGenesisState creates a randomized GenState of the module -//func (AppModule) GenerateGenesisState(simState *module.SimulationState) { -// accs := make([]string, len(simState.Accounts)) -// for i, acc := range simState.Accounts { -// accs[i] = acc.Address.String() -// } -// icacallbacksGenesis := types.GenesisState{ -// Params: types.DefaultParams(), -// PortId: types.PortID, -// // this line is used by starport scaffolding # simapp/module/genesisState -// } -// simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&icacallbacksGenesis) -//} -// -//// ProposalContents doesn't return any content functions for governance proposals -//func (AppModule) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { -// return nil -//} -// -//// RandomizedParams creates randomized param changes for the simulator -//func (am AppModule) RandomizedParams(_ *rand.Rand) []simtypes.LegacyParamChange { -// return []simtypes.LegacyParamChange{} -//} -// -//// RegisterStoreDecoder registers a decoder -//func (am AppModule) RegisterStoreDecoder(_ sdk.StoreDecoderRegistry) {} -// -//// WeightedOperations returns the all the gov module operations with their respective weights. -//func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { -// operations := make([]simtypes.WeightedOperation, 0) -// -// // this line is used by starport scaffolding # simapp/module/operation -// -// return operations -//} diff --git a/x/icacallbacks/simulation/simap.go b/x/icacallbacks/simulation/simap.go deleted file mode 100644 index 92c437c0d..000000000 --- a/x/icacallbacks/simulation/simap.go +++ /dev/null @@ -1,15 +0,0 @@ -package simulation - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" -) - -// FindAccount find a specific address from an account list -func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { - creator, err := sdk.AccAddressFromBech32(address) - if err != nil { - panic(err) - } - return simtypes.FindAccount(accs, creator) -} diff --git a/x/icacallbacks/testutil/expected_keepers_mocks.go b/x/icacallbacks/testutil/expected_keepers_mocks.go deleted file mode 100644 index 141e8b46e..000000000 --- a/x/icacallbacks/testutil/expected_keepers_mocks.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: ./x/icacallbacks/types/expected_keepers.go -// -// Generated by this command: -// -// mockgen -source ./x/icacallbacks/types/expected_keepers.go -package testutil -destination ./x/icacallbacks/testutil/expected_keepers_mocks.go -// - -// Package testutil is a generated GoMock package. -package testutil - -import ( - context "context" - reflect "reflect" - - types "github.com/cosmos/cosmos-sdk/types" - gomock "go.uber.org/mock/gomock" -) - -// MockAccountKeeper is a mock of AccountKeeper interface. -type MockAccountKeeper struct { - ctrl *gomock.Controller - recorder *MockAccountKeeperMockRecorder -} - -// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. -type MockAccountKeeperMockRecorder struct { - mock *MockAccountKeeper -} - -// NewMockAccountKeeper creates a new mock instance. -func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { - mock := &MockAccountKeeper{ctrl: ctrl} - mock.recorder = &MockAccountKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { - return m.recorder -} - -// GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types.AccountI) - return ret0 -} - -// GetAccount indicates an expected call of GetAccount. -func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) -} - -// MockBankKeeper is a mock of BankKeeper interface. -type MockBankKeeper struct { - ctrl *gomock.Controller - recorder *MockBankKeeperMockRecorder -} - -// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. -type MockBankKeeperMockRecorder struct { - mock *MockBankKeeper -} - -// NewMockBankKeeper creates a new mock instance. -func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { - mock := &MockBankKeeper{ctrl: ctrl} - mock.recorder = &MockBankKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { - return m.recorder -} - -// SpendableCoins mocks base method. -func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddress) types.Coins { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) - ret0, _ := ret[0].(types.Coins) - return ret0 -} - -// SpendableCoins indicates an expected call of SpendableCoins. -func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) -} diff --git a/x/icacallbacks/types/acknowledgement_response.go b/x/icacallbacks/types/acknowledgement_response.go deleted file mode 100644 index 5cd79b010..000000000 --- a/x/icacallbacks/types/acknowledgement_response.go +++ /dev/null @@ -1,15 +0,0 @@ -package types - -type AckResponseStatus int - -const ( - AckResponseStatus_SUCCESS AckResponseStatus = iota - AckResponseStatus_TIMEOUT - AckResponseStatus_FAILURE -) - -type AcknowledgementResponse struct { - Status AckResponseStatus - MsgResponses [][]byte - Error string -} diff --git a/x/icacallbacks/types/callback_data.pb.go b/x/icacallbacks/types/callback_data.pb.go deleted file mode 100644 index 57e1a4764..000000000 --- a/x/icacallbacks/types/callback_data.pb.go +++ /dev/null @@ -1,564 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/icacallbacks/callback_data.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type CallbackData struct { - CallbackKey string `protobuf:"bytes,1,opt,name=callback_key,json=callbackKey,proto3" json:"callback_key,omitempty"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - ChannelId string `protobuf:"bytes,3,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` - CallbackId string `protobuf:"bytes,5,opt,name=callback_id,json=callbackId,proto3" json:"callback_id,omitempty"` - CallbackArgs []byte `protobuf:"bytes,6,opt,name=callback_args,json=callbackArgs,proto3" json:"callback_args,omitempty"` -} - -func (m *CallbackData) Reset() { *m = CallbackData{} } -func (m *CallbackData) String() string { return proto.CompactTextString(m) } -func (*CallbackData) ProtoMessage() {} -func (*CallbackData) Descriptor() ([]byte, []int) { - return fileDescriptor_19b6f19ce856679b, []int{0} -} -func (m *CallbackData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CallbackData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CallbackData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CallbackData) XXX_Merge(src proto.Message) { - xxx_messageInfo_CallbackData.Merge(m, src) -} -func (m *CallbackData) XXX_Size() int { - return m.Size() -} -func (m *CallbackData) XXX_DiscardUnknown() { - xxx_messageInfo_CallbackData.DiscardUnknown(m) -} - -var xxx_messageInfo_CallbackData proto.InternalMessageInfo - -func (m *CallbackData) GetCallbackKey() string { - if m != nil { - return m.CallbackKey - } - return "" -} - -func (m *CallbackData) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *CallbackData) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *CallbackData) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -func (m *CallbackData) GetCallbackId() string { - if m != nil { - return m.CallbackId - } - return "" -} - -func (m *CallbackData) GetCallbackArgs() []byte { - if m != nil { - return m.CallbackArgs - } - return nil -} - -func init() { - proto.RegisterType((*CallbackData)(nil), "stride.icacallbacks.CallbackData") -} - -func init() { - proto.RegisterFile("stride/icacallbacks/callback_data.proto", fileDescriptor_19b6f19ce856679b) -} - -var fileDescriptor_19b6f19ce856679b = []byte{ - // 268 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x3d, 0x4f, 0x84, 0x30, - 0x18, 0xc7, 0xaf, 0x7a, 0xa2, 0xf7, 0x88, 0x4b, 0x1d, 0x24, 0x26, 0x56, 0xd4, 0x41, 0x16, 0x61, - 0x30, 0x71, 0xf7, 0x65, 0x21, 0x2e, 0x86, 0xd1, 0xe5, 0xf2, 0xd0, 0x36, 0x1c, 0x81, 0x03, 0xa4, - 0xbd, 0x28, 0xdf, 0xc2, 0x8f, 0x65, 0xe2, 0x72, 0xa3, 0xa3, 0x81, 0x2f, 0x62, 0xc0, 0xa3, 0xd1, - 0xad, 0xbf, 0xff, 0x4b, 0xfa, 0xe4, 0x0f, 0x97, 0x4a, 0xd7, 0xa9, 0x90, 0x41, 0xca, 0x91, 0x63, - 0x9e, 0xc7, 0xc8, 0x33, 0x15, 0x8c, 0xaf, 0xb9, 0x40, 0x8d, 0x7e, 0x55, 0x97, 0xba, 0xa4, 0x87, - 0xbf, 0x41, 0xff, 0x6f, 0xf0, 0xfc, 0x93, 0x80, 0x7d, 0xbf, 0xa1, 0x07, 0xd4, 0x48, 0xcf, 0xc0, - 0x36, 0xe5, 0x4c, 0x36, 0x0e, 0x71, 0x89, 0x37, 0x8b, 0xf6, 0x47, 0xed, 0x51, 0x36, 0xf4, 0x08, - 0x76, 0xab, 0xb2, 0xd6, 0xf3, 0x54, 0x38, 0x5b, 0x83, 0x6b, 0xf5, 0x18, 0x0a, 0x7a, 0x02, 0xc0, - 0x17, 0x58, 0x14, 0x32, 0xef, 0xbd, 0xed, 0xc1, 0x9b, 0x6d, 0x94, 0x50, 0xd0, 0x63, 0xd8, 0x53, - 0xf2, 0x65, 0x25, 0x0b, 0x2e, 0x9d, 0xa9, 0x4b, 0xbc, 0x69, 0x64, 0x98, 0x9e, 0x82, 0xf9, 0xa2, - 0xef, 0xee, 0x0c, 0x5d, 0x18, 0xa5, 0x50, 0xd0, 0x0b, 0x38, 0x30, 0x01, 0xac, 0x13, 0xe5, 0x58, - 0x2e, 0xf1, 0xec, 0xc8, 0x1c, 0x7b, 0x5b, 0x27, 0xea, 0xee, 0xe9, 0xa3, 0x65, 0x64, 0xdd, 0x32, - 0xf2, 0xdd, 0x32, 0xf2, 0xde, 0xb1, 0xc9, 0xba, 0x63, 0x93, 0xaf, 0x8e, 0x4d, 0x9e, 0x6f, 0x92, - 0x54, 0x2f, 0x56, 0xb1, 0xcf, 0xcb, 0x65, 0xb0, 0x4c, 0xf3, 0xac, 0x79, 0xc5, 0xe6, 0x2a, 0xc7, - 0x58, 0x19, 0x0a, 0xde, 0xfe, 0x4f, 0xa8, 0x9b, 0x4a, 0xaa, 0xd8, 0x1a, 0xb6, 0xbb, 0xfe, 0x09, - 0x00, 0x00, 0xff, 0xff, 0x48, 0x06, 0xdf, 0x18, 0x66, 0x01, 0x00, 0x00, -} - -func (m *CallbackData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CallbackData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CallbackData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CallbackArgs) > 0 { - i -= len(m.CallbackArgs) - copy(dAtA[i:], m.CallbackArgs) - i = encodeVarintCallbackData(dAtA, i, uint64(len(m.CallbackArgs))) - i-- - dAtA[i] = 0x32 - } - if len(m.CallbackId) > 0 { - i -= len(m.CallbackId) - copy(dAtA[i:], m.CallbackId) - i = encodeVarintCallbackData(dAtA, i, uint64(len(m.CallbackId))) - i-- - dAtA[i] = 0x2a - } - if m.Sequence != 0 { - i = encodeVarintCallbackData(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x20 - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintCallbackData(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0x1a - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintCallbackData(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0x12 - } - if len(m.CallbackKey) > 0 { - i -= len(m.CallbackKey) - copy(dAtA[i:], m.CallbackKey) - i = encodeVarintCallbackData(dAtA, i, uint64(len(m.CallbackKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCallbackData(dAtA []byte, offset int, v uint64) int { - offset -= sovCallbackData(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CallbackData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CallbackKey) - if l > 0 { - n += 1 + l + sovCallbackData(uint64(l)) - } - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovCallbackData(uint64(l)) - } - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovCallbackData(uint64(l)) - } - if m.Sequence != 0 { - n += 1 + sovCallbackData(uint64(m.Sequence)) - } - l = len(m.CallbackId) - if l > 0 { - n += 1 + l + sovCallbackData(uint64(l)) - } - l = len(m.CallbackArgs) - if l > 0 { - n += 1 + l + sovCallbackData(uint64(l)) - } - return n -} - -func sovCallbackData(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCallbackData(x uint64) (n int) { - return sovCallbackData(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CallbackData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbackData - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CallbackData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CallbackData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbackData - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbackData - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbackData - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbackData - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbackData - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbackData - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbackData - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbackData - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbackData - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbackData - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbackData - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbackData - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbackData - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackArgs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbackData - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCallbackData - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCallbackData - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackArgs = append(m.CallbackArgs[:0], dAtA[iNdEx:postIndex]...) - if m.CallbackArgs == nil { - m.CallbackArgs = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbackData(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbackData - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCallbackData(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCallbackData - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCallbackData - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCallbackData - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCallbackData - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCallbackData - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCallbackData - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCallbackData = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCallbackData = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCallbackData = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/icacallbacks/types/callbacks.go b/x/icacallbacks/types/callbacks.go deleted file mode 100644 index 3bccae16c..000000000 --- a/x/icacallbacks/types/callbacks.go +++ /dev/null @@ -1,16 +0,0 @@ -package types - -import ( - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type ICACallbackFunction func(sdk.Context, channeltypes.Packet, *AcknowledgementResponse, []byte) error - -type ICACallback struct { - CallbackId string - CallbackFunc ICACallbackFunction -} - -type ModuleCallbacks []ICACallback diff --git a/x/icacallbacks/types/codec.go b/x/icacallbacks/types/codec.go deleted file mode 100644 index 8883bdf68..000000000 --- a/x/icacallbacks/types/codec.go +++ /dev/null @@ -1,24 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - - // this line is used by starport scaffolding # 1 - "github.com/cosmos/cosmos-sdk/types/msgservice" -) - -func RegisterCodec(cdc *codec.LegacyAmino) { - // this line is used by starport scaffolding # 2 -} - -func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { - // this line is used by starport scaffolding # 3 - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) -} - -var ( - Amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) -) diff --git a/x/icacallbacks/types/errors.go b/x/icacallbacks/types/errors.go deleted file mode 100644 index 3c5abf81c..000000000 --- a/x/icacallbacks/types/errors.go +++ /dev/null @@ -1,18 +0,0 @@ -package types - -// DONTCOVER - -import errorsmod "cosmossdk.io/errors" - -// x/icacallbacks module sentinel errors -var ( - ErrSample = errorsmod.Register(ModuleName, 1100, "sample error") - ErrInvalidPacketTimeout = errorsmod.Register(ModuleName, 1500, "invalid packet timeout") - ErrInvalidVersion = errorsmod.Register(ModuleName, 1501, "invalid version") - ErrCallbackHandlerNotFound = errorsmod.Register(ModuleName, 1502, "icacallback handler not found") - ErrCallbackIdNotFound = errorsmod.Register(ModuleName, 1503, "icacallback ID not found") - ErrCallbackFailed = errorsmod.Register(ModuleName, 1504, "icacallback failed") - ErrCallbackDataNotFound = errorsmod.Register(ModuleName, 1505, "icacallback data not found") - ErrTxMsgData = errorsmod.Register(ModuleName, 1506, "txMsgData fetch failed") - ErrInvalidAcknowledgement = errorsmod.Register(ModuleName, 1507, "invalid acknowledgement") -) diff --git a/x/icacallbacks/types/events_ibc.go b/x/icacallbacks/types/events_ibc.go deleted file mode 100644 index c0012b458..000000000 --- a/x/icacallbacks/types/events_ibc.go +++ /dev/null @@ -1,12 +0,0 @@ -package types - -// IBC events -const ( - EventTypeAck = "ack" - EventTypeTimeout = "timeout" - // this line is used by starport scaffolding # ibc/packet/event - - AttributeKeyAckSuccess = "success" - AttributeKeyAck = "acknowledgement" - AttributeKeyAckError = "error" -) diff --git a/x/icacallbacks/types/expected_keepers.go b/x/icacallbacks/types/expected_keepers.go deleted file mode 100644 index bf1668375..000000000 --- a/x/icacallbacks/types/expected_keepers.go +++ /dev/null @@ -1,19 +0,0 @@ -package types - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// AccountKeeper defines the expected account keeper used for simulations (noalias) -type AccountKeeper interface { - GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI - // Methods imported from account should be defined here -} - -// BankKeeper defines the expected interface needed to retrieve account balances. -type BankKeeper interface { - SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins - // Methods imported from bank should be defined here -} diff --git a/x/icacallbacks/types/genesis.go b/x/icacallbacks/types/genesis.go deleted file mode 100644 index 40b65b8fd..000000000 --- a/x/icacallbacks/types/genesis.go +++ /dev/null @@ -1,41 +0,0 @@ -package types - -import ( - "fmt" - - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" -) - -// DefaultIndex is the default capability global index -const DefaultIndex uint64 = 1 - -// DefaultGenesis returns the default Capability genesis state -func DefaultGenesis() *GenesisState { - return &GenesisState{ - PortId: PortID, - CallbackDataList: []CallbackData{}, - // this line is used by starport scaffolding # genesis/types/default - Params: DefaultParams(), - } -} - -// Validate performs basic genesis state validation returning an error upon any -// failure. -func (gs GenesisState) Validate() error { - if err := host.PortIdentifierValidator(gs.PortId); err != nil { - return err - } - // Check for duplicated index in callbackData - callbackDataIndexMap := make(map[string]struct{}) - - for _, elem := range gs.CallbackDataList { - index := string(CallbackDataKey(elem.CallbackKey)) - if _, ok := callbackDataIndexMap[index]; ok { - return fmt.Errorf("duplicated index for callbackData") - } - callbackDataIndexMap[index] = struct{}{} - } - // this line is used by starport scaffolding # genesis/types/validate - - return gs.Params.Validate() -} diff --git a/x/icacallbacks/types/genesis.pb.go b/x/icacallbacks/types/genesis.pb.go deleted file mode 100644 index 2311ebc5a..000000000 --- a/x/icacallbacks/types/genesis.pb.go +++ /dev/null @@ -1,439 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/icacallbacks/genesis.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the icacallbacks module's genesis state. -type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - CallbackDataList []CallbackData `protobuf:"bytes,3,rep,name=callback_data_list,json=callbackDataList,proto3" json:"callback_data_list"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_8c333baddfa20681, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func (m *GenesisState) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *GenesisState) GetCallbackDataList() []CallbackData { - if m != nil { - return m.CallbackDataList - } - return nil -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "stride.icacallbacks.GenesisState") -} - -func init() { proto.RegisterFile("stride/icacallbacks/genesis.proto", fileDescriptor_8c333baddfa20681) } - -var fileDescriptor_8c333baddfa20681 = []byte{ - // 279 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x2e, 0x29, 0xca, - 0x4c, 0x49, 0xd5, 0xcf, 0x4c, 0x4e, 0x4c, 0x4e, 0xcc, 0xc9, 0x49, 0x4a, 0x4c, 0xce, 0x2e, 0xd6, - 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, - 0x28, 0xd1, 0x43, 0x56, 0x22, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x96, 0xd7, 0x07, 0xb1, 0x20, - 0x4a, 0xa5, 0x14, 0xb0, 0x99, 0x56, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x35, 0x4c, 0x4a, 0x1d, 0x9b, - 0x0a, 0x18, 0x2b, 0x3e, 0x25, 0xb1, 0x24, 0x11, 0xa2, 0x50, 0x69, 0x27, 0x23, 0x17, 0x8f, 0x3b, - 0xc4, 0x1d, 0xc1, 0x25, 0x89, 0x25, 0xa9, 0x42, 0x96, 0x5c, 0x6c, 0x10, 0x93, 0x24, 0x18, 0x15, - 0x18, 0x35, 0xb8, 0x8d, 0xa4, 0xf5, 0xb0, 0xb8, 0x4b, 0x2f, 0x00, 0xac, 0xc4, 0x89, 0xe5, 0xc4, - 0x3d, 0x79, 0x86, 0x20, 0xa8, 0x06, 0x21, 0x71, 0x2e, 0xf6, 0x82, 0xfc, 0xa2, 0x92, 0xf8, 0xcc, - 0x14, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x36, 0x10, 0xd7, 0x33, 0x45, 0x28, 0x94, 0x4b, - 0x08, 0xc5, 0xee, 0xf8, 0x9c, 0xcc, 0xe2, 0x12, 0x09, 0x66, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x45, - 0xac, 0xe6, 0x3b, 0x43, 0x59, 0x2e, 0x89, 0x25, 0x89, 0x50, 0x5b, 0x04, 0x92, 0x91, 0xc4, 0x7c, - 0x32, 0x8b, 0x4b, 0x9c, 0x02, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, - 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, - 0x2c, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x37, 0x33, 0x27, 0xbb, - 0xb2, 0x3c, 0xb1, 0x52, 0x37, 0x27, 0x31, 0xa9, 0x18, 0xce, 0xd3, 0xaf, 0x40, 0x0d, 0x9b, 0x92, - 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0x70, 0xa0, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x55, - 0x25, 0x78, 0xc3, 0xaf, 0x01, 0x00, 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CallbackDataList) > 0 { - for iNdEx := len(m.CallbackDataList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CallbackDataList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.CallbackDataList) > 0 { - for _, e := range m.CallbackDataList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackDataList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackDataList = append(m.CallbackDataList, CallbackData{}) - if err := m.CallbackDataList[len(m.CallbackDataList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/icacallbacks/types/key_callback_data.go b/x/icacallbacks/types/key_callback_data.go deleted file mode 100644 index e878dcb6f..000000000 --- a/x/icacallbacks/types/key_callback_data.go +++ /dev/null @@ -1,25 +0,0 @@ -package types - -import ( - "encoding/binary" -) - -var _ binary.ByteOrder - -const ( - // CallbackDataKeyPrefix is the prefix to retrieve all CallbackData - CallbackDataKeyPrefix = "CallbackData/value/" -) - -// CallbackDataKey returns the store key to retrieve a CallbackData from the index fields -func CallbackDataKey( - callbackKey string, -) []byte { - var key []byte - - callbackKeyBytes := []byte(callbackKey) - key = append(key, callbackKeyBytes...) - key = append(key, []byte("/")...) - - return key -} diff --git a/x/icacallbacks/types/keys.go b/x/icacallbacks/types/keys.go deleted file mode 100644 index d5332e8b9..000000000 --- a/x/icacallbacks/types/keys.go +++ /dev/null @@ -1,37 +0,0 @@ -package types - -import fmt "fmt" - -const ( - // ModuleName defines the module name - ModuleName = "icacallbacks" - - // StoreKey defines the primary module store key - StoreKey = ModuleName - - // RouterKey is the message route for slashing - RouterKey = ModuleName - - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName - - // MemStoreKey defines the in-memory store key - MemStoreKey = "mem_icacallbacks" - - // Version defines the current version the IBC module supports - Version = "icacallbacks-1" - - // PortID is the default port id that module binds to - PortID = "icacallbacks" -) - -// PortKey defines the key to store the port ID in store -var PortKey = KeyPrefix("icacallbacks-port-") - -func KeyPrefix(p string) []byte { - return []byte(p) -} - -func PacketID(portID string, channelID string, sequence uint64) string { - return fmt.Sprintf("%s.%s.%d", portID, channelID, sequence) -} diff --git a/x/icacallbacks/types/packet.pb.go b/x/icacallbacks/types/packet.pb.go deleted file mode 100644 index bb1b58dfc..000000000 --- a/x/icacallbacks/types/packet.pb.go +++ /dev/null @@ -1,502 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/icacallbacks/packet.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type IcacallbacksPacketData struct { - // Types that are valid to be assigned to Packet: - // - // *IcacallbacksPacketData_NoData - Packet isIcacallbacksPacketData_Packet `protobuf_oneof:"packet"` -} - -func (m *IcacallbacksPacketData) Reset() { *m = IcacallbacksPacketData{} } -func (m *IcacallbacksPacketData) String() string { return proto.CompactTextString(m) } -func (*IcacallbacksPacketData) ProtoMessage() {} -func (*IcacallbacksPacketData) Descriptor() ([]byte, []int) { - return fileDescriptor_e68b4c401320f2a0, []int{0} -} -func (m *IcacallbacksPacketData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IcacallbacksPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IcacallbacksPacketData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IcacallbacksPacketData) XXX_Merge(src proto.Message) { - xxx_messageInfo_IcacallbacksPacketData.Merge(m, src) -} -func (m *IcacallbacksPacketData) XXX_Size() int { - return m.Size() -} -func (m *IcacallbacksPacketData) XXX_DiscardUnknown() { - xxx_messageInfo_IcacallbacksPacketData.DiscardUnknown(m) -} - -var xxx_messageInfo_IcacallbacksPacketData proto.InternalMessageInfo - -type isIcacallbacksPacketData_Packet interface { - isIcacallbacksPacketData_Packet() - MarshalTo([]byte) (int, error) - Size() int -} - -type IcacallbacksPacketData_NoData struct { - NoData *NoData `protobuf:"bytes,1,opt,name=no_data,json=noData,proto3,oneof" json:"no_data,omitempty"` -} - -func (*IcacallbacksPacketData_NoData) isIcacallbacksPacketData_Packet() {} - -func (m *IcacallbacksPacketData) GetPacket() isIcacallbacksPacketData_Packet { - if m != nil { - return m.Packet - } - return nil -} - -func (m *IcacallbacksPacketData) GetNoData() *NoData { - if x, ok := m.GetPacket().(*IcacallbacksPacketData_NoData); ok { - return x.NoData - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*IcacallbacksPacketData) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*IcacallbacksPacketData_NoData)(nil), - } -} - -type NoData struct { -} - -func (m *NoData) Reset() { *m = NoData{} } -func (m *NoData) String() string { return proto.CompactTextString(m) } -func (*NoData) ProtoMessage() {} -func (*NoData) Descriptor() ([]byte, []int) { - return fileDescriptor_e68b4c401320f2a0, []int{1} -} -func (m *NoData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NoData) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoData.Merge(m, src) -} -func (m *NoData) XXX_Size() int { - return m.Size() -} -func (m *NoData) XXX_DiscardUnknown() { - xxx_messageInfo_NoData.DiscardUnknown(m) -} - -var xxx_messageInfo_NoData proto.InternalMessageInfo - -func init() { - proto.RegisterType((*IcacallbacksPacketData)(nil), "stride.icacallbacks.IcacallbacksPacketData") - proto.RegisterType((*NoData)(nil), "stride.icacallbacks.NoData") -} - -func init() { proto.RegisterFile("stride/icacallbacks/packet.proto", fileDescriptor_e68b4c401320f2a0) } - -var fileDescriptor_e68b4c401320f2a0 = []byte{ - // 195 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x28, 0x2e, 0x29, 0xca, - 0x4c, 0x49, 0xd5, 0xcf, 0x4c, 0x4e, 0x4c, 0x4e, 0xcc, 0xc9, 0x49, 0x4a, 0x4c, 0xce, 0x2e, 0xd6, - 0x2f, 0x48, 0x4c, 0xce, 0x4e, 0x2d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0xa8, - 0xd0, 0x43, 0x56, 0xa1, 0x14, 0xc5, 0x25, 0xe6, 0x89, 0xc4, 0x0f, 0x00, 0x6b, 0x70, 0x49, 0x2c, - 0x49, 0x14, 0x32, 0xe3, 0x62, 0xcf, 0xcb, 0x8f, 0x4f, 0x49, 0x2c, 0x49, 0x94, 0x60, 0x54, 0x60, - 0xd4, 0xe0, 0x36, 0x92, 0xd6, 0xc3, 0x62, 0x80, 0x9e, 0x5f, 0x3e, 0x48, 0xb5, 0x07, 0x43, 0x10, - 0x5b, 0x1e, 0x98, 0xe5, 0xc4, 0xc1, 0xc5, 0x06, 0xb1, 0x56, 0x89, 0x83, 0x8b, 0x0d, 0x22, 0xeb, - 0x14, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, - 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x66, 0xe9, 0x99, 0x25, - 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xb9, 0x99, 0x39, 0xd9, 0x95, 0xe5, 0x89, 0x95, - 0xba, 0x39, 0x89, 0x49, 0xc5, 0x70, 0x9e, 0x7e, 0x05, 0xaa, 0x9f, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, - 0x93, 0xd8, 0xc0, 0x7e, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x71, 0x42, 0xd2, 0xf7, - 0x00, 0x00, 0x00, -} - -func (m *IcacallbacksPacketData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IcacallbacksPacketData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IcacallbacksPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Packet != nil { - { - size := m.Packet.Size() - i -= size - if _, err := m.Packet.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *IcacallbacksPacketData_NoData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IcacallbacksPacketData_NoData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.NoData != nil { - { - size, err := m.NoData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPacket(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *NoData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NoData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NoData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintPacket(dAtA []byte, offset int, v uint64) int { - offset -= sovPacket(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *IcacallbacksPacketData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Packet != nil { - n += m.Packet.Size() - } - return n -} - -func (m *IcacallbacksPacketData_NoData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoData != nil { - l = m.NoData.Size() - n += 1 + l + sovPacket(uint64(l)) - } - return n -} -func (m *NoData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovPacket(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPacket(x uint64) (n int) { - return sovPacket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *IcacallbacksPacketData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IcacallbacksPacketData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IcacallbacksPacketData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPacket - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPacket - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &NoData{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Packet = &IcacallbacksPacketData_NoData{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPacket(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPacket - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipPacket(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPacket - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPacket(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacket - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacket - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacket - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthPacket - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPacket - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPacket - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthPacket = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPacket = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPacket = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/icacallbacks/types/params.go b/x/icacallbacks/types/params.go deleted file mode 100644 index f4b9ae24d..000000000 --- a/x/icacallbacks/types/params.go +++ /dev/null @@ -1,26 +0,0 @@ -package types - -import ( - "gopkg.in/yaml.v2" -) - -// NewParams creates a new Params instance -func NewParams() Params { - return Params{} -} - -// DefaultParams returns a default set of parameters -func DefaultParams() Params { - return NewParams() -} - -// Validate validates the set of params -func (p Params) Validate() error { - return nil -} - -// String implements the Stringer interface. -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} diff --git a/x/icacallbacks/types/params.pb.go b/x/icacallbacks/types/params.pb.go deleted file mode 100644 index f5bd16465..000000000 --- a/x/icacallbacks/types/params.pb.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/icacallbacks/params.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Params defines the parameters for the module. -type Params struct { -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_4c402599e6cfed62, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Params)(nil), "stride.icacallbacks.Params") -} - -func init() { proto.RegisterFile("stride/icacallbacks/params.proto", fileDescriptor_4c402599e6cfed62) } - -var fileDescriptor_4c402599e6cfed62 = []byte{ - // 161 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x28, 0x2e, 0x29, 0xca, - 0x4c, 0x49, 0xd5, 0xcf, 0x4c, 0x4e, 0x4c, 0x4e, 0xcc, 0xc9, 0x49, 0x4a, 0x4c, 0xce, 0x2e, 0xd6, - 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0xa8, - 0xd0, 0x43, 0x56, 0x21, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x96, 0xd7, 0x07, 0xb1, 0x20, 0x4a, - 0x95, 0xf8, 0xb8, 0xd8, 0x02, 0xc0, 0x5a, 0xad, 0x58, 0x66, 0x2c, 0x90, 0x67, 0x70, 0x0a, 0x38, - 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, - 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xb3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, - 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xdc, 0xcc, 0x9c, 0xec, 0xca, 0xf2, 0xc4, 0x4a, 0xdd, 0x9c, - 0xc4, 0xa4, 0x62, 0x38, 0x4f, 0xbf, 0x02, 0xd5, 0x4d, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, - 0x60, 0x8b, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x01, 0x6d, 0x15, 0xc4, 0xb7, 0x00, 0x00, - 0x00, -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/icacallbacks/types/query.pb.go b/x/icacallbacks/types/query.pb.go deleted file mode 100644 index 7e7c6a4cd..000000000 --- a/x/icacallbacks/types/query.pb.go +++ /dev/null @@ -1,1390 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/icacallbacks/query.proto - -package types - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e73b99abb7e91c2, []int{0} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params holds all the parameters of this module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e73b99abb7e91c2, []int{1} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -type QueryGetCallbackDataRequest struct { - CallbackKey string `protobuf:"bytes,1,opt,name=callback_key,json=callbackKey,proto3" json:"callback_key,omitempty"` -} - -func (m *QueryGetCallbackDataRequest) Reset() { *m = QueryGetCallbackDataRequest{} } -func (m *QueryGetCallbackDataRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetCallbackDataRequest) ProtoMessage() {} -func (*QueryGetCallbackDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e73b99abb7e91c2, []int{2} -} -func (m *QueryGetCallbackDataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetCallbackDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetCallbackDataRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetCallbackDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetCallbackDataRequest.Merge(m, src) -} -func (m *QueryGetCallbackDataRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetCallbackDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetCallbackDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetCallbackDataRequest proto.InternalMessageInfo - -func (m *QueryGetCallbackDataRequest) GetCallbackKey() string { - if m != nil { - return m.CallbackKey - } - return "" -} - -type QueryGetCallbackDataResponse struct { - CallbackData CallbackData `protobuf:"bytes,1,opt,name=callback_data,json=callbackData,proto3" json:"callback_data"` -} - -func (m *QueryGetCallbackDataResponse) Reset() { *m = QueryGetCallbackDataResponse{} } -func (m *QueryGetCallbackDataResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetCallbackDataResponse) ProtoMessage() {} -func (*QueryGetCallbackDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e73b99abb7e91c2, []int{3} -} -func (m *QueryGetCallbackDataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetCallbackDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetCallbackDataResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetCallbackDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetCallbackDataResponse.Merge(m, src) -} -func (m *QueryGetCallbackDataResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetCallbackDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetCallbackDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetCallbackDataResponse proto.InternalMessageInfo - -func (m *QueryGetCallbackDataResponse) GetCallbackData() CallbackData { - if m != nil { - return m.CallbackData - } - return CallbackData{} -} - -type QueryAllCallbackDataRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllCallbackDataRequest) Reset() { *m = QueryAllCallbackDataRequest{} } -func (m *QueryAllCallbackDataRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllCallbackDataRequest) ProtoMessage() {} -func (*QueryAllCallbackDataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_5e73b99abb7e91c2, []int{4} -} -func (m *QueryAllCallbackDataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllCallbackDataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllCallbackDataRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllCallbackDataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllCallbackDataRequest.Merge(m, src) -} -func (m *QueryAllCallbackDataRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllCallbackDataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllCallbackDataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllCallbackDataRequest proto.InternalMessageInfo - -func (m *QueryAllCallbackDataRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryAllCallbackDataResponse struct { - CallbackData []CallbackData `protobuf:"bytes,1,rep,name=callback_data,json=callbackData,proto3" json:"callback_data"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllCallbackDataResponse) Reset() { *m = QueryAllCallbackDataResponse{} } -func (m *QueryAllCallbackDataResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllCallbackDataResponse) ProtoMessage() {} -func (*QueryAllCallbackDataResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_5e73b99abb7e91c2, []int{5} -} -func (m *QueryAllCallbackDataResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllCallbackDataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllCallbackDataResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllCallbackDataResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllCallbackDataResponse.Merge(m, src) -} -func (m *QueryAllCallbackDataResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllCallbackDataResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllCallbackDataResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllCallbackDataResponse proto.InternalMessageInfo - -func (m *QueryAllCallbackDataResponse) GetCallbackData() []CallbackData { - if m != nil { - return m.CallbackData - } - return nil -} - -func (m *QueryAllCallbackDataResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "stride.icacallbacks.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "stride.icacallbacks.QueryParamsResponse") - proto.RegisterType((*QueryGetCallbackDataRequest)(nil), "stride.icacallbacks.QueryGetCallbackDataRequest") - proto.RegisterType((*QueryGetCallbackDataResponse)(nil), "stride.icacallbacks.QueryGetCallbackDataResponse") - proto.RegisterType((*QueryAllCallbackDataRequest)(nil), "stride.icacallbacks.QueryAllCallbackDataRequest") - proto.RegisterType((*QueryAllCallbackDataResponse)(nil), "stride.icacallbacks.QueryAllCallbackDataResponse") -} - -func init() { proto.RegisterFile("stride/icacallbacks/query.proto", fileDescriptor_5e73b99abb7e91c2) } - -var fileDescriptor_5e73b99abb7e91c2 = []byte{ - // 529 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x3f, 0x6f, 0x13, 0x31, - 0x18, 0xc6, 0x73, 0xa5, 0x44, 0xc2, 0x2d, 0x42, 0x72, 0x3b, 0xa0, 0xb4, 0xba, 0xb6, 0x37, 0x90, - 0x82, 0x54, 0xbb, 0x29, 0x52, 0x25, 0x06, 0x04, 0x2d, 0x7f, 0x3a, 0xd0, 0x21, 0x84, 0x8d, 0x05, - 0xbd, 0x77, 0xb5, 0x8e, 0x53, 0x9c, 0xf3, 0x35, 0x76, 0x80, 0x13, 0x62, 0x41, 0x8c, 0x0c, 0x48, - 0x7c, 0x0f, 0x36, 0x16, 0x3e, 0x41, 0xc7, 0x4a, 0x2c, 0x4c, 0x08, 0x25, 0x7c, 0x10, 0x74, 0xb6, - 0x53, 0xee, 0x54, 0xa7, 0x51, 0xba, 0x39, 0xf6, 0xf3, 0x3e, 0xcf, 0xef, 0xcd, 0xfb, 0xea, 0xd0, - 0x9a, 0x54, 0xfd, 0xe4, 0x88, 0xd1, 0x24, 0x82, 0x08, 0x38, 0x0f, 0x21, 0xea, 0x4a, 0x7a, 0x3c, - 0x60, 0xfd, 0x9c, 0x64, 0x7d, 0xa1, 0x04, 0x5e, 0x32, 0x02, 0x52, 0x16, 0x34, 0x96, 0x63, 0x11, - 0x0b, 0xfd, 0x4e, 0x8b, 0x93, 0x91, 0x36, 0x56, 0x63, 0x21, 0x62, 0xce, 0x28, 0x64, 0x09, 0x85, - 0x34, 0x15, 0x0a, 0x54, 0x22, 0x52, 0x69, 0x5f, 0xef, 0x44, 0x42, 0xf6, 0x84, 0xa4, 0x21, 0x48, - 0x66, 0x12, 0xe8, 0x9b, 0x56, 0xc8, 0x14, 0xb4, 0x68, 0x06, 0x71, 0x92, 0x6a, 0xb1, 0xd5, 0xae, - 0xbb, 0xa8, 0x32, 0xe8, 0x43, 0x6f, 0xec, 0xd6, 0x74, 0x29, 0xc6, 0xa7, 0x57, 0x47, 0xa0, 0xc0, - 0x08, 0x83, 0x65, 0x84, 0x9f, 0x17, 0x61, 0x6d, 0x5d, 0xdd, 0x61, 0xc7, 0x03, 0x26, 0x55, 0xd0, - 0x46, 0x4b, 0x95, 0x5b, 0x99, 0x89, 0x54, 0x32, 0x7c, 0x0f, 0xd5, 0x4d, 0xca, 0x4d, 0x6f, 0xdd, - 0xdb, 0x5c, 0xd8, 0x59, 0x21, 0x8e, 0xee, 0x89, 0x29, 0xda, 0x9f, 0x3f, 0xf9, 0xbd, 0x56, 0xeb, - 0xd8, 0x82, 0xe0, 0x21, 0x5a, 0xd1, 0x8e, 0x07, 0x4c, 0x3d, 0xb2, 0xca, 0xc7, 0xa0, 0xc0, 0x06, - 0xe2, 0x0d, 0xb4, 0x78, 0x46, 0xd7, 0x65, 0xb9, 0xf6, 0xbf, 0xd6, 0x59, 0x18, 0xdf, 0x3d, 0x63, - 0x79, 0xc0, 0xd1, 0xaa, 0xdb, 0xc1, 0xc2, 0x1d, 0xa2, 0xeb, 0x95, 0x06, 0x2d, 0xe3, 0x86, 0x93, - 0xb1, 0xec, 0x60, 0x49, 0xcf, 0x00, 0x8a, 0xbb, 0x80, 0x59, 0xde, 0x3d, 0xce, 0x5d, 0xbc, 0x4f, - 0x11, 0xfa, 0x3f, 0x15, 0x9b, 0x74, 0x8b, 0x98, 0x11, 0x92, 0x62, 0x84, 0xc4, 0x2c, 0x89, 0x1d, - 0x21, 0x69, 0x43, 0xcc, 0x6c, 0x6d, 0xa7, 0x54, 0x19, 0x7c, 0xf7, 0x6c, 0x57, 0xe7, 0x72, 0x26, - 0x77, 0x75, 0xe5, 0xd2, 0x5d, 0xe1, 0x83, 0x0a, 0xf6, 0x9c, 0xc6, 0x6e, 0x4e, 0xc5, 0x36, 0x28, - 0x65, 0xee, 0x9d, 0x4f, 0xf3, 0xe8, 0xaa, 0xe6, 0xc6, 0x9f, 0x3d, 0x54, 0x37, 0x13, 0xc7, 0x4d, - 0x27, 0xd4, 0xf9, 0xf5, 0x6a, 0x6c, 0x4e, 0x17, 0x9a, 0xcc, 0x80, 0x7e, 0xfc, 0xf9, 0xf7, 0xeb, - 0xdc, 0x6d, 0xdc, 0xa4, 0x2f, 0x74, 0xc5, 0xd6, 0x21, 0x84, 0x92, 0x4e, 0x5e, 0x7f, 0xfc, 0xc3, - 0x43, 0x8b, 0xe5, 0xbf, 0x01, 0x6f, 0x4f, 0xce, 0x72, 0xef, 0x62, 0xa3, 0x35, 0x43, 0x85, 0xc5, - 0x7c, 0xa2, 0x31, 0x1f, 0xe0, 0xfb, 0x53, 0x31, 0x2b, 0xc3, 0xa4, 0xef, 0xcb, 0x4b, 0xff, 0x01, - 0x7f, 0xf3, 0xd0, 0x8d, 0xb2, 0xff, 0x1e, 0xe7, 0x17, 0xf1, 0xbb, 0x77, 0xf3, 0x22, 0xfe, 0x09, - 0x5b, 0x16, 0xec, 0x6a, 0xfe, 0x6d, 0x4c, 0x66, 0xe3, 0xdf, 0x6f, 0x9f, 0x0c, 0x7d, 0xef, 0x74, - 0xe8, 0x7b, 0x7f, 0x86, 0xbe, 0xf7, 0x65, 0xe4, 0xd7, 0x4e, 0x47, 0x7e, 0xed, 0xd7, 0xc8, 0xaf, - 0xbd, 0xdc, 0x8d, 0x13, 0xf5, 0x7a, 0x10, 0x92, 0x48, 0xf4, 0x68, 0x2f, 0xe1, 0xdd, 0xfc, 0x2d, - 0xe4, 0x5b, 0xbc, 0x70, 0x1d, 0xff, 0xa2, 0xef, 0xaa, 0xce, 0x2a, 0xcf, 0x98, 0x0c, 0xeb, 0xfa, - 0xb3, 0x74, 0xf7, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0x3e, 0xfc, 0xe8, 0x79, 0x05, 0x00, - 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Queries a CallbackData by index. - CallbackData(ctx context.Context, in *QueryGetCallbackDataRequest, opts ...grpc.CallOption) (*QueryGetCallbackDataResponse, error) - // Queries a list of CallbackData items. - CallbackDataAll(ctx context.Context, in *QueryAllCallbackDataRequest, opts ...grpc.CallOption) (*QueryAllCallbackDataResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/stride.icacallbacks.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CallbackData(ctx context.Context, in *QueryGetCallbackDataRequest, opts ...grpc.CallOption) (*QueryGetCallbackDataResponse, error) { - out := new(QueryGetCallbackDataResponse) - err := c.cc.Invoke(ctx, "/stride.icacallbacks.Query/CallbackData", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) CallbackDataAll(ctx context.Context, in *QueryAllCallbackDataRequest, opts ...grpc.CallOption) (*QueryAllCallbackDataResponse, error) { - out := new(QueryAllCallbackDataResponse) - err := c.cc.Invoke(ctx, "/stride.icacallbacks.Query/CallbackDataAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Queries a CallbackData by index. - CallbackData(context.Context, *QueryGetCallbackDataRequest) (*QueryGetCallbackDataResponse, error) - // Queries a list of CallbackData items. - CallbackDataAll(context.Context, *QueryAllCallbackDataRequest) (*QueryAllCallbackDataResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (*UnimplementedQueryServer) CallbackData(ctx context.Context, req *QueryGetCallbackDataRequest) (*QueryGetCallbackDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallbackData not implemented") -} -func (*UnimplementedQueryServer) CallbackDataAll(ctx context.Context, req *QueryAllCallbackDataRequest) (*QueryAllCallbackDataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CallbackDataAll not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.icacallbacks.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CallbackData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetCallbackDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CallbackData(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.icacallbacks.Query/CallbackData", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CallbackData(ctx, req.(*QueryGetCallbackDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_CallbackDataAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllCallbackDataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).CallbackDataAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.icacallbacks.Query/CallbackDataAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CallbackDataAll(ctx, req.(*QueryAllCallbackDataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "stride.icacallbacks.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "CallbackData", - Handler: _Query_CallbackData_Handler, - }, - { - MethodName: "CallbackDataAll", - Handler: _Query_CallbackDataAll_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/icacallbacks/query.proto", -} - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryGetCallbackDataRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetCallbackDataRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetCallbackDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CallbackKey) > 0 { - i -= len(m.CallbackKey) - copy(dAtA[i:], m.CallbackKey) - i = encodeVarintQuery(dAtA, i, uint64(len(m.CallbackKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetCallbackDataResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetCallbackDataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetCallbackDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.CallbackData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryAllCallbackDataRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllCallbackDataRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllCallbackDataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAllCallbackDataResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllCallbackDataResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllCallbackDataResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.CallbackData) > 0 { - for iNdEx := len(m.CallbackData) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CallbackData[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryGetCallbackDataRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CallbackKey) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetCallbackDataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.CallbackData.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllCallbackDataRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllCallbackDataResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.CallbackData) > 0 { - for _, e := range m.CallbackData { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetCallbackDataRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetCallbackDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetCallbackDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetCallbackDataResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetCallbackDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetCallbackDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CallbackData.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllCallbackDataRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllCallbackDataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllCallbackDataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllCallbackDataResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllCallbackDataResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllCallbackDataResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackData = append(m.CallbackData, CallbackData{}) - if err := m.CallbackData[len(m.CallbackData)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/icacallbacks/types/query.pb.gw.go b/x/icacallbacks/types/query.pb.gw.go deleted file mode 100644 index 0874f2e19..000000000 --- a/x/icacallbacks/types/query.pb.gw.go +++ /dev/null @@ -1,337 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: stride/icacallbacks/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_CallbackData_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetCallbackDataRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["callback_key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "callback_key") - } - - protoReq.CallbackKey, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "callback_key", err) - } - - msg, err := client.CallbackData(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_CallbackData_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetCallbackDataRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["callback_key"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "callback_key") - } - - protoReq.CallbackKey, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "callback_key", err) - } - - msg, err := server.CallbackData(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_CallbackDataAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_CallbackDataAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllCallbackDataRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CallbackDataAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CallbackDataAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_CallbackDataAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllCallbackDataRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CallbackDataAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CallbackDataAll(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CallbackData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_CallbackData_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CallbackData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CallbackDataAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_CallbackDataAll_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CallbackDataAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CallbackData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_CallbackData_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CallbackData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_CallbackDataAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_CallbackDataAll_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_CallbackDataAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "icacallbacks", "params"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_CallbackData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "icacallbacks", "callback_data", "callback_key"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_CallbackDataAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "icacallbacks", "callback_data"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - - forward_Query_CallbackData_0 = runtime.ForwardResponseMessage - - forward_Query_CallbackDataAll_0 = runtime.ForwardResponseMessage -) diff --git a/x/icacallbacks/types/tx.pb.go b/x/icacallbacks/types/tx.pb.go deleted file mode 100644 index fc88825ba..000000000 --- a/x/icacallbacks/types/tx.pb.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/icacallbacks/tx.proto - -package types - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -func init() { proto.RegisterFile("stride/icacallbacks/tx.proto", fileDescriptor_c4981fec5f7fee51) } - -var fileDescriptor_c4981fec5f7fee51 = []byte{ - // 163 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x2e, 0x29, 0xca, - 0x4c, 0x49, 0xd5, 0xcf, 0x4c, 0x4e, 0x4c, 0x4e, 0xcc, 0xc9, 0x49, 0x4a, 0x4c, 0xce, 0x2e, 0xd6, - 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0xc8, 0xea, 0x21, 0xcb, 0x4a, - 0x89, 0x27, 0xe7, 0x17, 0xe7, 0xe6, 0x17, 0xeb, 0xe7, 0x16, 0xa7, 0xeb, 0x97, 0x19, 0x82, 0x28, - 0x88, 0x6a, 0x23, 0x1e, 0x2e, 0x66, 0xdf, 0xe2, 0x74, 0x29, 0xd6, 0x86, 0xe7, 0x1b, 0xb4, 0x18, - 0x9d, 0x02, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, - 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x2c, 0x3d, 0xb3, - 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x37, 0x33, 0x27, 0xbb, 0xb2, 0x3c, 0xb1, - 0x52, 0x37, 0x27, 0x31, 0xa9, 0x18, 0xce, 0xd3, 0xaf, 0x40, 0x73, 0x50, 0x65, 0x41, 0x6a, 0x71, - 0x12, 0x1b, 0xd8, 0x1a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe2, 0xf5, 0xbb, 0x42, 0xb4, - 0x00, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "stride.icacallbacks.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/icacallbacks/tx.proto", -} diff --git a/x/icacallbacks/types/types.go b/x/icacallbacks/types/types.go deleted file mode 100644 index ab1254f4c..000000000 --- a/x/icacallbacks/types/types.go +++ /dev/null @@ -1 +0,0 @@ -package types diff --git a/x/interchainquery/LICENSE b/x/interchainquery/LICENSE deleted file mode 100644 index f74f6d35d..000000000 --- a/x/interchainquery/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright for interchainquery public infrastructure attributed to 2022 Quicksilver - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/x/interchainquery/README.md b/x/interchainquery/README.md deleted file mode 100644 index 44d228c34..000000000 --- a/x/interchainquery/README.md +++ /dev/null @@ -1,118 +0,0 @@ ---- -title: "Interchainquery" -excerpt: "" -category: 6392913957c533007128548e ---- - - - -# Interchain Query - -## Abstract - -Stride uses interchain queries and interchain accounts to perform multichain liquid staking. The `interchainquery` module creates a framework that allows other modules to query other appchains using IBC. The `interchainquery` module is used to make bank balance ICQ queries to withdrawal account every N. The callback triggers ICA bank sends for 90% of the rewards to the delegation account and 10% to the stride hostzone revenue account. The ICA bank send logic is in x/stakeibc/keeper/callbacks.go. - -## Contents - -1. **[Concepts](#concepts)** -2. **[State](#state)** -3. **[Events](#events)** -4. **[Keeper](#keeper)** -5. **[Msgs](#msgs)** -6. **[Queries](#queries)** - -## State - -The `interchainquery` module keeps `Query` objects and modifies the information from query to query, as defined in `proto/interchainquery/v1/genesis.proto` - -### InterchainQuery information type - -`Query` has information types that pertain to the query itself. `Query` keeps the following: - -1. `id`: query identification string. -2. `connection_id`: id of the connection between the controller and host chain. -3. `chain_id`: id of the queried chain. -4. `query_type`: type of interchain query (e.g. bank store query) -5. `request_data`: serialized request information (e.g. the address with which to query) -6. `callback_module`: name of the module that will handle the callback -7. `callback_id`: ID for the function that will be called after the response is returned -8. `callback_data`: optional serialized data associated with the callback -9. `timeout_policy`: specifies how to handle a timeout (fail the query, retry the query, or execute the callback with a timeout) -10. `timeout_duration`: the relative time from the current block with which the query should timeout -11. `timeout_timestamp`: the absolute time at which the query times out -12. `request_sent`: boolean indicating whether the query event has been emitted (and can be identified by a relayer) -13. `submission_height`: the light client hight of the queried chain at the time of query submission - - -`DataPoint` has information types that pertain to the data that is queried. `DataPoint` keeps the following: - -1. `id` keeps the identification string of the datapoint -2. `remote_height` keeps the block height of the queried chain -3. `local_height` keeps the block height of the querying chain -4. `value` keeps the bytecode value of the data retrieved by the Query - -## Events - -The `interchainquery` module emits an event at the end of every `stride_epoch`s (e.g. 15 minutes on local testnet). - -The purpose of this event is to send interchainqueries that query data about staking rewards, which Stride uses to reinvest (aka autocompound) staking rewards. - -```go - event := sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeyAction, types.AttributeValueQuery), - sdk.NewAttribute(types.AttributeKeyQueryId, queryInfo.Id), - sdk.NewAttribute(types.AttributeKeyChainId, queryInfo.ChainId), - sdk.NewAttribute(types.AttributeKeyConnectionId, queryInfo.ConnectionId), - sdk.NewAttribute(types.AttributeKeyType, queryInfo.QueryType), - sdk.NewAttribute(types.AttributeKeyHeight, "0"), - sdk.NewAttribute(types.AttributeKeyRequest, hex.EncodeToString(queryInfo.Request)), - ) -``` - -## Keeper - -### Keeper Functions - -`interchainquery/keeper/` module provides utility functions to manage ICQs - -```go -// GetQuery returns query -GetQuery(ctx sdk.Context, id string) (types.Query, bool) -// SetQuery set query info -SetQuery(ctx sdk.Context, query types.Query) -// DeleteQuery delete query info -DeleteQuery(ctx sdk.Context, id string) -// IterateQueries iterate through queries -IterateQueries(ctx sdk.Context, fn func(index int64, queryInfo types.Query) (stop bool)) -// AllQueries returns every queryInfo in the store -AllQueries(ctx sdk.Context) []types.Query -``` - -## Msgs - -```protobuf -// SubmitQueryResponse is used to return the query response back to Stride -message MsgSubmitQueryResponse { - string chain_id = 1; - string query_id = 2; - bytes result = 3; - tendermint.crypto.ProofOps proof_ops = 4; - int64 height = 5; - string from_address = 6; -} -``` - -## Queries - -```protobuf -// Query PendingQueries lists all queries that have been requested (i.e. emitted) -// but have not had a response submitted yet -message QueryPendingQueriesRequest {} -``` diff --git a/x/interchainquery/client/cli/query.go b/x/interchainquery/client/cli/query.go deleted file mode 100644 index 93d72dd7c..000000000 --- a/x/interchainquery/client/cli/query.go +++ /dev/null @@ -1,69 +0,0 @@ -package cli - -import ( - "context" - "fmt" - "strings" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/version" - - "github.com/milkyway-labs/milkyway/x/interchainquery/types" -) - -// GetQueryCmd returns the cli query commands for this module. -func GetQueryCmd() *cobra.Command { - // Group lockup queries under a subcommand - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand( - GetCmdListPendingQueries(), - ) - - return cmd -} - -// GetCmdQueries provides a list of all pending queries -// (queries that have not have been requested but have not received a response) -func GetCmdListPendingQueries() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-pending-queries", - Short: "Query all pending queries", - Example: strings.TrimSpace( - fmt.Sprintf(`$ %s query interchainquery list-pending-queries`, - version.AppName, - ), - ), - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, _ []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryServiceClient(clientCtx) - - req := &types.QueryPendingQueriesRequest{} - - res, err := queryClient.PendingQueries(context.Background(), req) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/interchainquery/genesis.go b/x/interchainquery/genesis.go deleted file mode 100644 index 148628178..000000000 --- a/x/interchainquery/genesis.go +++ /dev/null @@ -1,25 +0,0 @@ -package interchainquery - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/interchainquery/keeper" - "github.com/milkyway-labs/milkyway/x/interchainquery/types" -) - -// InitGenesis initializes the capability module's state from a provided genesis -// state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - // set registered zones info from genesis - for _, query := range genState.Queries { - // Initialize empty epoch values via Cosmos SDK - k.SetQuery(ctx, query) - } -} - -// ExportGenesis returns the capability module's exported genesis. -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { - return &types.GenesisState{ - Queries: k.AllQueries(ctx), - } -} diff --git a/x/interchainquery/keeper/abci.go b/x/interchainquery/keeper/abci.go deleted file mode 100644 index 193fc3b5f..000000000 --- a/x/interchainquery/keeper/abci.go +++ /dev/null @@ -1,49 +0,0 @@ -package keeper - -import ( - "encoding/hex" - "fmt" - "time" - - "github.com/cosmos/cosmos-sdk/telemetry" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/interchainquery/types" -) - -// EndBlocker of interchainquery module -func (k Keeper) EndBlocker(ctx sdk.Context) { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) - - events := sdk.Events{} - for _, query := range k.AllQueries(ctx) { - if query.RequestSent { - continue - } - - k.Logger(ctx).Info(fmt.Sprintf("Interchainquery event emitted %s", query.Id)) - - event := sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(sdk.AttributeKeyAction, types.AttributeValueQuery), - sdk.NewAttribute(types.AttributeKeyQueryId, query.Id), - sdk.NewAttribute(types.AttributeKeyChainId, query.ChainId), - sdk.NewAttribute(types.AttributeKeyConnectionId, query.ConnectionId), - sdk.NewAttribute(types.AttributeKeyType, query.QueryType), - sdk.NewAttribute(types.AttributeKeyHeight, "0"), - sdk.NewAttribute(types.AttributeKeyRequest, hex.EncodeToString(query.RequestData)), - ) - events = append(events, event) - - event.Type = "query_request" - events = append(events, event) - - query.RequestSent = true - k.SetQuery(ctx, query) - } - - if len(events) > 0 { - ctx.EventManager().EmitEvents(events) - } -} diff --git a/x/interchainquery/keeper/grpc_query.go b/x/interchainquery/keeper/grpc_query.go deleted file mode 100644 index 13837c4e9..000000000 --- a/x/interchainquery/keeper/grpc_query.go +++ /dev/null @@ -1,25 +0,0 @@ -package keeper - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/interchainquery/types" -) - -var _ types.QueryServiceServer = Keeper{} - -// Queries all queries that have been requested but have not received a response -func (k Keeper) PendingQueries(c context.Context, req *types.QueryPendingQueriesRequest) (*types.QueryPendingQueriesResponse, error) { - ctx := sdk.UnwrapSDKContext(c) - - pendingQueries := []types.Query{} - for _, query := range k.AllQueries(ctx) { - if query.RequestSent { - pendingQueries = append(pendingQueries, query) - } - } - - return &types.QueryPendingQueriesResponse{PendingQueries: pendingQueries}, nil -} diff --git a/x/interchainquery/keeper/keeper.go b/x/interchainquery/keeper/keeper.go deleted file mode 100644 index 96b0a254e..000000000 --- a/x/interchainquery/keeper/keeper.go +++ /dev/null @@ -1,104 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - - "github.com/milkyway-labs/milkyway/utils" - - "github.com/milkyway-labs/milkyway/x/interchainquery/types" -) - -// Keeper of this module maintains collections of registered zones. -type Keeper struct { - cdc codec.Codec - storeKey storetypes.StoreKey - callbacks map[string]types.QueryCallbacks - IBCKeeper *ibckeeper.Keeper -} - -// NewKeeper returns a new instance of zones Keeper -func NewKeeper(cdc codec.Codec, storeKey storetypes.StoreKey, ibckeeper *ibckeeper.Keeper) Keeper { - return Keeper{ - cdc: cdc, - storeKey: storeKey, - callbacks: make(map[string]types.QueryCallbacks), - IBCKeeper: ibckeeper, - } -} - -func (k *Keeper) SetCallbackHandler(module string, handler types.QueryCallbacks) error { - _, found := k.callbacks[module] - if found { - return fmt.Errorf("callback handler already set for %s", module) - } - k.callbacks[module] = handler.RegisterICQCallbacks() - return nil -} - -// Logger returns a module-specific logger. -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} - -func (k *Keeper) SubmitICQRequest(ctx sdk.Context, query types.Query, forceUnique bool) error { - k.Logger(ctx).Info(utils.LogWithHostZone(query.ChainId, - "Submitting ICQ Request - module=%s, callbackId=%s, connectionId=%s, queryType=%s, timeout_duration=%d", - query.CallbackModule, query.CallbackId, query.ConnectionId, query.QueryType, query.TimeoutDuration)) - - if err := k.ValidateQuery(ctx, query); err != nil { - return err - } - - // Set the timeout using the block time and timeout duration - timeoutTimestamp := uint64(ctx.BlockTime().UnixNano() + query.TimeoutDuration.Nanoseconds()) - query.TimeoutTimestamp = timeoutTimestamp - - // Generate and set the query ID - optionally force it to be unique - query.Id = k.GetQueryId(ctx, query, forceUnique) - query.RequestSent = false - - // Set the submission height on the Query to the latest light client height - // In the query response, this will be used to verify that the query wasn't historical - connection, found := k.IBCKeeper.ConnectionKeeper.GetConnection(ctx, query.ConnectionId) - if !found { - return errorsmod.Wrapf(connectiontypes.ErrConnectionNotFound, query.ConnectionId) - } - clientState, found := k.IBCKeeper.ClientKeeper.GetClientState(ctx, connection.ClientId) - if !found { - return errorsmod.Wrapf(clienttypes.ErrClientNotFound, connection.ClientId) - } - query.SubmissionHeight = clientState.GetLatestHeight().GetRevisionHeight() - - // Save the query to the store - // If the same query is re-requested, it will get replace in the store with an updated TTL - // and the RequestSent bool reset to false - k.SetQuery(ctx, query) - - return nil -} - -// Re-submit an ICQ, generally used after a timeout -func (k *Keeper) RetryICQRequest(ctx sdk.Context, query types.Query) error { - k.Logger(ctx).Info(utils.LogWithHostZone(query.ChainId, - "Queuing ICQ Retry - Query Type: %s, Query ID: %s", query.CallbackId, query.Id)) - - // Delete old query - k.DeleteQuery(ctx, query.Id) - - // Submit a new query (with a new ID) - if err := k.SubmitICQRequest(ctx, query, true); err != nil { - return errorsmod.Wrapf(err, types.ErrFailedToRetryQuery.Error()) - } - - return nil -} diff --git a/x/interchainquery/keeper/msg_server.go b/x/interchainquery/keeper/msg_server.go deleted file mode 100644 index 5bc826bcc..000000000 --- a/x/interchainquery/keeper/msg_server.go +++ /dev/null @@ -1,226 +0,0 @@ -package keeper - -import ( - "context" - "fmt" - "sort" - "strings" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - commitmenttypes "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types" - "github.com/cosmos/ibc-go/v8/modules/core/exported" - tendermint "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - ics23 "github.com/cosmos/ics23/go" - "github.com/spf13/cast" - - "github.com/milkyway-labs/milkyway/utils" - - "github.com/milkyway-labs/milkyway/x/interchainquery/types" -) - -type msgServer struct { - *Keeper -} - -// NewMsgServerImpl returns an implementation of the bank MsgServer interface -// for the provided Keeper. -func NewMsgServerImpl(keeper Keeper) types.MsgServer { - return &msgServer{Keeper: &keeper} -} - -var _ types.MsgServer = msgServer{} - -// check if the query requires proving; if it does, verify it! -func (k Keeper) VerifyKeyProof(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error { - pathParts := strings.Split(query.QueryType, "/") - - // the query does NOT have an associated proof, so no need to verify it. - if pathParts[len(pathParts)-1] != "key" { - return nil - } - - // If the query is a "key" proof query, verify the results are valid by checking the poof - if msg.ProofOps == nil { - return errorsmod.Wrapf(types.ErrInvalidICQProof, "Unable to validate proof. No proof submitted") - } - - // Get the client consensus state at the height 1 block above the message height - proofHeight, err := cast.ToUint64E(msg.Height) - if err != nil { - return err - } - height := clienttypes.NewHeight(clienttypes.ParseChainID(query.ChainId), proofHeight+1) - - // Confirm the query proof height occurred after the submission height - if proofHeight <= query.SubmissionHeight { - return errorsmod.Wrapf(types.ErrInvalidICQProof, - "Query proof height (%d) is older than the submission height (%d)", proofHeight, query.SubmissionHeight) - } - - // Get the client state and consensus state from the connection Id - connection, found := k.IBCKeeper.ConnectionKeeper.GetConnection(ctx, query.ConnectionId) - if !found { - return errorsmod.Wrapf(types.ErrInvalidICQProof, "ConnectionId %s does not exist", query.ConnectionId) - } - consensusState, found := k.IBCKeeper.ClientKeeper.GetClientConsensusState(ctx, connection.ClientId, height) - if !found { - return errorsmod.Wrapf(types.ErrInvalidICQProof, "Consensus state not found for client %s and height %d", connection.ClientId, height) - } - clientState, found := k.IBCKeeper.ClientKeeper.GetClientState(ctx, connection.ClientId) - if !found { - return errorsmod.Wrapf(types.ErrInvalidICQProof, "Unable to fetch client state for client %s", connection.ClientId) - } - - // Cast the client and consensus state to tendermint type - tendermintConsensusState, ok := consensusState.(*tendermint.ConsensusState) - if !ok { - return errorsmod.Wrapf(types.ErrInvalidICQProof, - "Only tendermint consensus state is supported (%s provided)", consensusState.ClientType()) - } - tendermintClientState, ok := clientState.(*tendermint.ClientState) - if !ok { - return errorsmod.Wrapf(types.ErrInvalidICQProof, - "Only tendermint client state is supported (%s provided)", clientState.ClientType()) - } - var stateRoot exported.Root = tendermintConsensusState.Root - var clientStateProof []*ics23.ProofSpec = tendermintClientState.ProofSpecs - - // Get the merkle path and merkle proof - path := commitmenttypes.NewMerklePath([]string{pathParts[1], string(query.RequestData)}...) - merkleProof, err := commitmenttypes.ConvertProofs(msg.ProofOps) - if err != nil { - return errorsmod.Wrapf(types.ErrInvalidICQProof, "Error converting proofs: %s", err.Error()) - } - - // If we got a non-nil response, verify inclusion proof - if len(msg.Result) != 0 { - if err := merkleProof.VerifyMembership(clientStateProof, stateRoot, path, msg.Result); err != nil { - return errorsmod.Wrapf(types.ErrInvalidICQProof, "Unable to verify membership proof: %s", err.Error()) - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, query.CallbackId, "Inclusion proof validated - QueryId %s", query.Id)) - - } else { - // if we got a nil query response, verify non inclusion proof. - if err := merkleProof.VerifyNonMembership(clientStateProof, stateRoot, path); err != nil { - return errorsmod.Wrapf(types.ErrInvalidICQProof, "Unable to verify non-membership proof: %s", err.Error()) - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, query.CallbackId, "Non-inclusion proof validated - QueryId %s", query.Id)) - } - - return nil -} - -// Handles a query timeout based on the timeout policy -func (k Keeper) HandleQueryTimeout(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error { - k.Logger(ctx).Error(utils.LogICQCallbackWithHostZone(query.ChainId, query.CallbackId, - "QUERY TIMEOUT - QueryId: %s, TTL: %d, BlockTime: %d", query.Id, query.TimeoutTimestamp, ctx.BlockHeader().Time.UnixNano())) - - switch query.TimeoutPolicy { - case types.TimeoutPolicy_REJECT_QUERY_RESPONSE: - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, query.CallbackId, "Rejecting query")) - return nil - - case types.TimeoutPolicy_RETRY_QUERY_REQUEST: - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, query.CallbackId, "Retrying query...")) - return k.RetryICQRequest(ctx, query) - - case types.TimeoutPolicy_EXECUTE_QUERY_CALLBACK: - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, query.CallbackId, "Executing callback...")) - return k.InvokeCallback(ctx, msg, query) - - default: - return fmt.Errorf("Unsupported query timeout policy: %s", query.TimeoutPolicy.String()) - } -} - -// call the query's associated callback function -func (k Keeper) InvokeCallback(ctx sdk.Context, msg *types.MsgSubmitQueryResponse, query types.Query) error { - // get all the callback handlers and sort them for determinism - // (each module has their own callback handler) - moduleNames := []string{} - for moduleName := range k.callbacks { - moduleNames = append(moduleNames, moduleName) - } - sort.Strings(moduleNames) - - // Loop through each module until the callbackId is found in one of the module handlers - for _, moduleName := range moduleNames { - moduleCallbackHandler := k.callbacks[moduleName] - - // Once the callback is found, invoke the function - if moduleCallbackHandler.HasICQCallback(query.CallbackId) { - if err := moduleCallbackHandler.CallICQCallback(ctx, query.CallbackId, msg.Result, query); err != nil { - k.Logger(ctx).Error(utils.LogICQCallbackWithHostZone(query.ChainId, query.CallbackId, - "Error invoking ICQ callback, error: %s, %s, Query Response: %s", - err.Error(), query.Description(), msg.Result)) - - return err - } - return nil - } - } - - // If no callback was found, return an error - return types.ErrICQCallbackNotFound -} - -// Handle ICQ query responses by validating the proof, and calling the query's corresponding callback -func (k msgServer) SubmitQueryResponse(goCtx context.Context, msg *types.MsgSubmitQueryResponse) (*types.MsgSubmitQueryResponseResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // check if the response has an associated query stored on stride - query, found := k.GetQuery(ctx, msg.QueryId) - if !found { - k.Logger(ctx).Info("ICQ RESPONSE | Ignoring non-existent query response (note: duplicate responses are nonexistent)") - return &types.MsgSubmitQueryResponseResponse{}, nil // technically this is an error, but will cause the entire tx to fail if we have one 'bad' message, so we can just no-op here. - } - - defer ctx.EventManager().EmitEvents(sdk.Events{ - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(types.AttributeKeyQueryId, query.Id), - ), - sdk.NewEvent( - "query_response", - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - sdk.NewAttribute(types.AttributeKeyQueryId, query.Id), - sdk.NewAttribute(types.AttributeKeyChainId, query.ChainId), - ), - }) - - // Verify the response's proof, if one exists - err := k.VerifyKeyProof(ctx, msg, query) - if err != nil { - k.Logger(ctx).Error(utils.LogICQCallbackWithHostZone(query.ChainId, query.CallbackId, - "QUERY PROOF VERIFICATION FAILED - QueryId: %s, Error: %s", query.Id, err.Error())) - return nil, err - } - - // Immediately delete the query so it cannot process again - k.DeleteQuery(ctx, query.Id) - - // If the query is contentless, end - if len(msg.Result) == 0 { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, query.CallbackId, - "Query response is contentless - QueryId: %s", query.Id)) - return &types.MsgSubmitQueryResponseResponse{}, nil - } - - // Check if the query has expired (if the block time is greater than the TTL timestamp, the query has expired) - if query.HasTimedOut(ctx.BlockTime()) { - if err := k.HandleQueryTimeout(ctx, msg, query); err != nil { - return nil, err - } - return &types.MsgSubmitQueryResponseResponse{}, nil - } - - // Invoke the query callback (if the query has not timed out) - if err := k.InvokeCallback(ctx, msg, query); err != nil { - return nil, err - } - - return &types.MsgSubmitQueryResponseResponse{}, nil -} diff --git a/x/interchainquery/keeper/queries.go b/x/interchainquery/keeper/queries.go deleted file mode 100644 index a6fd1e6ab..000000000 --- a/x/interchainquery/keeper/queries.go +++ /dev/null @@ -1,181 +0,0 @@ -package keeper - -import ( - "encoding/binary" - "fmt" - "strings" - "time" - - sdkmath "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" - - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/store/prefix" - "github.com/cometbft/cometbft/crypto" - "github.com/cosmos/cosmos-sdk/codec" - - "github.com/milkyway-labs/milkyway/x/interchainquery/types" -) - -// Generates a query ID based on the request information -// If forceUnique is false, queries of the same request type will have the same query ID -// (e.g. "query the ATOM balance of address X", will always have the same query ID) -// If forceUnique is true, a unique ID will be used for the query -func (k Keeper) GetQueryId(ctx sdk.Context, query types.Query, forceUnique bool) string { - // If forceUnique is true, grab and append the unique query UID - var queryKey []byte - if forceUnique { - queryKey = k.GetQueryUID(ctx) - } else { - queryKey = append([]byte(query.CallbackModule+query.ConnectionId+query.ChainId+query.QueryType+query.CallbackId), query.RequestData...) - } - return fmt.Sprintf("%x", crypto.Sha256(queryKey)) -} - -// ValidateQuery validates that all the required attributes of a query are supplied when submitting an ICQ -func (k Keeper) ValidateQuery(ctx sdk.Context, query types.Query) error { - if query.ChainId == "" { - return errorsmod.Wrapf(types.ErrInvalidICQRequest, "chain-id cannot be empty") - } - if query.ConnectionId == "" { - return errorsmod.Wrapf(types.ErrInvalidICQRequest, "connection-id cannot be empty") - } - if !strings.HasPrefix(query.ConnectionId, connectiontypes.ConnectionPrefix) { - return errorsmod.Wrapf(types.ErrInvalidICQRequest, "invalid connection-id (%s)", query.ConnectionId) - } - if query.QueryType == "" { - return errorsmod.Wrapf(types.ErrInvalidICQRequest, "query type cannot be empty") - } - if query.CallbackModule == "" { - return errorsmod.Wrapf(types.ErrInvalidICQRequest, "callback module must be specified") - } - if query.CallbackId == "" { - return errorsmod.Wrapf(types.ErrInvalidICQRequest, "callback-id cannot be empty") - } - if query.TimeoutDuration == time.Duration(0) { - return errorsmod.Wrapf(types.ErrInvalidICQRequest, "timeout duration must be set") - } - if _, exists := k.callbacks[query.CallbackModule]; !exists { - return errorsmod.Wrapf(types.ErrInvalidICQRequest, "no callback handler registered for module (%s)", query.CallbackModule) - } - if exists := k.callbacks[query.CallbackModule].HasICQCallback(query.CallbackId); !exists { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "callback-id (%s) is not registered for module (%s)", query.CallbackId, query.CallbackModule) - } - - return nil -} - -// GetQuery returns query -func (k Keeper) GetQuery(ctx sdk.Context, id string) (types.Query, bool) { - query := types.Query{} - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixQuery) - bz := store.Get([]byte(id)) - if len(bz) == 0 { - return query, false - } - k.cdc.MustUnmarshal(bz, &query) - return query, true -} - -// SetQuery set query info -func (k Keeper) SetQuery(ctx sdk.Context, query types.Query) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixQuery) - bz := k.cdc.MustMarshal(&query) - store.Set([]byte(query.Id), bz) -} - -// DeleteQuery delete query info -func (k Keeper) DeleteQuery(ctx sdk.Context, id string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixQuery) - store.Delete([]byte(id)) -} - -// To optionally force queries to be unique, a UID can be supplied when building the query Id -// This is implemented using a counter that increments every time a UID is retrieved -// The uid is returned as a byte array since it's appended to the serialized query key -func (k Keeper) GetQueryUID(ctx sdk.Context) []byte { - store := ctx.KVStore(k.storeKey) - uidBz := store.Get(types.KeyQueryCounter) - - // Initialize the UID if there is nothing in the store yet - if len(uidBz) == 0 { - uidBz = make([]byte, 8) - binary.BigEndian.PutUint64(uidBz, 1) - } - uid := binary.BigEndian.Uint64(uidBz) - - // Increment and store the next UID - nextUidBz := make([]byte, 8) - binary.BigEndian.PutUint64(nextUidBz, uid+1) - store.Set(types.KeyQueryCounter, nextUidBz) - - // Return the serialized uid - return uidBz -} - -// IterateQueries iterate through queries -func (k Keeper) IterateQueries(ctx sdk.Context, fn func(index int64, queryInfo types.Query) (stop bool)) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixQuery) - iterator := storetypes.KVStorePrefixIterator(store, nil) - defer iterator.Close() - - i := int64(0) - for ; iterator.Valid(); iterator.Next() { - query := types.Query{} - k.cdc.MustUnmarshal(iterator.Value(), &query) - stop := fn(i, query) - - if stop { - break - } - i++ - } -} - -// AllQueries returns every queryInfo in the store -func (k Keeper) AllQueries(ctx sdk.Context) []types.Query { - queries := []types.Query{} - k.IterateQueries(ctx, func(_ int64, queryInfo types.Query) (stop bool) { - queries = append(queries, queryInfo) - return false - }) - return queries -} - -// Helper function to unmarshal a Balance query response across SDK versions -// Before SDK v46, the query response returned a sdk.Coin type. SDK v46 returns an int type -// https://github.com/cosmos/cosmos-sdk/pull/9832 -func UnmarshalAmountFromBalanceQuery(cdc codec.BinaryCodec, queryResponseBz []byte) (amount sdkmath.Int, err error) { - // An nil should not be possible, exit immediately if it occurs - if queryResponseBz == nil { - return sdkmath.Int{}, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "query response is nil") - } - - // If the query response is empty, that means the account was never registered (and thus has a 0 balance) - if len(queryResponseBz) == 0 { - return sdkmath.ZeroInt(), nil - } - - // First attempt to unmarshal as an Int (for SDK v46+) - // If the result was serialized as a `Coin` type, it should contain a string (representing the denom) - // which will cause the unmarshalling to throw an error - intError := amount.Unmarshal(queryResponseBz) - if intError == nil { - return amount, nil - } - - // If the Int unmarshaling was unsuccessful, attempt again using a Coin type (for SDK v45 and below) - // If successful, return the amount field from the coin (if the coin is not nil) - var coin sdk.Coin - coinError := cdc.Unmarshal(queryResponseBz, &coin) - if coinError == nil { - return coin.Amount, nil - } - - // If it failed unmarshaling with either data structure, return an error with the failure messages combined - return sdkmath.Int{}, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, - "unable to unmarshal balance query response %v as sdkmath.Int (err: %s) or sdk.Coin (err: %s)", queryResponseBz, intError.Error(), coinError.Error()) -} diff --git a/x/interchainquery/module.go b/x/interchainquery/module.go deleted file mode 100644 index be84ed695..000000000 --- a/x/interchainquery/module.go +++ /dev/null @@ -1,202 +0,0 @@ -package interchainquery - -import ( - "context" - "encoding/json" - "fmt" - "math/rand" - - "cosmossdk.io/core/appmodule" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - - "github.com/milkyway-labs/milkyway/x/interchainquery/keeper" - - "github.com/milkyway-labs/milkyway/x/interchainquery/client/cli" - "github.com/milkyway-labs/milkyway/x/interchainquery/types" -) - -var ( - _ appmodule.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} -) - -// ---------------------------------------------------------------------------- -// AppModuleBasic -// ---------------------------------------------------------------------------- - -// AppModuleBasic implements the AppModuleBasic interface for the capability module. -type AppModuleBasic struct { - cdc codec.Codec -} - -// NewAppModuleBasic return a new AppModuleBasic -func NewAppModuleBasic(cdc codec.Codec) AppModuleBasic { - return AppModuleBasic{cdc: cdc} -} - -// Name returns the capability module's name. -func (AppModuleBasic) Name() string { - return types.ModuleName -} - -// RegisterCodec registers a legacy amino codec -func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) { - types.RegisterLegacyAminoCodec(cdc) -} - -// RegisterLegacyAminoCodec registers a legacy amino codec -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - types.RegisterLegacyAminoCodec(cdc) -} - -// RegisterInterfaces registers the module's interface types -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { - // RegisterInterfaces registers interfaces and implementations of the bank module. - types.RegisterInterfaces(reg) -} - -// DefaultGenesis returns the capability module's default genesis state. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesis()) -} - -// ValidateGenesis performs genesis state validation for the capability module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { - var genState types.GenesisState - if err := cdc.UnmarshalJSON(bz, &genState); err != nil { - return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) - } - return genState.Validate() -} - -// RegisterRESTRoutes registers the capability module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) {} - -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - err := types.RegisterQueryServiceHandlerClient(context.Background(), mux, types.NewQueryServiceClient(clientCtx)) - if err != nil { - panic(err) - } -} - -// GetQueryCmd returns the capability module's root query command. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd() -} - -// ---------------------------------------------------------------------------- -// AppModule -// ---------------------------------------------------------------------------- - -// AppModule implements the AppModule interface for the capability module. -type AppModule struct { - AppModuleBasic - keeper keeper.Keeper -} - -// NewAppModule return a new AppModule -func NewAppModule(cdc codec.Codec, keeper keeper.Keeper) AppModule { - return AppModule{ - AppModuleBasic: NewAppModuleBasic(cdc), - keeper: keeper, - } -} - -// Name returns the capability module's name. -func (am AppModule) Name() string { - return am.AppModuleBasic.Name() -} - -// QuerierRoute returns the capability module's query routing key. -func (AppModule) QuerierRoute() string { return types.QuerierRoute } - -// RegisterServices registers a GRPC query service to respond to the -// module-specific GRPC queries. -func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) - types.RegisterQueryServiceServer(cfg.QueryServer(), am.keeper) -} - -// RegisterInvariants registers the capability module's invariants. -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - -// InitGenesis performs the capability module's genesis initialization It returns -// no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { - var genState types.GenesisState - // Initialize global index to index in genesis state - cdc.MustUnmarshalJSON(gs, &genState) - InitGenesis(ctx, am.keeper, genState) - return []abci.ValidatorUpdate{} -} - -// ExportGenesis returns the capability module's exported genesis state as raw JSON bytes. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - genState := ExportGenesis(ctx, am.keeper) - return cdc.MustMarshalJSON(genState) -} - -// EndBlock executes all ABCI EndBlock logic respective to the capability module. It -// returns no validator updates. -func (am AppModule) EndBlock(ctx context.Context) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - am.keeper.EndBlocker(sdkCtx) - return nil -} - -// ___________________________________________________________________________ - -// AppModuleSimulation functions - -// GenerateGenesisState creates a randomized GenState of the pool-incentives module. -func (AppModule) GenerateGenesisState(simState *module.SimulationState) { - // simulation.RandomizedGenState(simState) -} - -// ProposalContents doesn't return any content functions for governance proposals. -func (AppModule) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalMsg { - return nil -} - -// RandomizedParams creates randomized pool-incentives param changes for the simulator. -func (AppModule) RandomizedParams(r *rand.Rand) []simtypes.LegacyParamChange { - return nil -} - -// WeightedOperations returns the all the gov module operations with their respective weights. -func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { - return nil // TODO -} - -// ConsensusVersion implements AppModule/ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 1 } - -func (am AppModule) IsOnePerModuleType() {} - -func (am AppModule) IsAppModule() {} - -// GetTxCmd returns the capability module's root tx command. -func (a AppModule) GetTxCmd() *cobra.Command { - // XXX: return an empty command. this prevents the following panic: - // panic: submit-query-response flag redefined: chain-id - return &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } -} diff --git a/x/interchainquery/types/callbacks.go b/x/interchainquery/types/callbacks.go deleted file mode 100644 index 0b5daa776..000000000 --- a/x/interchainquery/types/callbacks.go +++ /dev/null @@ -1,12 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -type QueryCallbacks interface { - AddICQCallback(id string, fn interface{}) QueryCallbacks - RegisterICQCallbacks() QueryCallbacks - CallICQCallback(ctx sdk.Context, id string, args []byte, query Query) error - HasICQCallback(id string) bool -} diff --git a/x/interchainquery/types/codec.go b/x/interchainquery/types/codec.go deleted file mode 100644 index bfe8808a3..000000000 --- a/x/interchainquery/types/codec.go +++ /dev/null @@ -1,33 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/codec" - "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/msgservice" -) - -var ( - amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(amino) -) - -func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgSubmitQueryResponse{}, "/stride.interchainquery.MsgSubmitQueryResponse", nil) - // this line is used by starport scaffolding # 2 -} - -func RegisterInterfaces(registry types.InterfaceRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgSubmitQueryResponse{}, - ) - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) -} - -func init() { - RegisterLegacyAminoCodec(amino) - cryptocodec.RegisterCrypto(amino) - amino.Seal() -} diff --git a/x/interchainquery/types/error.go b/x/interchainquery/types/error.go deleted file mode 100644 index c4780f68b..000000000 --- a/x/interchainquery/types/error.go +++ /dev/null @@ -1,13 +0,0 @@ -package types - -import "errors" - -var ( - ErrAlreadyFulfilled = errors.New("query already fulfilled") - ErrSucceededNoDelete = errors.New("query succeeded; do not not execute default behavior") - ErrInvalidICQProof = errors.New("icq query response failed") - ErrICQCallbackNotFound = errors.New("icq callback id not found") - ErrInvalidConsensusState = errors.New("invalid consensus state") - ErrInvalidICQRequest = errors.New("invalid interchain query request") - ErrFailedToRetryQuery = errors.New("failed to retry query") -) diff --git a/x/interchainquery/types/events.go b/x/interchainquery/types/events.go deleted file mode 100644 index d5dec6cc2..000000000 --- a/x/interchainquery/types/events.go +++ /dev/null @@ -1,14 +0,0 @@ -package types - -const ( - AttributeKeyQueryId = "query_id" - AttributeKeyChainId = "chain_id" - AttributeKeyConnectionId = "connection_id" - AttributeKeyType = "type" - AttributeKeyParams = "parameters" - AttributeKeyRequest = "request" - AttributeKeyHeight = "height" - - AttributeValueCategory = ModuleName - AttributeValueQuery = "query" -) diff --git a/x/interchainquery/types/genesis.go b/x/interchainquery/types/genesis.go deleted file mode 100644 index 82e905203..000000000 --- a/x/interchainquery/types/genesis.go +++ /dev/null @@ -1,18 +0,0 @@ -package types - -func NewGenesisState(queries []Query) *GenesisState { - return &GenesisState{Queries: queries} -} - -// DefaultGenesis returns the default Capability genesis state -func DefaultGenesis() *GenesisState { - queries := []Query{} - return NewGenesisState(queries) -} - -// Validate performs basic genesis state validation returning an error upon any -// failure. -func (gs GenesisState) Validate() error { - // TODO: validate genesis state. - return nil -} diff --git a/x/interchainquery/types/genesis.pb.go b/x/interchainquery/types/genesis.pb.go deleted file mode 100644 index 7fec822a7..000000000 --- a/x/interchainquery/types/genesis.pb.go +++ /dev/null @@ -1,1446 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/interchainquery/v1/genesis.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/durationpb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type TimeoutPolicy int32 - -const ( - TimeoutPolicy_REJECT_QUERY_RESPONSE TimeoutPolicy = 0 - TimeoutPolicy_RETRY_QUERY_REQUEST TimeoutPolicy = 1 - TimeoutPolicy_EXECUTE_QUERY_CALLBACK TimeoutPolicy = 2 -) - -var TimeoutPolicy_name = map[int32]string{ - 0: "REJECT_QUERY_RESPONSE", - 1: "RETRY_QUERY_REQUEST", - 2: "EXECUTE_QUERY_CALLBACK", -} - -var TimeoutPolicy_value = map[string]int32{ - "REJECT_QUERY_RESPONSE": 0, - "RETRY_QUERY_REQUEST": 1, - "EXECUTE_QUERY_CALLBACK": 2, -} - -func (x TimeoutPolicy) String() string { - return proto.EnumName(TimeoutPolicy_name, int32(x)) -} - -func (TimeoutPolicy) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_74cd646eb05658fd, []int{0} -} - -type Query struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - QueryType string `protobuf:"bytes,4,opt,name=query_type,json=queryType,proto3" json:"query_type,omitempty"` - RequestData []byte `protobuf:"bytes,5,opt,name=request_data,json=requestData,proto3" json:"request_data,omitempty"` - CallbackModule string `protobuf:"bytes,13,opt,name=callback_module,json=callbackModule,proto3" json:"callback_module,omitempty"` - CallbackId string `protobuf:"bytes,8,opt,name=callback_id,json=callbackId,proto3" json:"callback_id,omitempty"` - CallbackData []byte `protobuf:"bytes,12,opt,name=callback_data,json=callbackData,proto3" json:"callback_data,omitempty"` - TimeoutPolicy TimeoutPolicy `protobuf:"varint,15,opt,name=timeout_policy,json=timeoutPolicy,proto3,enum=stride.interchainquery.v1.TimeoutPolicy" json:"timeout_policy,omitempty"` - TimeoutDuration time.Duration `protobuf:"bytes,14,opt,name=timeout_duration,json=timeoutDuration,proto3,stdduration" json:"timeout_duration"` - TimeoutTimestamp uint64 `protobuf:"varint,9,opt,name=timeout_timestamp,json=timeoutTimestamp,proto3" json:"timeout_timestamp,omitempty"` - RequestSent bool `protobuf:"varint,11,opt,name=request_sent,json=requestSent,proto3" json:"request_sent,omitempty"` - SubmissionHeight uint64 `protobuf:"varint,16,opt,name=submission_height,json=submissionHeight,proto3" json:"submission_height,omitempty"` -} - -func (m *Query) Reset() { *m = Query{} } -func (m *Query) String() string { return proto.CompactTextString(m) } -func (*Query) ProtoMessage() {} -func (*Query) Descriptor() ([]byte, []int) { - return fileDescriptor_74cd646eb05658fd, []int{0} -} -func (m *Query) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Query.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Query) XXX_Merge(src proto.Message) { - xxx_messageInfo_Query.Merge(m, src) -} -func (m *Query) XXX_Size() int { - return m.Size() -} -func (m *Query) XXX_DiscardUnknown() { - xxx_messageInfo_Query.DiscardUnknown(m) -} - -var xxx_messageInfo_Query proto.InternalMessageInfo - -func (m *Query) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Query) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -func (m *Query) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *Query) GetQueryType() string { - if m != nil { - return m.QueryType - } - return "" -} - -func (m *Query) GetRequestData() []byte { - if m != nil { - return m.RequestData - } - return nil -} - -func (m *Query) GetCallbackModule() string { - if m != nil { - return m.CallbackModule - } - return "" -} - -func (m *Query) GetCallbackId() string { - if m != nil { - return m.CallbackId - } - return "" -} - -func (m *Query) GetCallbackData() []byte { - if m != nil { - return m.CallbackData - } - return nil -} - -func (m *Query) GetTimeoutPolicy() TimeoutPolicy { - if m != nil { - return m.TimeoutPolicy - } - return TimeoutPolicy_REJECT_QUERY_RESPONSE -} - -func (m *Query) GetTimeoutDuration() time.Duration { - if m != nil { - return m.TimeoutDuration - } - return 0 -} - -func (m *Query) GetTimeoutTimestamp() uint64 { - if m != nil { - return m.TimeoutTimestamp - } - return 0 -} - -func (m *Query) GetRequestSent() bool { - if m != nil { - return m.RequestSent - } - return false -} - -func (m *Query) GetSubmissionHeight() uint64 { - if m != nil { - return m.SubmissionHeight - } - return 0 -} - -type DataPoint struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - RemoteHeight cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=remote_height,json=remoteHeight,proto3,customtype=cosmossdk.io/math.Int" json:"remote_height"` - LocalHeight cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=local_height,json=localHeight,proto3,customtype=cosmossdk.io/math.Int" json:"local_height"` - Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"result,omitempty"` -} - -func (m *DataPoint) Reset() { *m = DataPoint{} } -func (m *DataPoint) String() string { return proto.CompactTextString(m) } -func (*DataPoint) ProtoMessage() {} -func (*DataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_74cd646eb05658fd, []int{1} -} -func (m *DataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataPoint.Merge(m, src) -} -func (m *DataPoint) XXX_Size() int { - return m.Size() -} -func (m *DataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_DataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_DataPoint proto.InternalMessageInfo - -func (m *DataPoint) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *DataPoint) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -// GenesisState defines the epochs module's genesis state. -type GenesisState struct { - Queries []Query `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_74cd646eb05658fd, []int{2} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetQueries() []Query { - if m != nil { - return m.Queries - } - return nil -} - -func init() { - proto.RegisterEnum("stride.interchainquery.v1.TimeoutPolicy", TimeoutPolicy_name, TimeoutPolicy_value) - proto.RegisterType((*Query)(nil), "stride.interchainquery.v1.Query") - proto.RegisterType((*DataPoint)(nil), "stride.interchainquery.v1.DataPoint") - proto.RegisterType((*GenesisState)(nil), "stride.interchainquery.v1.GenesisState") -} - -func init() { - proto.RegisterFile("stride/interchainquery/v1/genesis.proto", fileDescriptor_74cd646eb05658fd) -} - -var fileDescriptor_74cd646eb05658fd = []byte{ - // 713 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xc1, 0x4e, 0xdb, 0x48, - 0x18, 0x8e, 0x43, 0x58, 0x92, 0x89, 0x13, 0xb2, 0xb3, 0xb0, 0xeb, 0x20, 0x6d, 0xe2, 0x65, 0x0f, - 0x58, 0xb0, 0xd8, 0x82, 0x3d, 0xf5, 0x56, 0x12, 0xac, 0x36, 0x2d, 0x85, 0xe0, 0x04, 0xa9, 0xf4, - 0x62, 0x4d, 0xec, 0x69, 0x32, 0xc2, 0xf6, 0x04, 0xcf, 0x98, 0x36, 0x6f, 0xd1, 0x63, 0x9f, 0xa0, - 0x4f, 0xd0, 0x87, 0xe0, 0x88, 0x7a, 0xaa, 0x7a, 0xa0, 0x15, 0x9c, 0xda, 0xa7, 0xa8, 0x3c, 0x13, - 0x07, 0x5a, 0xd4, 0x4a, 0x3d, 0xc1, 0xff, 0x7d, 0xdf, 0xff, 0xfd, 0xe3, 0xf9, 0xbf, 0x09, 0x58, - 0x63, 0x3c, 0x26, 0x3e, 0xb6, 0x48, 0xc4, 0x71, 0xec, 0x8d, 0x10, 0x89, 0x4e, 0x13, 0x1c, 0x4f, - 0xac, 0xb3, 0x2d, 0x6b, 0x88, 0x23, 0xcc, 0x08, 0x33, 0xc7, 0x31, 0xe5, 0x14, 0xd6, 0xa5, 0xd0, - 0xfc, 0x4e, 0x68, 0x9e, 0x6d, 0xad, 0x2c, 0x0d, 0xe9, 0x90, 0x0a, 0x95, 0x95, 0xfe, 0x27, 0x1b, - 0x56, 0x1a, 0x43, 0x4a, 0x87, 0x01, 0xb6, 0x44, 0x35, 0x48, 0x9e, 0x5b, 0x7e, 0x12, 0x23, 0x4e, - 0x68, 0x34, 0xe5, 0xeb, 0x1e, 0x65, 0x21, 0x65, 0xae, 0x6c, 0x94, 0x85, 0xa4, 0x56, 0xdf, 0x14, - 0xc0, 0xfc, 0x61, 0xea, 0x0e, 0xab, 0x20, 0x4f, 0x7c, 0x4d, 0xd1, 0x15, 0xa3, 0xe4, 0xe4, 0x89, - 0x0f, 0xff, 0x05, 0x15, 0x8f, 0x46, 0x11, 0xf6, 0x52, 0x23, 0x97, 0xf8, 0x5a, 0x5e, 0x50, 0xea, - 0x0d, 0xd8, 0xf1, 0x61, 0x1d, 0x14, 0xc5, 0x01, 0x53, 0x7e, 0x4e, 0xf0, 0x0b, 0xa2, 0xee, 0xf8, - 0xf0, 0x6f, 0x00, 0xc4, 0xb1, 0x5d, 0x3e, 0x19, 0x63, 0xad, 0x20, 0xc8, 0x92, 0x40, 0xfa, 0x93, - 0x31, 0x86, 0xff, 0x00, 0x35, 0xc6, 0xa7, 0x09, 0x66, 0xdc, 0xf5, 0x11, 0x47, 0xda, 0xbc, 0xae, - 0x18, 0xaa, 0x53, 0x9e, 0x62, 0xbb, 0x88, 0x23, 0xb8, 0x06, 0x16, 0x3d, 0x14, 0x04, 0x03, 0xe4, - 0x9d, 0xb8, 0x21, 0xf5, 0x93, 0x00, 0x6b, 0x15, 0x61, 0x53, 0xcd, 0xe0, 0x27, 0x02, 0x85, 0x4d, - 0x50, 0x9e, 0x09, 0x89, 0xaf, 0x15, 0x85, 0x08, 0x64, 0x50, 0x47, 0x7e, 0x4b, 0x26, 0x10, 0xd3, - 0x54, 0x31, 0x4d, 0xcd, 0x40, 0x31, 0xee, 0x00, 0x54, 0x39, 0x09, 0x31, 0x4d, 0xb8, 0x3b, 0xa6, - 0x01, 0xf1, 0x26, 0xda, 0xa2, 0xae, 0x18, 0xd5, 0x6d, 0xc3, 0xfc, 0xe1, 0x3e, 0xcc, 0xbe, 0x6c, - 0xe8, 0x0a, 0xbd, 0x53, 0xe1, 0xb7, 0x4b, 0xb8, 0x0f, 0x6a, 0x99, 0x61, 0xb6, 0x10, 0xad, 0xaa, - 0x2b, 0x46, 0x79, 0xbb, 0x6e, 0xca, 0x8d, 0x99, 0xd9, 0xc6, 0xcc, 0xdd, 0xa9, 0xa0, 0x55, 0x3c, - 0xbf, 0x6c, 0xe6, 0x5e, 0x7f, 0x6c, 0x2a, 0xce, 0xe2, 0xb4, 0x39, 0xa3, 0xe0, 0x06, 0xf8, 0x3d, - 0xf3, 0x4b, 0xff, 0x32, 0x8e, 0xc2, 0xb1, 0x56, 0xd2, 0x15, 0xa3, 0xe0, 0x64, 0x83, 0xfa, 0x19, - 0x7e, 0xfb, 0x7e, 0x19, 0x8e, 0xb8, 0x56, 0xd6, 0x15, 0xa3, 0x38, 0xbb, 0xdf, 0x1e, 0x8e, 0x78, - 0xea, 0xc7, 0x92, 0x41, 0x48, 0x18, 0x4b, 0x37, 0x3c, 0xc2, 0x64, 0x38, 0xe2, 0x5a, 0x4d, 0xfa, - 0xdd, 0x10, 0x0f, 0x05, 0xbe, 0xfa, 0x59, 0x01, 0xa5, 0xf4, 0x9a, 0xba, 0x94, 0x44, 0xfc, 0x4e, - 0x58, 0xba, 0xa0, 0x12, 0xe3, 0x90, 0x72, 0x9c, 0xd9, 0x88, 0xb0, 0xb4, 0x36, 0xd2, 0x8f, 0xf9, - 0x70, 0xd9, 0x5c, 0x96, 0x99, 0x63, 0xfe, 0x89, 0x49, 0xa8, 0x15, 0x22, 0x3e, 0x32, 0x3b, 0x11, - 0x7f, 0xf7, 0x76, 0x13, 0x4c, 0xc3, 0xd8, 0x89, 0xb8, 0xa3, 0x4a, 0x07, 0x39, 0x0f, 0xee, 0x03, - 0x35, 0xa0, 0x1e, 0x0a, 0x32, 0xc3, 0xb9, 0x5f, 0x37, 0x2c, 0x0b, 0x83, 0xa9, 0xdf, 0x3a, 0x98, - 0x3f, 0x43, 0x41, 0x22, 0x93, 0xa8, 0xb6, 0x96, 0xbe, 0x5c, 0x36, 0x6b, 0x31, 0x66, 0x49, 0xc0, - 0xff, 0xa3, 0x21, 0xe1, 0x38, 0x1c, 0xf3, 0x89, 0x23, 0x25, 0xab, 0x5d, 0xa0, 0x3e, 0x90, 0x2f, - 0xb2, 0xc7, 0x11, 0xc7, 0xf0, 0x3e, 0x58, 0x48, 0x37, 0x4e, 0x30, 0xd3, 0x14, 0x7d, 0xce, 0x28, - 0x6f, 0xeb, 0x3f, 0x89, 0x84, 0x78, 0x4d, 0xad, 0x42, 0x7a, 0x50, 0x27, 0x6b, 0x5b, 0x77, 0x41, - 0xe5, 0x9b, 0xa8, 0xc0, 0x3a, 0x58, 0x76, 0xec, 0x47, 0x76, 0xbb, 0xef, 0x1e, 0x1e, 0xd9, 0xce, - 0xb1, 0xeb, 0xd8, 0xbd, 0xee, 0xc1, 0x7e, 0xcf, 0xae, 0xe5, 0xe0, 0x5f, 0xe0, 0x0f, 0xc7, 0xee, - 0x3b, 0xc7, 0x33, 0xe6, 0xf0, 0xc8, 0xee, 0xf5, 0x6b, 0x0a, 0x5c, 0x01, 0x7f, 0xda, 0x4f, 0xed, - 0xf6, 0x51, 0xdf, 0x9e, 0x52, 0xed, 0x9d, 0xbd, 0xbd, 0xd6, 0x4e, 0xfb, 0x71, 0x2d, 0xdf, 0xea, - 0x9d, 0x5f, 0x35, 0x94, 0x8b, 0xab, 0x86, 0xf2, 0xe9, 0xaa, 0xa1, 0xbc, 0xba, 0x6e, 0xe4, 0x2e, - 0xae, 0x1b, 0xb9, 0xf7, 0xd7, 0x8d, 0xdc, 0xb3, 0x7b, 0x43, 0xc2, 0x47, 0xc9, 0xc0, 0xf4, 0x68, - 0x68, 0x85, 0x24, 0x38, 0x99, 0xbc, 0x40, 0x93, 0xcd, 0x00, 0x0d, 0xd8, 0xac, 0xb2, 0x5e, 0xde, - 0xf9, 0x4d, 0x4a, 0xdf, 0x2c, 0x1b, 0xfc, 0x26, 0xe2, 0xf9, 0xff, 0xd7, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xaa, 0xa0, 0xd6, 0xde, 0xba, 0x04, 0x00, 0x00, -} - -func (m *Query) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Query) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Query) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SubmissionHeight != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.SubmissionHeight)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if m.TimeoutPolicy != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.TimeoutPolicy)) - i-- - dAtA[i] = 0x78 - } - n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.TimeoutDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TimeoutDuration):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintGenesis(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x72 - if len(m.CallbackModule) > 0 { - i -= len(m.CallbackModule) - copy(dAtA[i:], m.CallbackModule) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.CallbackModule))) - i-- - dAtA[i] = 0x6a - } - if len(m.CallbackData) > 0 { - i -= len(m.CallbackData) - copy(dAtA[i:], m.CallbackData) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.CallbackData))) - i-- - dAtA[i] = 0x62 - } - if m.RequestSent { - i-- - if m.RequestSent { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.TimeoutTimestamp != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.TimeoutTimestamp)) - i-- - dAtA[i] = 0x48 - } - if len(m.CallbackId) > 0 { - i -= len(m.CallbackId) - copy(dAtA[i:], m.CallbackId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.CallbackId))) - i-- - dAtA[i] = 0x42 - } - if len(m.RequestData) > 0 { - i -= len(m.RequestData) - copy(dAtA[i:], m.RequestData) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.RequestData))) - i-- - dAtA[i] = 0x2a - } - if len(m.QueryType) > 0 { - i -= len(m.QueryType) - copy(dAtA[i:], m.QueryType) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.QueryType))) - i-- - dAtA[i] = 0x22 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x1a - } - if len(m.ConnectionId) > 0 { - i -= len(m.ConnectionId) - copy(dAtA[i:], m.ConnectionId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.ConnectionId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x22 - } - { - size := m.LocalHeight.Size() - i -= size - if _, err := m.LocalHeight.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size := m.RemoteHeight.Size() - i -= size - if _, err := m.RemoteHeight.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Queries) > 0 { - for iNdEx := len(m.Queries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Queries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Query) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.ConnectionId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.QueryType) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.RequestData) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.CallbackId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.TimeoutTimestamp != 0 { - n += 1 + sovGenesis(uint64(m.TimeoutTimestamp)) - } - if m.RequestSent { - n += 2 - } - l = len(m.CallbackData) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.CallbackModule) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.TimeoutDuration) - n += 1 + l + sovGenesis(uint64(l)) - if m.TimeoutPolicy != 0 { - n += 1 + sovGenesis(uint64(m.TimeoutPolicy)) - } - if m.SubmissionHeight != 0 { - n += 2 + sovGenesis(uint64(m.SubmissionHeight)) - } - return n -} - -func (m *DataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = m.RemoteHeight.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = m.LocalHeight.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} - -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Queries) > 0 { - for _, e := range m.Queries { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Query) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Query: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Query: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueryType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestData = append(m.RequestData[:0], dAtA[iNdEx:postIndex]...) - if m.RequestData == nil { - m.RequestData = []byte{} - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutTimestamp", wireType) - } - m.TimeoutTimestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeoutTimestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestSent", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RequestSent = bool(v != 0) - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackData", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackData = append(m.CallbackData[:0], dAtA[iNdEx:postIndex]...) - if m.CallbackData == nil { - m.CallbackData = []byte{} - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CallbackModule", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CallbackModule = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.TimeoutDuration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutPolicy", wireType) - } - m.TimeoutPolicy = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeoutPolicy |= TimeoutPolicy(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SubmissionHeight", wireType) - } - m.SubmissionHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SubmissionHeight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RemoteHeight", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RemoteHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalHeight", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LocalHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Queries = append(m.Queries, Query{}) - if err := m.Queries[len(m.Queries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/interchainquery/types/keys.go b/x/interchainquery/types/keys.go deleted file mode 100644 index 0569dafd8..000000000 --- a/x/interchainquery/types/keys.go +++ /dev/null @@ -1,64 +0,0 @@ -package types - -import "fmt" - -const ( - // ModuleName defines the module name - ModuleName = "interchainquery" - - // StoreKey defines the primary module store key - StoreKey = ModuleName - - // RouterKey is the message route for slashing - RouterKey = ModuleName - - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName -) - -// prefix bytes for the interchainquery persistent store -const ( - prefixData = iota + 1 - prefixQuery = iota + 1 - prefixQueryCounter = iota + 1 -) - -// keys for proof queries to various stores, note: there's an implicit assumption here that -// the stores on the counterparty chain are prefixed with the standard cosmos-sdk module names -// this might not be true for all IBC chains, and is something we should verify before onboarding a -// new chain - -const ( - // The staking store is key'd by the validator's address - STAKING_STORE_QUERY_WITH_PROOF = "store/mstaking/key" - // The bank store is key'd by the account address - BANK_STORE_QUERY_WITH_PROOF = "store/move/key" - // The Osmosis twap store - key'd by the pool ID and denom's - TWAP_STORE_QUERY_WITH_PROOF = "store/twap/key" // XXX -) - -var ( - // Osmosis TWAP query info - OsmosisKeySeparator = "|" - OsmosisMostRecentTWAPsPrefix = "recent_twap" + OsmosisKeySeparator -) - -var ( - KeyPrefixData = []byte{prefixData} - KeyPrefixQuery = []byte{prefixQuery} - KeyQueryCounter = []byte{prefixQueryCounter} -) - -func KeyPrefix(p string) []byte { - return []byte(p) -} - -func FormatOsmosisMostRecentTWAPKey(poolId uint64, denom1, denom2 string) []byte { - // Sort denoms - if denom1 > denom2 { - denom1, denom2 = denom2, denom1 - } - - poolIdBz := fmt.Sprintf("%0.20d", poolId) - return []byte(fmt.Sprintf("%s%s%s%s%s%s", OsmosisMostRecentTWAPsPrefix, poolIdBz, OsmosisKeySeparator, denom1, OsmosisKeySeparator, denom2)) -} diff --git a/x/interchainquery/types/messages.pb.go b/x/interchainquery/types/messages.pb.go deleted file mode 100644 index 18052b9dd..000000000 --- a/x/interchainquery/types/messages.pb.go +++ /dev/null @@ -1,764 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/interchainquery/v1/messages.proto - -package types - -import ( - context "context" - fmt "fmt" - crypto "github.com/cometbft/cometbft/proto/tendermint/crypto" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgSubmitQueryResponse represents a message type to fulfil a query request. -type MsgSubmitQueryResponse struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"` - QueryId string `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty" yaml:"query_id"` - Result []byte `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty" yaml:"result"` - ProofOps *crypto.ProofOps `protobuf:"bytes,4,opt,name=proof_ops,json=proofOps,proto3" json:"proof_ops,omitempty" yaml:"proof_ops"` - Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty" yaml:"height"` - FromAddress string `protobuf:"bytes,6,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` -} - -func (m *MsgSubmitQueryResponse) Reset() { *m = MsgSubmitQueryResponse{} } -func (m *MsgSubmitQueryResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitQueryResponse) ProtoMessage() {} -func (*MsgSubmitQueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25adad4f8ed32400, []int{0} -} -func (m *MsgSubmitQueryResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitQueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitQueryResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSubmitQueryResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitQueryResponse.Merge(m, src) -} -func (m *MsgSubmitQueryResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitQueryResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitQueryResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitQueryResponse proto.InternalMessageInfo - -// MsgSubmitQueryResponseResponse defines the MsgSubmitQueryResponse response -// type. -type MsgSubmitQueryResponseResponse struct { -} - -func (m *MsgSubmitQueryResponseResponse) Reset() { *m = MsgSubmitQueryResponseResponse{} } -func (m *MsgSubmitQueryResponseResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSubmitQueryResponseResponse) ProtoMessage() {} -func (*MsgSubmitQueryResponseResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25adad4f8ed32400, []int{1} -} -func (m *MsgSubmitQueryResponseResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSubmitQueryResponseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSubmitQueryResponseResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSubmitQueryResponseResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSubmitQueryResponseResponse.Merge(m, src) -} -func (m *MsgSubmitQueryResponseResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSubmitQueryResponseResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSubmitQueryResponseResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSubmitQueryResponseResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgSubmitQueryResponse)(nil), "stride.interchainquery.v1.MsgSubmitQueryResponse") - proto.RegisterType((*MsgSubmitQueryResponseResponse)(nil), "stride.interchainquery.v1.MsgSubmitQueryResponseResponse") -} - -func init() { - proto.RegisterFile("stride/interchainquery/v1/messages.proto", fileDescriptor_25adad4f8ed32400) -} - -var fileDescriptor_25adad4f8ed32400 = []byte{ - // 558 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x73, 0x0d, 0x4d, 0x5b, 0xb7, 0x08, 0xea, 0x46, 0xe0, 0x06, 0xb0, 0x23, 0x2f, 0x84, - 0x88, 0xfa, 0x94, 0x30, 0x35, 0x4c, 0x64, 0xeb, 0x50, 0xa0, 0xce, 0xc6, 0x12, 0x39, 0xf1, 0xf5, - 0x72, 0x22, 0xf6, 0x99, 0xbb, 0x4b, 0xa8, 0x37, 0xd4, 0x09, 0x31, 0x21, 0xb1, 0x30, 0xe6, 0x13, - 0xa0, 0x0c, 0x48, 0x7c, 0x03, 0xc4, 0x58, 0xc1, 0xc2, 0x14, 0xa1, 0x04, 0x29, 0xcc, 0xf9, 0x04, - 0xc8, 0x77, 0x4e, 0x80, 0x36, 0x0c, 0x5d, 0x92, 0xbb, 0xf7, 0xff, 0xbd, 0xf7, 0xee, 0xef, 0xf7, - 0xb4, 0x12, 0x17, 0x8c, 0xf8, 0x08, 0x92, 0x50, 0x20, 0xd6, 0xee, 0x78, 0x24, 0x7c, 0xd1, 0x43, - 0x2c, 0x86, 0xfd, 0x0a, 0x0c, 0x10, 0xe7, 0x1e, 0x46, 0xdc, 0x89, 0x18, 0x15, 0x54, 0xdf, 0x55, - 0xa4, 0x73, 0x8e, 0x74, 0xfa, 0x95, 0x42, 0x1e, 0x53, 0x4c, 0x25, 0x05, 0x93, 0x93, 0x4a, 0x28, - 0xec, 0xb6, 0x29, 0x0f, 0x28, 0x6f, 0x2a, 0x41, 0x5d, 0x52, 0xe9, 0xa6, 0xba, 0xc1, 0x80, 0x63, - 0xd9, 0x89, 0xe3, 0x54, 0xb8, 0x8d, 0x29, 0xc5, 0x5d, 0x04, 0xbd, 0x88, 0x40, 0x2f, 0x0c, 0xa9, - 0xf0, 0x04, 0xa1, 0xe1, 0x3c, 0xed, 0x8e, 0x40, 0xa1, 0x8f, 0x58, 0x40, 0x42, 0x01, 0xdb, 0x2c, - 0x8e, 0x04, 0x85, 0x11, 0xa3, 0xf4, 0x38, 0x95, 0xb7, 0xbd, 0x80, 0x84, 0x14, 0xca, 0x5f, 0x15, - 0xb2, 0x3f, 0x64, 0xb5, 0x1b, 0x87, 0x1c, 0x37, 0x7a, 0xad, 0x80, 0x88, 0xa3, 0xe4, 0xbd, 0x2e, - 0xe2, 0x11, 0x0d, 0x39, 0xd2, 0x1d, 0x6d, 0x5d, 0xba, 0x68, 0x12, 0xdf, 0x00, 0x45, 0x50, 0xda, - 0xa8, 0xef, 0xcc, 0x46, 0xd6, 0xb5, 0xd8, 0x0b, 0xba, 0x35, 0x7b, 0xae, 0xd8, 0xee, 0x9a, 0x3c, - 0x1e, 0xf8, 0x09, 0x2f, 0x0d, 0x27, 0xfc, 0xca, 0x79, 0x7e, 0xae, 0xd8, 0xee, 0x9a, 0x3c, 0x1e, - 0xf8, 0xfa, 0x3d, 0x2d, 0xc7, 0x10, 0xef, 0x75, 0x85, 0x91, 0x2d, 0x82, 0xd2, 0x56, 0x7d, 0x7b, - 0x36, 0xb2, 0xae, 0x2a, 0x5a, 0xc5, 0x6d, 0x37, 0x05, 0xf4, 0xc7, 0xda, 0x86, 0xf4, 0xd1, 0xa4, - 0x11, 0x37, 0xae, 0x14, 0x41, 0x69, 0xb3, 0x7a, 0xcb, 0xf9, 0xe3, 0xd5, 0x51, 0x5e, 0x9d, 0xa7, - 0x09, 0xf3, 0x24, 0xe2, 0xf5, 0xfc, 0x6c, 0x64, 0x5d, 0x57, 0xa5, 0x16, 0x79, 0xb6, 0xbb, 0x1e, - 0xa5, 0x7a, 0xd2, 0xba, 0x83, 0x08, 0xee, 0x08, 0x63, 0xb5, 0x08, 0x4a, 0xd9, 0xbf, 0x5b, 0xab, - 0xb8, 0xed, 0xa6, 0x80, 0xfe, 0x50, 0xdb, 0x3a, 0x66, 0x34, 0x68, 0x7a, 0xbe, 0xcf, 0x10, 0xe7, - 0x46, 0x4e, 0x3a, 0x33, 0xbe, 0x7e, 0xdc, 0xcb, 0xa7, 0x13, 0x7b, 0xa4, 0x94, 0x86, 0x60, 0x24, - 0xc4, 0xee, 0x66, 0x42, 0xa7, 0xa1, 0xda, 0xd1, 0xeb, 0x81, 0x95, 0x79, 0x3f, 0xb0, 0xc0, 0xaf, - 0x81, 0x95, 0x39, 0x9d, 0x0e, 0xcb, 0xff, 0xd4, 0x7a, 0x33, 0x1d, 0x96, 0x61, 0xba, 0x5e, 0x27, - 0x17, 0x16, 0x6c, 0xf9, 0x54, 0xec, 0xa2, 0x66, 0x2e, 0x57, 0xe6, 0xff, 0xd5, 0xcf, 0x40, 0xcb, - 0x1e, 0x72, 0xac, 0x7f, 0x02, 0xda, 0xce, 0xb2, 0xb9, 0x56, 0x9c, 0xff, 0x2e, 0xaa, 0xb3, 0xbc, - 0x74, 0x61, 0xff, 0xd2, 0x29, 0x8b, 0xf7, 0x56, 0x4f, 0xbf, 0xfd, 0x7c, 0xb7, 0x72, 0xbf, 0x06, - 0xca, 0xf6, 0xdd, 0x0b, 0x1e, 0xc5, 0x09, 0xec, 0x57, 0x5a, 0x48, 0x78, 0x15, 0xc8, 0x65, 0x0d, - 0x19, 0x2e, 0xac, 0xbe, 0x9a, 0x0e, 0xcb, 0xa0, 0xde, 0xf8, 0x32, 0x36, 0xc1, 0xd9, 0xd8, 0x04, - 0x3f, 0xc6, 0x26, 0x78, 0x3b, 0x31, 0x33, 0x67, 0x13, 0x33, 0xf3, 0x7d, 0x62, 0x66, 0x9e, 0xed, - 0x63, 0x22, 0x3a, 0xbd, 0x96, 0xd3, 0xa6, 0x01, 0x0c, 0x48, 0xf7, 0x79, 0xfc, 0xd2, 0x8b, 0xf7, - 0xba, 0x5e, 0x8b, 0x2f, 0x6e, 0x4b, 0x3e, 0xa8, 0x88, 0x23, 0xc4, 0x5b, 0x39, 0xb9, 0xf7, 0x0f, - 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xc3, 0x21, 0x0a, 0xd8, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - // SubmitQueryResponse defines a method for submit query responses. - SubmitQueryResponse(ctx context.Context, in *MsgSubmitQueryResponse, opts ...grpc.CallOption) (*MsgSubmitQueryResponseResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) SubmitQueryResponse(ctx context.Context, in *MsgSubmitQueryResponse, opts ...grpc.CallOption) (*MsgSubmitQueryResponseResponse, error) { - out := new(MsgSubmitQueryResponseResponse) - err := c.cc.Invoke(ctx, "/stride.interchainquery.v1.Msg/SubmitQueryResponse", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // SubmitQueryResponse defines a method for submit query responses. - SubmitQueryResponse(context.Context, *MsgSubmitQueryResponse) (*MsgSubmitQueryResponseResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) SubmitQueryResponse(ctx context.Context, req *MsgSubmitQueryResponse) (*MsgSubmitQueryResponseResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SubmitQueryResponse not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_SubmitQueryResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSubmitQueryResponse) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SubmitQueryResponse(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.interchainquery.v1.Msg/SubmitQueryResponse", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SubmitQueryResponse(ctx, req.(*MsgSubmitQueryResponse)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "stride.interchainquery.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SubmitQueryResponse", - Handler: _Msg_SubmitQueryResponse_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/interchainquery/v1/messages.proto", -} - -func (m *MsgSubmitQueryResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSubmitQueryResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitQueryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FromAddress) > 0 { - i -= len(m.FromAddress) - copy(dAtA[i:], m.FromAddress) - i = encodeVarintMessages(dAtA, i, uint64(len(m.FromAddress))) - i-- - dAtA[i] = 0x32 - } - if m.Height != 0 { - i = encodeVarintMessages(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x28 - } - if m.ProofOps != nil { - { - size, err := m.ProofOps.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMessages(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Result) > 0 { - i -= len(m.Result) - copy(dAtA[i:], m.Result) - i = encodeVarintMessages(dAtA, i, uint64(len(m.Result))) - i-- - dAtA[i] = 0x1a - } - if len(m.QueryId) > 0 { - i -= len(m.QueryId) - copy(dAtA[i:], m.QueryId) - i = encodeVarintMessages(dAtA, i, uint64(len(m.QueryId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintMessages(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSubmitQueryResponseResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSubmitQueryResponseResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSubmitQueryResponseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintMessages(dAtA []byte, offset int, v uint64) int { - offset -= sovMessages(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgSubmitQueryResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - l = len(m.QueryId) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - l = len(m.Result) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - if m.ProofOps != nil { - l = m.ProofOps.Size() - n += 1 + l + sovMessages(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovMessages(uint64(m.Height)) - } - l = len(m.FromAddress) - if l > 0 { - n += 1 + l + sovMessages(uint64(l)) - } - return n -} - -func (m *MsgSubmitQueryResponseResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovMessages(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMessages(x uint64) (n int) { - return sovMessages(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgSubmitQueryResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitQueryResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitQueryResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessages - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessages - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueryId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMessages - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Result = append(m.Result[:0], dAtA[iNdEx:postIndex]...) - if m.Result == nil { - m.Result = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProofOps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMessages - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ProofOps == nil { - m.ProofOps = &crypto.ProofOps{} - } - if err := m.ProofOps.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessages - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessages - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FromAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMessages(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMessages - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSubmitQueryResponseResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessages - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSubmitQueryResponseResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSubmitQueryResponseResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipMessages(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMessages - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMessages(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMessages - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMessages - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMessages - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMessages - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMessages - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMessages - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/interchainquery/types/messages.pb.gw.go b/x/interchainquery/types/messages.pb.gw.go deleted file mode 100644 index e883c2bd9..000000000 --- a/x/interchainquery/types/messages.pb.gw.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: stride/interchainquery/v1/messages.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Msg_SubmitQueryResponse_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgSubmitQueryResponse - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.SubmitQueryResponse(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Msg_SubmitQueryResponse_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgSubmitQueryResponse - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.SubmitQueryResponse(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". -// UnaryRPC :call MsgServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. -func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { - - mux.Handle("POST", pattern_Msg_SubmitQueryResponse_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Msg_SubmitQueryResponse_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_SubmitQueryResponse_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterMsgHandler(ctx, mux, conn) -} - -// RegisterMsgHandler registers the http handlers for service Msg to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) -} - -// RegisterMsgHandlerClient registers the http handlers for service Msg -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "MsgClient" to call the correct interceptors. -func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { - - mux.Handle("POST", pattern_Msg_SubmitQueryResponse_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Msg_SubmitQueryResponse_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Msg_SubmitQueryResponse_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Msg_SubmitQueryResponse_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"interchainquery", "tx", "v1beta1", "submitquery"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Msg_SubmitQueryResponse_0 = runtime.ForwardResponseMessage -) diff --git a/x/interchainquery/types/msgs.go b/x/interchainquery/types/msgs.go deleted file mode 100644 index 055a7c71b..000000000 --- a/x/interchainquery/types/msgs.go +++ /dev/null @@ -1,46 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -// interchainquery message types -const ( - TypeMsgSubmitQueryResponse = "submitqueryresponse" -) - -var _ sdk.Msg = &MsgSubmitQueryResponse{} - -// Route Implements Msg. -func (msg MsgSubmitQueryResponse) Route() string { return RouterKey } - -// Type Implements Msg. -func (msg MsgSubmitQueryResponse) Type() string { return TypeMsgSubmitQueryResponse } - -// ValidateBasic Implements Msg. -func (msg MsgSubmitQueryResponse) ValidateBasic() error { - // check from address - _, err := sdk.AccAddressFromBech32(msg.FromAddress) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid fromAddress in ICQ response (%s)", err) - } - // check chain_id is not empty - if msg.ChainId == "" { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "chain_id cannot be empty in ICQ response") - } - - return nil -} - -// GetSignBytes Implements Msg. -func (msg MsgSubmitQueryResponse) GetSignBytes() []byte { - return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) -} - -// GetSigners Implements Msg. -func (msg MsgSubmitQueryResponse) GetSigners() []sdk.AccAddress { - fromAddress, _ := sdk.AccAddressFromBech32(msg.FromAddress) - return []sdk.AccAddress{fromAddress} -} diff --git a/x/interchainquery/types/query.go b/x/interchainquery/types/query.go deleted file mode 100644 index eb9e49b80..000000000 --- a/x/interchainquery/types/query.go +++ /dev/null @@ -1,18 +0,0 @@ -package types - -import ( - fmt "fmt" - time "time" -) - -// Check if a query has timed-out by checking whether the block time is after -// the timeout timestamp -func (q Query) HasTimedOut(currentBlockTime time.Time) bool { - return q.TimeoutTimestamp < uint64(currentBlockTime.UnixNano()) -} - -// Prints an abbreviated query description for logging purposes -func (q Query) Description() string { - return fmt.Sprintf("QueryId: %s, QueryType: %s, ConnectionId: %s, QueryRequest: %v", - q.Id, q.QueryType, q.ConnectionId, q.RequestData) -} diff --git a/x/interchainquery/types/query.pb.go b/x/interchainquery/types/query.pb.go deleted file mode 100644 index fb13ee8fc..000000000 --- a/x/interchainquery/types/query.pb.go +++ /dev/null @@ -1,544 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/interchainquery/v1/query.proto - -package types - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type QueryPendingQueriesRequest struct { -} - -func (m *QueryPendingQueriesRequest) Reset() { *m = QueryPendingQueriesRequest{} } -func (m *QueryPendingQueriesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryPendingQueriesRequest) ProtoMessage() {} -func (*QueryPendingQueriesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b720c147b9144d5b, []int{0} -} -func (m *QueryPendingQueriesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryPendingQueriesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryPendingQueriesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryPendingQueriesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPendingQueriesRequest.Merge(m, src) -} -func (m *QueryPendingQueriesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryPendingQueriesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPendingQueriesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryPendingQueriesRequest proto.InternalMessageInfo - -type QueryPendingQueriesResponse struct { - PendingQueries []Query `protobuf:"bytes,1,rep,name=pending_queries,json=pendingQueries,proto3" json:"pending_queries"` -} - -func (m *QueryPendingQueriesResponse) Reset() { *m = QueryPendingQueriesResponse{} } -func (m *QueryPendingQueriesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryPendingQueriesResponse) ProtoMessage() {} -func (*QueryPendingQueriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b720c147b9144d5b, []int{1} -} -func (m *QueryPendingQueriesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryPendingQueriesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryPendingQueriesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryPendingQueriesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPendingQueriesResponse.Merge(m, src) -} -func (m *QueryPendingQueriesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryPendingQueriesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPendingQueriesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryPendingQueriesResponse proto.InternalMessageInfo - -func (m *QueryPendingQueriesResponse) GetPendingQueries() []Query { - if m != nil { - return m.PendingQueries - } - return nil -} - -func init() { - proto.RegisterType((*QueryPendingQueriesRequest)(nil), "stride.interchainquery.v1.QueryPendingQueriesRequest") - proto.RegisterType((*QueryPendingQueriesResponse)(nil), "stride.interchainquery.v1.QueryPendingQueriesResponse") -} - -func init() { - proto.RegisterFile("stride/interchainquery/v1/query.proto", fileDescriptor_b720c147b9144d5b) -} - -var fileDescriptor_b720c147b9144d5b = []byte{ - // 324 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2d, 0x2e, 0x29, 0xca, - 0x4c, 0x49, 0xd5, 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0x4a, 0xce, 0x48, 0xcc, 0xcc, 0x2b, 0x2c, 0x4d, - 0x2d, 0xaa, 0xd4, 0x2f, 0x33, 0xd4, 0x07, 0x33, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x24, - 0x21, 0xca, 0xf4, 0xd0, 0x94, 0xe9, 0x95, 0x19, 0x4a, 0xa9, 0xe3, 0x36, 0x21, 0x3d, 0x35, 0x2f, - 0xb5, 0x38, 0xb3, 0x18, 0x62, 0x86, 0x94, 0x4c, 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x7e, 0x62, - 0x41, 0xa6, 0x7e, 0x62, 0x5e, 0x5e, 0x7e, 0x49, 0x62, 0x49, 0x66, 0x7e, 0x1e, 0x4c, 0x56, 0x24, - 0x3d, 0x3f, 0x3d, 0x1f, 0xcc, 0xd4, 0x07, 0xb1, 0x20, 0xa2, 0x4a, 0x32, 0x5c, 0x52, 0x81, 0x20, - 0xd3, 0x02, 0x52, 0xf3, 0x52, 0x32, 0xf3, 0xd2, 0x41, 0xec, 0xcc, 0xd4, 0xe2, 0xa0, 0xd4, 0xc2, - 0xd2, 0xd4, 0xe2, 0x12, 0xa5, 0x3c, 0x2e, 0x69, 0xac, 0xb2, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, - 0x42, 0xfe, 0x5c, 0xfc, 0x05, 0x10, 0x99, 0xf8, 0x42, 0x88, 0x94, 0x04, 0xa3, 0x02, 0xb3, 0x06, - 0xb7, 0x91, 0x82, 0x1e, 0x4e, 0xef, 0xe8, 0x81, 0x0d, 0x74, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, - 0x88, 0xaf, 0x00, 0xc5, 0x60, 0xa3, 0xb3, 0x8c, 0x5c, 0x3c, 0x60, 0xf9, 0xe0, 0xd4, 0xa2, 0xb2, - 0xcc, 0xe4, 0x54, 0xa1, 0x3d, 0x8c, 0x5c, 0x7c, 0xa8, 0x96, 0x0b, 0x99, 0x12, 0x32, 0x1b, 0xab, - 0x57, 0xa4, 0xcc, 0x48, 0xd5, 0x06, 0xf1, 0xa3, 0x92, 0x75, 0xd3, 0xe5, 0x27, 0x93, 0x99, 0x4c, - 0x85, 0x8c, 0xf5, 0x83, 0xc1, 0xfa, 0x75, 0x7d, 0x12, 0x93, 0x8a, 0xf5, 0x71, 0x44, 0x09, 0x5a, - 0x68, 0x38, 0x05, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, - 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x65, 0x7a, - 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x6e, 0x66, 0x4e, 0x76, 0x65, 0x79, - 0x62, 0xa5, 0x6e, 0x0e, 0xc8, 0x68, 0x18, 0x4f, 0xbf, 0x02, 0xc3, 0xf8, 0x92, 0xca, 0x82, 0xd4, - 0xe2, 0x24, 0x36, 0x70, 0xcc, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x31, 0x61, 0x5f, 0xa9, - 0x5a, 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryServiceClient is the client API for QueryService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryServiceClient interface { - PendingQueries(ctx context.Context, in *QueryPendingQueriesRequest, opts ...grpc.CallOption) (*QueryPendingQueriesResponse, error) -} - -type queryServiceClient struct { - cc grpc1.ClientConn -} - -func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient { - return &queryServiceClient{cc} -} - -func (c *queryServiceClient) PendingQueries(ctx context.Context, in *QueryPendingQueriesRequest, opts ...grpc.CallOption) (*QueryPendingQueriesResponse, error) { - out := new(QueryPendingQueriesResponse) - err := c.cc.Invoke(ctx, "/stride.interchainquery.v1.QueryService/PendingQueries", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServiceServer is the server API for QueryService service. -type QueryServiceServer interface { - PendingQueries(context.Context, *QueryPendingQueriesRequest) (*QueryPendingQueriesResponse, error) -} - -// UnimplementedQueryServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServiceServer struct { -} - -func (*UnimplementedQueryServiceServer) PendingQueries(ctx context.Context, req *QueryPendingQueriesRequest) (*QueryPendingQueriesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PendingQueries not implemented") -} - -func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer) { - s.RegisterService(&_QueryService_serviceDesc, srv) -} - -func _QueryService_PendingQueries_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryPendingQueriesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServiceServer).PendingQueries(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.interchainquery.v1.QueryService/PendingQueries", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServiceServer).PendingQueries(ctx, req.(*QueryPendingQueriesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _QueryService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "stride.interchainquery.v1.QueryService", - HandlerType: (*QueryServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PendingQueries", - Handler: _QueryService_PendingQueries_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/interchainquery/v1/query.proto", -} - -func (m *QueryPendingQueriesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryPendingQueriesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryPendingQueriesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryPendingQueriesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryPendingQueriesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryPendingQueriesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PendingQueries) > 0 { - for iNdEx := len(m.PendingQueries) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PendingQueries[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryPendingQueriesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryPendingQueriesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.PendingQueries) > 0 { - for _, e := range m.PendingQueries { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryPendingQueriesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryPendingQueriesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPendingQueriesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryPendingQueriesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryPendingQueriesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPendingQueriesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PendingQueries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PendingQueries = append(m.PendingQueries, Query{}) - if err := m.PendingQueries[len(m.PendingQueries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/interchainquery/types/query.pb.gw.go b/x/interchainquery/types/query.pb.gw.go deleted file mode 100644 index aaf3eb83c..000000000 --- a/x/interchainquery/types/query.pb.gw.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: stride/interchainquery/v1/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_QueryService_PendingQueries_0(ctx context.Context, marshaler runtime.Marshaler, client QueryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryPendingQueriesRequest - var metadata runtime.ServerMetadata - - msg, err := client.PendingQueries(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_QueryService_PendingQueries_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryPendingQueriesRequest - var metadata runtime.ServerMetadata - - msg, err := server.PendingQueries(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". -// UnaryRPC :call QueryServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryServiceHandlerFromEndpoint instead. -func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error { - - mux.Handle("GET", pattern_QueryService_PendingQueries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_QueryService_PendingQueries_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_QueryService_PendingQueries_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryServiceHandler(ctx, mux, conn) -} - -// RegisterQueryServiceHandler registers the http handlers for service QueryService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryServiceHandlerClient(ctx, mux, NewQueryServiceClient(conn)) -} - -// RegisterQueryServiceHandlerClient registers the http handlers for service QueryService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryServiceClient" to call the correct interceptors. -func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error { - - mux.Handle("GET", pattern_QueryService_PendingQueries_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_QueryService_PendingQueries_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_QueryService_PendingQueries_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_QueryService_PendingQueries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "interchainquery", "pending_queries"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_QueryService_PendingQueries_0 = runtime.ForwardResponseMessage -) diff --git a/x/records/README.md b/x/records/README.md deleted file mode 100644 index 3bcc8669f..000000000 --- a/x/records/README.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: "Records" -excerpt: "" -category: 6392913957c533007128548e ---- - -# The Records Module - -The records module handles record keeping and accounting for the Stride blockchain. - -It is [IBC middleware](https://ibc.cosmos.network/main/ibc/middleware/develop.html). IBC middleware wraps core IBC modules and other middlewares. Specifically, the records module adds a middleware stack to `app.go` with the following structure: `records -> transfer`. All ibc packets routed to the `transfer` module will first pass through `records`, where we can apply custom logic (record keeping) before passing messages to the underlying `transfer` module. - -Note: - -- The middleware stack is added in `app.go` -- The custom handler logic is added in `ibc_module.go` by implementing the IBCModule interface - -## Keeper functions - -Deposit Records - -- `GetDepositRecordCount()` -- `SetDepositRecordCount()` -- `AppendDepositRecord()` -- `SetDepositRecord()` -- `GetDepositRecord()` -- `RemoveDepositRecord()` -- `GetAllDepositRecord()` -- `GetTransferDepositRecordByEpochAndChain()` - -Epoch Unbonding Records - -- `SetEpochUnbondingRecord()` -- `GetEpochUnbondingRecord()` -- `RemoveEpochUnbondingRecord()` -- `GetAllEpochUnbondingRecord()` -- `GetAllPreviousEpochUnbondingRecords()` -- `GetHostZoneUnbondingByChainId()` -- `AddHostZoneToEpochUnbondingRecord()` -- `SetHostZoneUnbondingStatus()` - -User Redemption Records - -- `SetUserRedemptionRecord()` -- `GetUserRedemptionRecord()` -- `RemoveUserRedemptionRecord()` -- `GetAllUserRedemptionRecord()` -- `IterateUserRedemptionRecords()` - -## State - -Callbacks - -- `TransferCallback` - -Genesis - -- `UserRedemptionRecord` -- `Params` -- `RecordsPacketData` -- `NoData` -- `DepositRecord` -- `HostZoneUnbonding` -- `EpochUnbondingRecord` -- `GenesisState` - -## Queries - -- `Params` -- `GetDepositRecord` -- `AllDepositRecord` -- `GetUserRedemptionRecord` -- `AllUserRedemptionRecord` -- `AllUserRedemptionRecordForUser` -- `GetEpochUnbondingRecord` -- `AllEpochUnbondingRecord` - -## Events - -The `records` module emits does not currently emit any events. diff --git a/x/records/client/cli/query.go b/x/records/client/cli/query.go deleted file mode 100644 index fa1f154d1..000000000 --- a/x/records/client/cli/query.go +++ /dev/null @@ -1,39 +0,0 @@ -package cli - -import ( - "fmt" - // "strings" - - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" - // sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(queryRoute string) *cobra.Command { - // Group records queries under a subcommand - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand(CmdQueryParams()) - cmd.AddCommand(CmdListUserRedemptionRecord()) - cmd.AddCommand(CmdShowUserRedemptionRecord()) - cmd.AddCommand(CmdListEpochUnbondingRecord()) - cmd.AddCommand(CmdShowEpochUnbondingRecord()) - cmd.AddCommand(CmdListDepositRecord()) - cmd.AddCommand(CmdShowDepositRecord()) - cmd.AddCommand(CmdListDepositRecordByHost()) - cmd.AddCommand(CmdLSMDeposit()) - cmd.AddCommand(CmdLSMDeposits()) - - return cmd -} diff --git a/x/records/client/cli/query_deposit_record.go b/x/records/client/cli/query_deposit_record.go deleted file mode 100644 index b229a06dc..000000000 --- a/x/records/client/cli/query_deposit_record.go +++ /dev/null @@ -1,105 +0,0 @@ -package cli - -import ( - "context" - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func CmdListDepositRecord() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-deposit-record", - Short: "list all depositRecord", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllDepositRecordRequest{ - Pagination: pageReq, - } - - res, err := queryClient.DepositRecordAll(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, cmd.Use) - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdShowDepositRecord() *cobra.Command { - cmd := &cobra.Command{ - Use: "show-deposit-record [id]", - Short: "shows a depositRecord", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - id, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - params := &types.QueryGetDepositRecordRequest{ - Id: id, - } - - res, err := queryClient.DepositRecord(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdListDepositRecordByHost() *cobra.Command { - cmd := &cobra.Command{ - Use: "deposit-records-by-host [host]", - Short: "list all depositRecords for a given host zone", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - hostZoneId := args[0] - - clientCtx := client.GetClientContextFromCmd(cmd) - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.DepositRecordByHost(context.Background(), &types.QueryDepositRecordByHostRequest{ - HostZoneId: hostZoneId, - }) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/records/client/cli/query_epoch_unbonding_record.go b/x/records/client/cli/query_epoch_unbonding_record.go deleted file mode 100644 index 22d52369f..000000000 --- a/x/records/client/cli/query_epoch_unbonding_record.go +++ /dev/null @@ -1,78 +0,0 @@ -package cli - -import ( - "context" - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func CmdListEpochUnbondingRecord() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-epoch-unbonding-record", - Short: "list all EpochUnbondingRecord", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllEpochUnbondingRecordRequest{ - Pagination: pageReq, - } - - res, err := queryClient.EpochUnbondingRecordAll(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, cmd.Use) - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdShowEpochUnbondingRecord() *cobra.Command { - cmd := &cobra.Command{ - Use: "show-epoch-unbonding-record [id]", - Short: "shows a EpochUnbondingRecord", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - epochNumber, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - params := &types.QueryGetEpochUnbondingRecordRequest{ - EpochNumber: epochNumber, - } - - res, err := queryClient.EpochUnbondingRecord(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/records/client/cli/query_lsm_deposits.go b/x/records/client/cli/query_lsm_deposits.go deleted file mode 100644 index 843aedcd4..000000000 --- a/x/records/client/cli/query_lsm_deposits.go +++ /dev/null @@ -1,93 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -const ( - FlagHostChainId = "host-chain-id" - FlagValidatorAddress = "validator" - FlagStatus = "status" -) - -func CmdLSMDeposit() *cobra.Command { - cmd := &cobra.Command{ - Use: "lsm-deposit [chain-id] [denom]", - Short: "shows an LSM deposit matching given denom and chain-id", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - chainId := args[0] - denom := args[1] - - params := &types.QueryLSMDepositRequest{ChainId: chainId, Denom: denom} - res, err := queryClient.LSMDeposit(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdLSMDeposits() *cobra.Command { - cmd := &cobra.Command{ - Use: "lsm-deposits", - Short: "shows all lsm-deposits matching optional filters", - Long: `Shows all LSM deposits with optional filters -Examples: - $ lsm-deposits - $ lsm-deposits --host-chain-id=[chain-id] - $ lsm-deposits --host-chain-id=[chain-id] validator=[validator-address] - $ lsm-deposits --host-chain-id=[chain-id] --status=[status] -`, - Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { - chainId, err := cmd.Flags().GetString(FlagHostChainId) - if err != nil { - return err - } - validatorAddress, err := cmd.Flags().GetString(FlagValidatorAddress) - if err != nil { - return err - } - status, err := cmd.Flags().GetString(FlagStatus) - if err != nil { - return err - } - - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryLSMDepositsRequest{ChainId: chainId, ValidatorAddress: validatorAddress, Status: status} - res, err := queryClient.LSMDeposits(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - cmd.Flags().String(FlagHostChainId, "", "The chainId for host zone") - cmd.Flags().String(FlagValidatorAddress, "", "The validator address") - cmd.Flags().String(FlagStatus, "", "The status") - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/records/client/cli/query_params.go b/x/records/client/cli/query_params.go deleted file mode 100644 index 45a02fc23..000000000 --- a/x/records/client/cli/query_params.go +++ /dev/null @@ -1,35 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func CmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "shows the parameters of the module", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/records/client/cli/query_user_redemption_record.go b/x/records/client/cli/query_user_redemption_record.go deleted file mode 100644 index 43ce23b38..000000000 --- a/x/records/client/cli/query_user_redemption_record.go +++ /dev/null @@ -1,74 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func CmdListUserRedemptionRecord() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-user-redemption-record", - Short: "list all userRedemptionRecord", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllUserRedemptionRecordRequest{ - Pagination: pageReq, - } - - res, err := queryClient.UserRedemptionRecordAll(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, cmd.Use) - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdShowUserRedemptionRecord() *cobra.Command { - cmd := &cobra.Command{ - Use: "show-user-redemption-record [id]", - Short: "shows a userRedemptionRecord", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - id := args[0] - - params := &types.QueryGetUserRedemptionRecordRequest{ - Id: id, - } - - res, err := queryClient.UserRedemptionRecord(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/records/client/cli/tx.go b/x/records/client/cli/tx.go deleted file mode 100644 index 08fd12d0b..000000000 --- a/x/records/client/cli/tx.go +++ /dev/null @@ -1,30 +0,0 @@ -package cli - -import ( - "fmt" - "time" - - "github.com/spf13/cast" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - // "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/milkyway-labs/milkyway/x/records/types" -) - -var DefaultRelativePacketTimeoutTimestamp = cast.ToUint64((time.Duration(10) * time.Minute).Nanoseconds()) - -// GetTxCmd returns the transaction commands for this module -func GetTxCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - // this line is used by starport scaffolding # 1 - - return cmd -} diff --git a/x/records/genesis.go b/x/records/genesis.go deleted file mode 100644 index 795b5ca3d..000000000 --- a/x/records/genesis.go +++ /dev/null @@ -1,52 +0,0 @@ -package records - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/records/keeper" - "github.com/milkyway-labs/milkyway/x/records/types" -) - -// InitGenesis initializes the capability module's state from a provided genesis -// state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - // Set all the userRedemptionRecord - for _, elem := range genState.UserRedemptionRecordList { - k.SetUserRedemptionRecord(ctx, elem) - } - - // Set all the epochUnbondingRecord - for _, elem := range genState.EpochUnbondingRecordList { - k.SetEpochUnbondingRecord(ctx, elem) - } - - // this line is used by starport scaffolding # genesis/module/init - k.SetParams(ctx, genState.Params) - - // Set all the depositRecord - for _, elem := range genState.DepositRecordList { - k.SetDepositRecord(ctx, elem) - } - - // Set depositRecord count - k.SetDepositRecordCount(ctx, genState.DepositRecordCount) - - // Set all lsm deposit records - for _, elem := range genState.LsmTokenDepositList { - k.SetLSMTokenDeposit(ctx, elem) - } -} - -// ExportGenesis returns the capability module's exported genesis. -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { - genesis := types.DefaultGenesis() - genesis.Params = k.GetParams(ctx) - genesis.DepositRecordList = k.GetAllDepositRecord(ctx) - genesis.DepositRecordCount = k.GetDepositRecordCount(ctx) - - genesis.UserRedemptionRecordList = k.GetAllUserRedemptionRecord(ctx) - genesis.EpochUnbondingRecordList = k.GetAllEpochUnbondingRecord(ctx) - genesis.LsmTokenDepositList = k.GetAllLSMTokenDeposit(ctx) - - return genesis -} diff --git a/x/records/keeper/callback_lsm_transfer.go b/x/records/keeper/callback_lsm_transfer.go deleted file mode 100644 index e4cec1502..000000000 --- a/x/records/keeper/callback_lsm_transfer.go +++ /dev/null @@ -1,55 +0,0 @@ -package keeper - -import ( - "github.com/milkyway-labs/milkyway/utils" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - "github.com/milkyway-labs/milkyway/x/records/types" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" -) - -// Callback after an LSM token is IBC tranferred to the host zone -// -// If successful: mark the LSM Token status as DETOKENIZATION_QUEUE -// If failure: mark the LSM Token status as FAILED -// If timeout: revert the LSM Token status back to TRANSFER_QUEUE so it gets resubmitted -func (k Keeper) LSMTransferCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - // Fetch callback args - transferCallback := types.TransferLSMTokenCallback{} - if err := proto.Unmarshal(args, &transferCallback); err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, "unable to unmarshal LSM transfer callback: %s", err.Error()) - } - deposit := *transferCallback.Deposit - chainId := deposit.ChainId - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, IBCCallbacksID_LSMTransfer, "Starting LSM transfer callback")) - - // If timeout, update the status to TRANSFER_QUEUE so that it gets resubmitted - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, IBCCallbacksID_LSMTransfer, - icacallbackstypes.AckResponseStatus_TIMEOUT, packet)) - k.Logger(ctx).Error(utils.LogICACallbackWithHostZone(chainId, IBCCallbacksID_LSMTransfer, "Retrying transfer")) - - k.UpdateLSMTokenDepositStatus(ctx, deposit, types.LSMTokenDeposit_TRANSFER_QUEUE) - return nil - } - - // If the transfer failed, update the status to FAILED - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, IBCCallbacksID_LSMTransfer, - icacallbackstypes.AckResponseStatus_FAILURE, packet)) - - k.UpdateLSMTokenDepositStatus(ctx, deposit, types.LSMTokenDeposit_TRANSFER_FAILED) - return nil - } - - // If the transfer was successful, update the status to DETOKENIZATION_QUEUE - k.Logger(ctx).Info(utils.LogICACallbackStatusWithHostZone(chainId, IBCCallbacksID_LSMTransfer, - icacallbackstypes.AckResponseStatus_SUCCESS, packet)) - - k.UpdateLSMTokenDepositStatus(ctx, deposit, types.LSMTokenDeposit_DETOKENIZATION_QUEUE) - - return nil -} diff --git a/x/records/keeper/callback_native_transfer.go b/x/records/keeper/callback_native_transfer.go deleted file mode 100644 index bbd51539a..000000000 --- a/x/records/keeper/callback_native_transfer.go +++ /dev/null @@ -1,82 +0,0 @@ -package keeper - -import ( - "fmt" - - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - "github.com/milkyway-labs/milkyway/x/records/types" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" -) - -func (k Keeper) MarshalTransferCallbackArgs(ctx sdk.Context, delegateCallback types.TransferCallback) ([]byte, error) { - out, err := proto.Marshal(&delegateCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("MarshalTransferCallbackArgs %v", err.Error())) - return nil, err - } - return out, nil -} - -func (k Keeper) UnmarshalTransferCallbackArgs(ctx sdk.Context, delegateCallback []byte) (*types.TransferCallback, error) { - unmarshalledTransferCallback := types.TransferCallback{} - if err := proto.Unmarshal(delegateCallback, &unmarshalledTransferCallback); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UnmarshalTransferCallbackArgs %v", err.Error())) - return nil, err - } - return &unmarshalledTransferCallback, nil -} - -func (k Keeper) TransferCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - k.Logger(ctx).Info("TransferCallback executing", "packet", packet) - - // deserialize the args - transferCallbackData, err := k.UnmarshalTransferCallbackArgs(ctx, args) - if err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, "cannot unmarshal transfer callback args: %s", err.Error()) - } - k.Logger(ctx).Info(fmt.Sprintf("TransferCallback %v", transferCallbackData)) - depositRecord, found := k.GetDepositRecord(ctx, transferCallbackData.DepositRecordId) - if !found { - k.Logger(ctx).Error(fmt.Sprintf("TransferCallback deposit record not found, packet %v", packet)) - return errorsmod.Wrapf(types.ErrUnknownDepositRecord, "deposit record not found %d", transferCallbackData.DepositRecordId) - } - - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - // timeout - // put record back in the TRANSFER_QUEUE - depositRecord.Status = types.DepositRecord_TRANSFER_QUEUE - k.SetDepositRecord(ctx, depositRecord) - k.Logger(ctx).Error(fmt.Sprintf("TransferCallback timeout, ack is nil, packet %v", packet)) - return nil - } - - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - // error on host chain - // put record back in the TRANSFER_QUEUE - depositRecord.Status = types.DepositRecord_TRANSFER_QUEUE - k.SetDepositRecord(ctx, depositRecord) - k.Logger(ctx).Error(fmt.Sprintf("Error %s", ackResponse.Error)) - return nil - } - - var data ibctransfertypes.FungibleTokenPacketData - if err := ibctransfertypes.ModuleCdc.UnmarshalJSON(packet.GetData(), &data); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error unmarshalling packet %v", err.Error())) - return errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal ICS-20 transfer packet data: %s", err.Error()) - } - k.Logger(ctx).Info(fmt.Sprintf("TransferCallback unmarshalled FungibleTokenPacketData %v", data)) - - // put the deposit record in the DELEGATION_QUEUE - depositRecord.Status = types.DepositRecord_DELEGATION_QUEUE - k.SetDepositRecord(ctx, depositRecord) - k.Logger(ctx).Info(fmt.Sprintf("\t [IBC-TRANSFER] Deposit record updated: {%v}, status: {%s}", depositRecord.Id, depositRecord.Status.String())) - k.Logger(ctx).Info(fmt.Sprintf("[IBC-TRANSFER] success to %s", depositRecord.HostZoneId)) - return nil -} diff --git a/x/records/keeper/callbacks.go b/x/records/keeper/callbacks.go deleted file mode 100644 index 7fef2c290..000000000 --- a/x/records/keeper/callbacks.go +++ /dev/null @@ -1,15 +0,0 @@ -package keeper - -import ( - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -const IBCCallbacksID_NativeTransfer = "transfer" -const IBCCallbacksID_LSMTransfer = "lsm-transfer" - -func (k Keeper) Callbacks() icacallbackstypes.ModuleCallbacks { - return []icacallbackstypes.ICACallback{ - {CallbackId: IBCCallbacksID_NativeTransfer, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.TransferCallback)}, - {CallbackId: IBCCallbacksID_LSMTransfer, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.LSMTransferCallback)}, - } -} diff --git a/x/records/keeper/deposit_record.go b/x/records/keeper/deposit_record.go deleted file mode 100644 index d324dd393..000000000 --- a/x/records/keeper/deposit_record.go +++ /dev/null @@ -1,115 +0,0 @@ -package keeper - -import ( - "encoding/binary" - - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -// GetDepositRecordCount get the total number of depositRecord -func (k Keeper) GetDepositRecordCount(ctx sdk.Context) uint64 { - store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{}) - byteKey := types.KeyPrefix(types.DepositRecordCountKey) - bz := store.Get(byteKey) - - // Count doesn't exist: no element - if bz == nil { - return 0 - } - - // Parse bytes - return binary.BigEndian.Uint64(bz) -} - -// SetDepositRecordCount set the total number of depositRecord -func (k Keeper) SetDepositRecordCount(ctx sdk.Context, count uint64) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), []byte{}) - byteKey := types.KeyPrefix(types.DepositRecordCountKey) - bz := make([]byte, 8) - binary.BigEndian.PutUint64(bz, count) - store.Set(byteKey, bz) -} - -// AppendDepositRecord appends a depositRecord in the store with a new id and update the count -func (k Keeper) AppendDepositRecord( - ctx sdk.Context, - depositRecord types.DepositRecord, -) uint64 { - // Create the depositRecord - count := k.GetDepositRecordCount(ctx) - - // Set the ID of the appended value - depositRecord.Id = count - - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DepositRecordKey)) - appendedValue := k.Cdc.MustMarshal(&depositRecord) - store.Set(GetDepositRecordIDBytes(depositRecord.Id), appendedValue) - - // Update depositRecord count - k.SetDepositRecordCount(ctx, count+1) - - return count -} - -// SetDepositRecord set a specific depositRecord in the store -func (k Keeper) SetDepositRecord(ctx sdk.Context, depositRecord types.DepositRecord) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DepositRecordKey)) - b := k.Cdc.MustMarshal(&depositRecord) - store.Set(GetDepositRecordIDBytes(depositRecord.Id), b) -} - -// GetDepositRecord returns a depositRecord from its id -func (k Keeper) GetDepositRecord(ctx sdk.Context, id uint64) (val types.DepositRecord, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DepositRecordKey)) - b := store.Get(GetDepositRecordIDBytes(id)) - if b == nil { - return val, false - } - k.Cdc.MustUnmarshal(b, &val) - return val, true -} - -// RemoveDepositRecord removes a depositRecord from the store -func (k Keeper) RemoveDepositRecord(ctx sdk.Context, id uint64) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DepositRecordKey)) - store.Delete(GetDepositRecordIDBytes(id)) -} - -// GetAllDepositRecord returns all depositRecord -func (k Keeper) GetAllDepositRecord(ctx sdk.Context) (list []types.DepositRecord) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.DepositRecordKey)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.DepositRecord - k.Cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} - -// GetDepositRecordIDBytes returns the byte representation of the ID -func GetDepositRecordIDBytes(id uint64) []byte { - bz := make([]byte, 8) - binary.BigEndian.PutUint64(bz, id) - return bz -} - -func (k Keeper) GetTransferDepositRecordByEpochAndChain(ctx sdk.Context, epochNumber uint64, chainId string) (val *types.DepositRecord, found bool) { - records := k.GetAllDepositRecord(ctx) - for _, depositRecord := range records { - if depositRecord.DepositEpochNumber == epochNumber && - depositRecord.HostZoneId == chainId && - depositRecord.Status == types.DepositRecord_TRANSFER_QUEUE { - return &depositRecord, true - } - } - return nil, false -} diff --git a/x/records/keeper/epoch_unbonding_record.go b/x/records/keeper/epoch_unbonding_record.go deleted file mode 100644 index 0d5060eb7..000000000 --- a/x/records/keeper/epoch_unbonding_record.go +++ /dev/null @@ -1,158 +0,0 @@ -package keeper - -import ( - "encoding/binary" - "fmt" - - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - - stakeibctypes "github.com/milkyway-labs/milkyway/x/stakeibc/types" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -// SetEpochUnbondingRecord set a specific epochUnbondingRecord in the store -func (k Keeper) SetEpochUnbondingRecord(ctx sdk.Context, epochUnbondingRecord types.EpochUnbondingRecord) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochUnbondingRecordKey)) - b := k.Cdc.MustMarshal(&epochUnbondingRecord) - store.Set(GetEpochUnbondingRecordIDBytes(epochUnbondingRecord.EpochNumber), b) -} - -// GetEpochUnbondingRecord returns a epochUnbondingRecord from its id -func (k Keeper) GetEpochUnbondingRecord(ctx sdk.Context, epochNumber uint64) (val types.EpochUnbondingRecord, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochUnbondingRecordKey)) - b := store.Get(GetEpochUnbondingRecordIDBytes(epochNumber)) - if b == nil { - return val, false - } - k.Cdc.MustUnmarshal(b, &val) - return val, true -} - -// RemoveEpochUnbondingRecord removes a epochUnbondingRecord from the store -func (k Keeper) RemoveEpochUnbondingRecord(ctx sdk.Context, epochNumber uint64) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochUnbondingRecordKey)) - store.Delete(GetEpochUnbondingRecordIDBytes(epochNumber)) -} - -// GetAllEpochUnbondingRecord returns all epochUnbondingRecord -func (k Keeper) GetAllEpochUnbondingRecord(ctx sdk.Context) (list []types.EpochUnbondingRecord) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochUnbondingRecordKey)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.EpochUnbondingRecord - k.Cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} - -// GetAllPreviousEpochUnbondingRecords returns all epochUnbondingRecords prior to a given epoch -func (k Keeper) GetAllPreviousEpochUnbondingRecords(ctx sdk.Context, epochNumber uint64) (list []types.EpochUnbondingRecord) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochUnbondingRecordKey)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - // these aren't guaranteed to be ordered - for ; iterator.Valid(); iterator.Next() { - var val types.EpochUnbondingRecord - k.Cdc.MustUnmarshal(iterator.Value(), &val) - if val.EpochNumber < epochNumber { - list = append(list, val) - } - } - - return -} - -// GetEpochUnbondingRecordIDBytes returns the byte representation of the ID -func GetEpochUnbondingRecordIDBytes(id uint64) []byte { - bz := make([]byte, 8) - binary.BigEndian.PutUint64(bz, id) - return bz -} - -// GetEpochUnbondingRecordIDFromBytes returns ID in uint64 format from a byte array -func GetEpochUnbondingRecordIDFromBytes(bz []byte) uint64 { - return binary.BigEndian.Uint64(bz) -} - -// GetEpochUnbondingRecordByEpoch returns a epochUnbondingRecord from its epochNumber -func (k Keeper) GetHostZoneUnbondingByChainId(ctx sdk.Context, epochNumber uint64, chainId string) (val *types.HostZoneUnbonding, found bool) { - epochUnbondingRecord, found := k.GetEpochUnbondingRecord(ctx, epochNumber) - if !found { - return nil, false - } - hostZoneUnbondings := epochUnbondingRecord.HostZoneUnbondings - for _, hzUnbondingRecord := range hostZoneUnbondings { - if hzUnbondingRecord.HostZoneId == chainId { - return hzUnbondingRecord, true - } - } - return &types.HostZoneUnbonding{}, false -} - -// Adds a HostZoneUnbonding to an EpochUnbondingRecord -// TODO [cleanup]: Return error instead of success -func (k Keeper) AddHostZoneToEpochUnbondingRecord(ctx sdk.Context, epochNumber uint64, chainId string, hzu *types.HostZoneUnbonding) (val *types.EpochUnbondingRecord, success bool) { - epochUnbondingRecord, found := k.GetEpochUnbondingRecord(ctx, epochNumber) - if !found { - return nil, false - } - wasSet := false - for i, hostZoneUnbonding := range epochUnbondingRecord.HostZoneUnbondings { - if hostZoneUnbonding.GetHostZoneId() == chainId { - epochUnbondingRecord.HostZoneUnbondings[i] = hzu - wasSet = true - break - } - } - if !wasSet { - // add new host zone unbonding record - epochUnbondingRecord.HostZoneUnbondings = append(epochUnbondingRecord.HostZoneUnbondings, hzu) - } - return &epochUnbondingRecord, true -} - -// Stores a host zone unbonding record - set via an epoch unbonding record -func (k Keeper) SetHostZoneUnbondingRecord(ctx sdk.Context, epochNumber uint64, chainId string, hostZoneUnbonding types.HostZoneUnbonding) error { - epochUnbondingRecord, success := k.AddHostZoneToEpochUnbondingRecord(ctx, epochNumber, chainId, &hostZoneUnbonding) - if !success { - return errorsmod.Wrapf(types.ErrEpochUnbondingRecordNotFound, "epoch unbonding record not found for epoch %d", epochNumber) - } - k.SetEpochUnbondingRecord(ctx, *epochUnbondingRecord) - return nil -} - -// Updates the status for a given host zone across relevant epoch unbonding record IDs -func (k Keeper) SetHostZoneUnbondingStatus(ctx sdk.Context, chainId string, epochUnbondingRecordIds []uint64, status types.HostZoneUnbonding_Status) error { - for _, epochUnbondingRecordId := range epochUnbondingRecordIds { - k.Logger(ctx).Info(fmt.Sprintf("Updating host zone unbondings on EpochUnbondingRecord %d to status %s", epochUnbondingRecordId, status.String())) - // fetch the host zone unbonding - hostZoneUnbonding, found := k.GetHostZoneUnbondingByChainId(ctx, epochUnbondingRecordId, chainId) - if !found { - errMsg := fmt.Sprintf("Error fetching host zone unbonding record for epoch: %d, host zone: %s", epochUnbondingRecordId, chainId) - k.Logger(ctx).Error(errMsg) - return errorsmod.Wrapf(stakeibctypes.ErrHostZoneNotFound, errMsg) - } - hostZoneUnbonding.Status = status - // save the updated hzu on the epoch unbonding record - updatedRecord, success := k.AddHostZoneToEpochUnbondingRecord(ctx, epochUnbondingRecordId, chainId, hostZoneUnbonding) - if !success { - errMsg := fmt.Sprintf("Error adding host zone unbonding record to epoch unbonding record: %d, host zone: %s", epochUnbondingRecordId, chainId) - k.Logger(ctx).Error(errMsg) - return errorsmod.Wrap(types.ErrAddingHostZone, errMsg) - } - k.SetEpochUnbondingRecord(ctx, *updatedRecord) - } - return nil -} diff --git a/x/records/keeper/grpc_query.go b/x/records/keeper/grpc_query.go deleted file mode 100644 index 5413738de..000000000 --- a/x/records/keeper/grpc_query.go +++ /dev/null @@ -1,7 +0,0 @@ -package keeper - -import ( - "github.com/milkyway-labs/milkyway/x/records/types" -) - -var _ types.QueryServer = Keeper{} diff --git a/x/records/keeper/grpc_query_deposit_record.go b/x/records/keeper/grpc_query_deposit_record.go deleted file mode 100644 index 02c50376d..000000000 --- a/x/records/keeper/grpc_query_deposit_record.go +++ /dev/null @@ -1,73 +0,0 @@ -package keeper - -import ( - "context" - - "cosmossdk.io/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/query" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func (k Keeper) DepositRecordAll(c context.Context, req *types.QueryAllDepositRecordRequest) (*types.QueryAllDepositRecordResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var depositRecords []types.DepositRecord - ctx := sdk.UnwrapSDKContext(c) - - store := ctx.KVStore(k.storeKey) - depositRecordStore := prefix.NewStore(store, types.KeyPrefix(types.DepositRecordKey)) - - pageRes, err := query.Paginate(depositRecordStore, req.Pagination, func(key []byte, value []byte) error { - var depositRecord types.DepositRecord - if err := k.Cdc.Unmarshal(value, &depositRecord); err != nil { - return err - } - - depositRecords = append(depositRecords, depositRecord) - return nil - }) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryAllDepositRecordResponse{DepositRecord: depositRecords, Pagination: pageRes}, nil -} - -func (k Keeper) DepositRecord(c context.Context, req *types.QueryGetDepositRecordRequest) (*types.QueryGetDepositRecordResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(c) - depositRecord, found := k.GetDepositRecord(ctx, req.Id) - if !found { - return nil, sdkerrors.ErrKeyNotFound - } - - return &types.QueryGetDepositRecordResponse{DepositRecord: depositRecord}, nil -} - -func (k Keeper) DepositRecordByHost(c context.Context, req *types.QueryDepositRecordByHostRequest) (*types.QueryDepositRecordByHostResponse, error) { - ctx := sdk.UnwrapSDKContext(c) - - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var depositRecordsForHost []types.DepositRecord - for _, depositRecord := range k.GetAllDepositRecord(ctx) { - if depositRecord.HostZoneId == req.HostZoneId { - depositRecordsForHost = append(depositRecordsForHost, depositRecord) - } - } - - return &types.QueryDepositRecordByHostResponse{DepositRecord: depositRecordsForHost}, nil -} diff --git a/x/records/keeper/grpc_query_epoch_unbonding_record.go b/x/records/keeper/grpc_query_epoch_unbonding_record.go deleted file mode 100644 index 3ec8fc596..000000000 --- a/x/records/keeper/grpc_query_epoch_unbonding_record.go +++ /dev/null @@ -1,56 +0,0 @@ -package keeper - -import ( - "context" - - "cosmossdk.io/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/query" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func (k Keeper) EpochUnbondingRecordAll(c context.Context, req *types.QueryAllEpochUnbondingRecordRequest) (*types.QueryAllEpochUnbondingRecordResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var epochUnbondingRecords []types.EpochUnbondingRecord - ctx := sdk.UnwrapSDKContext(c) - - store := ctx.KVStore(k.storeKey) - epochUnbondingRecordStore := prefix.NewStore(store, types.KeyPrefix(types.EpochUnbondingRecordKey)) - - pageRes, err := query.Paginate(epochUnbondingRecordStore, req.Pagination, func(key []byte, value []byte) error { - var epochUnbondingRecord types.EpochUnbondingRecord - if err := k.Cdc.Unmarshal(value, &epochUnbondingRecord); err != nil { - return err - } - - epochUnbondingRecords = append(epochUnbondingRecords, epochUnbondingRecord) - return nil - }) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryAllEpochUnbondingRecordResponse{EpochUnbondingRecord: epochUnbondingRecords, Pagination: pageRes}, nil -} - -func (k Keeper) EpochUnbondingRecord(c context.Context, req *types.QueryGetEpochUnbondingRecordRequest) (*types.QueryGetEpochUnbondingRecordResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(c) - epochUnbondingRecord, found := k.GetEpochUnbondingRecord(ctx, req.EpochNumber) - if !found { - return nil, sdkerrors.ErrKeyNotFound - } - - return &types.QueryGetEpochUnbondingRecordResponse{EpochUnbondingRecord: epochUnbondingRecord}, nil -} diff --git a/x/records/keeper/grpc_query_lsm_deposits.go b/x/records/keeper/grpc_query_lsm_deposits.go deleted file mode 100644 index b027198c1..000000000 --- a/x/records/keeper/grpc_query_lsm_deposits.go +++ /dev/null @@ -1,62 +0,0 @@ -package keeper - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func (k Keeper) LSMDeposit(c context.Context, req *types.QueryLSMDepositRequest) (*types.QueryLSMDepositResponse, error) { - if req == nil || req.ChainId == "" || req.Denom == "" { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(c) - - deposit, found := k.GetLSMTokenDeposit(ctx, req.ChainId, req.Denom) - if !found { - return nil, status.Error(codes.NotFound, "LSM deposit not found") - } - - return &types.QueryLSMDepositResponse{Deposit: deposit}, nil -} - -func (k Keeper) LSMDeposits(c context.Context, req *types.QueryLSMDepositsRequest) (*types.QueryLSMDepositsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var deposits []types.LSMTokenDeposit - ctx := sdk.UnwrapSDKContext(c) - - // Case 1: no chain_id was given, so we should load all deposits across all chains - if req.ChainId == "" { - deposits = k.GetAllLSMTokenDeposit(ctx) - } - - // Case 2: chain_id is given, load all for that chain - if req.ChainId != "" { - deposits = k.GetLSMDepositsForHostZone(ctx, req.ChainId) - } - - // Filter for matches by hand if validator_address or status optional filters are given - filtered := []types.LSMTokenDeposit{} - filterByValidator := req.ValidatorAddress != "" - filterByStatus := req.Status != "" - for _, deposit := range deposits { - validatorMatch := !filterByValidator || (deposit.ValidatorAddress == req.ValidatorAddress) - statusMatch := !filterByStatus || (deposit.Status.String() == req.Status) - if validatorMatch && statusMatch { - filtered = append(filtered, deposit) - } - } - deposits = filtered - - // Be aware this could be an empty array, there may have been no deposits matching given filters - return &types.QueryLSMDepositsResponse{Deposits: deposits}, nil -} diff --git a/x/records/keeper/grpc_query_params.go b/x/records/keeper/grpc_query_params.go deleted file mode 100644 index deb6a47f6..000000000 --- a/x/records/keeper/grpc_query_params.go +++ /dev/null @@ -1,20 +0,0 @@ -package keeper - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(c) - - return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil -} diff --git a/x/records/keeper/grpc_query_user_redemption_record.go b/x/records/keeper/grpc_query_user_redemption_record.go deleted file mode 100644 index f1683f777..000000000 --- a/x/records/keeper/grpc_query_user_redemption_record.go +++ /dev/null @@ -1,56 +0,0 @@ -package keeper - -import ( - "context" - - "cosmossdk.io/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/query" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func (k Keeper) UserRedemptionRecordAll(c context.Context, req *types.QueryAllUserRedemptionRecordRequest) (*types.QueryAllUserRedemptionRecordResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var userRedemptionRecords []types.UserRedemptionRecord - ctx := sdk.UnwrapSDKContext(c) - - store := ctx.KVStore(k.storeKey) - userRedemptionRecordStore := prefix.NewStore(store, types.KeyPrefix(types.UserRedemptionRecordKey)) - - pageRes, err := query.Paginate(userRedemptionRecordStore, req.Pagination, func(key []byte, value []byte) error { - var userRedemptionRecord types.UserRedemptionRecord - if err := k.Cdc.Unmarshal(value, &userRedemptionRecord); err != nil { - return err - } - - userRedemptionRecords = append(userRedemptionRecords, userRedemptionRecord) - return nil - }) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryAllUserRedemptionRecordResponse{UserRedemptionRecord: userRedemptionRecords, Pagination: pageRes}, nil -} - -func (k Keeper) UserRedemptionRecord(c context.Context, req *types.QueryGetUserRedemptionRecordRequest) (*types.QueryGetUserRedemptionRecordResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(c) - userRedemptionRecord, found := k.GetUserRedemptionRecord(ctx, req.Id) - if !found { - return nil, sdkerrors.ErrKeyNotFound - } - - return &types.QueryGetUserRedemptionRecordResponse{UserRedemptionRecord: userRedemptionRecord}, nil -} diff --git a/x/records/keeper/grpc_query_user_redemption_record_for_user.go b/x/records/keeper/grpc_query_user_redemption_record_for_user.go deleted file mode 100644 index 90ca21caf..000000000 --- a/x/records/keeper/grpc_query_user_redemption_record_for_user.go +++ /dev/null @@ -1,44 +0,0 @@ -package keeper - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func (k Keeper) UserRedemptionRecordForUser(c context.Context, req *types.QueryAllUserRedemptionRecordForUserRequest) (*types.QueryAllUserRedemptionRecordForUserResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var userRedemptionRecords []types.UserRedemptionRecord - - ctx := sdk.UnwrapSDKContext(c) - - // limit loop to 50 records for performance - var loopback uint64 - loopback = req.Limit - if loopback > 50 { - loopback = 50 - } - var i uint64 - for i = 0; i < loopback; i++ { - if i > req.Day { - // we have reached the end of the records - break - } - currentDay := req.Day - i - // query the user redemption record for the current day - userRedemptionRecord, found := k.GetUserRedemptionRecord(ctx, types.UserRedemptionRecordKeyFormatter(req.ChainId, currentDay, req.Address)) - if !found { - continue - } - userRedemptionRecords = append(userRedemptionRecords, userRedemptionRecord) - } - - return &types.QueryAllUserRedemptionRecordForUserResponse{UserRedemptionRecord: userRedemptionRecords}, nil -} diff --git a/x/records/keeper/ibc.go b/x/records/keeper/ibc.go deleted file mode 100644 index 7174c1aff..000000000 --- a/x/records/keeper/ibc.go +++ /dev/null @@ -1,46 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - - "github.com/milkyway-labs/milkyway/x/icacallbacks" - icacallbacktypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -// OnAcknowledgementPacket unmarshals the acknowledgement object to determine if the ack was successful and -// then passes that to the ICACallback -// If this packet does not have associated callback data, there will be no additional ack logic in CallRegisteredICACallback -func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, acknowledgement []byte) error { - packetDescription := fmt.Sprintf("Sequence %d, from %s %s, to %s %s", - packet.Sequence, packet.SourceChannel, packet.SourcePort, packet.DestinationChannel, packet.DestinationPort) - - ackResponse, err := icacallbacks.UnpackAcknowledgementResponse(ctx, k.Logger(ctx), acknowledgement, false) - if err != nil { - return errorsmod.Wrapf(err, "unable to unpack message data from acknowledgement - %s", packetDescription) - } - - // Custom ack logic only applies to ibc transfers initiated from the `stakeibc` module account - // NOTE: if the `stakeibc` module account IBC transfers tokens for some other reason in the future, - // this will need to be updated - if err := k.ICACallbacksKeeper.CallRegisteredICACallback(ctx, packet, ackResponse); err != nil { - return errorsmod.Wrapf(err, "unable to call registered callback for records OnAckPacket - %s", packetDescription) - } - - return nil -} - -// OnTimeoutPacket passes the ack timeout to the ICACallback -// If there was no callback data associated with this packet, -// there will be no additional ack logic in CallRegisteredICACallback -func (k Keeper) OnTimeoutPacket(ctx sdk.Context, packet channeltypes.Packet) error { - ackResponse := icacallbacktypes.AcknowledgementResponse{Status: icacallbacktypes.AckResponseStatus_TIMEOUT} - if err := k.ICACallbacksKeeper.CallRegisteredICACallback(ctx, packet, &ackResponse); err != nil { - return errorsmod.Wrapf(err, "unable to call registered callback for records OnTimeoutPacket") - } - - return nil -} diff --git a/x/records/keeper/keeper.go b/x/records/keeper/keeper.go deleted file mode 100644 index c9c971968..000000000 --- a/x/records/keeper/keeper.go +++ /dev/null @@ -1,52 +0,0 @@ -package keeper - -import ( - "fmt" - - "cosmossdk.io/log" - storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - - icacallbackskeeper "github.com/milkyway-labs/milkyway/x/icacallbacks/keeper" - "github.com/milkyway-labs/milkyway/x/records/types" -) - -type ( - Keeper struct { - // *cosmosibckeeper.Keeper - Cdc codec.BinaryCodec - storeKey storetypes.StoreKey - memKey storetypes.StoreKey - AccountKeeper types.AccountKeeper - TransferKeeper ibctransferkeeper.Keeper - IBCKeeper ibckeeper.Keeper - ICACallbacksKeeper icacallbackskeeper.Keeper - } -) - -func NewKeeper( - Cdc codec.BinaryCodec, - storeKey, - memKey storetypes.StoreKey, - AccountKeeper types.AccountKeeper, - TransferKeeper ibctransferkeeper.Keeper, - ibcKeeper ibckeeper.Keeper, - ICACallbacksKeeper icacallbackskeeper.Keeper, -) *Keeper { - return &Keeper{ - Cdc: Cdc, - storeKey: storeKey, - memKey: memKey, - AccountKeeper: AccountKeeper, - TransferKeeper: TransferKeeper, - IBCKeeper: ibcKeeper, - ICACallbacksKeeper: ICACallbacksKeeper, - } -} - -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} diff --git a/x/records/keeper/lsm_token_deposit.go b/x/records/keeper/lsm_token_deposit.go deleted file mode 100644 index aed0623e9..000000000 --- a/x/records/keeper/lsm_token_deposit.go +++ /dev/null @@ -1,81 +0,0 @@ -package keeper - -import ( - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -func (k Keeper) SetLSMTokenDeposit(ctx sdk.Context, deposit types.LSMTokenDeposit) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LSMTokenDepositKey)) - depositKey := types.GetLSMTokenDepositKey(deposit.ChainId, deposit.Denom) - depositData := k.Cdc.MustMarshal(&deposit) - store.Set(depositKey, depositData) -} - -func (k Keeper) RemoveLSMTokenDeposit(ctx sdk.Context, chainId, denom string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LSMTokenDepositKey)) - depositKey := types.GetLSMTokenDepositKey(chainId, denom) - store.Delete(depositKey) -} - -func (k Keeper) GetLSMTokenDeposit(ctx sdk.Context, chainId, denom string) (deposit types.LSMTokenDeposit, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LSMTokenDepositKey)) - depositKey := types.GetLSMTokenDepositKey(chainId, denom) - depositData := store.Get(depositKey) - if len(depositData) == 0 { - return deposit, false - } - k.Cdc.MustUnmarshal(depositData, &deposit) - return deposit, true -} - -func (k Keeper) GetAllLSMTokenDeposit(ctx sdk.Context) []types.LSMTokenDeposit { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LSMTokenDepositKey)) - iterator := store.Iterator(nil, nil) - allLSMTokenDeposits := []types.LSMTokenDeposit{} - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var deposit types.LSMTokenDeposit - k.Cdc.MustUnmarshal(iterator.Value(), &deposit) - allLSMTokenDeposits = append(allLSMTokenDeposits, deposit) - } - - return allLSMTokenDeposits -} - -func (k Keeper) UpdateLSMTokenDepositStatus(ctx sdk.Context, deposit types.LSMTokenDeposit, status types.LSMTokenDeposit_Status) { - deposit.Status = status - k.SetLSMTokenDeposit(ctx, deposit) -} - -func (k Keeper) GetLSMDepositsForHostZone(ctx sdk.Context, chainId string) []types.LSMTokenDeposit { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.LSMTokenDepositKey)) - iterator := storetypes.KVStorePrefixIterator(store, types.KeyPrefix(chainId)) - hostZoneLSMTokenDeposits := []types.LSMTokenDeposit{} - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var deposit types.LSMTokenDeposit - k.Cdc.MustUnmarshal(iterator.Value(), &deposit) - hostZoneLSMTokenDeposits = append(hostZoneLSMTokenDeposits, deposit) - } - - return hostZoneLSMTokenDeposits -} - -func (k Keeper) GetLSMDepositsForHostZoneWithStatus(ctx sdk.Context, chainId string, status types.LSMTokenDeposit_Status) []types.LSMTokenDeposit { - filtered := []types.LSMTokenDeposit{} - hostZoneLSMTokenDeposits := k.GetLSMDepositsForHostZone(ctx, chainId) - for _, deposit := range hostZoneLSMTokenDeposits { - if deposit.Status == status { - filtered = append(filtered, deposit) - } - } - return filtered -} diff --git a/x/records/keeper/params.go b/x/records/keeper/params.go deleted file mode 100644 index a9800bd59..000000000 --- a/x/records/keeper/params.go +++ /dev/null @@ -1,16 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -// GetParams get all parameters as types.Params -func (k Keeper) GetParams(ctx sdk.Context) types.Params { - return types.NewParams() -} - -// SetParams set the params -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { -} diff --git a/x/records/keeper/transfer.go b/x/records/keeper/transfer.go deleted file mode 100644 index 8a2101267..000000000 --- a/x/records/keeper/transfer.go +++ /dev/null @@ -1,107 +0,0 @@ -package keeper - -import ( - "time" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" - transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - - "github.com/milkyway-labs/milkyway/utils" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -var ( - // Timeout for the IBC transfer of the LSM Token to the host zone - LSMDepositTransferTimeout = time.Hour * 24 // 1 day -) - -// Transfers native tokens, accumulated from normal liquid stakes, to the host zone -// This is invoked epochly -func (k Keeper) IBCTransferNativeTokens(ctx sdk.Context, msg *transfertypes.MsgTransfer, depositRecord types.DepositRecord) error { - // Submit IBC transfer - msgTransferResponse, err := k.TransferKeeper.Transfer(sdk.WrapSDKContext(ctx), msg) - if err != nil { - return err - } - - // Build callback data - transferCallback := types.TransferCallback{ - DepositRecordId: depositRecord.Id, - } - k.Logger(ctx).Info(utils.LogWithHostZone(depositRecord.HostZoneId, "Marshalling TransferCallback args: %+v", transferCallback)) - marshalledCallbackArgs, err := k.MarshalTransferCallbackArgs(ctx, transferCallback) - if err != nil { - return err - } - - // Store the callback data - sequence := msgTransferResponse.Sequence - callback := icacallbackstypes.CallbackData{ - CallbackKey: icacallbackstypes.PacketID(msg.SourcePort, msg.SourceChannel, sequence), - PortId: msg.SourcePort, - ChannelId: msg.SourceChannel, - Sequence: sequence, - CallbackId: IBCCallbacksID_NativeTransfer, - CallbackArgs: marshalledCallbackArgs, - } - k.Logger(ctx).Info(utils.LogWithHostZone(depositRecord.HostZoneId, "Storing callback data: %+v", callback)) - k.ICACallbacksKeeper.SetCallbackData(ctx, callback) - - // update the record state to TRANSFER_IN_PROGRESS - depositRecord.Status = types.DepositRecord_TRANSFER_IN_PROGRESS - k.SetDepositRecord(ctx, depositRecord) - - return nil -} - -// Transfer's LSM Tokens to the host from LSMLiquidStakes -// This is invoked immediately after the LSMLiquidStake -func (k Keeper) IBCTransferLSMToken( - ctx sdk.Context, - lsmTokenDeposit types.LSMTokenDeposit, - transferChannelID string, - hostZoneDepositAddress string, - hostZoneDelegationICAAddress string, -) error { - // Build transfer message with a conservative timeout - timeout := uint64(ctx.BlockTime().UnixNano() + (LSMDepositTransferTimeout).Nanoseconds()) - ibcToken := sdk.NewCoin(lsmTokenDeposit.IbcDenom, lsmTokenDeposit.Amount) - transferMsg := transfertypes.MsgTransfer{ - SourcePort: transfertypes.PortID, - SourceChannel: transferChannelID, - Token: ibcToken, - Sender: hostZoneDepositAddress, - Receiver: hostZoneDelegationICAAddress, - TimeoutTimestamp: timeout, - } - - // Send LSM Token to host zone via IBC transfer - msgTransferResponse, err := k.TransferKeeper.Transfer(sdk.WrapSDKContext(ctx), &transferMsg) - if err != nil { - return err - } - - // Store transfer callback data - callbackArgs := types.TransferLSMTokenCallback{ - Deposit: &lsmTokenDeposit, - } - callbackArgsBz, err := proto.Marshal(&callbackArgs) - if err != nil { - return errorsmod.Wrapf(err, "Unable to marshal transfer callback data for %+v", callbackArgs) - } - - k.ICACallbacksKeeper.SetCallbackData(ctx, icacallbackstypes.CallbackData{ - CallbackKey: icacallbackstypes.PacketID(transferMsg.SourcePort, transferMsg.SourceChannel, msgTransferResponse.Sequence), - PortId: transferMsg.SourcePort, - ChannelId: transferMsg.SourceChannel, - Sequence: msgTransferResponse.Sequence, - CallbackId: IBCCallbacksID_LSMTransfer, - CallbackArgs: callbackArgsBz, - }) - - return nil -} diff --git a/x/records/keeper/user_redemption_record.go b/x/records/keeper/user_redemption_record.go deleted file mode 100644 index 8ce481a65..000000000 --- a/x/records/keeper/user_redemption_record.go +++ /dev/null @@ -1,73 +0,0 @@ -package keeper - -import ( - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/records/types" -) - -// SetUserRedemptionRecord set a specific userRedemptionRecord in the store -func (k Keeper) SetUserRedemptionRecord(ctx sdk.Context, userRedemptionRecord types.UserRedemptionRecord) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.UserRedemptionRecordKey)) - b := k.Cdc.MustMarshal(&userRedemptionRecord) - store.Set([]byte(userRedemptionRecord.Id), b) -} - -// GetUserRedemptionRecord returns a userRedemptionRecord from its id -func (k Keeper) GetUserRedemptionRecord(ctx sdk.Context, id string) (val types.UserRedemptionRecord, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.UserRedemptionRecordKey)) - b := store.Get([]byte(id)) - if b == nil { - return val, false - } - k.Cdc.MustUnmarshal(b, &val) - return val, true -} - -// RemoveUserRedemptionRecord removes a userRedemptionRecord from the store -func (k Keeper) RemoveUserRedemptionRecord(ctx sdk.Context, id string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.UserRedemptionRecordKey)) - store.Delete([]byte(id)) -} - -// GetAllUserRedemptionRecord returns all userRedemptionRecord -func (k Keeper) GetAllUserRedemptionRecord(ctx sdk.Context) (list []types.UserRedemptionRecord) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.UserRedemptionRecordKey)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.UserRedemptionRecord - k.Cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} - -// IterateUserRedemptionRecords iterates zones -func (k Keeper) IterateUserRedemptionRecords(ctx sdk.Context, - fn func(index int64, userRedemptionRecord types.UserRedemptionRecord) (stop bool), -) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.UserRedemptionRecordKey)) - - iterator := storetypes.KVStorePrefixIterator(store, nil) - defer iterator.Close() - - i := int64(0) - - for ; iterator.Valid(); iterator.Next() { - userRedRecord := types.UserRedemptionRecord{} - k.Cdc.MustUnmarshal(iterator.Value(), &userRedRecord) - - stop := fn(i, userRedRecord) - - if stop { - break - } - i++ - } -} diff --git a/x/records/module.go b/x/records/module.go deleted file mode 100644 index be7f20819..000000000 --- a/x/records/module.go +++ /dev/null @@ -1,163 +0,0 @@ -package records - -import ( - "context" - "encoding/json" - "fmt" - - "cosmossdk.io/core/appmodule" - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - - "github.com/milkyway-labs/milkyway/x/records/client/cli" - "github.com/milkyway-labs/milkyway/x/records/keeper" - "github.com/milkyway-labs/milkyway/x/records/types" -) - -var ( - _ appmodule.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} - // _ porttypes.IBCModule = AppModule{} -) - -// ---------------------------------------------------------------------------- -// AppModuleBasic -// ---------------------------------------------------------------------------- - -// AppModuleBasic implements the AppModuleBasic interface for the capability module. -type AppModuleBasic struct { - cdc codec.BinaryCodec -} - -func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { - return AppModuleBasic{cdc: cdc} -} - -// Name returns the capability module's name. -func (AppModuleBasic) Name() string { - return types.ModuleName -} - -func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) { - types.RegisterCodec(cdc) -} - -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - types.RegisterCodec(cdc) -} - -// RegisterInterfaces registers the module's interface types -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) {} - -// DefaultGenesis returns the capability module's default genesis state. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesis()) -} - -// ValidateGenesis performs genesis state validation for the capability module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { - var genState types.GenesisState - if err := cdc.UnmarshalJSON(bz, &genState); err != nil { - return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) - } - return genState.Validate() -} - -// RegisterRESTRoutes registers the capability module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { -} - -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { - panic(err) - } -} - -// GetTxCmd returns the capability module's root tx command. -func (a AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.GetTxCmd() -} - -// GetQueryCmd returns the capability module's root query command. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(types.StoreKey) -} - -// ---------------------------------------------------------------------------- -// AppModule -// ---------------------------------------------------------------------------- - -// AppModule implements the AppModule interface for the capability module. -type AppModule struct { - AppModuleBasic - - keeper keeper.Keeper - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper -} - -func NewAppModule( - cdc codec.Codec, - keeper keeper.Keeper, - accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, -) AppModule { - return AppModule{ - AppModuleBasic: NewAppModuleBasic(cdc), - keeper: keeper, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - } -} - -// Name returns the capability module's name. -func (am AppModule) Name() string { - return am.AppModuleBasic.Name() -} - -// QuerierRoute returns the capability module's query routing key. -func (AppModule) QuerierRoute() string { return types.QuerierRoute } - -// RegisterServices registers a GRPC query service to respond to the -// module-specific GRPC queries. -func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterQueryServer(cfg.QueryServer(), am.keeper) -} - -// RegisterInvariants registers the capability module's invariants. -func (am AppModule) RegisterInvariants(_ sdk.InvariantRegistry) {} - -// InitGenesis performs the capability module's genesis initialization It returns -// no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { - var genState types.GenesisState - // Initialize global index to index in genesis state - cdc.MustUnmarshalJSON(gs, &genState) - - InitGenesis(ctx, am.keeper, genState) - - return []abci.ValidatorUpdate{} -} - -// ExportGenesis returns the capability module's exported genesis state as raw JSON bytes. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - genState := ExportGenesis(ctx, am.keeper) - return cdc.MustMarshalJSON(genState) -} - -// ConsensusVersion implements ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 2 } - -func (am AppModule) IsOnePerModuleType() {} - -func (am AppModule) IsAppModule() {} diff --git a/x/records/module_ibc.go b/x/records/module_ibc.go deleted file mode 100644 index 21e3d10e5..000000000 --- a/x/records/module_ibc.go +++ /dev/null @@ -1,332 +0,0 @@ -package records - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - - "github.com/milkyway-labs/milkyway/x/records/keeper" -) - -// IBC MODULE IMPLEMENTATION -// IBCModule implements the ICS26 interface for transfer given the transfer keeper. -type IBCModule struct { - keeper keeper.Keeper - app porttypes.IBCModule -} - -// NewIBCModule creates a new IBCModule given the keeper -func NewIBCModule(k keeper.Keeper, app porttypes.IBCModule) IBCModule { - return IBCModule{ - keeper: k, - app: app, - } -} - -// OnChanOpenInit implements the IBCModule interface -func (im IBCModule) OnChanOpenInit( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID string, - channelID string, - channelCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version string, -) (string, error) { - return im.app.OnChanOpenInit( - ctx, - order, - connectionHops, - portID, - channelID, - channelCap, - counterparty, - version, - ) -} - -// OnChanOpenTry implements the IBCModule interface. -func (im IBCModule) OnChanOpenTry( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - counterpartyVersion string, -) (string, error) { - // doCustomLogic() - // core/04-channel/types contains a helper function to split middleware and underlying app version - // call the underlying applications OnChanOpenTry callback - version, err := im.app.OnChanOpenTry( - ctx, - order, - connectionHops, - portID, - channelID, - chanCap, - counterparty, - counterpartyVersion, - ) - if err != nil { - return "", err - } - ctx.Logger().Info(fmt.Sprintf("IBC Chan Open Version %s: ", version)) - ctx.Logger().Info(fmt.Sprintf("IBC Chan Open cpAppVersion %s: ", counterpartyVersion)) - return version, nil -} - -// OnChanOpenAck implements the IBCModule interface -func (im IBCModule) OnChanOpenAck( - ctx sdk.Context, - portID, - channelID string, - counterpartyChannelId string, // counterpartyChannelId - counterpartyVersion string, -) error { - // core/04-channel/types contains a helper function to split middleware and underlying app version - // _, _ := channeltypes.SplitChannelVersion(counterpartyVersion) - // doCustomLogic() - // call the underlying applications OnChanOpenTry callback - return im.app.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelId, counterpartyVersion) -} - -// OnChanOpenConfirm implements the IBCModule interface -func (im IBCModule) OnChanOpenConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - // doCustomLogic() - return im.app.OnChanOpenConfirm(ctx, portID, channelID) -} - -// OnChanCloseInit implements the IBCModule interface -func (im IBCModule) OnChanCloseInit( - ctx sdk.Context, - portID, - channelID string, -) error { - // doCustomLogic() - return im.app.OnChanCloseInit(ctx, portID, channelID) -} - -// OnChanCloseConfirm implements the IBCModule interface -func (im IBCModule) OnChanCloseConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - // doCustomLogic() - return im.app.OnChanCloseConfirm(ctx, portID, channelID) -} - -// OnRecvPacket implements the IBCModule interface. A successful acknowledgement -// is returned if the packet data is successfully decoded and the receive application -// logic returns without error. -func (im IBCModule) OnRecvPacket( - ctx sdk.Context, - packet channeltypes.Packet, - relayer sdk.AccAddress, -) ibcexported.Acknowledgement { - // NOTE: acknowledgement will be written synchronously during IBC handler execution. - // doCustomLogic(packet) - return im.app.OnRecvPacket(ctx, packet, relayer) -} - -// OnAcknowledgementPacket implements the IBCModule interface -func (im IBCModule) OnAcknowledgementPacket( - ctx sdk.Context, - packet channeltypes.Packet, - acknowledgement []byte, - relayer sdk.AccAddress, -) error { - im.keeper.Logger(ctx).Info( - fmt.Sprintf("OnAcknowledgementPacket (Records): Sequence %d, SourcePort %s, SourceChannel %s, DestinationPort %s, DestinationChannel %s", - packet.Sequence, packet.SourcePort, packet.SourceChannel, packet.DestinationPort, packet.DestinationChannel)) - - // The error here is intentionally returned immediately instead of refunding tokens - // This only errors if either: - // 1) The ack can't be parsed, in which case we don't know whether to refund tokens, or - // 2) The callback errors, in which case, it's better to not refund tokens to keep the state - // changes as consistent as possible between records and the bank module - // Transfer initiated from users will flow through this branch without an error, since the callbacks - // are only prevalent for transfer's initated by stakeibc - if err := im.keeper.OnAcknowledgementPacket(ctx, packet, acknowledgement); err != nil { - im.keeper.Logger(ctx).Error(fmt.Sprintf("Records OnAcknowledgementPacket failed: %s", err.Error())) - return errorsmod.Wrapf(err, "OnAckPacket callback failed") - } - - return im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) -} - -// OnTimeoutPacket implements the IBCModule interface -func (im IBCModule) OnTimeoutPacket( - ctx sdk.Context, - packet channeltypes.Packet, - relayer sdk.AccAddress, -) error { - im.keeper.Logger(ctx).Error( - fmt.Sprintf("OnTimeoutPacket (Records): Sequence %d, SourcePort %s, SourceChannel %s, DestinationPort %s, DestinationChannel %s", - packet.Sequence, packet.SourcePort, packet.SourceChannel, packet.DestinationPort, packet.DestinationChannel)) - - // The error here is intentionally returned immediately instead of refunding tokens - // This only errors if the callback fails, in which case, it's better to not refund tokens to keep the state - // changes as consistent as possible between records and the bank module - // Transfer initiated from users will flow through this branch without an error, since the callbacks - // are only prevalent for transfer's initated by stakeibc - if err := im.keeper.OnTimeoutPacket(ctx, packet); err != nil { - im.keeper.Logger(ctx).Error(fmt.Sprintf("Records OnTimeoutPacket failed: %s", err.Error())) - return errorsmod.Wrapf(err, "OnTimeoutPacket callback failed") - } - - return im.app.OnTimeoutPacket(ctx, packet, relayer) -} - -// This is implemented by ICS4 and all middleware that are wrapping base application. -// The base application will call `sendPacket` or `writeAcknowledgement` of the middleware directly above them -// which will call the next middleware until it reaches the core IBC handler. -// SendPacket implements the ICS4 Wrapper interface -func (im IBCModule) SendPacket( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - packet ibcexported.PacketI, -) error { - return nil -} - -// WriteAcknowledgement implements the ICS4 Wrapper interface -func (im IBCModule) WriteAcknowledgement( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - packet ibcexported.PacketI, - ack ibcexported.Acknowledgement, -) error { - return nil -} - -// GetAppVersion returns the interchain accounts metadata. -func (im IBCModule) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { - return ibctransfertypes.Version, true // im.keeper.GetAppVersion(ctx, portID, channelID) -} - -// TODO [cleanup]: We probably don't need these AppModule callbacks, -// but we should dig into it more -// before removing - -// APP MODULE IMPLEMENTATION -// OnChanOpenInit implements the IBCModule interface -func (am AppModule) OnChanOpenInit( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID string, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version string, -) (string, error) { - return "", errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "UNIMPLEMENTED") -} - -// OnChanOpenTry implements the IBCModule interface -func (am AppModule) OnChanOpenTry( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version, - counterpartyVersion string, -) error { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "UNIMPLEMENTED") -} - -// OnChanOpenAck implements the IBCModule interface -func (am AppModule) OnChanOpenAck( - ctx sdk.Context, - portID, - channelID string, - counterpartyVersion string, -) error { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "UNIMPLEMENTED") -} - -// OnChanOpenConfirm implements the IBCModule interface -func (am AppModule) OnChanOpenConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "UNIMPLEMENTED") -} - -// OnChanCloseInit implements the IBCModule interface -func (am AppModule) OnChanCloseInit( - ctx sdk.Context, - portID, - channelID string, -) error { - // Disallow user-initiated channel closing for channels - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "user cannot close channel") -} - -// OnChanCloseConfirm implements the IBCModule interface -func (am AppModule) OnChanCloseConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "UNIMPLEMENTED") -} - -// OnRecvPacket implements the IBCModule interface -func (am AppModule) OnRecvPacket( - ctx sdk.Context, - modulePacket channeltypes.Packet, - relayer sdk.AccAddress, -) ibcexported.Acknowledgement { - // NOTE: acknowledgement will be written synchronously during IBC handler execution. - return nil -} - -// OnAcknowledgementPacket implements the IBCModule interface -func (am AppModule) OnAcknowledgementPacket( - ctx sdk.Context, - modulePacket channeltypes.Packet, - acknowledgement []byte, - relayer sdk.AccAddress, -) error { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "UNIMPLEMENTED") -} - -// OnTimeoutPacket implements the IBCModule interface -func (am AppModule) OnTimeoutPacket( - ctx sdk.Context, - modulePacket channeltypes.Packet, - relayer sdk.AccAddress, -) error { - return nil -} - -func (am AppModule) NegotiateAppVersion( - ctx sdk.Context, - order channeltypes.Order, - connectionID string, - portID string, - counterparty channeltypes.Counterparty, - proposedVersion string, -) (version string, err error) { - return proposedVersion, nil -} diff --git a/x/records/simulation/simap.go b/x/records/simulation/simap.go deleted file mode 100644 index 92c437c0d..000000000 --- a/x/records/simulation/simap.go +++ /dev/null @@ -1,15 +0,0 @@ -package simulation - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" -) - -// FindAccount find a specific address from an account list -func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { - creator, err := sdk.AccAddressFromBech32(address) - if err != nil { - panic(err) - } - return simtypes.FindAccount(accs, creator) -} diff --git a/x/records/testutil/expected_keepers_mocks.go b/x/records/testutil/expected_keepers_mocks.go deleted file mode 100644 index 21e443210..000000000 --- a/x/records/testutil/expected_keepers_mocks.go +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: ./x/records/types/expected_keepers.go -// -// Generated by this command: -// -// mockgen -source ./x/records/types/expected_keepers.go -package testutil -destination ./x/records/testutil/expected_keepers_mocks.go -// - -// Package testutil is a generated GoMock package. -package testutil - -import ( - context "context" - reflect "reflect" - - types "github.com/cosmos/cosmos-sdk/types" - gomock "go.uber.org/mock/gomock" -) - -// MockAccountKeeper is a mock of AccountKeeper interface. -type MockAccountKeeper struct { - ctrl *gomock.Controller - recorder *MockAccountKeeperMockRecorder -} - -// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. -type MockAccountKeeperMockRecorder struct { - mock *MockAccountKeeper -} - -// NewMockAccountKeeper creates a new mock instance. -func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { - mock := &MockAccountKeeper{ctrl: ctrl} - mock.recorder = &MockAccountKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { - return m.recorder -} - -// GetAccount mocks base method. -func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccount", ctx, addr) - ret0, _ := ret[0].(types.AccountI) - return ret0 -} - -// GetAccount indicates an expected call of GetAccount. -func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) -} - -// GetModuleAddress mocks base method. -func (m *MockAccountKeeper) GetModuleAddress(name string) types.AccAddress { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetModuleAddress", name) - ret0, _ := ret[0].(types.AccAddress) - return ret0 -} - -// GetModuleAddress indicates an expected call of GetModuleAddress. -func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(name any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), name) -} - -// MockBankKeeper is a mock of BankKeeper interface. -type MockBankKeeper struct { - ctrl *gomock.Controller - recorder *MockBankKeeperMockRecorder -} - -// MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper. -type MockBankKeeperMockRecorder struct { - mock *MockBankKeeper -} - -// NewMockBankKeeper creates a new mock instance. -func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper { - mock := &MockBankKeeper{ctrl: ctrl} - mock.recorder = &MockBankKeeperMockRecorder{mock} - return mock -} - -// EXPECT returns an object that allows the caller to indicate expected use. -func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder { - return m.recorder -} - -// SpendableCoins mocks base method. -func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddress) types.Coins { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SpendableCoins", ctx, addr) - ret0, _ := ret[0].(types.Coins) - return ret0 -} - -// SpendableCoins indicates an expected call of SpendableCoins. -func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SpendableCoins", reflect.TypeOf((*MockBankKeeper)(nil).SpendableCoins), ctx, addr) -} diff --git a/x/records/types/callbacks.pb.go b/x/records/types/callbacks.pb.go deleted file mode 100644 index 070855ce3..000000000 --- a/x/records/types/callbacks.pb.go +++ /dev/null @@ -1,482 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/records/callbacks.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type TransferCallback struct { - DepositRecordId uint64 `protobuf:"varint,1,opt,name=deposit_record_id,json=depositRecordId,proto3" json:"deposit_record_id,omitempty"` -} - -func (m *TransferCallback) Reset() { *m = TransferCallback{} } -func (m *TransferCallback) String() string { return proto.CompactTextString(m) } -func (*TransferCallback) ProtoMessage() {} -func (*TransferCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_6f7cdd5c1d8b3a46, []int{0} -} -func (m *TransferCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransferCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransferCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TransferCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferCallback.Merge(m, src) -} -func (m *TransferCallback) XXX_Size() int { - return m.Size() -} -func (m *TransferCallback) XXX_DiscardUnknown() { - xxx_messageInfo_TransferCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_TransferCallback proto.InternalMessageInfo - -func (m *TransferCallback) GetDepositRecordId() uint64 { - if m != nil { - return m.DepositRecordId - } - return 0 -} - -type TransferLSMTokenCallback struct { - Deposit *LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` -} - -func (m *TransferLSMTokenCallback) Reset() { *m = TransferLSMTokenCallback{} } -func (m *TransferLSMTokenCallback) String() string { return proto.CompactTextString(m) } -func (*TransferLSMTokenCallback) ProtoMessage() {} -func (*TransferLSMTokenCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_6f7cdd5c1d8b3a46, []int{1} -} -func (m *TransferLSMTokenCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TransferLSMTokenCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TransferLSMTokenCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TransferLSMTokenCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferLSMTokenCallback.Merge(m, src) -} -func (m *TransferLSMTokenCallback) XXX_Size() int { - return m.Size() -} -func (m *TransferLSMTokenCallback) XXX_DiscardUnknown() { - xxx_messageInfo_TransferLSMTokenCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_TransferLSMTokenCallback proto.InternalMessageInfo - -func (m *TransferLSMTokenCallback) GetDeposit() *LSMTokenDeposit { - if m != nil { - return m.Deposit - } - return nil -} - -func init() { - proto.RegisterType((*TransferCallback)(nil), "stride.records.TransferCallback") - proto.RegisterType((*TransferLSMTokenCallback)(nil), "stride.records.TransferLSMTokenCallback") -} - -func init() { proto.RegisterFile("stride/records/callbacks.proto", fileDescriptor_6f7cdd5c1d8b3a46) } - -var fileDescriptor_6f7cdd5c1d8b3a46 = []byte{ - // 225 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2b, 0x2e, 0x29, 0xca, - 0x4c, 0x49, 0xd5, 0x2f, 0x4a, 0x4d, 0xce, 0x2f, 0x4a, 0x29, 0xd6, 0x4f, 0x4e, 0xcc, 0xc9, 0x49, - 0x4a, 0x4c, 0xce, 0x2e, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0xc8, 0xeb, 0x41, - 0xe5, 0xa5, 0x64, 0xd0, 0xd4, 0x43, 0x69, 0x88, 0x6a, 0x25, 0x3b, 0x2e, 0x81, 0x90, 0xa2, 0xc4, - 0xbc, 0xe2, 0xb4, 0xd4, 0x22, 0x67, 0xa8, 0x41, 0x42, 0x5a, 0x5c, 0x82, 0x29, 0xa9, 0x05, 0xf9, - 0xc5, 0x99, 0x25, 0xf1, 0x10, 0xc5, 0xf1, 0x99, 0x29, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, - 0xfc, 0x50, 0x89, 0x20, 0xb0, 0xb8, 0x67, 0x8a, 0x52, 0x28, 0x97, 0x04, 0x4c, 0xbf, 0x4f, 0xb0, - 0x6f, 0x48, 0x7e, 0x76, 0x6a, 0x1e, 0xdc, 0x1c, 0x4b, 0x2e, 0x76, 0xa8, 0x72, 0xb0, 0x6e, 0x6e, - 0x23, 0x79, 0x3d, 0x54, 0xb7, 0xe9, 0xc1, 0xb4, 0xb8, 0x40, 0x4d, 0x85, 0xa9, 0x77, 0xf2, 0x3e, - 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, - 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xc3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, - 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xdc, 0xcc, 0x9c, 0xec, 0xca, 0xf2, 0xc4, 0x4a, 0xdd, 0x9c, - 0xc4, 0xa4, 0x62, 0x38, 0x4f, 0xbf, 0x02, 0xee, 0xd7, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, - 0xb0, 0x57, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x74, 0xcb, 0x76, 0x3a, 0x01, 0x00, - 0x00, -} - -func (m *TransferCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransferCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransferCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DepositRecordId != 0 { - i = encodeVarintCallbacks(dAtA, i, uint64(m.DepositRecordId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TransferLSMTokenCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TransferLSMTokenCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TransferLSMTokenCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Deposit != nil { - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCallbacks(dAtA []byte, offset int, v uint64) int { - offset -= sovCallbacks(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TransferCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DepositRecordId != 0 { - n += 1 + sovCallbacks(uint64(m.DepositRecordId)) - } - return n -} - -func (m *TransferLSMTokenCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Deposit != nil { - l = m.Deposit.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - return n -} - -func sovCallbacks(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCallbacks(x uint64) (n int) { - return sovCallbacks(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TransferCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransferCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransferCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRecordId", wireType) - } - m.DepositRecordId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DepositRecordId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TransferLSMTokenCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TransferLSMTokenCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TransferLSMTokenCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Deposit == nil { - m.Deposit = &LSMTokenDeposit{} - } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCallbacks(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCallbacks - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCallbacks - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCallbacks - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCallbacks - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCallbacks - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCallbacks - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCallbacks = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCallbacks = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCallbacks = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/records/types/codec.go b/x/records/types/codec.go deleted file mode 100644 index 673a02108..000000000 --- a/x/records/types/codec.go +++ /dev/null @@ -1,13 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" -) - -func RegisterCodec(cdc *codec.LegacyAmino) {} - -var ( - Amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) -) diff --git a/x/records/types/errors.go b/x/records/types/errors.go deleted file mode 100644 index 2186fd622..000000000 --- a/x/records/types/errors.go +++ /dev/null @@ -1,15 +0,0 @@ -package types - -// DONTCOVER - -import errorsmod "cosmossdk.io/errors" - -// x/records module sentinel errors -var ( - ErrInvalidVersion = errorsmod.Register(ModuleName, 1501, "invalid version") - ErrEpochUnbondingRecordNotFound = errorsmod.Register(ModuleName, 1503, "epoch unbonding record not found") - ErrUnknownDepositRecord = errorsmod.Register(ModuleName, 1504, "unknown deposit record") - ErrUnmarshalFailure = errorsmod.Register(ModuleName, 1505, "cannot unmarshal") - ErrAddingHostZone = errorsmod.Register(ModuleName, 1506, "could not add hzu to epoch unbonding record") - ErrHostUnbondingRecordNotFound = errorsmod.Register(ModuleName, 1507, "host zone unbonding record not found on epoch unbonding record") -) diff --git a/x/records/types/events_ibc.go b/x/records/types/events_ibc.go deleted file mode 100644 index 07c66a43c..000000000 --- a/x/records/types/events_ibc.go +++ /dev/null @@ -1,11 +0,0 @@ -package types - -// IBC events -const ( - EventTypeTimeout = "timeout" - // this line is used by starport scaffolding # ibc/packet/event - - AttributeKeyAckSuccess = "success" - AttributeKeyAck = "acknowledgement" - AttributeKeyAckError = "error" -) diff --git a/x/records/types/expected_keepers.go b/x/records/types/expected_keepers.go deleted file mode 100644 index 5cb3e956f..000000000 --- a/x/records/types/expected_keepers.go +++ /dev/null @@ -1,20 +0,0 @@ -package types - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// AccountKeeper defines the expected account keeper used for simulations (noalias) -type AccountKeeper interface { - GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI - // Methods imported from account should be defined here - GetModuleAddress(name string) sdk.AccAddress -} - -// BankKeeper defines the expected interface needed to retrieve account balances. -type BankKeeper interface { - SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins - // Methods imported from bank should be defined here -} diff --git a/x/records/types/genesis.go b/x/records/types/genesis.go deleted file mode 100644 index 565bf36d9..000000000 --- a/x/records/types/genesis.go +++ /dev/null @@ -1,79 +0,0 @@ -package types - -import ( - "fmt" - - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" -) - -// DefaultIndex is the default capability global index -const DefaultIndex uint64 = 1 - -// DefaultGenesis returns the default Capability genesis state -func DefaultGenesis() *GenesisState { - return &GenesisState{ - Params: DefaultParams(), - PortId: PortID, - UserRedemptionRecordList: []UserRedemptionRecord{}, - UserRedemptionRecordCount: 0, - EpochUnbondingRecordList: []EpochUnbondingRecord{}, - DepositRecordList: []DepositRecord{}, - DepositRecordCount: 0, - LsmTokenDepositList: []LSMTokenDeposit{}, - } -} - -// Validate performs basic genesis state validation returning an error upon any -// failure. -func (gs GenesisState) Validate() error { - if err := host.PortIdentifierValidator(gs.PortId); err != nil { - return err - } - // Check for duplicated ID in userRedemptionRecord - userRedemptionRecordIdMap := make(map[string]bool) - for _, elem := range gs.UserRedemptionRecordList { - if _, ok := userRedemptionRecordIdMap[elem.Id]; ok { - return fmt.Errorf("duplicated id for userRedemptionRecord") - } - userRedemptionRecordIdMap[elem.Id] = true - } - // Check for duplicated ID in epochUnbondingRecord - epochUnbondingRecordIdMap := make(map[uint64]bool) - for _, elem := range gs.EpochUnbondingRecordList { - if _, ok := epochUnbondingRecordIdMap[elem.EpochNumber]; ok { - return fmt.Errorf("duplicated id for epochUnbondingRecord") - } - epochUnbondingRecordIdMap[elem.EpochNumber] = true - } - // Check for duplicated ID in depositRecord - depositRecordIdMap := make(map[uint64]bool) - depositRecordCount := gs.GetDepositRecordCount() - for _, elem := range gs.DepositRecordList { - if _, ok := depositRecordIdMap[elem.Id]; ok { - return fmt.Errorf("duplicated id for depositRecord") - } - if elem.Id >= depositRecordCount { - return fmt.Errorf("depositRecord id should be lower or equal than the last id") - } - depositRecordIdMap[elem.Id] = true - } - - // Check for duplicate LSM token denoms - lsmTokenDepositIdMap := make(map[string]bool) - lsmTokenDepositChainDenomMap := make(map[string]bool) - for _, elem := range gs.LsmTokenDepositList { - if _, ok := lsmTokenDepositIdMap[elem.DepositId]; ok { - return fmt.Errorf("duplicated lsm token deposit ID") - } - lsmTokenDepositIdMap[elem.DepositId] = true - - chainDenomId := elem.ChainId + elem.Denom - if _, ok := lsmTokenDepositChainDenomMap[chainDenomId]; ok { - return fmt.Errorf("duplicated chain ID and denom") - } - - lsmTokenDepositChainDenomMap[chainDenomId] = true - } - - return gs.Params.Validate() -} diff --git a/x/records/types/genesis.pb.go b/x/records/types/genesis.pb.go deleted file mode 100644 index 7f93cb80b..000000000 --- a/x/records/types/genesis.pb.go +++ /dev/null @@ -1,704 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/records/genesis.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the records module's genesis state. -type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - UserRedemptionRecordList []UserRedemptionRecord `protobuf:"bytes,3,rep,name=user_redemption_record_list,json=userRedemptionRecordList,proto3" json:"user_redemption_record_list"` - UserRedemptionRecordCount uint64 `protobuf:"varint,4,opt,name=user_redemption_record_count,json=userRedemptionRecordCount,proto3" json:"user_redemption_record_count,omitempty"` - EpochUnbondingRecordList []EpochUnbondingRecord `protobuf:"bytes,5,rep,name=epoch_unbonding_record_list,json=epochUnbondingRecordList,proto3" json:"epoch_unbonding_record_list"` - DepositRecordList []DepositRecord `protobuf:"bytes,7,rep,name=deposit_record_list,json=depositRecordList,proto3" json:"deposit_record_list"` - DepositRecordCount uint64 `protobuf:"varint,8,opt,name=deposit_record_count,json=depositRecordCount,proto3" json:"deposit_record_count,omitempty"` - LsmTokenDepositList []LSMTokenDeposit `protobuf:"bytes,9,rep,name=lsm_token_deposit_list,json=lsmTokenDepositList,proto3" json:"lsm_token_deposit_list"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_98cfd0253c8b6797, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func (m *GenesisState) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *GenesisState) GetUserRedemptionRecordList() []UserRedemptionRecord { - if m != nil { - return m.UserRedemptionRecordList - } - return nil -} - -func (m *GenesisState) GetUserRedemptionRecordCount() uint64 { - if m != nil { - return m.UserRedemptionRecordCount - } - return 0 -} - -func (m *GenesisState) GetEpochUnbondingRecordList() []EpochUnbondingRecord { - if m != nil { - return m.EpochUnbondingRecordList - } - return nil -} - -func (m *GenesisState) GetDepositRecordList() []DepositRecord { - if m != nil { - return m.DepositRecordList - } - return nil -} - -func (m *GenesisState) GetDepositRecordCount() uint64 { - if m != nil { - return m.DepositRecordCount - } - return 0 -} - -func (m *GenesisState) GetLsmTokenDepositList() []LSMTokenDeposit { - if m != nil { - return m.LsmTokenDepositList - } - return nil -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "stride.records.GenesisState") -} - -func init() { proto.RegisterFile("stride/records/genesis.proto", fileDescriptor_98cfd0253c8b6797) } - -var fileDescriptor_98cfd0253c8b6797 = []byte{ - // 418 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcf, 0x8e, 0x93, 0x40, - 0x1c, 0xc7, 0xc1, 0xc5, 0xae, 0x3b, 0x6b, 0x4c, 0x64, 0x37, 0x15, 0xdb, 0x4a, 0x89, 0xf1, 0xc0, - 0x45, 0xd0, 0xea, 0xdd, 0xa4, 0x6a, 0x8c, 0xb1, 0x26, 0x86, 0xda, 0x4b, 0x2f, 0x04, 0x98, 0x09, - 0x9d, 0x14, 0x18, 0x32, 0x33, 0x44, 0xfb, 0x16, 0x3e, 0x56, 0x8f, 0xbd, 0xe9, 0xc9, 0x98, 0xf6, - 0x45, 0x0c, 0x33, 0xd3, 0xa6, 0x10, 0xf6, 0x04, 0xf3, 0xfb, 0x7d, 0xff, 0x7c, 0x26, 0x19, 0x30, - 0x62, 0x9c, 0x62, 0x88, 0x7c, 0x8a, 0x12, 0x42, 0x21, 0xf3, 0x53, 0x54, 0x20, 0x86, 0x99, 0x57, - 0x52, 0xc2, 0x89, 0xf9, 0x48, 0x6e, 0x3d, 0xb5, 0x1d, 0x0c, 0x5b, 0xea, 0x32, 0xa2, 0x51, 0xae, - 0xc4, 0x83, 0x76, 0x94, 0xfa, 0xaa, 0xed, 0x6d, 0x4a, 0x52, 0x22, 0x7e, 0xfd, 0xfa, 0x4f, 0x4e, - 0x9f, 0xff, 0x36, 0xc0, 0xc3, 0x4f, 0xb2, 0x72, 0xce, 0x23, 0x8e, 0xcc, 0xb7, 0xa0, 0x27, 0x43, - 0x2d, 0xdd, 0xd1, 0xdd, 0xeb, 0x49, 0xdf, 0x6b, 0x22, 0x78, 0xdf, 0xc4, 0x76, 0x6a, 0x6c, 0xff, - 0x8e, 0xb5, 0x40, 0x69, 0xcd, 0x27, 0xe0, 0xb2, 0x24, 0x94, 0x87, 0x18, 0x5a, 0xf7, 0x1c, 0xdd, - 0xbd, 0x0a, 0x7a, 0xf5, 0xf1, 0x33, 0x34, 0x31, 0x18, 0x56, 0x0c, 0xd1, 0x90, 0x22, 0x88, 0xf2, - 0x92, 0x63, 0x52, 0x84, 0x32, 0x28, 0xcc, 0x30, 0xe3, 0xd6, 0x85, 0x73, 0xe1, 0x5e, 0x4f, 0x5e, - 0xb4, 0x3b, 0x16, 0x0c, 0xd1, 0xe0, 0xe4, 0x08, 0xc4, 0x54, 0x35, 0x5a, 0x55, 0xc7, 0x6e, 0x86, - 0x19, 0x37, 0xdf, 0x81, 0xd1, 0x1d, 0x55, 0x09, 0xa9, 0x0a, 0x6e, 0x19, 0x8e, 0xee, 0x1a, 0xc1, - 0xd3, 0x2e, 0xff, 0xfb, 0x5a, 0x50, 0xb3, 0xa2, 0x92, 0x24, 0xab, 0xb0, 0x2a, 0x62, 0x52, 0x40, - 0x5c, 0xa4, 0x0d, 0xd6, 0xfb, 0xdd, 0xac, 0x1f, 0x6b, 0xcb, 0xe2, 0xe8, 0x68, 0xb2, 0xa2, 0x8e, - 0x9d, 0x60, 0x9d, 0x83, 0x1b, 0x88, 0x4a, 0xc2, 0x30, 0x6f, 0x54, 0x5c, 0x8a, 0x8a, 0x67, 0xed, - 0x8a, 0x0f, 0x52, 0xda, 0xc8, 0x7e, 0x0c, 0xcf, 0x87, 0x22, 0xf4, 0x15, 0xb8, 0x6d, 0x85, 0xca, - 0x8b, 0x3f, 0x10, 0x17, 0x37, 0x1b, 0x06, 0x79, 0xe3, 0x25, 0xe8, 0x67, 0x2c, 0x0f, 0x39, 0x59, - 0xa3, 0x22, 0x3c, 0x7a, 0x05, 0xc9, 0x95, 0x20, 0x19, 0xb7, 0x49, 0x66, 0xf3, 0xaf, 0xdf, 0x6b, - 0xb1, 0x22, 0x52, 0x2c, 0x37, 0x19, 0xcb, 0xcf, 0xc7, 0x35, 0xcd, 0xf4, 0xcb, 0x76, 0x6f, 0xeb, - 0xbb, 0xbd, 0xad, 0xff, 0xdb, 0xdb, 0xfa, 0xaf, 0x83, 0xad, 0xed, 0x0e, 0xb6, 0xf6, 0xe7, 0x60, - 0x6b, 0xcb, 0xd7, 0x29, 0xe6, 0xab, 0x2a, 0xf6, 0x12, 0x92, 0xfb, 0x39, 0xce, 0xd6, 0x9b, 0x1f, - 0xd1, 0xe6, 0x65, 0x16, 0xc5, 0xec, 0x74, 0xf2, 0x7f, 0x9e, 0x1e, 0x31, 0xdf, 0x94, 0x88, 0xc5, - 0x3d, 0xf1, 0x5a, 0xdf, 0xfc, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x35, 0xfc, 0x75, 0xa5, 0x2e, 0x03, - 0x00, 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.LsmTokenDepositList) > 0 { - for iNdEx := len(m.LsmTokenDepositList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LsmTokenDepositList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if m.DepositRecordCount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.DepositRecordCount)) - i-- - dAtA[i] = 0x40 - } - if len(m.DepositRecordList) > 0 { - for iNdEx := len(m.DepositRecordList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DepositRecordList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.EpochUnbondingRecordList) > 0 { - for iNdEx := len(m.EpochUnbondingRecordList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EpochUnbondingRecordList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.UserRedemptionRecordCount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.UserRedemptionRecordCount)) - i-- - dAtA[i] = 0x20 - } - if len(m.UserRedemptionRecordList) > 0 { - for iNdEx := len(m.UserRedemptionRecordList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UserRedemptionRecordList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.UserRedemptionRecordList) > 0 { - for _, e := range m.UserRedemptionRecordList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.UserRedemptionRecordCount != 0 { - n += 1 + sovGenesis(uint64(m.UserRedemptionRecordCount)) - } - if len(m.EpochUnbondingRecordList) > 0 { - for _, e := range m.EpochUnbondingRecordList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.DepositRecordList) > 0 { - for _, e := range m.DepositRecordList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.DepositRecordCount != 0 { - n += 1 + sovGenesis(uint64(m.DepositRecordCount)) - } - if len(m.LsmTokenDepositList) > 0 { - for _, e := range m.LsmTokenDepositList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecordList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserRedemptionRecordList = append(m.UserRedemptionRecordList, UserRedemptionRecord{}) - if err := m.UserRedemptionRecordList[len(m.UserRedemptionRecordList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecordCount", wireType) - } - m.UserRedemptionRecordCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UserRedemptionRecordCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecordList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EpochUnbondingRecordList = append(m.EpochUnbondingRecordList, EpochUnbondingRecord{}) - if err := m.EpochUnbondingRecordList[len(m.EpochUnbondingRecordList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRecordList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositRecordList = append(m.DepositRecordList, DepositRecord{}) - if err := m.DepositRecordList[len(m.DepositRecordList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRecordCount", wireType) - } - m.DepositRecordCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DepositRecordCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LsmTokenDepositList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LsmTokenDepositList = append(m.LsmTokenDepositList, LSMTokenDeposit{}) - if err := m.LsmTokenDepositList[len(m.LsmTokenDepositList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/records/types/keys.go b/x/records/types/keys.go deleted file mode 100644 index c1bf57658..000000000 --- a/x/records/types/keys.go +++ /dev/null @@ -1,55 +0,0 @@ -package types - -import ( - "cosmossdk.io/collections" -) - -const ( - // ModuleName defines the module name - ModuleName = "records" - - // StoreKey defines the primary module store key - StoreKey = ModuleName - - // RouterKey is the message route for slashing - RouterKey = ModuleName - - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName - - // MemStoreKey defines the in-memory store key - MemStoreKey = "mem_records" - - // Version defines the current version the IBC module supports - Version = "records-1" - - // PortID is the default port id that module binds to - PortID = "records" -) - -// PortKey defines the key to store the port ID in store -var PortKey = KeyPrefix("records-port-") - -var ParamsKey = collections.NewPrefix(1) - -func KeyPrefix(p string) []byte { - return []byte(p) -} - -// Create the LSMTokenDeposit prefix as chainId + denom -func GetLSMTokenDepositKey(chainId, denom string) []byte { - return append([]byte(chainId), []byte(denom)...) -} - -const ( - UserRedemptionRecordKey = "UserRedemptionRecord-value-" - UserRedemptionRecordCountKey = "UserRedemptionRecord-count-" -) - -const ( - EpochUnbondingRecordKey = "EpochUnbondingRecord-value-" - EpochUnbondingRecordCountKey = "EpochUnbondingRecord-count-" - DepositRecordKey = "DepositRecord-value-" - DepositRecordCountKey = "DepositRecord-count-" - LSMTokenDepositKey = "LSMTokenDeposit" -) diff --git a/x/records/types/params.go b/x/records/types/params.go deleted file mode 100644 index 874012a4b..000000000 --- a/x/records/types/params.go +++ /dev/null @@ -1,16 +0,0 @@ -package types - -// NewParams creates a new Params instance -func NewParams() Params { - return Params{} -} - -// DefaultParams returns a default set of parameters -func DefaultParams() Params { - return NewParams() -} - -// Validate validates the set of params -func (p Params) Validate() error { - return nil -} diff --git a/x/records/types/params.pb.go b/x/records/types/params.pb.go deleted file mode 100644 index 1f8800ada..000000000 --- a/x/records/types/params.pb.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/records/params.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Params defines the parameters for the module. -type Params struct { -} - -func (m *Params) Reset() { *m = Params{} } -func (m *Params) String() string { return proto.CompactTextString(m) } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_5d92633ea4bee482, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Params)(nil), "stride.records.Params") -} - -func init() { proto.RegisterFile("stride/records/params.proto", fileDescriptor_5d92633ea4bee482) } - -var fileDescriptor_5d92633ea4bee482 = []byte{ - // 136 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x2e, 0x29, 0xca, - 0x4c, 0x49, 0xd5, 0x2f, 0x4a, 0x4d, 0xce, 0x2f, 0x4a, 0x29, 0xd6, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, - 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0x48, 0xea, 0x41, 0x25, 0x95, 0x38, - 0xb8, 0xd8, 0x02, 0xc0, 0xf2, 0x4e, 0xde, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, - 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, - 0x10, 0x65, 0x98, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9b, 0x99, - 0x93, 0x5d, 0x59, 0x9e, 0x58, 0xa9, 0x9b, 0x93, 0x98, 0x54, 0x0c, 0xe7, 0xe9, 0x57, 0xc0, 0x6d, - 0x2b, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xdb, 0x66, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, - 0x72, 0xc8, 0x0e, 0x00, 0x8c, 0x00, 0x00, 0x00, -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/records/types/query.pb.go b/x/records/types/query.pb.go deleted file mode 100644 index c75c43655..000000000 --- a/x/records/types/query.pb.go +++ /dev/null @@ -1,5031 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/records/query.proto - -package types - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{0} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params holds all the parameters of this module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{1} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -type QueryGetDepositRecordRequest struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *QueryGetDepositRecordRequest) Reset() { *m = QueryGetDepositRecordRequest{} } -func (m *QueryGetDepositRecordRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetDepositRecordRequest) ProtoMessage() {} -func (*QueryGetDepositRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{2} -} -func (m *QueryGetDepositRecordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetDepositRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetDepositRecordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetDepositRecordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetDepositRecordRequest.Merge(m, src) -} -func (m *QueryGetDepositRecordRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetDepositRecordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetDepositRecordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetDepositRecordRequest proto.InternalMessageInfo - -func (m *QueryGetDepositRecordRequest) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -type QueryGetDepositRecordResponse struct { - DepositRecord DepositRecord `protobuf:"bytes,1,opt,name=deposit_record,json=depositRecord,proto3" json:"deposit_record"` -} - -func (m *QueryGetDepositRecordResponse) Reset() { *m = QueryGetDepositRecordResponse{} } -func (m *QueryGetDepositRecordResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetDepositRecordResponse) ProtoMessage() {} -func (*QueryGetDepositRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{3} -} -func (m *QueryGetDepositRecordResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetDepositRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetDepositRecordResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetDepositRecordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetDepositRecordResponse.Merge(m, src) -} -func (m *QueryGetDepositRecordResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetDepositRecordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetDepositRecordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetDepositRecordResponse proto.InternalMessageInfo - -func (m *QueryGetDepositRecordResponse) GetDepositRecord() DepositRecord { - if m != nil { - return m.DepositRecord - } - return DepositRecord{} -} - -type QueryAllDepositRecordRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllDepositRecordRequest) Reset() { *m = QueryAllDepositRecordRequest{} } -func (m *QueryAllDepositRecordRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllDepositRecordRequest) ProtoMessage() {} -func (*QueryAllDepositRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{4} -} -func (m *QueryAllDepositRecordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllDepositRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllDepositRecordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllDepositRecordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllDepositRecordRequest.Merge(m, src) -} -func (m *QueryAllDepositRecordRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllDepositRecordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllDepositRecordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllDepositRecordRequest proto.InternalMessageInfo - -func (m *QueryAllDepositRecordRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryAllDepositRecordResponse struct { - DepositRecord []DepositRecord `protobuf:"bytes,1,rep,name=deposit_record,json=depositRecord,proto3" json:"deposit_record"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllDepositRecordResponse) Reset() { *m = QueryAllDepositRecordResponse{} } -func (m *QueryAllDepositRecordResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllDepositRecordResponse) ProtoMessage() {} -func (*QueryAllDepositRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{5} -} -func (m *QueryAllDepositRecordResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllDepositRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllDepositRecordResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllDepositRecordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllDepositRecordResponse.Merge(m, src) -} -func (m *QueryAllDepositRecordResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllDepositRecordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllDepositRecordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllDepositRecordResponse proto.InternalMessageInfo - -func (m *QueryAllDepositRecordResponse) GetDepositRecord() []DepositRecord { - if m != nil { - return m.DepositRecord - } - return nil -} - -func (m *QueryAllDepositRecordResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryDepositRecordByHostRequest struct { - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` -} - -func (m *QueryDepositRecordByHostRequest) Reset() { *m = QueryDepositRecordByHostRequest{} } -func (m *QueryDepositRecordByHostRequest) String() string { return proto.CompactTextString(m) } -func (*QueryDepositRecordByHostRequest) ProtoMessage() {} -func (*QueryDepositRecordByHostRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{6} -} -func (m *QueryDepositRecordByHostRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryDepositRecordByHostRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDepositRecordByHostRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryDepositRecordByHostRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDepositRecordByHostRequest.Merge(m, src) -} -func (m *QueryDepositRecordByHostRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryDepositRecordByHostRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDepositRecordByHostRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDepositRecordByHostRequest proto.InternalMessageInfo - -func (m *QueryDepositRecordByHostRequest) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -type QueryDepositRecordByHostResponse struct { - DepositRecord []DepositRecord `protobuf:"bytes,1,rep,name=deposit_record,json=depositRecord,proto3" json:"deposit_record"` -} - -func (m *QueryDepositRecordByHostResponse) Reset() { *m = QueryDepositRecordByHostResponse{} } -func (m *QueryDepositRecordByHostResponse) String() string { return proto.CompactTextString(m) } -func (*QueryDepositRecordByHostResponse) ProtoMessage() {} -func (*QueryDepositRecordByHostResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{7} -} -func (m *QueryDepositRecordByHostResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryDepositRecordByHostResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryDepositRecordByHostResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryDepositRecordByHostResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryDepositRecordByHostResponse.Merge(m, src) -} -func (m *QueryDepositRecordByHostResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryDepositRecordByHostResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryDepositRecordByHostResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryDepositRecordByHostResponse proto.InternalMessageInfo - -func (m *QueryDepositRecordByHostResponse) GetDepositRecord() []DepositRecord { - if m != nil { - return m.DepositRecord - } - return nil -} - -type QueryGetUserRedemptionRecordRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (m *QueryGetUserRedemptionRecordRequest) Reset() { *m = QueryGetUserRedemptionRecordRequest{} } -func (m *QueryGetUserRedemptionRecordRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetUserRedemptionRecordRequest) ProtoMessage() {} -func (*QueryGetUserRedemptionRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{8} -} -func (m *QueryGetUserRedemptionRecordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetUserRedemptionRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetUserRedemptionRecordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetUserRedemptionRecordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetUserRedemptionRecordRequest.Merge(m, src) -} -func (m *QueryGetUserRedemptionRecordRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetUserRedemptionRecordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetUserRedemptionRecordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetUserRedemptionRecordRequest proto.InternalMessageInfo - -func (m *QueryGetUserRedemptionRecordRequest) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -type QueryGetUserRedemptionRecordResponse struct { - UserRedemptionRecord UserRedemptionRecord `protobuf:"bytes,1,opt,name=user_redemption_record,json=userRedemptionRecord,proto3" json:"user_redemption_record"` -} - -func (m *QueryGetUserRedemptionRecordResponse) Reset() { *m = QueryGetUserRedemptionRecordResponse{} } -func (m *QueryGetUserRedemptionRecordResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetUserRedemptionRecordResponse) ProtoMessage() {} -func (*QueryGetUserRedemptionRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{9} -} -func (m *QueryGetUserRedemptionRecordResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetUserRedemptionRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetUserRedemptionRecordResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetUserRedemptionRecordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetUserRedemptionRecordResponse.Merge(m, src) -} -func (m *QueryGetUserRedemptionRecordResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetUserRedemptionRecordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetUserRedemptionRecordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetUserRedemptionRecordResponse proto.InternalMessageInfo - -func (m *QueryGetUserRedemptionRecordResponse) GetUserRedemptionRecord() UserRedemptionRecord { - if m != nil { - return m.UserRedemptionRecord - } - return UserRedemptionRecord{} -} - -type QueryAllUserRedemptionRecordRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllUserRedemptionRecordRequest) Reset() { *m = QueryAllUserRedemptionRecordRequest{} } -func (m *QueryAllUserRedemptionRecordRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllUserRedemptionRecordRequest) ProtoMessage() {} -func (*QueryAllUserRedemptionRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{10} -} -func (m *QueryAllUserRedemptionRecordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllUserRedemptionRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllUserRedemptionRecordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllUserRedemptionRecordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllUserRedemptionRecordRequest.Merge(m, src) -} -func (m *QueryAllUserRedemptionRecordRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllUserRedemptionRecordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllUserRedemptionRecordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllUserRedemptionRecordRequest proto.InternalMessageInfo - -func (m *QueryAllUserRedemptionRecordRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryAllUserRedemptionRecordResponse struct { - UserRedemptionRecord []UserRedemptionRecord `protobuf:"bytes,1,rep,name=user_redemption_record,json=userRedemptionRecord,proto3" json:"user_redemption_record"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllUserRedemptionRecordResponse) Reset() { *m = QueryAllUserRedemptionRecordResponse{} } -func (m *QueryAllUserRedemptionRecordResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllUserRedemptionRecordResponse) ProtoMessage() {} -func (*QueryAllUserRedemptionRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{11} -} -func (m *QueryAllUserRedemptionRecordResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllUserRedemptionRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllUserRedemptionRecordResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllUserRedemptionRecordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllUserRedemptionRecordResponse.Merge(m, src) -} -func (m *QueryAllUserRedemptionRecordResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllUserRedemptionRecordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllUserRedemptionRecordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllUserRedemptionRecordResponse proto.InternalMessageInfo - -func (m *QueryAllUserRedemptionRecordResponse) GetUserRedemptionRecord() []UserRedemptionRecord { - if m != nil { - return m.UserRedemptionRecord - } - return nil -} - -func (m *QueryAllUserRedemptionRecordResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// Query UserRedemptionRecords by chainId / userId pair -type QueryAllUserRedemptionRecordForUserRequest struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Day uint64 `protobuf:"varint,2,opt,name=day,proto3" json:"day,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - Limit uint64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllUserRedemptionRecordForUserRequest) Reset() { - *m = QueryAllUserRedemptionRecordForUserRequest{} -} -func (m *QueryAllUserRedemptionRecordForUserRequest) String() string { - return proto.CompactTextString(m) -} -func (*QueryAllUserRedemptionRecordForUserRequest) ProtoMessage() {} -func (*QueryAllUserRedemptionRecordForUserRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{12} -} -func (m *QueryAllUserRedemptionRecordForUserRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllUserRedemptionRecordForUserRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllUserRedemptionRecordForUserRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllUserRedemptionRecordForUserRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllUserRedemptionRecordForUserRequest.Merge(m, src) -} -func (m *QueryAllUserRedemptionRecordForUserRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllUserRedemptionRecordForUserRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllUserRedemptionRecordForUserRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllUserRedemptionRecordForUserRequest proto.InternalMessageInfo - -func (m *QueryAllUserRedemptionRecordForUserRequest) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *QueryAllUserRedemptionRecordForUserRequest) GetDay() uint64 { - if m != nil { - return m.Day - } - return 0 -} - -func (m *QueryAllUserRedemptionRecordForUserRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *QueryAllUserRedemptionRecordForUserRequest) GetLimit() uint64 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *QueryAllUserRedemptionRecordForUserRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryAllUserRedemptionRecordForUserResponse struct { - UserRedemptionRecord []UserRedemptionRecord `protobuf:"bytes,1,rep,name=user_redemption_record,json=userRedemptionRecord,proto3" json:"user_redemption_record"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllUserRedemptionRecordForUserResponse) Reset() { - *m = QueryAllUserRedemptionRecordForUserResponse{} -} -func (m *QueryAllUserRedemptionRecordForUserResponse) String() string { - return proto.CompactTextString(m) -} -func (*QueryAllUserRedemptionRecordForUserResponse) ProtoMessage() {} -func (*QueryAllUserRedemptionRecordForUserResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{13} -} -func (m *QueryAllUserRedemptionRecordForUserResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllUserRedemptionRecordForUserResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllUserRedemptionRecordForUserResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllUserRedemptionRecordForUserResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllUserRedemptionRecordForUserResponse.Merge(m, src) -} -func (m *QueryAllUserRedemptionRecordForUserResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllUserRedemptionRecordForUserResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllUserRedemptionRecordForUserResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllUserRedemptionRecordForUserResponse proto.InternalMessageInfo - -func (m *QueryAllUserRedemptionRecordForUserResponse) GetUserRedemptionRecord() []UserRedemptionRecord { - if m != nil { - return m.UserRedemptionRecord - } - return nil -} - -func (m *QueryAllUserRedemptionRecordForUserResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryGetEpochUnbondingRecordRequest struct { - EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` -} - -func (m *QueryGetEpochUnbondingRecordRequest) Reset() { *m = QueryGetEpochUnbondingRecordRequest{} } -func (m *QueryGetEpochUnbondingRecordRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetEpochUnbondingRecordRequest) ProtoMessage() {} -func (*QueryGetEpochUnbondingRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{14} -} -func (m *QueryGetEpochUnbondingRecordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetEpochUnbondingRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetEpochUnbondingRecordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetEpochUnbondingRecordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetEpochUnbondingRecordRequest.Merge(m, src) -} -func (m *QueryGetEpochUnbondingRecordRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetEpochUnbondingRecordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetEpochUnbondingRecordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetEpochUnbondingRecordRequest proto.InternalMessageInfo - -func (m *QueryGetEpochUnbondingRecordRequest) GetEpochNumber() uint64 { - if m != nil { - return m.EpochNumber - } - return 0 -} - -type QueryGetEpochUnbondingRecordResponse struct { - EpochUnbondingRecord EpochUnbondingRecord `protobuf:"bytes,1,opt,name=epoch_unbonding_record,json=epochUnbondingRecord,proto3" json:"epoch_unbonding_record"` -} - -func (m *QueryGetEpochUnbondingRecordResponse) Reset() { *m = QueryGetEpochUnbondingRecordResponse{} } -func (m *QueryGetEpochUnbondingRecordResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetEpochUnbondingRecordResponse) ProtoMessage() {} -func (*QueryGetEpochUnbondingRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{15} -} -func (m *QueryGetEpochUnbondingRecordResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetEpochUnbondingRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetEpochUnbondingRecordResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetEpochUnbondingRecordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetEpochUnbondingRecordResponse.Merge(m, src) -} -func (m *QueryGetEpochUnbondingRecordResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetEpochUnbondingRecordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetEpochUnbondingRecordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetEpochUnbondingRecordResponse proto.InternalMessageInfo - -func (m *QueryGetEpochUnbondingRecordResponse) GetEpochUnbondingRecord() EpochUnbondingRecord { - if m != nil { - return m.EpochUnbondingRecord - } - return EpochUnbondingRecord{} -} - -type QueryAllEpochUnbondingRecordRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllEpochUnbondingRecordRequest) Reset() { *m = QueryAllEpochUnbondingRecordRequest{} } -func (m *QueryAllEpochUnbondingRecordRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllEpochUnbondingRecordRequest) ProtoMessage() {} -func (*QueryAllEpochUnbondingRecordRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{16} -} -func (m *QueryAllEpochUnbondingRecordRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllEpochUnbondingRecordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllEpochUnbondingRecordRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllEpochUnbondingRecordRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllEpochUnbondingRecordRequest.Merge(m, src) -} -func (m *QueryAllEpochUnbondingRecordRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllEpochUnbondingRecordRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllEpochUnbondingRecordRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllEpochUnbondingRecordRequest proto.InternalMessageInfo - -func (m *QueryAllEpochUnbondingRecordRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryAllEpochUnbondingRecordResponse struct { - EpochUnbondingRecord []EpochUnbondingRecord `protobuf:"bytes,1,rep,name=epoch_unbonding_record,json=epochUnbondingRecord,proto3" json:"epoch_unbonding_record"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllEpochUnbondingRecordResponse) Reset() { *m = QueryAllEpochUnbondingRecordResponse{} } -func (m *QueryAllEpochUnbondingRecordResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllEpochUnbondingRecordResponse) ProtoMessage() {} -func (*QueryAllEpochUnbondingRecordResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{17} -} -func (m *QueryAllEpochUnbondingRecordResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllEpochUnbondingRecordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllEpochUnbondingRecordResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllEpochUnbondingRecordResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllEpochUnbondingRecordResponse.Merge(m, src) -} -func (m *QueryAllEpochUnbondingRecordResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllEpochUnbondingRecordResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllEpochUnbondingRecordResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllEpochUnbondingRecordResponse proto.InternalMessageInfo - -func (m *QueryAllEpochUnbondingRecordResponse) GetEpochUnbondingRecord() []EpochUnbondingRecord { - if m != nil { - return m.EpochUnbondingRecord - } - return nil -} - -func (m *QueryAllEpochUnbondingRecordResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryLSMDepositRequest struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (m *QueryLSMDepositRequest) Reset() { *m = QueryLSMDepositRequest{} } -func (m *QueryLSMDepositRequest) String() string { return proto.CompactTextString(m) } -func (*QueryLSMDepositRequest) ProtoMessage() {} -func (*QueryLSMDepositRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{18} -} -func (m *QueryLSMDepositRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLSMDepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLSMDepositRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryLSMDepositRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLSMDepositRequest.Merge(m, src) -} -func (m *QueryLSMDepositRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryLSMDepositRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLSMDepositRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLSMDepositRequest proto.InternalMessageInfo - -func (m *QueryLSMDepositRequest) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *QueryLSMDepositRequest) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -type QueryLSMDepositResponse struct { - Deposit LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit"` -} - -func (m *QueryLSMDepositResponse) Reset() { *m = QueryLSMDepositResponse{} } -func (m *QueryLSMDepositResponse) String() string { return proto.CompactTextString(m) } -func (*QueryLSMDepositResponse) ProtoMessage() {} -func (*QueryLSMDepositResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{19} -} -func (m *QueryLSMDepositResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLSMDepositResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLSMDepositResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryLSMDepositResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLSMDepositResponse.Merge(m, src) -} -func (m *QueryLSMDepositResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryLSMDepositResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLSMDepositResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLSMDepositResponse proto.InternalMessageInfo - -func (m *QueryLSMDepositResponse) GetDeposit() LSMTokenDeposit { - if m != nil { - return m.Deposit - } - return LSMTokenDeposit{} -} - -type QueryLSMDepositsRequest struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` -} - -func (m *QueryLSMDepositsRequest) Reset() { *m = QueryLSMDepositsRequest{} } -func (m *QueryLSMDepositsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryLSMDepositsRequest) ProtoMessage() {} -func (*QueryLSMDepositsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{20} -} -func (m *QueryLSMDepositsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLSMDepositsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLSMDepositsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryLSMDepositsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLSMDepositsRequest.Merge(m, src) -} -func (m *QueryLSMDepositsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryLSMDepositsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLSMDepositsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLSMDepositsRequest proto.InternalMessageInfo - -func (m *QueryLSMDepositsRequest) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *QueryLSMDepositsRequest) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *QueryLSMDepositsRequest) GetStatus() string { - if m != nil { - return m.Status - } - return "" -} - -type QueryLSMDepositsResponse struct { - Deposits []LSMTokenDeposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"` -} - -func (m *QueryLSMDepositsResponse) Reset() { *m = QueryLSMDepositsResponse{} } -func (m *QueryLSMDepositsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryLSMDepositsResponse) ProtoMessage() {} -func (*QueryLSMDepositsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_25e7cc311be81f7b, []int{21} -} -func (m *QueryLSMDepositsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryLSMDepositsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryLSMDepositsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryLSMDepositsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLSMDepositsResponse.Merge(m, src) -} -func (m *QueryLSMDepositsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryLSMDepositsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLSMDepositsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryLSMDepositsResponse proto.InternalMessageInfo - -func (m *QueryLSMDepositsResponse) GetDeposits() []LSMTokenDeposit { - if m != nil { - return m.Deposits - } - return nil -} - -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "stride.records.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "stride.records.QueryParamsResponse") - proto.RegisterType((*QueryGetDepositRecordRequest)(nil), "stride.records.QueryGetDepositRecordRequest") - proto.RegisterType((*QueryGetDepositRecordResponse)(nil), "stride.records.QueryGetDepositRecordResponse") - proto.RegisterType((*QueryAllDepositRecordRequest)(nil), "stride.records.QueryAllDepositRecordRequest") - proto.RegisterType((*QueryAllDepositRecordResponse)(nil), "stride.records.QueryAllDepositRecordResponse") - proto.RegisterType((*QueryDepositRecordByHostRequest)(nil), "stride.records.QueryDepositRecordByHostRequest") - proto.RegisterType((*QueryDepositRecordByHostResponse)(nil), "stride.records.QueryDepositRecordByHostResponse") - proto.RegisterType((*QueryGetUserRedemptionRecordRequest)(nil), "stride.records.QueryGetUserRedemptionRecordRequest") - proto.RegisterType((*QueryGetUserRedemptionRecordResponse)(nil), "stride.records.QueryGetUserRedemptionRecordResponse") - proto.RegisterType((*QueryAllUserRedemptionRecordRequest)(nil), "stride.records.QueryAllUserRedemptionRecordRequest") - proto.RegisterType((*QueryAllUserRedemptionRecordResponse)(nil), "stride.records.QueryAllUserRedemptionRecordResponse") - proto.RegisterType((*QueryAllUserRedemptionRecordForUserRequest)(nil), "stride.records.QueryAllUserRedemptionRecordForUserRequest") - proto.RegisterType((*QueryAllUserRedemptionRecordForUserResponse)(nil), "stride.records.QueryAllUserRedemptionRecordForUserResponse") - proto.RegisterType((*QueryGetEpochUnbondingRecordRequest)(nil), "stride.records.QueryGetEpochUnbondingRecordRequest") - proto.RegisterType((*QueryGetEpochUnbondingRecordResponse)(nil), "stride.records.QueryGetEpochUnbondingRecordResponse") - proto.RegisterType((*QueryAllEpochUnbondingRecordRequest)(nil), "stride.records.QueryAllEpochUnbondingRecordRequest") - proto.RegisterType((*QueryAllEpochUnbondingRecordResponse)(nil), "stride.records.QueryAllEpochUnbondingRecordResponse") - proto.RegisterType((*QueryLSMDepositRequest)(nil), "stride.records.QueryLSMDepositRequest") - proto.RegisterType((*QueryLSMDepositResponse)(nil), "stride.records.QueryLSMDepositResponse") - proto.RegisterType((*QueryLSMDepositsRequest)(nil), "stride.records.QueryLSMDepositsRequest") - proto.RegisterType((*QueryLSMDepositsResponse)(nil), "stride.records.QueryLSMDepositsResponse") -} - -func init() { proto.RegisterFile("stride/records/query.proto", fileDescriptor_25e7cc311be81f7b) } - -var fileDescriptor_25e7cc311be81f7b = []byte{ - // 1200 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4d, 0x6f, 0x1b, 0xc5, - 0x1b, 0xcf, 0xe6, 0xb5, 0x79, 0xd2, 0xe6, 0x9f, 0xff, 0xd4, 0x4a, 0x83, 0x9b, 0x3a, 0xe9, 0xa6, - 0xea, 0x4b, 0x5e, 0x3c, 0x24, 0x0d, 0xaa, 0x68, 0x85, 0x2a, 0x37, 0x90, 0x26, 0x34, 0xad, 0x8a, - 0x43, 0x2f, 0x91, 0xc0, 0x5d, 0x7b, 0x27, 0xce, 0x2a, 0xeb, 0x1d, 0x77, 0x67, 0x5d, 0x30, 0xc6, - 0x17, 0x4e, 0x1c, 0x91, 0xfa, 0x0d, 0x40, 0x7c, 0x03, 0x3e, 0x00, 0xe2, 0x94, 0x03, 0x87, 0x56, - 0x5c, 0x7a, 0x42, 0x28, 0xe1, 0x23, 0x70, 0x46, 0x68, 0x67, 0x66, 0x1d, 0xaf, 0x3d, 0xbb, 0xb6, - 0x23, 0x73, 0xe0, 0xe4, 0x9d, 0x99, 0xe7, 0xe5, 0xf7, 0x7b, 0xe6, 0x99, 0xe7, 0x99, 0x31, 0x24, - 0x99, 0xe7, 0x5a, 0x26, 0xc1, 0x2e, 0x29, 0x50, 0xd7, 0x64, 0xf8, 0x45, 0x85, 0xb8, 0xd5, 0x74, - 0xd9, 0xa5, 0x1e, 0x45, 0x93, 0x62, 0x2d, 0x2d, 0xd7, 0x92, 0xb3, 0x2d, 0xb2, 0xf2, 0x57, 0x48, - 0x27, 0x2f, 0xb7, 0xac, 0x96, 0x0d, 0xd7, 0x28, 0x05, 0x8b, 0x89, 0x22, 0x2d, 0x52, 0xfe, 0x89, - 0xfd, 0x2f, 0x39, 0x3b, 0x5b, 0xa4, 0xb4, 0x68, 0x13, 0x6c, 0x94, 0x2d, 0x6c, 0x38, 0x0e, 0xf5, - 0x0c, 0xcf, 0xa2, 0x4e, 0xa0, 0xb3, 0x58, 0xa0, 0xac, 0x44, 0x19, 0xce, 0x1b, 0x8c, 0x08, 0x5c, - 0xf8, 0xe5, 0x6a, 0x9e, 0x78, 0xc6, 0x2a, 0x2e, 0x1b, 0x45, 0xcb, 0xe1, 0xc2, 0x42, 0x56, 0x4f, - 0x00, 0xfa, 0xc4, 0x97, 0x78, 0xca, 0x9d, 0x66, 0xc9, 0x8b, 0x0a, 0x61, 0x9e, 0xfe, 0x08, 0x2e, - 0x86, 0x66, 0x59, 0x99, 0x3a, 0x8c, 0xa0, 0x75, 0x18, 0x15, 0xe0, 0x66, 0xb4, 0x79, 0xed, 0xe6, - 0xc4, 0xda, 0x74, 0x3a, 0x4c, 0x34, 0x2d, 0xe4, 0x1f, 0x0c, 0x1f, 0xfd, 0x3e, 0x37, 0x90, 0x95, - 0xb2, 0x7a, 0x1a, 0x66, 0xb9, 0xb1, 0x87, 0xc4, 0xfb, 0x90, 0x94, 0x29, 0xb3, 0xbc, 0x2c, 0x17, - 0x97, 0xce, 0xd0, 0x24, 0x0c, 0x5a, 0x26, 0xb7, 0x38, 0x9c, 0x1d, 0xb4, 0x4c, 0xfd, 0x10, 0xae, - 0x44, 0xc8, 0x4b, 0x18, 0x1f, 0xc3, 0xa4, 0x29, 0x16, 0x72, 0xc2, 0xb1, 0x84, 0x73, 0xa5, 0x15, - 0x4e, 0x48, 0x5d, 0xa2, 0xba, 0x60, 0x36, 0x4f, 0xea, 0xfb, 0x12, 0x5c, 0xc6, 0xb6, 0x95, 0xe0, - 0x36, 0x01, 0x4e, 0x63, 0x26, 0xfd, 0x5c, 0x4f, 0x8b, 0x00, 0xa7, 0xfd, 0x00, 0xa7, 0xc5, 0xc6, - 0xcb, 0x00, 0xa7, 0x9f, 0x1a, 0x45, 0x22, 0x75, 0xb3, 0x4d, 0x9a, 0xfa, 0x4f, 0x9a, 0x64, 0xd5, - 0xee, 0x28, 0x86, 0xd5, 0xd0, 0xd9, 0x58, 0xa1, 0x87, 0x21, 0xd4, 0x83, 0x1c, 0xf5, 0x8d, 0x8e, - 0xa8, 0x05, 0x90, 0x10, 0xec, 0x0d, 0x98, 0xe3, 0xa8, 0xc3, 0x3e, 0xab, 0x5b, 0x94, 0x79, 0x41, - 0x84, 0xe6, 0xe1, 0xfc, 0x01, 0x65, 0x5e, 0xee, 0x2b, 0xea, 0x90, 0x9c, 0xdc, 0xc8, 0xf1, 0x2c, - 0xf8, 0x73, 0x7b, 0xd4, 0x21, 0xdb, 0xa6, 0xee, 0xc0, 0x7c, 0xb4, 0x91, 0xfe, 0xb3, 0xd7, 0xdf, - 0x83, 0x85, 0x20, 0x81, 0x9e, 0x31, 0xe2, 0x66, 0x89, 0x49, 0x4a, 0x65, 0x9f, 0x4e, 0x54, 0xde, - 0x8d, 0xf3, 0xbc, 0xfb, 0x56, 0x83, 0x6b, 0xf1, 0x7a, 0x12, 0xeb, 0x73, 0x98, 0xae, 0x30, 0xe2, - 0xe6, 0xdc, 0x86, 0x40, 0x38, 0x0f, 0xaf, 0xb5, 0x62, 0x56, 0x59, 0x93, 0xd0, 0x13, 0x15, 0xc5, - 0x9a, 0x5e, 0x92, 0x0c, 0x32, 0xb6, 0x1d, 0xc7, 0xa0, 0x5f, 0xc9, 0xf9, 0x26, 0x60, 0x1e, 0xe9, - 0xaf, 0x0b, 0xe6, 0x43, 0xfd, 0x60, 0xde, 0xbf, 0xcc, 0x7d, 0xa3, 0xc1, 0x62, 0x1c, 0xa7, 0x4d, - 0xea, 0x8a, 0x69, 0x11, 0xca, 0x77, 0xe0, 0x5c, 0xe1, 0xc0, 0xb0, 0x9c, 0xd3, 0x0c, 0x1e, 0xe3, - 0xe3, 0x6d, 0x13, 0x4d, 0xc1, 0x90, 0x69, 0x54, 0x39, 0x96, 0xe1, 0xac, 0xff, 0x89, 0x66, 0x60, - 0xcc, 0x30, 0x4d, 0x97, 0x30, 0x36, 0x33, 0x24, 0x64, 0xe5, 0x10, 0x25, 0x60, 0xc4, 0xb6, 0x4a, - 0x96, 0x37, 0x33, 0xcc, 0xa5, 0xc5, 0xa0, 0x65, 0x9f, 0x46, 0xce, 0xbc, 0x4f, 0x6f, 0x35, 0x58, - 0xea, 0x8a, 0xd3, 0x7f, 0x6f, 0xbb, 0xb6, 0x4e, 0xcf, 0xec, 0x47, 0x65, 0x5a, 0x38, 0x78, 0xe6, - 0xe4, 0xa9, 0x63, 0x5a, 0x4e, 0x31, 0x9c, 0xf1, 0x57, 0xe1, 0x3c, 0xf1, 0x97, 0x73, 0x4e, 0xa5, - 0x94, 0x27, 0xae, 0xec, 0x1a, 0x13, 0x7c, 0xee, 0x09, 0x9f, 0x0a, 0x1d, 0x63, 0xb5, 0xa9, 0xd3, - 0xe8, 0x08, 0x5b, 0x95, 0x40, 0xa0, 0xc3, 0x31, 0x56, 0x59, 0x0b, 0xa2, 0x43, 0x14, 0x6b, 0xcd, - 0xc7, 0x38, 0x8e, 0xd4, 0xbf, 0x71, 0x8c, 0xcf, 0xcc, 0x7c, 0xa8, 0x1f, 0xcc, 0xfb, 0x97, 0x17, - 0xdb, 0x30, 0xcd, 0x29, 0xed, 0xec, 0x3e, 0x6e, 0x54, 0xfe, 0x8e, 0x27, 0x36, 0x01, 0x23, 0x26, - 0x71, 0x68, 0x89, 0x3b, 0x1e, 0xcf, 0x8a, 0x81, 0xbe, 0x07, 0x97, 0xda, 0x4c, 0xc9, 0x80, 0xdc, - 0x87, 0x31, 0xd9, 0x42, 0x64, 0xf8, 0xe7, 0x5a, 0x23, 0xb0, 0xb3, 0xfb, 0xf8, 0x53, 0x7a, 0x48, - 0x1c, 0xa9, 0x29, 0xc9, 0x07, 0x5a, 0x7a, 0xb5, 0xcd, 0x36, 0xeb, 0x02, 0xe7, 0x12, 0xfc, 0xff, - 0xa5, 0x61, 0x5b, 0xa6, 0xe1, 0x51, 0x37, 0x17, 0x54, 0x14, 0x81, 0x79, 0xaa, 0xb1, 0x90, 0x91, - 0xa5, 0x65, 0x1a, 0x46, 0x99, 0x67, 0x78, 0x95, 0xa0, 0xe6, 0xc8, 0x91, 0xfe, 0x19, 0xcc, 0xb4, - 0xbb, 0x96, 0xbc, 0x32, 0x70, 0x4e, 0x22, 0x64, 0x72, 0x6b, 0xbb, 0x24, 0xd6, 0x50, 0x5b, 0xfb, - 0xeb, 0x7f, 0x30, 0xc2, 0xed, 0xa3, 0xaf, 0x61, 0x54, 0xdc, 0xef, 0x90, 0xde, 0x6a, 0xa4, 0xfd, - 0x0a, 0x99, 0x5c, 0x88, 0x95, 0x11, 0xf8, 0xf4, 0x5b, 0xdf, 0xfc, 0xf6, 0xe7, 0xab, 0xc1, 0x05, - 0x74, 0x15, 0xef, 0x72, 0xe1, 0x1d, 0x23, 0xcf, 0xb0, 0xf2, 0x3a, 0x8c, 0x7e, 0xd1, 0x20, 0xa1, - 0x2a, 0x4f, 0xe8, 0xb6, 0xd2, 0x51, 0x7c, 0xef, 0x4f, 0xae, 0xf7, 0xa6, 0x24, 0xe1, 0xde, 0xe7, - 0x70, 0xdf, 0x47, 0x77, 0x24, 0xdc, 0x15, 0x15, 0x5e, 0x75, 0xc5, 0xc5, 0x35, 0xcb, 0xac, 0xa3, - 0x9f, 0x35, 0xb8, 0xa4, 0xf2, 0x90, 0xb1, 0xed, 0x08, 0x1e, 0xf1, 0x37, 0x80, 0x08, 0x1e, 0x1d, - 0xda, 0xb8, 0x7e, 0x97, 0xf3, 0x58, 0x47, 0x6b, 0xbd, 0xf3, 0x40, 0x7f, 0x6b, 0x70, 0x39, 0xa6, - 0xf7, 0xa0, 0xbb, 0xbd, 0x20, 0x0a, 0x37, 0xe1, 0xe4, 0xbd, 0x33, 0xe9, 0x4a, 0x52, 0xfb, 0x9c, - 0xd4, 0x73, 0xf4, 0x79, 0xef, 0xa4, 0x72, 0xfb, 0xd4, 0xcd, 0xf9, 0x4b, 0xb8, 0x16, 0x1c, 0xd5, - 0x3a, 0xae, 0x99, 0x46, 0xb5, 0x8e, 0x6b, 0xf2, 0x58, 0xd6, 0x71, 0x8d, 0xf7, 0xf2, 0x3a, 0xfa, - 0x55, 0x83, 0x84, 0xaa, 0x1e, 0x46, 0x27, 0x62, 0x4c, 0xed, 0x8f, 0x4e, 0xc4, 0xb8, 0x02, 0xae, - 0x6f, 0x73, 0xae, 0x1b, 0x28, 0x13, 0xc7, 0x55, 0x5d, 0xe2, 0x71, 0xad, 0xb9, 0x81, 0x8a, 0x94, - 0x54, 0xf9, 0x8a, 0x4d, 0xc9, 0xde, 0x19, 0x75, 0x68, 0x49, 0xdd, 0xa5, 0xa4, 0x9a, 0x11, 0xfa, - 0x51, 0x83, 0x0b, 0xa1, 0x67, 0x01, 0x5a, 0x8e, 0x8a, 0xaa, 0xea, 0x8d, 0x97, 0x5c, 0xe9, 0x52, - 0x5a, 0x42, 0xbd, 0xc3, 0xa1, 0xae, 0x22, 0x1c, 0x07, 0x35, 0xfc, 0x98, 0x11, 0xa7, 0xff, 0x07, - 0x0d, 0xa6, 0x42, 0x26, 0xfd, 0x18, 0x2f, 0x47, 0x85, 0xab, 0x07, 0xa8, 0x51, 0x6f, 0x4a, 0x7d, - 0x8d, 0x43, 0x5d, 0x46, 0x8b, 0xdd, 0x43, 0x45, 0x47, 0x1a, 0x5c, 0x54, 0xbc, 0xd4, 0x10, 0x56, - 0xba, 0x8e, 0x7e, 0x18, 0x26, 0xdf, 0xed, 0x5e, 0x41, 0xc2, 0x7d, 0xc2, 0xe1, 0x6e, 0xa1, 0xcd, - 0xee, 0xe1, 0xe6, 0xf2, 0xd5, 0x5c, 0xe3, 0xf9, 0x89, 0x6b, 0xcd, 0x2f, 0xd1, 0x3a, 0xfa, 0x5e, - 0x03, 0x38, 0x6d, 0x8b, 0xe8, 0xba, 0x12, 0x50, 0xdb, 0xcd, 0x22, 0x79, 0xa3, 0xa3, 0x9c, 0xc4, - 0xbb, 0xc1, 0xf1, 0x7e, 0x80, 0xee, 0xa9, 0xf0, 0x32, 0xcf, 0x38, 0x24, 0x56, 0xbe, 0x80, 0x6d, - 0x56, 0xca, 0x49, 0xd0, 0xe1, 0xfa, 0xe2, 0xdf, 0x4a, 0xea, 0xe8, 0x95, 0x06, 0x13, 0x4d, 0xbd, - 0x1b, 0x75, 0xf2, 0xde, 0xe8, 0xb0, 0x37, 0x3b, 0x0b, 0x4a, 0x9c, 0xab, 0x1c, 0xe7, 0x12, 0xba, - 0xd5, 0x2d, 0x4e, 0xf6, 0xe0, 0xd1, 0xd1, 0x71, 0x4a, 0x7b, 0x7d, 0x9c, 0xd2, 0xfe, 0x38, 0x4e, - 0x69, 0xdf, 0x9d, 0xa4, 0x06, 0x5e, 0x9f, 0xa4, 0x06, 0xde, 0x9e, 0xa4, 0x06, 0xf6, 0x56, 0x8b, - 0x96, 0x77, 0x50, 0xc9, 0xa7, 0x0b, 0xb4, 0x84, 0x4b, 0x96, 0x7d, 0x58, 0xfd, 0xc2, 0xa8, 0xae, - 0xd8, 0xbe, 0xc1, 0x60, 0x84, 0xbf, 0x6c, 0x6c, 0x96, 0x57, 0x2d, 0x13, 0x96, 0x1f, 0xe5, 0xff, - 0x35, 0xdd, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xf5, 0xf6, 0xcc, 0x34, 0x13, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Queries a UserRedemptionRecord by id. - UserRedemptionRecord(ctx context.Context, in *QueryGetUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryGetUserRedemptionRecordResponse, error) - // Queries a list of UserRedemptionRecord items. - UserRedemptionRecordAll(ctx context.Context, in *QueryAllUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordResponse, error) - // Queries a list of UserRedemptionRecord items by chainId / userId pair. - UserRedemptionRecordForUser(ctx context.Context, in *QueryAllUserRedemptionRecordForUserRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordForUserResponse, error) - // Queries a EpochUnbondingRecord by id. - EpochUnbondingRecord(ctx context.Context, in *QueryGetEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryGetEpochUnbondingRecordResponse, error) - // Queries a list of EpochUnbondingRecord items. - EpochUnbondingRecordAll(ctx context.Context, in *QueryAllEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryAllEpochUnbondingRecordResponse, error) - // Queries a DepositRecord by id. - DepositRecord(ctx context.Context, in *QueryGetDepositRecordRequest, opts ...grpc.CallOption) (*QueryGetDepositRecordResponse, error) - // Queries a list of DepositRecord items. - DepositRecordAll(ctx context.Context, in *QueryAllDepositRecordRequest, opts ...grpc.CallOption) (*QueryAllDepositRecordResponse, error) - // Queries a list of DepositRecord items for a given host zone - DepositRecordByHost(ctx context.Context, in *QueryDepositRecordByHostRequest, opts ...grpc.CallOption) (*QueryDepositRecordByHostResponse, error) - // Queries the existing LSMTokenDeposits for one specific deposit - LSMDeposit(ctx context.Context, in *QueryLSMDepositRequest, opts ...grpc.CallOption) (*QueryLSMDepositResponse, error) - // Queries the existing LSMTokenDeposits for all which match filters - // - // intended use: - // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z - LSMDeposits(ctx context.Context, in *QueryLSMDepositsRequest, opts ...grpc.CallOption) (*QueryLSMDepositsResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UserRedemptionRecord(ctx context.Context, in *QueryGetUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryGetUserRedemptionRecordResponse, error) { - out := new(QueryGetUserRedemptionRecordResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/UserRedemptionRecord", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UserRedemptionRecordAll(ctx context.Context, in *QueryAllUserRedemptionRecordRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordResponse, error) { - out := new(QueryAllUserRedemptionRecordResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/UserRedemptionRecordAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) UserRedemptionRecordForUser(ctx context.Context, in *QueryAllUserRedemptionRecordForUserRequest, opts ...grpc.CallOption) (*QueryAllUserRedemptionRecordForUserResponse, error) { - out := new(QueryAllUserRedemptionRecordForUserResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/UserRedemptionRecordForUser", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochUnbondingRecord(ctx context.Context, in *QueryGetEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryGetEpochUnbondingRecordResponse, error) { - out := new(QueryGetEpochUnbondingRecordResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/EpochUnbondingRecord", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochUnbondingRecordAll(ctx context.Context, in *QueryAllEpochUnbondingRecordRequest, opts ...grpc.CallOption) (*QueryAllEpochUnbondingRecordResponse, error) { - out := new(QueryAllEpochUnbondingRecordResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/EpochUnbondingRecordAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DepositRecord(ctx context.Context, in *QueryGetDepositRecordRequest, opts ...grpc.CallOption) (*QueryGetDepositRecordResponse, error) { - out := new(QueryGetDepositRecordResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/DepositRecord", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DepositRecordAll(ctx context.Context, in *QueryAllDepositRecordRequest, opts ...grpc.CallOption) (*QueryAllDepositRecordResponse, error) { - out := new(QueryAllDepositRecordResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/DepositRecordAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) DepositRecordByHost(ctx context.Context, in *QueryDepositRecordByHostRequest, opts ...grpc.CallOption) (*QueryDepositRecordByHostResponse, error) { - out := new(QueryDepositRecordByHostResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/DepositRecordByHost", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LSMDeposit(ctx context.Context, in *QueryLSMDepositRequest, opts ...grpc.CallOption) (*QueryLSMDepositResponse, error) { - out := new(QueryLSMDepositResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/LSMDeposit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) LSMDeposits(ctx context.Context, in *QueryLSMDepositsRequest, opts ...grpc.CallOption) (*QueryLSMDepositsResponse, error) { - out := new(QueryLSMDepositsResponse) - err := c.cc.Invoke(ctx, "/stride.records.Query/LSMDeposits", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Queries a UserRedemptionRecord by id. - UserRedemptionRecord(context.Context, *QueryGetUserRedemptionRecordRequest) (*QueryGetUserRedemptionRecordResponse, error) - // Queries a list of UserRedemptionRecord items. - UserRedemptionRecordAll(context.Context, *QueryAllUserRedemptionRecordRequest) (*QueryAllUserRedemptionRecordResponse, error) - // Queries a list of UserRedemptionRecord items by chainId / userId pair. - UserRedemptionRecordForUser(context.Context, *QueryAllUserRedemptionRecordForUserRequest) (*QueryAllUserRedemptionRecordForUserResponse, error) - // Queries a EpochUnbondingRecord by id. - EpochUnbondingRecord(context.Context, *QueryGetEpochUnbondingRecordRequest) (*QueryGetEpochUnbondingRecordResponse, error) - // Queries a list of EpochUnbondingRecord items. - EpochUnbondingRecordAll(context.Context, *QueryAllEpochUnbondingRecordRequest) (*QueryAllEpochUnbondingRecordResponse, error) - // Queries a DepositRecord by id. - DepositRecord(context.Context, *QueryGetDepositRecordRequest) (*QueryGetDepositRecordResponse, error) - // Queries a list of DepositRecord items. - DepositRecordAll(context.Context, *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) - // Queries a list of DepositRecord items for a given host zone - DepositRecordByHost(context.Context, *QueryDepositRecordByHostRequest) (*QueryDepositRecordByHostResponse, error) - // Queries the existing LSMTokenDeposits for one specific deposit - LSMDeposit(context.Context, *QueryLSMDepositRequest) (*QueryLSMDepositResponse, error) - // Queries the existing LSMTokenDeposits for all which match filters - // - // intended use: - // ...stakeibc/lsm_deposits?chain_id=X&validator_address=Y&status=Z - LSMDeposits(context.Context, *QueryLSMDepositsRequest) (*QueryLSMDepositsResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (*UnimplementedQueryServer) UserRedemptionRecord(ctx context.Context, req *QueryGetUserRedemptionRecordRequest) (*QueryGetUserRedemptionRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRedemptionRecord not implemented") -} -func (*UnimplementedQueryServer) UserRedemptionRecordAll(ctx context.Context, req *QueryAllUserRedemptionRecordRequest) (*QueryAllUserRedemptionRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRedemptionRecordAll not implemented") -} -func (*UnimplementedQueryServer) UserRedemptionRecordForUser(ctx context.Context, req *QueryAllUserRedemptionRecordForUserRequest) (*QueryAllUserRedemptionRecordForUserResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRedemptionRecordForUser not implemented") -} -func (*UnimplementedQueryServer) EpochUnbondingRecord(ctx context.Context, req *QueryGetEpochUnbondingRecordRequest) (*QueryGetEpochUnbondingRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochUnbondingRecord not implemented") -} -func (*UnimplementedQueryServer) EpochUnbondingRecordAll(ctx context.Context, req *QueryAllEpochUnbondingRecordRequest) (*QueryAllEpochUnbondingRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochUnbondingRecordAll not implemented") -} -func (*UnimplementedQueryServer) DepositRecord(ctx context.Context, req *QueryGetDepositRecordRequest) (*QueryGetDepositRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositRecord not implemented") -} -func (*UnimplementedQueryServer) DepositRecordAll(ctx context.Context, req *QueryAllDepositRecordRequest) (*QueryAllDepositRecordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositRecordAll not implemented") -} -func (*UnimplementedQueryServer) DepositRecordByHost(ctx context.Context, req *QueryDepositRecordByHostRequest) (*QueryDepositRecordByHostResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DepositRecordByHost not implemented") -} -func (*UnimplementedQueryServer) LSMDeposit(ctx context.Context, req *QueryLSMDepositRequest) (*QueryLSMDepositResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LSMDeposit not implemented") -} -func (*UnimplementedQueryServer) LSMDeposits(ctx context.Context, req *QueryLSMDepositsRequest) (*QueryLSMDepositsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LSMDeposits not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UserRedemptionRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetUserRedemptionRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UserRedemptionRecord(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/UserRedemptionRecord", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserRedemptionRecord(ctx, req.(*QueryGetUserRedemptionRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UserRedemptionRecordAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllUserRedemptionRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UserRedemptionRecordAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/UserRedemptionRecordAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserRedemptionRecordAll(ctx, req.(*QueryAllUserRedemptionRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_UserRedemptionRecordForUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllUserRedemptionRecordForUserRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).UserRedemptionRecordForUser(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/UserRedemptionRecordForUser", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserRedemptionRecordForUser(ctx, req.(*QueryAllUserRedemptionRecordForUserRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochUnbondingRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetEpochUnbondingRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochUnbondingRecord(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/EpochUnbondingRecord", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochUnbondingRecord(ctx, req.(*QueryGetEpochUnbondingRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochUnbondingRecordAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllEpochUnbondingRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochUnbondingRecordAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/EpochUnbondingRecordAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochUnbondingRecordAll(ctx, req.(*QueryAllEpochUnbondingRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DepositRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetDepositRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DepositRecord(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/DepositRecord", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DepositRecord(ctx, req.(*QueryGetDepositRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DepositRecordAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllDepositRecordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DepositRecordAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/DepositRecordAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DepositRecordAll(ctx, req.(*QueryAllDepositRecordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_DepositRecordByHost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryDepositRecordByHostRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).DepositRecordByHost(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/DepositRecordByHost", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).DepositRecordByHost(ctx, req.(*QueryDepositRecordByHostRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LSMDeposit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLSMDepositRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LSMDeposit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/LSMDeposit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LSMDeposit(ctx, req.(*QueryLSMDepositRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_LSMDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLSMDepositsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).LSMDeposits(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.records.Query/LSMDeposits", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LSMDeposits(ctx, req.(*QueryLSMDepositsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "stride.records.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "UserRedemptionRecord", - Handler: _Query_UserRedemptionRecord_Handler, - }, - { - MethodName: "UserRedemptionRecordAll", - Handler: _Query_UserRedemptionRecordAll_Handler, - }, - { - MethodName: "UserRedemptionRecordForUser", - Handler: _Query_UserRedemptionRecordForUser_Handler, - }, - { - MethodName: "EpochUnbondingRecord", - Handler: _Query_EpochUnbondingRecord_Handler, - }, - { - MethodName: "EpochUnbondingRecordAll", - Handler: _Query_EpochUnbondingRecordAll_Handler, - }, - { - MethodName: "DepositRecord", - Handler: _Query_DepositRecord_Handler, - }, - { - MethodName: "DepositRecordAll", - Handler: _Query_DepositRecordAll_Handler, - }, - { - MethodName: "DepositRecordByHost", - Handler: _Query_DepositRecordByHost_Handler, - }, - { - MethodName: "LSMDeposit", - Handler: _Query_LSMDeposit_Handler, - }, - { - MethodName: "LSMDeposits", - Handler: _Query_LSMDeposits_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/records/query.proto", -} - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryGetDepositRecordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetDepositRecordRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetDepositRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Id != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryGetDepositRecordResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetDepositRecordResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetDepositRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.DepositRecord.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryAllDepositRecordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllDepositRecordRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllDepositRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAllDepositRecordResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllDepositRecordResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllDepositRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.DepositRecord) > 0 { - for iNdEx := len(m.DepositRecord) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DepositRecord[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryDepositRecordByHostRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryDepositRecordByHostRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDepositRecordByHostRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryDepositRecordByHostResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryDepositRecordByHostResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryDepositRecordByHostResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DepositRecord) > 0 { - for iNdEx := len(m.DepositRecord) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DepositRecord[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryGetUserRedemptionRecordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetUserRedemptionRecordRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetUserRedemptionRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetUserRedemptionRecordResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetUserRedemptionRecordResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetUserRedemptionRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.UserRedemptionRecord.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryAllUserRedemptionRecordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllUserRedemptionRecordRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllUserRedemptionRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAllUserRedemptionRecordResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllUserRedemptionRecordResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllUserRedemptionRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.UserRedemptionRecord) > 0 { - for iNdEx := len(m.UserRedemptionRecord) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UserRedemptionRecord[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryAllUserRedemptionRecordForUserRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllUserRedemptionRecordForUserRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllUserRedemptionRecordForUserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Limit != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x20 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x1a - } - if m.Day != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Day)) - i-- - dAtA[i] = 0x10 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAllUserRedemptionRecordForUserResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllUserRedemptionRecordForUserResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllUserRedemptionRecordForUserResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.UserRedemptionRecord) > 0 { - for iNdEx := len(m.UserRedemptionRecord) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.UserRedemptionRecord[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryGetEpochUnbondingRecordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetEpochUnbondingRecordRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetEpochUnbondingRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EpochNumber != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.EpochNumber)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryGetEpochUnbondingRecordResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetEpochUnbondingRecordResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetEpochUnbondingRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.EpochUnbondingRecord.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryAllEpochUnbondingRecordRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllEpochUnbondingRecordRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllEpochUnbondingRecordRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAllEpochUnbondingRecordResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllEpochUnbondingRecordResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllEpochUnbondingRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.EpochUnbondingRecord) > 0 { - for iNdEx := len(m.EpochUnbondingRecord) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EpochUnbondingRecord[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryLSMDepositRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryLSMDepositRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLSMDepositRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryLSMDepositResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryLSMDepositResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLSMDepositResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryLSMDepositsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryLSMDepositsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLSMDepositsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Status) > 0 { - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryLSMDepositsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryLSMDepositsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryLSMDepositsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Deposits) > 0 { - for iNdEx := len(m.Deposits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Deposits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryGetDepositRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovQuery(uint64(m.Id)) - } - return n -} - -func (m *QueryGetDepositRecordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.DepositRecord.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllDepositRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllDepositRecordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DepositRecord) > 0 { - for _, e := range m.DepositRecord { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryDepositRecordByHostRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryDepositRecordByHostResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DepositRecord) > 0 { - for _, e := range m.DepositRecord { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryGetUserRedemptionRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetUserRedemptionRecordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.UserRedemptionRecord.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllUserRedemptionRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllUserRedemptionRecordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.UserRedemptionRecord) > 0 { - for _, e := range m.UserRedemptionRecord { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllUserRedemptionRecordForUserRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Day != 0 { - n += 1 + sovQuery(uint64(m.Day)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Limit != 0 { - n += 1 + sovQuery(uint64(m.Limit)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllUserRedemptionRecordForUserResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.UserRedemptionRecord) > 0 { - for _, e := range m.UserRedemptionRecord { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetEpochUnbondingRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EpochNumber != 0 { - n += 1 + sovQuery(uint64(m.EpochNumber)) - } - return n -} - -func (m *QueryGetEpochUnbondingRecordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.EpochUnbondingRecord.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllEpochUnbondingRecordRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllEpochUnbondingRecordResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.EpochUnbondingRecord) > 0 { - for _, e := range m.EpochUnbondingRecord { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryLSMDepositRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryLSMDepositResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Deposit.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryLSMDepositsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Status) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryLSMDepositsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Deposits) > 0 { - for _, e := range m.Deposits { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetDepositRecordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetDepositRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetDepositRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetDepositRecordResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetDepositRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetDepositRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DepositRecord.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllDepositRecordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllDepositRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllDepositRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllDepositRecordResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllDepositRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllDepositRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositRecord = append(m.DepositRecord, DepositRecord{}) - if err := m.DepositRecord[len(m.DepositRecord)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryDepositRecordByHostRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryDepositRecordByHostRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDepositRecordByHostRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryDepositRecordByHostResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryDepositRecordByHostResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDepositRecordByHostResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositRecord = append(m.DepositRecord, DepositRecord{}) - if err := m.DepositRecord[len(m.DepositRecord)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetUserRedemptionRecordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetUserRedemptionRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetUserRedemptionRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetUserRedemptionRecordResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetUserRedemptionRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetUserRedemptionRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UserRedemptionRecord.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllUserRedemptionRecordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllUserRedemptionRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllUserRedemptionRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllUserRedemptionRecordResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllUserRedemptionRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllUserRedemptionRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserRedemptionRecord = append(m.UserRedemptionRecord, UserRedemptionRecord{}) - if err := m.UserRedemptionRecord[len(m.UserRedemptionRecord)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllUserRedemptionRecordForUserRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllUserRedemptionRecordForUserRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllUserRedemptionRecordForUserRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Day", wireType) - } - m.Day = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Day |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllUserRedemptionRecordForUserResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllUserRedemptionRecordForUserResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllUserRedemptionRecordForUserResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserRedemptionRecord = append(m.UserRedemptionRecord, UserRedemptionRecord{}) - if err := m.UserRedemptionRecord[len(m.UserRedemptionRecord)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetEpochUnbondingRecordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetEpochUnbondingRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetEpochUnbondingRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - m.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetEpochUnbondingRecordResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetEpochUnbondingRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetEpochUnbondingRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.EpochUnbondingRecord.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllEpochUnbondingRecordRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllEpochUnbondingRecordRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllEpochUnbondingRecordRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllEpochUnbondingRecordResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllEpochUnbondingRecordResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllEpochUnbondingRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecord", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EpochUnbondingRecord = append(m.EpochUnbondingRecord, EpochUnbondingRecord{}) - if err := m.EpochUnbondingRecord[len(m.EpochUnbondingRecord)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLSMDepositRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryLSMDepositRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLSMDepositRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLSMDepositResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryLSMDepositResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLSMDepositResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLSMDepositsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryLSMDepositsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLSMDepositsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryLSMDepositsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryLSMDepositsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLSMDepositsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Deposits = append(m.Deposits, LSMTokenDeposit{}) - if err := m.Deposits[len(m.Deposits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/records/types/query.pb.gw.go b/x/records/types/query.pb.gw.go deleted file mode 100644 index 11571cb44..000000000 --- a/x/records/types/query.pb.gw.go +++ /dev/null @@ -1,1197 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: stride/records/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_UserRedemptionRecord_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetUserRedemptionRecordRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UserRedemptionRecord(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_UserRedemptionRecord_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetUserRedemptionRecordRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.UserRedemptionRecord(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_UserRedemptionRecordAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_UserRedemptionRecordAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllUserRedemptionRecordRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserRedemptionRecordAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UserRedemptionRecordAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_UserRedemptionRecordAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllUserRedemptionRecordRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserRedemptionRecordAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UserRedemptionRecordAll(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_UserRedemptionRecordForUser_0 = &utilities.DoubleArray{Encoding: map[string]int{"chain_id": 0, "day": 1, "address": 2, "limit": 3}, Base: []int{1, 1, 2, 3, 4, 0, 0, 0, 0}, Check: []int{0, 1, 1, 1, 1, 2, 3, 4, 5}} -) - -func request_Query_UserRedemptionRecordForUser_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllUserRedemptionRecordForUserRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - val, ok = pathParams["day"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "day") - } - - protoReq.Day, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "day", err) - } - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - val, ok = pathParams["limit"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "limit") - } - - protoReq.Limit, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "limit", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserRedemptionRecordForUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.UserRedemptionRecordForUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_UserRedemptionRecordForUser_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllUserRedemptionRecordForUserRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - val, ok = pathParams["day"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "day") - } - - protoReq.Day, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "day", err) - } - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - val, ok = pathParams["limit"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "limit") - } - - protoReq.Limit, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "limit", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserRedemptionRecordForUser_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.UserRedemptionRecordForUser(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_EpochUnbondingRecord_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetEpochUnbondingRecordRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["epoch_number"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") - } - - protoReq.EpochNumber, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) - } - - msg, err := client.EpochUnbondingRecord(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EpochUnbondingRecord_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetEpochUnbondingRecordRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["epoch_number"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_number") - } - - protoReq.EpochNumber, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_number", err) - } - - msg, err := server.EpochUnbondingRecord(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_EpochUnbondingRecordAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_EpochUnbondingRecordAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllEpochUnbondingRecordRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EpochUnbondingRecordAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.EpochUnbondingRecordAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EpochUnbondingRecordAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllEpochUnbondingRecordRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EpochUnbondingRecordAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.EpochUnbondingRecordAll(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_DepositRecord_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetDepositRecordRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.DepositRecord(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_DepositRecord_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetDepositRecordRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Uint64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.DepositRecord(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_DepositRecordAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_DepositRecordAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllDepositRecordRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DepositRecordAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DepositRecordAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_DepositRecordAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllDepositRecordRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_DepositRecordAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DepositRecordAll(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_DepositRecordByHost_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryDepositRecordByHostRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["host_zone_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_zone_id") - } - - protoReq.HostZoneId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_zone_id", err) - } - - msg, err := client.DepositRecordByHost(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_DepositRecordByHost_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryDepositRecordByHostRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["host_zone_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "host_zone_id") - } - - protoReq.HostZoneId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "host_zone_id", err) - } - - msg, err := server.DepositRecordByHost(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_LSMDeposit_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLSMDepositRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - val, ok = pathParams["denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") - } - - protoReq.Denom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) - } - - msg, err := client.LSMDeposit(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_LSMDeposit_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLSMDepositRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - val, ok = pathParams["denom"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "denom") - } - - protoReq.Denom, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "denom", err) - } - - msg, err := server.LSMDeposit(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_LSMDeposits_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_LSMDeposits_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLSMDepositsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LSMDeposits_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.LSMDeposits(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_LSMDeposits_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLSMDepositsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LSMDeposits_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.LSMDeposits(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_UserRedemptionRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_UserRedemptionRecord_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_UserRedemptionRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_UserRedemptionRecordAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_UserRedemptionRecordAll_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_UserRedemptionRecordAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_UserRedemptionRecordForUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_UserRedemptionRecordForUser_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_UserRedemptionRecordForUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochUnbondingRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EpochUnbondingRecord_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochUnbondingRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochUnbondingRecordAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EpochUnbondingRecordAll_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochUnbondingRecordAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_DepositRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_DepositRecord_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_DepositRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_DepositRecordAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_DepositRecordAll_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_DepositRecordAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_DepositRecordByHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_DepositRecordByHost_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_DepositRecordByHost_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LSMDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_LSMDeposit_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_LSMDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LSMDeposits_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_LSMDeposits_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_LSMDeposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_UserRedemptionRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_UserRedemptionRecord_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_UserRedemptionRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_UserRedemptionRecordAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_UserRedemptionRecordAll_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_UserRedemptionRecordAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_UserRedemptionRecordForUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_UserRedemptionRecordForUser_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_UserRedemptionRecordForUser_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochUnbondingRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EpochUnbondingRecord_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochUnbondingRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochUnbondingRecordAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EpochUnbondingRecordAll_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochUnbondingRecordAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_DepositRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_DepositRecord_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_DepositRecord_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_DepositRecordAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_DepositRecordAll_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_DepositRecordAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_DepositRecordByHost_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_DepositRecordByHost_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_DepositRecordByHost_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LSMDeposit_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_LSMDeposit_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_LSMDeposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_LSMDeposits_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_LSMDeposits_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_LSMDeposits_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"StrideLabs", "stride", "records", "params"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_UserRedemptionRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "records", "user_redemption_record", "id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_UserRedemptionRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "records", "user_redemption_record"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_UserRedemptionRecordForUser_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7}, []string{"Stride-Labs", "stride", "records", "user_redemption_record_for_user", "chain_id", "day", "address", "limit"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_EpochUnbondingRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "records", "epoch_unbonding_record", "epoch_number"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_EpochUnbondingRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "records", "epoch_unbonding_record"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_DepositRecord_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "records", "deposit_record", "id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_DepositRecordAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "records", "deposit_record"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_DepositRecordByHost_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "records", "deposit_record_by_host_zone", "host_zone_id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_LSMDeposit_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"Stride-Labs", "stride", "stakeibc", "lsm_deposit", "chain_id", "denom"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_LSMDeposits_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "stakeibc", "lsm_deposits"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - - forward_Query_UserRedemptionRecord_0 = runtime.ForwardResponseMessage - - forward_Query_UserRedemptionRecordAll_0 = runtime.ForwardResponseMessage - - forward_Query_UserRedemptionRecordForUser_0 = runtime.ForwardResponseMessage - - forward_Query_EpochUnbondingRecord_0 = runtime.ForwardResponseMessage - - forward_Query_EpochUnbondingRecordAll_0 = runtime.ForwardResponseMessage - - forward_Query_DepositRecord_0 = runtime.ForwardResponseMessage - - forward_Query_DepositRecordAll_0 = runtime.ForwardResponseMessage - - forward_Query_DepositRecordByHost_0 = runtime.ForwardResponseMessage - - forward_Query_LSMDeposit_0 = runtime.ForwardResponseMessage - - forward_Query_LSMDeposits_0 = runtime.ForwardResponseMessage -) diff --git a/x/records/types/records.go b/x/records/types/records.go deleted file mode 100644 index 902517e16..000000000 --- a/x/records/types/records.go +++ /dev/null @@ -1,10 +0,0 @@ -package types - -import sdkmath "cosmossdk.io/math" - -// Helper function to evaluate if a host zone unbonding record still needs to be initiated -func (r HostZoneUnbonding) ShouldInitiateUnbonding() bool { - notYetUnbonding := r.Status == HostZoneUnbonding_UNBONDING_QUEUE - hasAtLeastOneRecord := r.NativeTokenAmount.GT(sdkmath.ZeroInt()) - return notYetUnbonding && hasAtLeastOneRecord -} diff --git a/x/records/types/records.pb.go b/x/records/types/records.pb.go deleted file mode 100644 index 747d16d70..000000000 --- a/x/records/types/records.pb.go +++ /dev/null @@ -1,2457 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/records/records.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type DepositRecord_Status int32 - -const ( - // in transfer queue to be sent to the delegation ICA - DepositRecord_TRANSFER_QUEUE DepositRecord_Status = 0 - // transfer in progress (IBC packet sent, ack not received) - DepositRecord_TRANSFER_IN_PROGRESS DepositRecord_Status = 2 - // in staking queue on delegation ICA - DepositRecord_DELEGATION_QUEUE DepositRecord_Status = 1 - // staking in progress (ICA packet sent, ack not received) - DepositRecord_DELEGATION_IN_PROGRESS DepositRecord_Status = 3 -) - -var DepositRecord_Status_name = map[int32]string{ - 0: "TRANSFER_QUEUE", - 2: "TRANSFER_IN_PROGRESS", - 1: "DELEGATION_QUEUE", - 3: "DELEGATION_IN_PROGRESS", -} - -var DepositRecord_Status_value = map[string]int32{ - "TRANSFER_QUEUE": 0, - "TRANSFER_IN_PROGRESS": 2, - "DELEGATION_QUEUE": 1, - "DELEGATION_IN_PROGRESS": 3, -} - -func (x DepositRecord_Status) String() string { - return proto.EnumName(DepositRecord_Status_name, int32(x)) -} - -func (DepositRecord_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_295ee594cc85d8ca, []int{1, 0} -} - -type DepositRecord_Source int32 - -const ( - DepositRecord_STRIDE DepositRecord_Source = 0 - DepositRecord_WITHDRAWAL_ICA DepositRecord_Source = 1 -) - -var DepositRecord_Source_name = map[int32]string{ - 0: "STRIDE", - 1: "WITHDRAWAL_ICA", -} - -var DepositRecord_Source_value = map[string]int32{ - "STRIDE": 0, - "WITHDRAWAL_ICA": 1, -} - -func (x DepositRecord_Source) String() string { - return proto.EnumName(DepositRecord_Source_name, int32(x)) -} - -func (DepositRecord_Source) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_295ee594cc85d8ca, []int{1, 1} -} - -type HostZoneUnbonding_Status int32 - -const ( - // tokens bonded on delegate account - HostZoneUnbonding_UNBONDING_QUEUE HostZoneUnbonding_Status = 0 - HostZoneUnbonding_UNBONDING_IN_PROGRESS HostZoneUnbonding_Status = 3 - // unbonding completed on delegate account - HostZoneUnbonding_EXIT_TRANSFER_QUEUE HostZoneUnbonding_Status = 1 - HostZoneUnbonding_EXIT_TRANSFER_IN_PROGRESS HostZoneUnbonding_Status = 4 - // transfer success - HostZoneUnbonding_CLAIMABLE HostZoneUnbonding_Status = 2 -) - -var HostZoneUnbonding_Status_name = map[int32]string{ - 0: "UNBONDING_QUEUE", - 3: "UNBONDING_IN_PROGRESS", - 1: "EXIT_TRANSFER_QUEUE", - 4: "EXIT_TRANSFER_IN_PROGRESS", - 2: "CLAIMABLE", -} - -var HostZoneUnbonding_Status_value = map[string]int32{ - "UNBONDING_QUEUE": 0, - "UNBONDING_IN_PROGRESS": 3, - "EXIT_TRANSFER_QUEUE": 1, - "EXIT_TRANSFER_IN_PROGRESS": 4, - "CLAIMABLE": 2, -} - -func (x HostZoneUnbonding_Status) String() string { - return proto.EnumName(HostZoneUnbonding_Status_name, int32(x)) -} - -func (HostZoneUnbonding_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_295ee594cc85d8ca, []int{2, 0} -} - -type LSMTokenDeposit_Status int32 - -const ( - LSMTokenDeposit_DEPOSIT_PENDING LSMTokenDeposit_Status = 0 - LSMTokenDeposit_TRANSFER_QUEUE LSMTokenDeposit_Status = 1 - LSMTokenDeposit_TRANSFER_IN_PROGRESS LSMTokenDeposit_Status = 2 - LSMTokenDeposit_TRANSFER_FAILED LSMTokenDeposit_Status = 3 - LSMTokenDeposit_DETOKENIZATION_QUEUE LSMTokenDeposit_Status = 4 - LSMTokenDeposit_DETOKENIZATION_IN_PROGRESS LSMTokenDeposit_Status = 5 - LSMTokenDeposit_DETOKENIZATION_FAILED LSMTokenDeposit_Status = 6 -) - -var LSMTokenDeposit_Status_name = map[int32]string{ - 0: "DEPOSIT_PENDING", - 1: "TRANSFER_QUEUE", - 2: "TRANSFER_IN_PROGRESS", - 3: "TRANSFER_FAILED", - 4: "DETOKENIZATION_QUEUE", - 5: "DETOKENIZATION_IN_PROGRESS", - 6: "DETOKENIZATION_FAILED", -} - -var LSMTokenDeposit_Status_value = map[string]int32{ - "DEPOSIT_PENDING": 0, - "TRANSFER_QUEUE": 1, - "TRANSFER_IN_PROGRESS": 2, - "TRANSFER_FAILED": 3, - "DETOKENIZATION_QUEUE": 4, - "DETOKENIZATION_IN_PROGRESS": 5, - "DETOKENIZATION_FAILED": 6, -} - -func (x LSMTokenDeposit_Status) String() string { - return proto.EnumName(LSMTokenDeposit_Status_name, int32(x)) -} - -func (LSMTokenDeposit_Status) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_295ee594cc85d8ca, []int{4, 0} -} - -type UserRedemptionRecord struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"` - NativeTokenAmount cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=native_token_amount,json=nativeTokenAmount,proto3,customtype=cosmossdk.io/math.Int" json:"native_token_amount"` - Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"` - HostZoneId string `protobuf:"bytes,6,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - EpochNumber uint64 `protobuf:"varint,7,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` - ClaimIsPending bool `protobuf:"varint,8,opt,name=claim_is_pending,json=claimIsPending,proto3" json:"claim_is_pending,omitempty"` - StTokenAmount cosmossdk_io_math.Int `protobuf:"bytes,9,opt,name=st_token_amount,json=stTokenAmount,proto3,customtype=cosmossdk.io/math.Int" json:"st_token_amount"` -} - -func (m *UserRedemptionRecord) Reset() { *m = UserRedemptionRecord{} } -func (m *UserRedemptionRecord) String() string { return proto.CompactTextString(m) } -func (*UserRedemptionRecord) ProtoMessage() {} -func (*UserRedemptionRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_295ee594cc85d8ca, []int{0} -} -func (m *UserRedemptionRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UserRedemptionRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UserRedemptionRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UserRedemptionRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_UserRedemptionRecord.Merge(m, src) -} -func (m *UserRedemptionRecord) XXX_Size() int { - return m.Size() -} -func (m *UserRedemptionRecord) XXX_DiscardUnknown() { - xxx_messageInfo_UserRedemptionRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_UserRedemptionRecord proto.InternalMessageInfo - -func (m *UserRedemptionRecord) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *UserRedemptionRecord) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -func (m *UserRedemptionRecord) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *UserRedemptionRecord) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -func (m *UserRedemptionRecord) GetEpochNumber() uint64 { - if m != nil { - return m.EpochNumber - } - return 0 -} - -func (m *UserRedemptionRecord) GetClaimIsPending() bool { - if m != nil { - return m.ClaimIsPending - } - return false -} - -type DepositRecord struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` - HostZoneId string `protobuf:"bytes,4,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - Status DepositRecord_Status `protobuf:"varint,6,opt,name=status,proto3,enum=stride.records.DepositRecord_Status" json:"status,omitempty"` - DepositEpochNumber uint64 `protobuf:"varint,7,opt,name=deposit_epoch_number,json=depositEpochNumber,proto3" json:"deposit_epoch_number,omitempty"` - Source DepositRecord_Source `protobuf:"varint,8,opt,name=source,proto3,enum=stride.records.DepositRecord_Source" json:"source,omitempty"` -} - -func (m *DepositRecord) Reset() { *m = DepositRecord{} } -func (m *DepositRecord) String() string { return proto.CompactTextString(m) } -func (*DepositRecord) ProtoMessage() {} -func (*DepositRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_295ee594cc85d8ca, []int{1} -} -func (m *DepositRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DepositRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DepositRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DepositRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_DepositRecord.Merge(m, src) -} -func (m *DepositRecord) XXX_Size() int { - return m.Size() -} -func (m *DepositRecord) XXX_DiscardUnknown() { - xxx_messageInfo_DepositRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_DepositRecord proto.InternalMessageInfo - -func (m *DepositRecord) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *DepositRecord) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *DepositRecord) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -func (m *DepositRecord) GetStatus() DepositRecord_Status { - if m != nil { - return m.Status - } - return DepositRecord_TRANSFER_QUEUE -} - -func (m *DepositRecord) GetDepositEpochNumber() uint64 { - if m != nil { - return m.DepositEpochNumber - } - return 0 -} - -func (m *DepositRecord) GetSource() DepositRecord_Source { - if m != nil { - return m.Source - } - return DepositRecord_STRIDE -} - -type HostZoneUnbonding struct { - StTokenAmount cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=st_token_amount,json=stTokenAmount,proto3,customtype=cosmossdk.io/math.Int" json:"st_token_amount"` - NativeTokenAmount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=native_token_amount,json=nativeTokenAmount,proto3,customtype=cosmossdk.io/math.Int" json:"native_token_amount"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` - HostZoneId string `protobuf:"bytes,4,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - UnbondingTime uint64 `protobuf:"varint,5,opt,name=unbonding_time,json=unbondingTime,proto3" json:"unbonding_time,omitempty"` - Status HostZoneUnbonding_Status `protobuf:"varint,6,opt,name=status,proto3,enum=stride.records.HostZoneUnbonding_Status" json:"status,omitempty"` - UserRedemptionRecords []string `protobuf:"bytes,7,rep,name=user_redemption_records,json=userRedemptionRecords,proto3" json:"user_redemption_records,omitempty"` -} - -func (m *HostZoneUnbonding) Reset() { *m = HostZoneUnbonding{} } -func (m *HostZoneUnbonding) String() string { return proto.CompactTextString(m) } -func (*HostZoneUnbonding) ProtoMessage() {} -func (*HostZoneUnbonding) Descriptor() ([]byte, []int) { - return fileDescriptor_295ee594cc85d8ca, []int{2} -} -func (m *HostZoneUnbonding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostZoneUnbonding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HostZoneUnbonding.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HostZoneUnbonding) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostZoneUnbonding.Merge(m, src) -} -func (m *HostZoneUnbonding) XXX_Size() int { - return m.Size() -} -func (m *HostZoneUnbonding) XXX_DiscardUnknown() { - xxx_messageInfo_HostZoneUnbonding.DiscardUnknown(m) -} - -var xxx_messageInfo_HostZoneUnbonding proto.InternalMessageInfo - -func (m *HostZoneUnbonding) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *HostZoneUnbonding) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -func (m *HostZoneUnbonding) GetUnbondingTime() uint64 { - if m != nil { - return m.UnbondingTime - } - return 0 -} - -func (m *HostZoneUnbonding) GetStatus() HostZoneUnbonding_Status { - if m != nil { - return m.Status - } - return HostZoneUnbonding_UNBONDING_QUEUE -} - -func (m *HostZoneUnbonding) GetUserRedemptionRecords() []string { - if m != nil { - return m.UserRedemptionRecords - } - return nil -} - -type EpochUnbondingRecord struct { - EpochNumber uint64 `protobuf:"varint,1,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` - HostZoneUnbondings []*HostZoneUnbonding `protobuf:"bytes,3,rep,name=host_zone_unbondings,json=hostZoneUnbondings,proto3" json:"host_zone_unbondings,omitempty"` -} - -func (m *EpochUnbondingRecord) Reset() { *m = EpochUnbondingRecord{} } -func (m *EpochUnbondingRecord) String() string { return proto.CompactTextString(m) } -func (*EpochUnbondingRecord) ProtoMessage() {} -func (*EpochUnbondingRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_295ee594cc85d8ca, []int{3} -} -func (m *EpochUnbondingRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EpochUnbondingRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EpochUnbondingRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EpochUnbondingRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_EpochUnbondingRecord.Merge(m, src) -} -func (m *EpochUnbondingRecord) XXX_Size() int { - return m.Size() -} -func (m *EpochUnbondingRecord) XXX_DiscardUnknown() { - xxx_messageInfo_EpochUnbondingRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_EpochUnbondingRecord proto.InternalMessageInfo - -func (m *EpochUnbondingRecord) GetEpochNumber() uint64 { - if m != nil { - return m.EpochNumber - } - return 0 -} - -func (m *EpochUnbondingRecord) GetHostZoneUnbondings() []*HostZoneUnbonding { - if m != nil { - return m.HostZoneUnbondings - } - return nil -} - -type LSMTokenDeposit struct { - DepositId string `protobuf:"bytes,1,opt,name=deposit_id,json=depositId,proto3" json:"deposit_id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` - IbcDenom string `protobuf:"bytes,4,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty"` - StakerAddress string `protobuf:"bytes,5,opt,name=staker_address,json=stakerAddress,proto3" json:"staker_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,6,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` - StToken types.Coin `protobuf:"bytes,8,opt,name=st_token,json=stToken,proto3" json:"st_token"` - Status LSMTokenDeposit_Status `protobuf:"varint,9,opt,name=status,proto3,enum=stride.records.LSMTokenDeposit_Status" json:"status,omitempty"` -} - -func (m *LSMTokenDeposit) Reset() { *m = LSMTokenDeposit{} } -func (m *LSMTokenDeposit) String() string { return proto.CompactTextString(m) } -func (*LSMTokenDeposit) ProtoMessage() {} -func (*LSMTokenDeposit) Descriptor() ([]byte, []int) { - return fileDescriptor_295ee594cc85d8ca, []int{4} -} -func (m *LSMTokenDeposit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LSMTokenDeposit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LSMTokenDeposit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LSMTokenDeposit) XXX_Merge(src proto.Message) { - xxx_messageInfo_LSMTokenDeposit.Merge(m, src) -} -func (m *LSMTokenDeposit) XXX_Size() int { - return m.Size() -} -func (m *LSMTokenDeposit) XXX_DiscardUnknown() { - xxx_messageInfo_LSMTokenDeposit.DiscardUnknown(m) -} - -var xxx_messageInfo_LSMTokenDeposit proto.InternalMessageInfo - -func (m *LSMTokenDeposit) GetDepositId() string { - if m != nil { - return m.DepositId - } - return "" -} - -func (m *LSMTokenDeposit) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *LSMTokenDeposit) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *LSMTokenDeposit) GetIbcDenom() string { - if m != nil { - return m.IbcDenom - } - return "" -} - -func (m *LSMTokenDeposit) GetStakerAddress() string { - if m != nil { - return m.StakerAddress - } - return "" -} - -func (m *LSMTokenDeposit) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *LSMTokenDeposit) GetStToken() types.Coin { - if m != nil { - return m.StToken - } - return types.Coin{} -} - -func (m *LSMTokenDeposit) GetStatus() LSMTokenDeposit_Status { - if m != nil { - return m.Status - } - return LSMTokenDeposit_DEPOSIT_PENDING -} - -func init() { - proto.RegisterEnum("stride.records.DepositRecord_Status", DepositRecord_Status_name, DepositRecord_Status_value) - proto.RegisterEnum("stride.records.DepositRecord_Source", DepositRecord_Source_name, DepositRecord_Source_value) - proto.RegisterEnum("stride.records.HostZoneUnbonding_Status", HostZoneUnbonding_Status_name, HostZoneUnbonding_Status_value) - proto.RegisterEnum("stride.records.LSMTokenDeposit_Status", LSMTokenDeposit_Status_name, LSMTokenDeposit_Status_value) - proto.RegisterType((*UserRedemptionRecord)(nil), "stride.records.UserRedemptionRecord") - proto.RegisterType((*DepositRecord)(nil), "stride.records.DepositRecord") - proto.RegisterType((*HostZoneUnbonding)(nil), "stride.records.HostZoneUnbonding") - proto.RegisterType((*EpochUnbondingRecord)(nil), "stride.records.EpochUnbondingRecord") - proto.RegisterType((*LSMTokenDeposit)(nil), "stride.records.LSMTokenDeposit") -} - -func init() { proto.RegisterFile("stride/records/records.proto", fileDescriptor_295ee594cc85d8ca) } - -var fileDescriptor_295ee594cc85d8ca = []byte{ - // 991 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xc1, 0x6f, 0xe3, 0xc4, - 0x17, 0xae, 0x13, 0x37, 0x4d, 0x5e, 0xb7, 0xa9, 0x3b, 0x4d, 0x7f, 0xeb, 0xf6, 0x47, 0xb3, 0xd9, - 0x88, 0x45, 0x91, 0x10, 0x0e, 0x2d, 0x82, 0x03, 0x42, 0x08, 0xb7, 0xf1, 0x76, 0xbd, 0x9b, 0xa6, - 0xc5, 0x49, 0xb4, 0xa8, 0x17, 0xcb, 0xb1, 0x47, 0xcd, 0xa8, 0xb5, 0x27, 0xf2, 0x4c, 0x0a, 0xe5, - 0xc2, 0x81, 0x7f, 0x80, 0x03, 0xff, 0x0a, 0x47, 0xee, 0x7b, 0xdc, 0x13, 0x42, 0x1c, 0x56, 0xa8, - 0xfd, 0x47, 0x90, 0xc7, 0x8e, 0x93, 0x38, 0x5b, 0x76, 0x2b, 0x4e, 0xc9, 0x7c, 0xef, 0xbd, 0x79, - 0x9e, 0x6f, 0xbe, 0xf7, 0xd9, 0xf0, 0x01, 0xe3, 0x21, 0xf1, 0x70, 0x33, 0xc4, 0x2e, 0x0d, 0x3d, - 0x36, 0xf9, 0xd5, 0x46, 0x21, 0xe5, 0x14, 0x95, 0xe3, 0xa8, 0x96, 0xa0, 0x3b, 0x55, 0x97, 0x32, - 0x9f, 0xb2, 0xe6, 0xc0, 0x61, 0xb8, 0x79, 0xb5, 0x37, 0xc0, 0xdc, 0xd9, 0x6b, 0xba, 0x94, 0x04, - 0x71, 0xfe, 0x4e, 0xe5, 0x9c, 0x9e, 0x53, 0xf1, 0xb7, 0x19, 0xfd, 0x8b, 0xd1, 0xfa, 0x6d, 0x0e, - 0x2a, 0x7d, 0x86, 0x43, 0x0b, 0x7b, 0xd8, 0x1f, 0x71, 0x42, 0x03, 0x4b, 0xec, 0x87, 0xca, 0x90, - 0x23, 0x9e, 0x2a, 0xd5, 0xa4, 0x46, 0xc9, 0xca, 0x11, 0x0f, 0xed, 0x40, 0x31, 0xc4, 0x2e, 0x26, - 0x57, 0x38, 0x54, 0xf3, 0x02, 0x4d, 0xd7, 0xe8, 0x18, 0x36, 0x03, 0x87, 0x93, 0x2b, 0x6c, 0x73, - 0x7a, 0x81, 0x03, 0xdb, 0xf1, 0xe9, 0x38, 0xe0, 0xaa, 0x1c, 0xa5, 0x1d, 0xec, 0xbe, 0x7a, 0xf3, - 0x68, 0xe9, 0xaf, 0x37, 0x8f, 0xb6, 0xe2, 0xe7, 0x63, 0xde, 0x85, 0x46, 0x68, 0xd3, 0x77, 0xf8, - 0x50, 0x33, 0x03, 0x6e, 0x6d, 0xc4, 0x95, 0xbd, 0xa8, 0x50, 0x17, 0x75, 0xa8, 0x02, 0xcb, 0x1e, - 0x0e, 0xa8, 0xaf, 0x2e, 0x8b, 0x3e, 0xf1, 0x02, 0xd5, 0xe0, 0xc1, 0x90, 0x32, 0x6e, 0xff, 0x48, - 0x03, 0x6c, 0x13, 0x4f, 0x2d, 0x88, 0x20, 0x44, 0xd8, 0x19, 0x0d, 0xb0, 0xe9, 0xa1, 0xc7, 0xf0, - 0x00, 0x8f, 0xa8, 0x3b, 0xb4, 0x83, 0xb1, 0x3f, 0xc0, 0xa1, 0xba, 0x52, 0x93, 0x1a, 0xb2, 0xb5, - 0x2a, 0xb0, 0x8e, 0x80, 0x50, 0x03, 0x14, 0xf7, 0xd2, 0x21, 0xbe, 0x4d, 0x98, 0x3d, 0xc2, 0x81, - 0x47, 0x82, 0x73, 0xb5, 0x58, 0x93, 0x1a, 0x45, 0xab, 0x2c, 0x70, 0x93, 0x9d, 0xc6, 0x28, 0x32, - 0x60, 0x9d, 0xf1, 0xf9, 0xf3, 0x94, 0xde, 0xe7, 0x3c, 0x6b, 0x8c, 0xcf, 0x9c, 0xe5, 0xb9, 0x5c, - 0xcc, 0x29, 0xf9, 0xfa, 0x1f, 0x79, 0x58, 0x6b, 0xe1, 0x11, 0x65, 0x84, 0x2f, 0xd0, 0x2b, 0x0b, - 0x7a, 0x3f, 0x87, 0x42, 0xd2, 0x25, 0xf7, 0x3e, 0x5d, 0x92, 0xe4, 0x29, 0x55, 0xf9, 0x7f, 0xa3, - 0x4a, 0x5e, 0xa0, 0xea, 0x2b, 0x28, 0x30, 0xee, 0xf0, 0x31, 0x13, 0x34, 0x96, 0xf7, 0x3f, 0xd4, - 0xe6, 0xd5, 0xa4, 0xcd, 0x3d, 0xad, 0xd6, 0x15, 0xb9, 0x56, 0x52, 0x83, 0x3e, 0x85, 0x8a, 0x17, - 0xc7, 0xed, 0xb7, 0x10, 0x8e, 0x92, 0x98, 0x31, 0xc3, 0x7b, 0xd4, 0x8f, 0x8e, 0x43, 0x17, 0x0b, - 0xb6, 0xdf, 0xdd, 0x4f, 0xe4, 0x5a, 0x49, 0x4d, 0x7d, 0x08, 0x85, 0xf8, 0x09, 0x10, 0x82, 0x72, - 0xcf, 0xd2, 0x3b, 0xdd, 0xa7, 0x86, 0x65, 0x7f, 0xdb, 0x37, 0xfa, 0x86, 0xb2, 0x84, 0x54, 0xa8, - 0xa4, 0x98, 0xd9, 0xb1, 0x4f, 0xad, 0x93, 0x23, 0xcb, 0xe8, 0x76, 0x95, 0x1c, 0xaa, 0x80, 0xd2, - 0x32, 0xda, 0xc6, 0x91, 0xde, 0x33, 0x4f, 0x3a, 0x49, 0xbe, 0x84, 0x76, 0xe0, 0x7f, 0x33, 0xe8, - 0x6c, 0x45, 0xbe, 0xde, 0x80, 0x42, 0xdc, 0x1b, 0x01, 0x14, 0xba, 0x3d, 0xcb, 0x6c, 0x45, 0x1d, - 0x10, 0x94, 0x5f, 0x9a, 0xbd, 0x67, 0x2d, 0x4b, 0x7f, 0xa9, 0xb7, 0x6d, 0xf3, 0x50, 0x57, 0xa4, - 0xe7, 0x72, 0x71, 0x59, 0x29, 0xd4, 0x7f, 0x96, 0x61, 0xe3, 0x59, 0x42, 0x6b, 0x3f, 0x18, 0xd0, - 0x3b, 0xb5, 0x23, 0xdd, 0x5f, 0x3b, 0x77, 0x8d, 0x55, 0xee, 0xbf, 0x8e, 0xd5, 0x3d, 0xb5, 0xf2, - 0x04, 0xca, 0xe3, 0xc9, 0xd1, 0x6c, 0x4e, 0x7c, 0x2c, 0xe6, 0x52, 0xb6, 0xd6, 0x52, 0xb4, 0x47, - 0x7c, 0x8c, 0xbe, 0xc9, 0x48, 0xaa, 0x91, 0xbd, 0xe2, 0x05, 0x9e, 0xb2, 0xb2, 0xfa, 0x02, 0x1e, - 0x8e, 0x19, 0x0e, 0xed, 0x30, 0xf5, 0x22, 0x3b, 0xa9, 0x55, 0x57, 0x6a, 0xf9, 0x46, 0xc9, 0xda, - 0x1a, 0xbf, 0xc5, 0xa9, 0x58, 0xfd, 0xa7, 0x54, 0x1e, 0x9b, 0xb0, 0xde, 0xef, 0x1c, 0x9c, 0x74, - 0x5a, 0x66, 0xe7, 0x28, 0xd5, 0xc7, 0x36, 0x6c, 0x4d, 0xc1, 0xb9, 0xeb, 0x46, 0x0f, 0x61, 0xd3, - 0xf8, 0xce, 0xec, 0xd9, 0x19, 0x4d, 0x49, 0x68, 0x17, 0xb6, 0xe7, 0x03, 0xb3, 0x75, 0x32, 0x5a, - 0x83, 0xd2, 0x61, 0x5b, 0x37, 0x8f, 0xf5, 0x83, 0xb6, 0xa1, 0xe4, 0xea, 0xbf, 0x4a, 0x50, 0x11, - 0x6a, 0x4f, 0x8f, 0x96, 0x4c, 0x79, 0xd6, 0x91, 0xa4, 0x45, 0x47, 0xea, 0x42, 0x65, 0xca, 0x7f, - 0xca, 0x28, 0x53, 0xf3, 0xb5, 0x7c, 0x63, 0x75, 0xff, 0xf1, 0x3b, 0x49, 0xb4, 0xd0, 0x30, 0x0b, - 0xb1, 0xc4, 0x75, 0x7e, 0x97, 0x61, 0xbd, 0xdd, 0x3d, 0x16, 0x1a, 0x48, 0xe6, 0x0b, 0xed, 0x02, - 0x4c, 0x46, 0x37, 0xb5, 0xf7, 0x52, 0x82, 0x98, 0x1e, 0xda, 0x86, 0xa2, 0x3b, 0x74, 0x48, 0x10, - 0x05, 0x85, 0xce, 0xac, 0x15, 0xb1, 0x36, 0xbd, 0x3b, 0xe4, 0xf3, 0x7f, 0x28, 0x91, 0x81, 0x6b, - 0xc7, 0x91, 0x58, 0x3b, 0x45, 0x32, 0x70, 0x5b, 0x22, 0xf8, 0x04, 0xca, 0x8c, 0x3b, 0x17, 0x38, - 0xb4, 0x1d, 0xcf, 0x0b, 0x31, 0x63, 0x89, 0xa3, 0xaf, 0xc5, 0xa8, 0x1e, 0x83, 0xe8, 0x63, 0xd8, - 0xb8, 0x72, 0x2e, 0x89, 0xe7, 0x70, 0x3a, 0xcd, 0x8c, 0xed, 0x5d, 0x49, 0x03, 0x93, 0xe4, 0xa9, - 0x51, 0xae, 0xdc, 0xc7, 0x28, 0xbf, 0x84, 0xe2, 0x64, 0x24, 0x85, 0x05, 0xad, 0xee, 0x6f, 0x6b, - 0x71, 0x85, 0x16, 0xbd, 0x30, 0xb5, 0xe4, 0x85, 0xa9, 0x1d, 0x52, 0x12, 0x1c, 0xc8, 0xd1, 0x9e, - 0xd6, 0x4a, 0x32, 0x8d, 0xe8, 0xeb, 0x54, 0xd9, 0x25, 0xa1, 0xec, 0x8f, 0xb2, 0x97, 0x92, 0x21, - 0x39, 0xa3, 0xeb, 0xfa, 0x6f, 0xd2, 0xac, 0x40, 0x5b, 0xc6, 0xe9, 0x49, 0xd7, 0xec, 0xd9, 0xa7, - 0x86, 0x50, 0x64, 0x6c, 0x2f, 0x0b, 0x02, 0xbc, 0xdb, 0xd4, 0x36, 0x61, 0x3d, 0x8d, 0x3c, 0xd5, - 0xcd, 0xb6, 0xd1, 0x52, 0xf2, 0x51, 0x7a, 0xcb, 0xe8, 0x9d, 0xbc, 0x30, 0x3a, 0xe6, 0xd9, 0xac, - 0xdb, 0xc9, 0xa8, 0x0a, 0x3b, 0x99, 0xc8, 0xec, 0x76, 0xcb, 0xd1, 0x74, 0x64, 0xe2, 0xc9, 0xa6, - 0x85, 0x83, 0x17, 0xaf, 0x6e, 0xaa, 0xd2, 0xeb, 0x9b, 0xaa, 0xf4, 0xf7, 0x4d, 0x55, 0xfa, 0xe5, - 0xb6, 0xba, 0xf4, 0xfa, 0xb6, 0xba, 0xf4, 0xe7, 0x6d, 0x75, 0xe9, 0x6c, 0xef, 0x9c, 0xf0, 0xe1, - 0x78, 0xa0, 0xb9, 0xd4, 0x6f, 0xfa, 0xe4, 0xf2, 0xe2, 0xfa, 0x7b, 0xe7, 0xfa, 0x93, 0x4b, 0x67, - 0xc0, 0xd2, 0x55, 0xf3, 0x87, 0xf4, 0xb3, 0x85, 0x5f, 0x8f, 0x30, 0x1b, 0x14, 0xc4, 0xf7, 0xc6, - 0x67, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xef, 0x76, 0x48, 0xb6, 0xd5, 0x08, 0x00, 0x00, -} - -func (m *UserRedemptionRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserRedemptionRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserRedemptionRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.StTokenAmount.Size() - i -= size - if _, err := m.StTokenAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - if m.ClaimIsPending { - i-- - if m.ClaimIsPending { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.EpochNumber != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.EpochNumber)) - i-- - dAtA[i] = 0x38 - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintRecords(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0x32 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintRecords(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x2a - } - { - size := m.NativeTokenAmount.Size() - i -= size - if _, err := m.NativeTokenAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintRecords(dAtA, i, uint64(len(m.Receiver))) - i-- - dAtA[i] = 0x1a - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintRecords(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DepositRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DepositRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DepositRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Source != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.Source)) - i-- - dAtA[i] = 0x40 - } - if m.DepositEpochNumber != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.DepositEpochNumber)) - i-- - dAtA[i] = 0x38 - } - if m.Status != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x30 - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintRecords(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0x22 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintRecords(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x1a - } - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.Id != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *HostZoneUnbonding) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HostZoneUnbonding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostZoneUnbonding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.UserRedemptionRecords) > 0 { - for iNdEx := len(m.UserRedemptionRecords) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UserRedemptionRecords[iNdEx]) - copy(dAtA[i:], m.UserRedemptionRecords[iNdEx]) - i = encodeVarintRecords(dAtA, i, uint64(len(m.UserRedemptionRecords[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if m.Status != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x30 - } - if m.UnbondingTime != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.UnbondingTime)) - i-- - dAtA[i] = 0x28 - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintRecords(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0x22 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintRecords(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x1a - } - { - size := m.NativeTokenAmount.Size() - i -= size - if _, err := m.NativeTokenAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.StTokenAmount.Size() - i -= size - if _, err := m.StTokenAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EpochUnbondingRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EpochUnbondingRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EpochUnbondingRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.HostZoneUnbondings) > 0 { - for iNdEx := len(m.HostZoneUnbondings) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.HostZoneUnbondings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.EpochNumber != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.EpochNumber)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *LSMTokenDeposit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LSMTokenDeposit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LSMTokenDeposit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Status != 0 { - i = encodeVarintRecords(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x48 - } - { - size, err := m.StToken.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRecords(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintRecords(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x32 - } - if len(m.StakerAddress) > 0 { - i -= len(m.StakerAddress) - copy(dAtA[i:], m.StakerAddress) - i = encodeVarintRecords(dAtA, i, uint64(len(m.StakerAddress))) - i-- - dAtA[i] = 0x2a - } - if len(m.IbcDenom) > 0 { - i -= len(m.IbcDenom) - copy(dAtA[i:], m.IbcDenom) - i = encodeVarintRecords(dAtA, i, uint64(len(m.IbcDenom))) - i-- - dAtA[i] = 0x22 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintRecords(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintRecords(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.DepositId) > 0 { - i -= len(m.DepositId) - copy(dAtA[i:], m.DepositId) - i = encodeVarintRecords(dAtA, i, uint64(len(m.DepositId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintRecords(dAtA []byte, offset int, v uint64) int { - offset -= sovRecords(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *UserRedemptionRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = m.NativeTokenAmount.Size() - n += 1 + l + sovRecords(uint64(l)) - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - if m.EpochNumber != 0 { - n += 1 + sovRecords(uint64(m.EpochNumber)) - } - if m.ClaimIsPending { - n += 2 - } - l = m.StTokenAmount.Size() - n += 1 + l + sovRecords(uint64(l)) - return n -} - -func (m *DepositRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovRecords(uint64(m.Id)) - } - l = m.Amount.Size() - n += 1 + l + sovRecords(uint64(l)) - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - if m.Status != 0 { - n += 1 + sovRecords(uint64(m.Status)) - } - if m.DepositEpochNumber != 0 { - n += 1 + sovRecords(uint64(m.DepositEpochNumber)) - } - if m.Source != 0 { - n += 1 + sovRecords(uint64(m.Source)) - } - return n -} - -func (m *HostZoneUnbonding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.StTokenAmount.Size() - n += 1 + l + sovRecords(uint64(l)) - l = m.NativeTokenAmount.Size() - n += 1 + l + sovRecords(uint64(l)) - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - if m.UnbondingTime != 0 { - n += 1 + sovRecords(uint64(m.UnbondingTime)) - } - if m.Status != 0 { - n += 1 + sovRecords(uint64(m.Status)) - } - if len(m.UserRedemptionRecords) > 0 { - for _, s := range m.UserRedemptionRecords { - l = len(s) - n += 1 + l + sovRecords(uint64(l)) - } - } - return n -} - -func (m *EpochUnbondingRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.EpochNumber != 0 { - n += 1 + sovRecords(uint64(m.EpochNumber)) - } - if len(m.HostZoneUnbondings) > 0 { - for _, e := range m.HostZoneUnbondings { - l = e.Size() - n += 1 + l + sovRecords(uint64(l)) - } - } - return n -} - -func (m *LSMTokenDeposit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DepositId) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.IbcDenom) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.StakerAddress) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovRecords(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovRecords(uint64(l)) - l = m.StToken.Size() - n += 1 + l + sovRecords(uint64(l)) - if m.Status != 0 { - n += 1 + sovRecords(uint64(m.Status)) - } - return n -} - -func sovRecords(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRecords(x uint64) (n int) { - return sovRecords(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *UserRedemptionRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserRedemptionRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserRedemptionRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NativeTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.NativeTokenAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - m.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimIsPending", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ClaimIsPending = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StTokenAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRecords(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRecords - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DepositRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DepositRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DepositRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= DepositRecord_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositEpochNumber", wireType) - } - m.DepositEpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DepositEpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - m.Source = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Source |= DepositRecord_Source(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRecords(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRecords - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostZoneUnbonding) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostZoneUnbonding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostZoneUnbonding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StTokenAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NativeTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.NativeTokenAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) - } - m.UnbondingTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= HostZoneUnbonding_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecords", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserRedemptionRecords = append(m.UserRedemptionRecords, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRecords(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRecords - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EpochUnbondingRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EpochUnbondingRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EpochUnbondingRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - m.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneUnbondings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneUnbondings = append(m.HostZoneUnbondings, &HostZoneUnbonding{}) - if err := m.HostZoneUnbondings[len(m.HostZoneUnbondings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRecords(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRecords - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LSMTokenDeposit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LSMTokenDeposit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LSMTokenDeposit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakerAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StakerAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StToken", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthRecords - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthRecords - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRecords - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= LSMTokenDeposit_Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipRecords(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRecords - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRecords(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRecords - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRecords - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRecords - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthRecords - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupRecords - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthRecords - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthRecords = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRecords = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupRecords = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/records/types/types.go b/x/records/types/types.go deleted file mode 100644 index bbc775cc2..000000000 --- a/x/records/types/types.go +++ /dev/null @@ -1,7 +0,0 @@ -package types - -import "fmt" - -func UserRedemptionRecordKeyFormatter(chainId string, epochNumber uint64, receiver string) string { - return fmt.Sprintf("%s.%d.%s", chainId, epochNumber, receiver) // {chain_id}.{epoch}.{receiver} -} diff --git a/x/stakeibc/README.md b/x/stakeibc/README.md deleted file mode 100644 index 024c19012..000000000 --- a/x/stakeibc/README.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -title: "StakeIBC" -excerpt: "" -category: 6392913957c533007128548e ---- - -# The StakeIBC Module - -The StakeIBC Module contains Stride's main app logic: - -- it exposes core liquid staking entry points to the user (liquid staking and redeeming) -- it executes automated beginBlocker and endBlocker logic to stake funds on relevant host zones using Interchain Accounts -- it handles registering new host zones and adjusting host zone validator sets and weights -- it defines Stride's core data structures (e.g. hostZone) -- it defines all the callbacks used when issuing Interchain Account logic - -Nearly all of Stride's functionality is built using interchain accounts (ICAs), which are a new functionality in Cosmos, and a critical component of IBC. ICAs allow accounts on Zone A to be controlled by Zone B. ICAs communicate with one another using Interchain Queries (ICQs), which involve Zone A querying Zone B for relevant information. - -Two Zones communicate via a connection and channel. All communications between the Controller Zone (the chain that is querying) and the Host Zone (the chain that is being queried) is done through a dedicated IBC channel between the two chains, which is opened the first time the two chains interact. - -For context, ICS standards define that each channel is associated with a particular connection, and a connection may have any number of associated channels. - -## Params - -``` -DepositInterval (default uint64 = 1) -DelegateInterval (default uint64 = 1) -ReinvestInterval (default uint64 = 1) -RewardsInterval (default uint64 = 1) -RedemptionRateInterval (default uint64 = 1) -StrideCommission (default uint64 = 10) -ICATimeoutNanos(default uint64 = 600000000000) -BufferSize (default uint64 = 5) -IbcTimeoutBlocks (default uint64 = 300) -FeeTransferTimeoutNanos (default uint64 = 1800000000000) -DefaultMinRedemptionRateThreshold (default uint64 = 90) -DefaultMaxRedemptionRateThreshold (default uint64 = 150) -MaxStakeICACallsPerEpoch (default uint64 = 100) -IBCTransferTimeoutNanos (default uint64 = 1800000000000) -MinRedemptionRates (default uint64 = 90) -MaxRedemptionRates (default uint64 = 150) -ValidatorSlashQueryThreshold (default uint64 = 1) -``` - -## Keeper functions - -- `LiquidStake()` -- `RedeemStake()` -- `ClaimUndelegatedTokens()` -- `RebalanceValidators()` -- `AddValidators()` -- `ChangeValidatorWeight()` -- `DeleteValidator()` -- `RegisterHostZone()` -- `ClearBalance()` -- `RestoreInterchainAccount()` -- `UpdateValidatorSharesExchRate()` - -## State - -Callbacks - -- `SplitDelegation` -- `DelegateCallback` -- `ClaimCallback` -- `ReinvestCallback` -- `UndelegateCallback` -- `RedemptionCallback` -- `Rebalancing` -- `RebalanceCallback` - -HostZone - -- `HostZone` -- `ICAAccount` -- `MinValidatorRequirements` - -Host Zone Validators - -- `Validator` -- `ValidatorExchangeRate` - -Misc - -- `GenesisState` -- `EpochTracker` -- `Delegation` - -Governance - -- `AddValidatorsProposal` - -## Queries - -- `QueryInterchainAccountFromAddress` -- `QueryParams` -- `QueryGetValidators` -- `QueryGetHostZone` -- `QueryAllHostZone` -- `QueryModuleAddress` -- `QueryGetEpochTracker` -- `QueryAllEpochTracker` -- `QueryGetNextPacketSequence` - -## Events - -`stakeibc` module emits the following events: - -Type: Attribute Key → Attribute Value --------------------------------------------------- - -registerHostZone: module → stakeibc -registerHostZone: connectionId → connectionId -registerHostZone: chainId → chainId -submitHostZoneUnbonding: hostZone → chainId -submitHostZoneUnbonding: newAmountUnbonding → totalAmtToUnbond -stakeExistingDepositsOnHostZone: hostZone → chainId -stakeExistingDepositsOnHostZone: newAmountStaked → amount -onAckPacket (IBC): module → moduleName -onAckPacket (IBC): ack → ackInfo diff --git a/x/stakeibc/client/cli/query.go b/x/stakeibc/client/cli/query.go deleted file mode 100644 index 6b123636a..000000000 --- a/x/stakeibc/client/cli/query.go +++ /dev/null @@ -1,35 +0,0 @@ -package cli - -import ( - "fmt" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// GetQueryCmd returns the cli query commands for this module -func GetQueryCmd(queryRoute string) *cobra.Command { - // Group stakeibc queries under a subcommand - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand(CmdQueryParams()) - cmd.AddCommand(CmdShowValidators()) - cmd.AddCommand(CmdListHostZone()) - cmd.AddCommand(CmdShowHostZone()) - cmd.AddCommand(CmdModuleAddress()) - cmd.AddCommand(CmdShowInterchainAccount()) - cmd.AddCommand(CmdListEpochTracker()) - cmd.AddCommand(CmdShowEpochTracker()) - cmd.AddCommand(CmdNextPacketSequence()) - cmd.AddCommand(CmdListTradeRoutes()) - - return cmd -} diff --git a/x/stakeibc/client/cli/query_epoch_tracker.go b/x/stakeibc/client/cli/query_epoch_tracker.go deleted file mode 100644 index 5cb2d32a8..000000000 --- a/x/stakeibc/client/cli/query_epoch_tracker.go +++ /dev/null @@ -1,66 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdListEpochTracker() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-epoch-tracker", - Short: "list all epoch-tracker", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllEpochTrackerRequest{} - - res, err := queryClient.EpochTrackerAll(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdShowEpochTracker() *cobra.Command { - cmd := &cobra.Command{ - Use: "show-epoch-tracker [epoch-identifier]", - Short: "shows a epoch-tracker", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) (err error) { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - argEpochIdentifier := args[0] - - params := &types.QueryGetEpochTrackerRequest{ - EpochIdentifier: argEpochIdentifier, - } - - res, err := queryClient.EpochTracker(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/query_host_zone.go b/x/stakeibc/client/cli/query_host_zone.go deleted file mode 100644 index 7bde1c180..000000000 --- a/x/stakeibc/client/cli/query_host_zone.go +++ /dev/null @@ -1,74 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdListHostZone() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-host-zone", - Short: "list all HostZone", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllHostZoneRequest{ - Pagination: pageReq, - } - - res, err := queryClient.HostZoneAll(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, cmd.Use) - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdShowHostZone() *cobra.Command { - cmd := &cobra.Command{ - Use: "show-host-zone [chain-id]", - Short: "shows a HostZone", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - chainId := args[0] - - params := &types.QueryGetHostZoneRequest{ - ChainId: chainId, - } - - res, err := queryClient.HostZone(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/query_module_address.go b/x/stakeibc/client/cli/query_module_address.go deleted file mode 100644 index a06a3b8d4..000000000 --- a/x/stakeibc/client/cli/query_module_address.go +++ /dev/null @@ -1,46 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var _ = strconv.Itoa(0) - -func CmdModuleAddress() *cobra.Command { - cmd := &cobra.Command{ - Use: "module-address [name]", - Short: "Query module-address", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) (err error) { - reqName := args[0] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryModuleAddressRequest{ - Name: reqName, - } - - res, err := queryClient.ModuleAddress(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/query_next_packet_sequence.go b/x/stakeibc/client/cli/query_next_packet_sequence.go deleted file mode 100644 index f4dde093a..000000000 --- a/x/stakeibc/client/cli/query_next_packet_sequence.go +++ /dev/null @@ -1,40 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdNextPacketSequence() *cobra.Command { - cmd := &cobra.Command{ - Use: "next-packet-sequence [channel-id] [port-id]", - Short: "returns the next packet sequence on a channel", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - channelId := args[0] - portId := args[1] - - params := &types.QueryGetNextPacketSequenceRequest{ChannelId: channelId, PortId: portId} - - res, err := queryClient.NextPacketSequence(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/query_params.go b/x/stakeibc/client/cli/query_params.go deleted file mode 100644 index 6e05d3402..000000000 --- a/x/stakeibc/client/cli/query_params.go +++ /dev/null @@ -1,35 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "shows the parameters of the module", - Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - res, err := queryClient.Params(context.Background(), &types.QueryParamsRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/query_register_ica.go b/x/stakeibc/client/cli/query_register_ica.go deleted file mode 100644 index e659632a0..000000000 --- a/x/stakeibc/client/cli/query_register_ica.go +++ /dev/null @@ -1,34 +0,0 @@ -package cli - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdShowInterchainAccount() *cobra.Command { - cmd := &cobra.Command{ - Use: "interchainaccounts [connection-id] [owner-account]", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.InterchainAccountFromAddress(cmd.Context(), types.NewQueryInterchainAccountRequest(args[0], args[1])) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/query_trade_routes.go b/x/stakeibc/client/cli/query_trade_routes.go deleted file mode 100644 index 587a2969a..000000000 --- a/x/stakeibc/client/cli/query_trade_routes.go +++ /dev/null @@ -1,36 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdListTradeRoutes() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-trade-routes", - Short: "list all trade routes", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllTradeRoutes{} - res, err := queryClient.AllTradeRoutes(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, cmd.Use) - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/query_validator.go b/x/stakeibc/client/cli/query_validator.go deleted file mode 100644 index 56925a578..000000000 --- a/x/stakeibc/client/cli/query_validator.go +++ /dev/null @@ -1,39 +0,0 @@ -package cli - -import ( - "context" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdShowValidators() *cobra.Command { - cmd := &cobra.Command{ - Use: "show-validators [chain-id]", - Short: "shows validators", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - chainId := args[0] - - params := &types.QueryGetValidatorsRequest{ChainId: chainId} - - res, err := queryClient.Validators(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx.go b/x/stakeibc/client/cli/tx.go deleted file mode 100644 index 6bd04c0e0..000000000 --- a/x/stakeibc/client/cli/tx.go +++ /dev/null @@ -1,47 +0,0 @@ -package cli - -import ( - "fmt" - "time" - - "github.com/spf13/cast" - "github.com/spf13/cobra" - - "github.com/cosmos/cosmos-sdk/client" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var DefaultRelativePacketTimeoutTimestamp = cast.ToUint64((time.Duration(10) * time.Minute).Nanoseconds()) - -// GetTxCmd returns the transaction commands for this module -func GetTxCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: types.ModuleName, - Short: fmt.Sprintf("%s transactions subcommands", types.ModuleName), - DisableFlagParsing: true, - SuggestionsMinimumDistance: 2, - RunE: client.ValidateCmd, - } - - cmd.AddCommand(CmdLiquidStake()) - cmd.AddCommand(CmdLSMLiquidStake()) - cmd.AddCommand(CmdRegisterHostZone()) - cmd.AddCommand(CmdRedeemStake()) - cmd.AddCommand(CmdClaimUndelegatedTokens()) - cmd.AddCommand(CmdRebalanceValidators()) - cmd.AddCommand(CmdAddValidators()) - cmd.AddCommand(CmdChangeValidatorWeight()) - cmd.AddCommand(CmdChangeMultipleValidatorWeight()) - cmd.AddCommand(CmdDeleteValidator()) - cmd.AddCommand(CmdRestoreInterchainAccount()) - cmd.AddCommand(CmdUpdateValidatorSharesExchRate()) - cmd.AddCommand(CmdCalibrateDelegation()) - cmd.AddCommand(CmdClearBalance()) - cmd.AddCommand(CmdUpdateInnerRedemptionRateBounds()) - cmd.AddCommand(CmdResumeHostZone()) - cmd.AddCommand(CmdSetCommunityPoolRebate()) - cmd.AddCommand(CmdToggleTradeController()) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_add_validators.go b/x/stakeibc/client/cli/tx_add_validators.go deleted file mode 100644 index 686e53308..000000000 --- a/x/stakeibc/client/cli/tx_add_validators.go +++ /dev/null @@ -1,74 +0,0 @@ -package cli - -import ( - "encoding/json" - "os" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -type ValidatorsList struct { - Validators []*types.Validator `json:"validators,omitempty"` -} - -// Parse a JSON with a list of validators in the format -// -// { -// "validators": [ -// {"name": "val1", "address": "cosmosXXX", "weight": 1}, -// {"name": "val2", "address": "cosmosXXX", "weight": 2} -// ] -// } -func parseAddValidatorsFile(validatorsFile string) (validators ValidatorsList, err error) { - fileContents, err := os.ReadFile(validatorsFile) - if err != nil { - return validators, err - } - - if err = json.Unmarshal(fileContents, &validators); err != nil { - return validators, err - } - - return validators, nil -} - -func CmdAddValidators() *cobra.Command { - cmd := &cobra.Command{ - Use: "add-validators [host-zone] [validator-list-file]", - Short: "Broadcast message add-validators", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) (err error) { - hostZone := args[0] - validatorListProposalFile := args[1] - - validators, err := parseAddValidatorsFile(validatorListProposalFile) - if err != nil { - return err - } - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgAddValidators( - clientCtx.GetFromAddress().String(), - hostZone, - validators.Validators, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_calibrate_delegation.go b/x/stakeibc/client/cli/tx_calibrate_delegation.go deleted file mode 100644 index b70c35a3c..000000000 --- a/x/stakeibc/client/cli/tx_calibrate_delegation.go +++ /dev/null @@ -1,41 +0,0 @@ -package cli - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdCalibrateDelegation() *cobra.Command { - cmd := &cobra.Command{ - Use: "calibrate-delegation [chainid] [valoper]", - Short: "Broadcast message calibrate-delegation", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argChainId := args[0] - argValoper := args[1] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgCalibrateDelegation( - clientCtx.GetFromAddress().String(), - argChainId, - argValoper, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_change_validator_weight.go b/x/stakeibc/client/cli/tx_change_validator_weight.go deleted file mode 100644 index 2abac2d7b..000000000 --- a/x/stakeibc/client/cli/tx_change_validator_weight.go +++ /dev/null @@ -1,140 +0,0 @@ -package cli - -import ( - "encoding/json" - "os" - "strings" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cast" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -type ValidatorWeightList struct { - ValidatorWeights []*types.ValidatorWeight `json:"validator_weights,omitempty"` -} - -// Parse a JSON with a list of validators in the format -// -// { -// "validator_weights": [ -// {"address": "cosmosXXX", "weight": 1}, -// {"address": "cosmosXXX", "weight": 2} -// ] -// } -func parseChangeValidatorWeightsFile(validatorsFile string) (weights []*types.ValidatorWeight, err error) { - fileContents, err := os.ReadFile(validatorsFile) - if err != nil { - return weights, err - } - - var weightsList ValidatorWeightList - if err = json.Unmarshal(fileContents, &weightsList); err != nil { - return weights, err - } - - return weightsList.ValidatorWeights, nil -} - -// Updates the weight for a single validator -func CmdChangeValidatorWeight() *cobra.Command { - cmd := &cobra.Command{ - Use: "change-validator-weight [host-zone] [address] [weight]", - Short: "Broadcast message change-validator-weight to update the weight for a single validator", - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) (err error) { - hostZone := args[0] - valAddress := args[1] - weight, err := cast.ToUint64E(args[2]) - if err != nil { - return err - } - weights := []*types.ValidatorWeight{ - { - Address: valAddress, - Weight: weight, - }, - } - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgChangeValidatorWeights( - clientCtx.GetFromAddress().String(), - hostZone, - weights, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -// Updates the weight for multiple validators -// -// Accepts a file in the following format: -// -// { -// "validator_weights": [ -// {"address": "cosmosXXX", "weight": 1}, -// {"address": "cosmosXXX", "weight": 2} -// ] -// } -func CmdChangeMultipleValidatorWeight() *cobra.Command { - cmd := &cobra.Command{ - Use: "change-validator-weights [host-zone] [validator-weight-file]", - Short: "Broadcast message change-validator-weights to update the weights for multiple validators", - Long: strings.TrimSpace( - `Changes multiple validator weights at once, using a JSON file in the following format - { - "validator_weights": [ - {"address": "cosmosXXX", "weight": 1}, - {"address": "cosmosXXX", "weight": 2} - ] - } -`), - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) (err error) { - hostZone := args[0] - validatorWeightChangeFile := args[1] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - weights, err := parseChangeValidatorWeightsFile(validatorWeightChangeFile) - if err != nil { - return err - } - - msg := types.NewMsgChangeValidatorWeights( - clientCtx.GetFromAddress().String(), - hostZone, - weights, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_claim_undelegated_tokens.go b/x/stakeibc/client/cli/tx_claim_undelegated_tokens.go deleted file mode 100644 index f8350bc25..000000000 --- a/x/stakeibc/client/cli/tx_claim_undelegated_tokens.go +++ /dev/null @@ -1,51 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cast" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var _ = strconv.Itoa(0) - -func CmdClaimUndelegatedTokens() *cobra.Command { - cmd := &cobra.Command{ - Use: "claim-undelegated-tokens [host-zone] [epoch] [receiver]", - Short: "Broadcast message claimUndelegatedTokens", - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argHostZone := args[0] - argEpoch, err := cast.ToUint64E(args[1]) - if err != nil { - return err - } - argReceiver := args[2] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgClaimUndelegatedTokens( - clientCtx.GetFromAddress().String(), - argHostZone, - argEpoch, - argReceiver, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_clear_balance.go b/x/stakeibc/client/cli/tx_clear_balance.go deleted file mode 100644 index 8d1019d75..000000000 --- a/x/stakeibc/client/cli/tx_clear_balance.go +++ /dev/null @@ -1,53 +0,0 @@ -package cli - -import ( - "strconv" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var _ = strconv.Itoa(0) - -func CmdClearBalance() *cobra.Command { - cmd := &cobra.Command{ - Use: "clear-balance [chain-id] [amount] [channel-id]", - Short: "Broadcast message clear-balance", - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argChainId := args[0] - argAmount, found := sdkmath.NewIntFromString(args[1]) - if !found { - return errorsmod.Wrap(sdkerrors.ErrInvalidType, "can not convert string to int") - } - argChannelId := args[2] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgClearBalance( - clientCtx.GetFromAddress().String(), - argChainId, - argAmount, - argChannelId, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_delete_validator.go b/x/stakeibc/client/cli/tx_delete_validator.go deleted file mode 100644 index 101803537..000000000 --- a/x/stakeibc/client/cli/tx_delete_validator.go +++ /dev/null @@ -1,41 +0,0 @@ -package cli - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdDeleteValidator() *cobra.Command { - cmd := &cobra.Command{ - Use: "delete-validator [host-zone] [address]", - Short: "Broadcast message delete-validator", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argHostZone := args[0] - argAddress := args[1] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgDeleteValidator( - clientCtx.GetFromAddress().String(), - argHostZone, - argAddress, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_liquid_stake.go b/x/stakeibc/client/cli/tx_liquid_stake.go deleted file mode 100644 index 0514caf89..000000000 --- a/x/stakeibc/client/cli/tx_liquid_stake.go +++ /dev/null @@ -1,51 +0,0 @@ -package cli - -import ( - "strconv" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var _ = strconv.Itoa(0) - -func CmdLiquidStake() *cobra.Command { - cmd := &cobra.Command{ - Use: "liquid-stake [amount] [hostDenom]", - Short: "Broadcast message liquid-stake", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argAmount, found := sdkmath.NewIntFromString(args[0]) - if !found { - return errorsmod.Wrap(sdkerrors.ErrInvalidType, "can not convert string to int") - } - argHostDenom := args[1] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgLiquidStake( - clientCtx.GetFromAddress().String(), - argAmount, - argHostDenom, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_lsm_liquid_stake.go b/x/stakeibc/client/cli/tx_lsm_liquid_stake.go deleted file mode 100644 index b2d60c997..000000000 --- a/x/stakeibc/client/cli/tx_lsm_liquid_stake.go +++ /dev/null @@ -1,47 +0,0 @@ -package cli - -import ( - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdLSMLiquidStake() *cobra.Command { - cmd := &cobra.Command{ - Use: "lsm-liquid-stake [amount] [lsm-token-denom]", - Short: "Broadcast message lsm-liquid-stake", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) (err error) { - amount, found := sdkmath.NewIntFromString(args[0]) - if !found { - return errorsmod.Wrap(sdkerrors.ErrInvalidType, "can not convert string to int") - } - denom := args[1] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgLSMLiquidStake( - clientCtx.GetFromAddress().String(), - amount, - denom, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_rebalance_validators.go b/x/stakeibc/client/cli/tx_rebalance_validators.go deleted file mode 100644 index bb9543c02..000000000 --- a/x/stakeibc/client/cli/tx_rebalance_validators.go +++ /dev/null @@ -1,47 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var _ = strconv.Itoa(0) - -func CmdRebalanceValidators() *cobra.Command { - cmd := &cobra.Command{ - Use: "rebalance-validators [host-zone] [num-to-rebalance]", - Short: "Broadcast message rebalanceValidators", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argHostZone := args[0] - argNumValidators, err := strconv.ParseUint(args[1], 10, 64) - if err != nil { - return err - } - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgRebalanceValidators( - clientCtx.GetFromAddress().String(), - argHostZone, - argNumValidators, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_redeem_stake.go b/x/stakeibc/client/cli/tx_redeem_stake.go deleted file mode 100644 index b52cfb1e2..000000000 --- a/x/stakeibc/client/cli/tx_redeem_stake.go +++ /dev/null @@ -1,54 +0,0 @@ -package cli - -import ( - "strconv" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var _ = strconv.Itoa(0) - -func CmdRedeemStake() *cobra.Command { - cmd := &cobra.Command{ - Use: "redeem-stake [amount] [hostZoneID] [receiver]", - Short: "Broadcast message redeem-stake", - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) error { - argAmount, found := sdkmath.NewIntFromString(args[0]) - if !found { - return errorsmod.Wrap(sdkerrors.ErrInvalidType, "can not convert string to int") - } - hostZoneID := args[1] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - argReceiver := args[2] - - msg := types.NewMsgRedeemStake( - clientCtx.GetFromAddress().String(), - argAmount, - hostZoneID, - argReceiver, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_register_host_zone.go b/x/stakeibc/client/cli/tx_register_host_zone.go deleted file mode 100644 index 4c9ddc7a0..000000000 --- a/x/stakeibc/client/cli/tx_register_host_zone.go +++ /dev/null @@ -1,111 +0,0 @@ -package cli - -import ( - "strconv" - - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -const ( - FlagMinRedemptionRate = "min-redemption-rate" - FlagMaxRedemptionRate = "max-redemption-rate" - FlagCommunityPoolTreasuryAddress = "community-pool-treasury-address" - FlagMaxMessagesPerIcaTx = "max-messages-per-ica-tx" -) - -func CmdRegisterHostZone() *cobra.Command { - cmd := &cobra.Command{ - Use: "register-host-zone [connection-id] [host-denom] [bech32prefix] [ibc-denom] [channel-id] [unbonding-period] [lsm-enabled]", - Short: "Broadcast message register-host-zone", - Args: cobra.ExactArgs(7), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - connectionId := args[0] - hostDenom := args[1] - bech32prefix := args[2] - ibcDenom := args[3] - channelId := args[4] - unbondingPeriod, err := strconv.ParseUint(args[5], 10, 64) - if err != nil { - return err - } - lsmEnabled, err := strconv.ParseBool(args[6]) - if err != nil { - return err - } - - minRedemptionRateStr, err := cmd.Flags().GetString(FlagMinRedemptionRate) - if err != nil { - return err - } - minRedemptionRate := sdkmath.LegacyZeroDec() - if minRedemptionRateStr != "" { - minRedemptionRate, err = sdkmath.LegacyNewDecFromStr(minRedemptionRateStr) - if err != nil { - return err - } - } - - maxRedemptionRateStr, err := cmd.Flags().GetString(FlagMaxRedemptionRate) - if err != nil { - return err - } - maxRedemptionRate := sdkmath.LegacyZeroDec() - if maxRedemptionRateStr != "" { - maxRedemptionRate, err = sdkmath.LegacyNewDecFromStr(maxRedemptionRateStr) - if err != nil { - return err - } - } - - communityPoolTreasuryAddress, err := cmd.Flags().GetString(FlagCommunityPoolTreasuryAddress) - if err != nil { - return err - } - - maxMessagesPerIcaTx, err := cmd.Flags().GetUint64(FlagMaxMessagesPerIcaTx) - if err != nil { - return err - } - - msg := types.NewMsgRegisterHostZone( - clientCtx.GetFromAddress().String(), - connectionId, - bech32prefix, - hostDenom, - ibcDenom, - channelId, - unbondingPeriod, - minRedemptionRate, - maxRedemptionRate, - lsmEnabled, - communityPoolTreasuryAddress, - maxMessagesPerIcaTx, - ) - - if err := msg.ValidateBasic(); err != nil { - return err - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - cmd.Flags().String(FlagMinRedemptionRate, "", "minimum redemption rate") - cmd.Flags().String(FlagMaxRedemptionRate, "", "maximum redemption rate") - cmd.Flags().String(FlagCommunityPoolTreasuryAddress, "", "community pool treasury address") - cmd.Flags().Uint64(FlagMaxMessagesPerIcaTx, 0, "maximum number of ICA txs in a given tx") - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_restore_interchain_account.go b/x/stakeibc/client/cli/tx_restore_interchain_account.go deleted file mode 100644 index cce56248e..000000000 --- a/x/stakeibc/client/cli/tx_restore_interchain_account.go +++ /dev/null @@ -1,58 +0,0 @@ -package cli - -import ( - "strings" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdRestoreInterchainAccount() *cobra.Command { - cmd := &cobra.Command{ - Use: "restore-interchain-account [chain-id] [connection-id] [account-owner]", - Short: "Broadcast message restore-interchain-account", - Long: strings.TrimSpace( - `Restores a closed channel associated with an interchain account. -Specify the chain ID and account owner - where the owner is the alias for the ICA account - -For host zone ICA accounts, the owner is of the form {chainId}.{accountType} -ex: ->>> strided tx restore-interchain-account cosmoshub-4 connection-0 cosmoshub-4.DELEGATION - -For trade route ICA accounts, the owner is of the form: - {chainId}.{rewardDenom}-{hostDenom}.{accountType} -ex: ->>> strided tx restore-interchain-account dydx-mainnet-1 connection-1 dydx-mainnet-1.uusdc-udydx.CONVERTER_TRADE - `), - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) (err error) { - chainId := args[0] - connectionId := args[1] - accountOwner := args[2] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgRestoreInterchainAccount( - clientCtx.GetFromAddress().String(), - chainId, - connectionId, - accountOwner, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_resume_host_zone.go b/x/stakeibc/client/cli/tx_resume_host_zone.go deleted file mode 100644 index df378cef4..000000000 --- a/x/stakeibc/client/cli/tx_resume_host_zone.go +++ /dev/null @@ -1,39 +0,0 @@ -package cli - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdResumeHostZone() *cobra.Command { - cmd := &cobra.Command{ - Use: "resume-host-zone [chainid]", - Short: "Broadcast message resume-host-zone", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argChainId := args[0] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgResumeHostZone( - clientCtx.GetFromAddress().String(), - argChainId, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_set_community_pool_rebate.go b/x/stakeibc/client/cli/tx_set_community_pool_rebate.go deleted file mode 100644 index 01dad059b..000000000 --- a/x/stakeibc/client/cli/tx_set_community_pool_rebate.go +++ /dev/null @@ -1,60 +0,0 @@ -package cli - -import ( - "errors" - "fmt" - "strings" - - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdSetCommunityPoolRebate() *cobra.Command { - cmd := &cobra.Command{ - Use: "set-rebate [chain-id] [rebate-rate] [liquid-staked-sttoken-amount]", - Short: "Registers or updates a community pool rebate", - Long: strings.TrimSpace(`Registers a community pool rebate by specifying the rebate percentage (as a decimal) -and the amount liquid staked, denominated in the number of stTokens received. -E.g. to specify a 20% rebate, the rebate rate should be 0.2 - -If a 0.0 rebate or 0 token liquid stake is specified, the rebate will be deleted. - `), - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) (err error) { - chainId := args[0] - rebatePercentage, err := sdkmath.LegacyNewDecFromStr(args[1]) - if err != nil { - return fmt.Errorf("unable to parse rebate percentage: %s", err.Error()) - } - liquidStakedStTokenAmount, ok := sdkmath.NewIntFromString(args[2]) - if !ok { - return errors.New("unable to parse liquid stake amount") - } - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgSetCommunityPoolRebate( - clientCtx.GetFromAddress().String(), - chainId, - rebatePercentage, - liquidStakedStTokenAmount, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_toggle_trade_controller.go b/x/stakeibc/client/cli/tx_toggle_trade_controller.go deleted file mode 100644 index 10ca7ebc1..000000000 --- a/x/stakeibc/client/cli/tx_toggle_trade_controller.go +++ /dev/null @@ -1,56 +0,0 @@ -package cli - -import ( - "errors" - "strings" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdToggleTradeController() *cobra.Command { - cmd := &cobra.Command{ - Use: "toggle-trade-controller [trade-chain-id] [grant|revoke] [address]", - Short: "Submits an ICA tx to grant or revoke permissions to trade on behalf of the trade ICA", - Long: strings.TrimSpace(`Submits an ICA tx to grant or revoke permissions to trade on behalf of the trade ICA -Ex: ->>> strided tx toggle-trade-controller osmosis-1 grant osmoXXX - `), - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) (err error) { - chainId := args[0] - permissionChangeString := args[1] - address := args[2] - - permissionChangeInt, ok := types.AuthzPermissionChange_value[strings.ToUpper(permissionChangeString)] - if !ok { - return errors.New("invalid permission change, must be either 'grant' or 'revoke'") - } - permissionChange := types.AuthzPermissionChange(permissionChangeInt) - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgToggleTradeController( - clientCtx.GetFromAddress().String(), - chainId, - permissionChange, - address, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_update_delegation.go b/x/stakeibc/client/cli/tx_update_delegation.go deleted file mode 100644 index 05021c60e..000000000 --- a/x/stakeibc/client/cli/tx_update_delegation.go +++ /dev/null @@ -1,45 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var _ = strconv.Itoa(0) - -func CmdUpdateValidatorSharesExchRate() *cobra.Command { - cmd := &cobra.Command{ - Use: "update-delegation [chainid] [valoper]", - Short: "Broadcast message update-delegation", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argHostdenom := args[0] - argValoper := args[1] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgUpdateValidatorSharesExchRate( - clientCtx.GetFromAddress().String(), - argHostdenom, - argValoper, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/client/cli/tx_update_inner_redemption_rate_bounds.go b/x/stakeibc/client/cli/tx_update_inner_redemption_rate_bounds.go deleted file mode 100644 index 91a3bc8ee..000000000 --- a/x/stakeibc/client/cli/tx_update_inner_redemption_rate_bounds.go +++ /dev/null @@ -1,44 +0,0 @@ -package cli - -import ( - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/spf13/cobra" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func CmdUpdateInnerRedemptionRateBounds() *cobra.Command { - cmd := &cobra.Command{ - Use: "set-redemption-rate-bounds [chainid] [min-bound] [max-bound]", - Short: "Broadcast message set-redemption-rate-bounds", - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argChainId := args[0] - minInnerRedemptionRate := sdkmath.LegacyMustNewDecFromStr(args[1]) - maxInnerRedemptionRate := sdkmath.LegacyMustNewDecFromStr(args[2]) - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgUpdateInnerRedemptionRateBounds( - clientCtx.GetFromAddress().String(), - argChainId, - minInnerRedemptionRate, - maxInnerRedemptionRate, - ) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/stakeibc/genesis.go b/x/stakeibc/genesis.go deleted file mode 100644 index 14874dd0e..000000000 --- a/x/stakeibc/genesis.go +++ /dev/null @@ -1,34 +0,0 @@ -package stakeibc - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// InitGenesis initializes the capability module's state from a provided genesis -// state. -func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - for _, hostZone := range genState.HostZoneList { - k.SetHostZone(ctx, hostZone) - } - for _, epochTracker := range genState.EpochTrackerList { - k.SetEpochTracker(ctx, epochTracker) - } - - if err := k.SetParams(ctx, genState.Params); err != nil { - panic(err) - } -} - -// ExportGenesis returns the capability module's exported genesis. -func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { - genesis := types.DefaultGenesis() - - genesis.Params = k.GetParams(ctx) - genesis.HostZoneList = k.GetAllHostZone(ctx) - genesis.EpochTrackerList = k.GetAllEpochTracker(ctx) - - return genesis -} diff --git a/x/stakeibc/ibc_middleware.go b/x/stakeibc/ibc_middleware.go deleted file mode 100644 index c5406668e..000000000 --- a/x/stakeibc/ibc_middleware.go +++ /dev/null @@ -1,161 +0,0 @@ -package stakeibc - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" -) - -var _ porttypes.Middleware = &IBCMiddleware{} - -type IBCMiddleware struct { - app porttypes.IBCModule - keeper keeper.Keeper -} - -func NewIBCMiddleware(app porttypes.IBCModule, k keeper.Keeper) IBCMiddleware { - return IBCMiddleware{ - app: app, - keeper: k, - } -} - -// OnChanOpenInit simply passes down the to next middleware stack -func (im IBCMiddleware) OnChanOpenInit( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID string, - channelID string, - channelCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version string, -) (string, error) { - return im.app.OnChanOpenInit(ctx, order, connectionHops, portID, channelID, channelCap, counterparty, version) -} - -// OnChanOpenTry simply passes down the to next middleware stack -func (im IBCMiddleware) OnChanOpenTry( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - counterpartyVersion string, -) (string, error) { - return im.app.OnChanOpenTry(ctx, order, connectionHops, portID, channelID, chanCap, counterparty, counterpartyVersion) -} - -// OnChanOpenAck stores the new ICA acccount addresses on the host zone and then passes to the next middleware stack -func (im IBCMiddleware) OnChanOpenAck( - ctx sdk.Context, - portID, - channelID string, - counterpartyChannelID string, - counterpartyVersion string, -) error { - im.keeper.Logger(ctx).Info(fmt.Sprintf("OnChanOpenAck: portID %s, channelID %s, counterpartyChannelID %s, counterpartyVersion %s", portID, channelID, counterpartyChannelID, counterpartyVersion)) - if err := im.keeper.OnChanOpenAck(ctx, portID, channelID); err != nil { - ctx.Logger().Error(fmt.Sprintf("Error during stakeibc OnChanOpenAck: %s", err.Error())) - return err - } - - // call underlying app's OnChanOpenAck - return im.app.OnChanOpenAck(ctx, portID, channelID, counterpartyChannelID, counterpartyVersion) -} - -// OnChanCloseConfirm simply passes down the to next middleware stack -func (im IBCMiddleware) OnChanCloseConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - return im.app.OnChanCloseConfirm(ctx, portID, channelID) -} - -// OnChanCloseInit simply passes down the to next middleware stack -func (im IBCMiddleware) OnChanCloseInit( - ctx sdk.Context, - portID, - channelID string, -) error { - return im.app.OnChanCloseInit(ctx, portID, channelID) -} - -// OnChanOpenConfirm simply passes down the to next middleware stack -func (im IBCMiddleware) OnChanOpenConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - return im.app.OnChanOpenConfirm(ctx, portID, channelID) -} - -// OnAcknowledgementPacket simply passes down the to next middleware stack -// The Ack handling and routing is managed by icacallbacks -func (im IBCMiddleware) OnAcknowledgementPacket( - ctx sdk.Context, - packet channeltypes.Packet, - acknowledgement []byte, - relayer sdk.AccAddress, -) error { - return im.app.OnAcknowledgementPacket(ctx, packet, acknowledgement, relayer) -} - -// OnTimeoutPacket simply passes down the to next middleware stack -// The Ack handling and routing is managed by icacallbacks -func (im IBCMiddleware) OnTimeoutPacket( - ctx sdk.Context, - packet channeltypes.Packet, - relayer sdk.AccAddress, -) error { - return im.app.OnTimeoutPacket(ctx, packet, relayer) -} - -// OnRecvPacket simply passes down the to next middleware stack -func (im IBCMiddleware) OnRecvPacket( - ctx sdk.Context, - packet channeltypes.Packet, - relayer sdk.AccAddress, -) ibcexported.Acknowledgement { - return im.app.OnRecvPacket(ctx, packet, relayer) -} - -// SendPacket implements the ICS4 Wrapper interface but is not utilized in the ICA stack -func (im IBCMiddleware) SendPacket( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - sourcePort string, - sourceChannel string, - timeoutHeight clienttypes.Height, - timeoutTimestamp uint64, - data []byte, -) (sequence uint64, err error) { - panic("UNIMPLEMENTED") -} - -// WriteAcknowledgement implements the ICS4 Wrapper interface -// but is not utilized in the bottom of ICA stack -func (im IBCMiddleware) WriteAcknowledgement( - ctx sdk.Context, - chanCap *capabilitytypes.Capability, - packet ibcexported.PacketI, - ack ibcexported.Acknowledgement, -) error { - panic("UNIMPLEMENTED") -} - -// GetAppVersion implements the ICS4 Wrapper interface -// but is not utilized in the bottom of ICA stack -func (im IBCMiddleware) GetAppVersion(ctx sdk.Context, portID, channelID string) (string, bool) { - panic("UNIMPLEMENTED") -} diff --git a/x/stakeibc/keeper/abci.go b/x/stakeibc/keeper/abci.go deleted file mode 100644 index a18ae58c7..000000000 --- a/x/stakeibc/keeper/abci.go +++ /dev/null @@ -1,47 +0,0 @@ -package keeper - -import ( - "fmt" - "time" - - "github.com/cosmos/cosmos-sdk/telemetry" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" - - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// BeginBlocker of stakeibc module -func (k Keeper) BeginBlocker(ctx sdk.Context) { - defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) - - // Iterate over all host zones and verify redemption rate - for _, hz := range k.GetAllHostZone(ctx) { - rrSafe, err := k.IsRedemptionRateWithinSafetyBounds(ctx, hz) - if !rrSafe { - hz.Halted = true - k.SetHostZone(ctx, hz) - - // set rate limit on stAsset - stDenom := types.StAssetDenomFromHostZoneDenom(hz.HostDenom) - k.rateLimitKeeper.AddDenomToBlacklist(ctx, stDenom) - - k.Logger(ctx).Error(fmt.Sprintf("[INVARIANT BROKEN!!!] %s's RR is %s. ERR: %v", hz.GetChainId(), hz.RedemptionRate.String(), err.Error())) - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeHostZoneHalt, - sdk.NewAttribute(types.AttributeKeyHostZone, hz.ChainId), - sdk.NewAttribute(types.AttributeKeyRedemptionRate, hz.RedemptionRate.String()), - ), - ) - } - } - - k.AssertStrideAndDayEpochRelationship(ctx) -} - -func (k Keeper) EndBlocker(ctx sdk.Context) { - // Submit an IBC transfer or detokenization ICA for all queued LSM Deposits across each host - k.TransferAllLSMDeposits(ctx) - k.DetokenizeAllLSMDeposits(ctx) -} diff --git a/x/stakeibc/keeper/claim.go b/x/stakeibc/keeper/claim.go deleted file mode 100644 index 30922ebfd..000000000 --- a/x/stakeibc/keeper/claim.go +++ /dev/null @@ -1,142 +0,0 @@ -package keeper - -import ( - "context" - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - bankTypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/gogoproto/proto" - - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -type IcaTx struct { - ConnectionId string - Msgs []proto.Message - ICAAccountType types.ICAAccountType - Timeout uint64 -} - -func (k msgServer) ClaimUndelegatedTokens(goCtx context.Context, msg *types.MsgClaimUndelegatedTokens) (*types.MsgClaimUndelegatedTokensResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - k.Logger(ctx).Info(fmt.Sprintf("ClaimUndelegatedTokens %v", msg)) - userRedemptionRecord, err := k.GetClaimableRedemptionRecord(ctx, msg) - if err != nil { - errMsg := fmt.Sprintf("unable to find claimable redemption record for msg: %v, error %s", msg, err.Error()) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrap(types.ErrRecordNotFound, errMsg) - } - - hostZone, found := k.GetHostZone(ctx, msg.HostZoneId) - if !found { - return nil, errorsmod.Wrap(types.ErrHostZoneNotFound, fmt.Sprintf("Host zone %s not found", msg.HostZoneId)) - } - - if hostZone.Halted { - k.Logger(ctx).Error(fmt.Sprintf("Host Zone %s halted", msg.HostZoneId)) - return nil, errorsmod.Wrapf(types.ErrHaltedHostZone, "Host Zone %s halted", msg.HostZoneId) - } - - icaTx, err := k.GetRedemptionTransferMsg(ctx, userRedemptionRecord, msg.HostZoneId) - if err != nil { - return nil, errorsmod.Wrap(err, "unable to build redemption transfer message") - } - - // add callback data - claimCallback := types.ClaimCallback{ - UserRedemptionRecordId: userRedemptionRecord.Id, - ChainId: msg.HostZoneId, - EpochNumber: msg.Epoch, - } - marshalledCallbackArgs, err := k.MarshalClaimCallbackArgs(ctx, claimCallback) - if err != nil { - return nil, errorsmod.Wrap(err, "unable to marshal claim callback args") - } - _, err = k.SubmitTxs(ctx, icaTx.ConnectionId, icaTx.Msgs, icaTx.ICAAccountType, icaTx.Timeout, ICACallbackID_Claim, marshalledCallbackArgs) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Submit tx error: %s", err.Error())) - return nil, errorsmod.Wrap(err, "unable to submit ICA redemption tx") - } - - // Set claimIsPending to true, so that the record can't be double claimed - userRedemptionRecord.ClaimIsPending = true - k.recordsKeeper.SetUserRedemptionRecord(ctx, *userRedemptionRecord) - - return &types.MsgClaimUndelegatedTokensResponse{}, nil -} - -func (k Keeper) GetClaimableRedemptionRecord(ctx sdk.Context, msg *types.MsgClaimUndelegatedTokens) (*recordstypes.UserRedemptionRecord, error) { - // grab the UserRedemptionRecord from the store - userRedemptionRecordKey := recordstypes.UserRedemptionRecordKeyFormatter(msg.HostZoneId, msg.Epoch, msg.Receiver) - userRedemptionRecord, found := k.recordsKeeper.GetUserRedemptionRecord(ctx, userRedemptionRecordKey) - if !found { - errMsg := fmt.Sprintf("User redemption record %s not found on host zone %s", userRedemptionRecordKey, msg.HostZoneId) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrap(types.ErrInvalidUserRedemptionRecord, errMsg) - } - - // check that the record is claimable - hostZoneUnbonding, found := k.recordsKeeper.GetHostZoneUnbondingByChainId(ctx, userRedemptionRecord.EpochNumber, msg.HostZoneId) - if !found { - errMsg := fmt.Sprintf("Host zone unbonding record %s not found on host zone %s", userRedemptionRecordKey, msg.HostZoneId) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrInvalidUserRedemptionRecord, errMsg) - } - // records associated with host zone unbondings are claimable after the host zone unbonding tokens have been CLAIMABLE to the redemption account - if hostZoneUnbonding.Status != recordstypes.HostZoneUnbonding_CLAIMABLE { - errMsg := fmt.Sprintf("User redemption record %s is not claimable, host zone unbonding has status: %s, requires status CLAIMABLE", userRedemptionRecord.Id, hostZoneUnbonding.Status) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrInvalidUserRedemptionRecord, errMsg) - } - // records that have claimIsPending set to True have already been claimed (and are pending an ack) - if userRedemptionRecord.ClaimIsPending { - errMsg := fmt.Sprintf("User redemption record %s is not claimable, pending ack", userRedemptionRecord.Id) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrInvalidUserRedemptionRecord, errMsg) - } - return &userRedemptionRecord, nil -} - -func (k Keeper) GetRedemptionTransferMsg(ctx sdk.Context, userRedemptionRecord *recordstypes.UserRedemptionRecord, hostZoneId string) (*IcaTx, error) { - // grab necessary fields to construct ICA call - hostZone, found := k.GetHostZone(ctx, hostZoneId) - if !found { - return nil, errorsmod.Wrapf(types.ErrInvalidHostZone, "Host zone %s not found", hostZoneId) - } - if hostZone.RedemptionIcaAddress == "" { - return nil, errorsmod.Wrapf(types.ErrICAAccountNotFound, "Redemption account not found for host zone %s", hostZoneId) - } - - var msgs []proto.Message - rrAmt := userRedemptionRecord.NativeTokenAmount - msgs = append(msgs, &bankTypes.MsgSend{ - FromAddress: hostZone.RedemptionIcaAddress, - ToAddress: userRedemptionRecord.Receiver, - Amount: sdk.NewCoins(sdk.NewCoin(userRedemptionRecord.Denom, rrAmt)), - }) - - // Give claims a 10 minute timeout - // TODO [optimization]: Remove reference to epoch time (make timeout relative to block time) - epochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - errMsg := fmt.Sprintf("Epoch tracker not found for epoch %s", epochstypes.STRIDE_EPOCH) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrap(types.ErrEpochNotFound, errMsg) - } - icaTimeOutNanos := k.GetParams(ctx).IcaTimeoutNanos - nextEpochStarttime := epochTracker.NextEpochStartTime - timeout := nextEpochStarttime + icaTimeOutNanos - - icaTx := IcaTx{ - ConnectionId: hostZone.GetConnectionId(), - Msgs: msgs, - ICAAccountType: types.ICAAccountType_REDEMPTION, - Timeout: timeout, - } - - return &icaTx, nil -} diff --git a/x/stakeibc/keeper/community_pool.go b/x/stakeibc/keeper/community_pool.go deleted file mode 100644 index 4b418a33d..000000000 --- a/x/stakeibc/keeper/community_pool.go +++ /dev/null @@ -1,314 +0,0 @@ -package keeper - -import ( - "fmt" - "strings" - "time" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - - "github.com/cosmos/gogoproto/proto" - - "github.com/milkyway-labs/milkyway/utils" - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// For each hostZone with a valid community pool, trigger the ICQs and ICAs to transfer tokens from DepositICA or back to ReturnICA -// Since ICQs and ICAs take time to complete, it is almost certain tokens swept in and processed will be swept out in a later epoch -func (k Keeper) ProcessAllCommunityPoolTokens(ctx sdk.Context) { - hostZones := k.GetAllActiveHostZone(ctx) - for _, hostZone := range hostZones { - if hostZone.CommunityPoolDepositIcaAddress == "" || - hostZone.CommunityPoolStakeHoldingAddress == "" || - hostZone.CommunityPoolRedeemHoldingAddress == "" || - hostZone.CommunityPoolReturnIcaAddress == "" { - continue - } - - // stDenom is the ibc denom on hostZone when the hostZone's native denom is staked - denom := hostZone.HostDenom - stIbcDenom, err := k.GetStIbcDenomOnHostZone(ctx, hostZone) - if err != nil { - k.Logger(ctx).Error(utils.LogWithHostZone(hostZone.ChainId, "Unable to get stToken ibc denom - %s", err.Error())) - continue - } - - /****** Stage 1: Query deposit ICA for denom/stDenom, Transfer tokens to stride *******/ - - // ICQ for the host denom of the chain, these are tokens the pool wants staked - err = k.QueryCommunityPoolIcaBalance(ctx, hostZone, types.ICAAccountType_COMMUNITY_POOL_DEPOSIT, denom) - if err != nil { - k.Logger(ctx).Error(utils.LogWithHostZone(hostZone.ChainId, - "Failed to submit ICQ for native denom %s in deposit ICA - %s", denom, err.Error())) - } - // ICQ for staked tokens of the host denom, these are tokens the pool wants redeemed - err = k.QueryCommunityPoolIcaBalance(ctx, hostZone, types.ICAAccountType_COMMUNITY_POOL_DEPOSIT, stIbcDenom) - if err != nil { - k.Logger(ctx).Error(utils.LogWithHostZone(hostZone.ChainId, - "Failed to submit ICQ for stHostDenom %s in deposit ICA - %s", stIbcDenom, err.Error())) - } - - /****** Stage 2: LiquidStake denom and transfer to return ICA, or RedeemStake stDenom *******/ - - // LiquidStake tokens in the stake holding address and transfer to the return ica - if err = k.LiquidStakeCommunityPoolTokens(ctx, hostZone); err != nil { - k.Logger(ctx).Error(utils.LogWithHostZone(hostZone.ChainId, - "Failed to liquid staking and transfer community pool tokens in stake holding address - %s", err.Error())) - } - // RedeemStake tokens in the redeem holding address, in 30 days they claim to the return ica - if err = k.RedeemCommunityPoolTokens(ctx, hostZone); err != nil { - k.Logger(ctx).Error(utils.LogWithHostZone(hostZone.ChainId, - "Failed to redeeming stTokens in redeem holding address - %s", err.Error())) - } - - /****** Stage 3: Query return ICA for denom/stDenom, FundCommunityPool from return ICA *******/ - - err = k.QueryCommunityPoolIcaBalance(ctx, hostZone, types.ICAAccountType_COMMUNITY_POOL_RETURN, denom) - if err != nil { - k.Logger(ctx).Error(utils.LogWithHostZone(hostZone.ChainId, - "Failed to submit ICQ for native denom %s in return ICA - %s", denom, err.Error())) - } - err = k.QueryCommunityPoolIcaBalance(ctx, hostZone, types.ICAAccountType_COMMUNITY_POOL_RETURN, stIbcDenom) - if err != nil { - k.Logger(ctx).Error(utils.LogWithHostZone(hostZone.ChainId, - "Failed to submit ICQ for stHostDenom %s in return ICA - %s", stIbcDenom, err.Error())) - } - } -} - -// ICQ specific denom for balance in the deposit ICA or return ICA on the community pool host zone -// Depending on account type and denom, discovered tokens are transferred to Stride or funded to the pool -func (k Keeper) QueryCommunityPoolIcaBalance( - ctx sdk.Context, - hostZone types.HostZone, - icaType types.ICAAccountType, - denom string, -) error { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, - "Building ICQ for %s balance in community pool %s address", denom, icaType.String())) - - var icaAddress string - switch icaType { - case types.ICAAccountType_COMMUNITY_POOL_DEPOSIT: - icaAddress = hostZone.CommunityPoolDepositIcaAddress - case types.ICAAccountType_COMMUNITY_POOL_RETURN: - icaAddress = hostZone.CommunityPoolReturnIcaAddress - default: - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "icaType must be either deposit or return!") - } - - // Verify a valid ica address exists for this host zone - if icaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no address of type %s found for %s", - icaType.String(), hostZone.ChainId) - } - - _, addressBz, err := bech32.DecodeAndConvert(icaAddress) - if err != nil { - return errorsmod.Wrapf(err, "invalid %s address, could not decode (%s)", - icaType.String(), icaAddress) - } - queryData, err := types.MoveBankBalanceKey(addressBz, denom) - if err != nil { - panic(fmt.Sprintf( - "cannot construct move bank balance key for address %s and denom %s", - icaAddress, denom)) - } - - // The response might be a coin, or might just be an int depending on sdk version - // Since we need the denom later, store the denom as callback data for the query - callbackData := types.CommunityPoolBalanceQueryCallback{ - IcaType: icaType, - Denom: denom, - } - callbackDataBz, err := proto.Marshal(&callbackData) - if err != nil { - return errorsmod.Wrapf(err, "can't marshal community pool balance callback data %+v", callbackData) - } - - // Timeout query at end of epoch - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.STRIDE_EPOCH) - } - timeout := time.Unix(0, int64(strideEpochTracker.NextEpochStartTime)) - timeoutDuration := timeout.Sub(ctx.BlockTime()) - - // Submit the ICQ for the withdrawal account balance - query := icqtypes.Query{ - ChainId: hostZone.ChainId, - ConnectionId: hostZone.ConnectionId, - QueryType: icqtypes.BANK_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_CommunityPoolIcaBalance, - CallbackData: callbackDataBz, - TimeoutDuration: timeoutDuration, - TimeoutPolicy: icqtypes.TimeoutPolicy_REJECT_QUERY_RESPONSE, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - return errorsmod.Wrapf(err, "Error submitting query for pool ica balance") - } - - return nil -} - -// Liquid stake all native tokens in the stake holding address -func (k Keeper) LiquidStakeCommunityPoolTokens(ctx sdk.Context, hostZone types.HostZone) error { - // Get the number of native tokens in the stake address - // The native tokens will be an ibc denom since they've been transferred to stride - communityPoolStakeAddress, err := sdk.AccAddressFromBech32(hostZone.CommunityPoolStakeHoldingAddress) - if err != nil { - return err - } - nativeTokens := k.bankKeeper.GetBalance(ctx, communityPoolStakeAddress, hostZone.IbcDenom) - - // If there aren't enough tokens, do nothing - // (consider specifying a minimum here) - if nativeTokens.Amount.LTE(sdkmath.ZeroInt()) { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "No community pool tokens to liquid stake")) - return nil - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Liquid staking community pool tokens: %+v", nativeTokens)) - - // TODO: Move LS function to keeper method instead of message server - // Liquid stake the balance in the stake holding account - msgServer := NewMsgServerImpl(k) - liquidStakeRequest := types.MsgLiquidStake{ - Creator: hostZone.CommunityPoolStakeHoldingAddress, - Amount: nativeTokens.Amount, - HostDenom: hostZone.HostDenom, - } - resp, err := msgServer.LiquidStake(ctx, &liquidStakeRequest) - if err != nil { - return types.ErrFailedToLiquidStake.Wrapf(err.Error()) - } - - // If the liquid stake was successful, transfer the stTokens to the return ICA - return k.TransferHoldingToCommunityPoolReturn(ctx, hostZone, resp.StToken) -} - -// Redeem all the stTokens in the redeem holding address -func (k Keeper) RedeemCommunityPoolTokens(ctx sdk.Context, hostZone types.HostZone) error { - // Get the number of stTokens in the redeem address - communityPoolRedeemAddress, err := sdk.AccAddressFromBech32(hostZone.CommunityPoolRedeemHoldingAddress) - if err != nil { - return err - } - stDenom := types.StAssetDenomFromHostZoneDenom(hostZone.HostDenom) - stTokens := k.bankKeeper.GetBalance(ctx, communityPoolRedeemAddress, stDenom) - - // If there aren't enough tokens, do nothing - // (consider a greater than zero minimum threshold to avoid extra transfers) - if stTokens.Amount.LTE(sdkmath.ZeroInt()) { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "No community pool tokens to redeem")) - return nil - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Redeeming community pool tokens: %+v", stTokens)) - - // TODO: Move Redeem function to keeper method instead of message server - // Redeem the stTokens in the redeem holding account - // The return ICA address will be the recipient of the claim - msgServer := NewMsgServerImpl(k) - redeemStakeRequest := types.MsgRedeemStake{ - Creator: hostZone.CommunityPoolRedeemHoldingAddress, - Amount: stTokens.Amount, - HostZone: hostZone.ChainId, - Receiver: hostZone.CommunityPoolReturnIcaAddress, - } - if _, err := msgServer.RedeemStake(ctx, &redeemStakeRequest); err != nil { - return types.ErrUnableToRedeemStake.Wrapf(err.Error()) - } - - return nil -} - -// Builds a msg to send funds to a community pool -// If the community pool treasury address is specified on the host zone, the tokens are bank sent there -// Otherwise, a MsgFundCommunityPool is used to send tokens to the default community pool address -func (k Keeper) BuildFundCommunityPoolMsg( - ctx sdk.Context, - hostZone types.HostZone, - tokens sdk.Coins, - senderAccountType types.ICAAccountType, -) (fundMsg []proto.Message, err error) { - // Get the sender ICA address based on the account type - var sender string - switch senderAccountType { - case types.ICAAccountType_COMMUNITY_POOL_RETURN: - sender = hostZone.CommunityPoolReturnIcaAddress - case types.ICAAccountType_WITHDRAWAL: - sender = hostZone.WithdrawalIcaAddress - default: - return nil, errorsmod.Wrapf(types.ErrICATxFailed, - "fund community pool ICA can only be initiated from either the community pool return or withdrawal ICA account") - } - senderAccountString := strings.ToLower(senderAccountType.String()) - - // If the community pool treasury address is specified, bank send there - if hostZone.CommunityPoolTreasuryAddress != "" { - fundMsg = []proto.Message{&banktypes.MsgSend{ - FromAddress: sender, - ToAddress: hostZone.CommunityPoolTreasuryAddress, - Amount: tokens, - }} - k.Logger(ctx).Info(fmt.Sprintf("Preparing MsgBankSend of %v from the %s ICA account to the community pool treasury", - tokens.String(), senderAccountString)) - } else { - // Otherwise, call MsgFundCommunityPool - fundMsg = []proto.Message{&disttypes.MsgFundCommunityPool{ - Amount: tokens, - Depositor: sender, - }} - k.Logger(ctx).Info(fmt.Sprintf("Preparing MsgFundCommunityPool of %v from the %s ICA account", - tokens.String(), senderAccountString)) - } - - return fundMsg, nil -} - -// Using tokens in the CommunityPoolReturnIcaAddress, trigger ICA tx to fund community pool -// Note: The denom of the passed in token has to be the denom which exists on the hostZone not Stride -func (k Keeper) FundCommunityPool( - ctx sdk.Context, - hostZone types.HostZone, - token sdk.Coin, - senderAccountType types.ICAAccountType, -) error { - msgs, err := k.BuildFundCommunityPoolMsg(ctx, hostZone, sdk.NewCoins(token), senderAccountType) - if err != nil { - return err - } - - // Timeout the ICA at the end of the epoch - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.STRIDE_EPOCH) - } - timeoutTimestamp := uint64(strideEpochTracker.NextEpochStartTime) - - // No need to build ICA callback data or input an ICA callback method - icaCallbackId := "" - var icaCallbackData []byte - - // Send the transaction through SubmitTx to kick off ICA command - _, err = k.SubmitTxs(ctx, - hostZone.ConnectionId, - msgs, - senderAccountType, - timeoutTimestamp, - icaCallbackId, - icaCallbackData) - if err != nil { - return errorsmod.Wrapf(err, "Failed to SubmitTxs for FundCommunityPool, Messages: %+v", msgs) - } - - return nil -} diff --git a/x/stakeibc/keeper/consumer.go b/x/stakeibc/keeper/consumer.go deleted file mode 100644 index 1bc69853f..000000000 --- a/x/stakeibc/keeper/consumer.go +++ /dev/null @@ -1,40 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// Register new stTokens to the consumer reward denom whitelist -func (k Keeper) RegisterStTokenDenomsToWhitelist(ctx sdk.Context, denoms []string) error { - hostZones := k.GetAllHostZone(ctx) - allDenomsMap := make(map[string]bool) - //registeredDenomsMap := make(map[string]bool) - - // get all stToken denoms - for _, zone := range hostZones { - allDenomsMap[types.StAssetDenomFromHostZoneDenom(zone.HostDenom)] = true - } - - // XXX - //// get registered denoms in the consumer reward denom whitelist - //consumerParams := k.ConsumerKeeper.GetConsumerParams(ctx) - //for _, denom := range consumerParams.RewardDenoms { - // registeredDenomsMap[denom] = true - //} - // - //// register new denoms to the whitelist - //for _, denom := range denoms { - // if !allDenomsMap[denom] { - // return types.ErrStTokenNotFound - // } else if registeredDenomsMap[denom] { - // continue - // } else { - // consumerParams.RewardDenoms = append(consumerParams.RewardDenoms, denom) - // } - //} - // - //k.ConsumerKeeper.SetParams(ctx, consumerParams) - return nil -} diff --git a/x/stakeibc/keeper/delegation.go b/x/stakeibc/keeper/delegation.go deleted file mode 100644 index bf7828d40..000000000 --- a/x/stakeibc/keeper/delegation.go +++ /dev/null @@ -1,178 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - stakingtypes "github.com/initia-labs/initia/x/mstaking/types" - "github.com/spf13/cast" - - "github.com/milkyway-labs/milkyway/utils" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func (k Keeper) DelegateOnHost(ctx sdk.Context, hostZone types.HostZone, amt sdk.Coin, depositRecord recordstypes.DepositRecord) error { - // Fetch the relevant ICA - if hostZone.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation account found for %s", hostZone.ChainId) - } - - // Construct the transaction - targetDelegatedAmts, err := k.GetTargetValAmtsForHostZone(ctx, hostZone, amt.Amount) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error getting target delegation amounts for host zone %s", hostZone.ChainId)) - return err - } - - var splitDelegations []*types.SplitDelegation - var msgs []proto.Message - for _, validator := range hostZone.Validators { - relativeAmount, ok := targetDelegatedAmts[validator.Address] - if !ok || !relativeAmount.IsPositive() { - continue - } - - msgs = append(msgs, &stakingtypes.MsgDelegate{ - DelegatorAddress: hostZone.DelegationIcaAddress, - ValidatorAddress: validator.Address, - Amount: sdk.NewCoins(sdk.NewCoin(amt.Denom, relativeAmount)), - }) - splitDelegations = append(splitDelegations, &types.SplitDelegation{ - Validator: validator.Address, - Amount: relativeAmount, - }) - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Preparing MsgDelegates from the delegation account to each validator")) - - if len(msgs) == 0 { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Target delegation amount was 0 for each validator") - } - - // add callback data - delegateCallback := types.DelegateCallback{ - HostZoneId: hostZone.ChainId, - DepositRecordId: depositRecord.Id, - SplitDelegations: splitDelegations, - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Marshalling DelegateCallback args: %+v", delegateCallback)) - marshalledCallbackArgs, err := k.MarshalDelegateCallbackArgs(ctx, delegateCallback) - if err != nil { - return err - } - - // Send the transaction through SubmitTx - _, err = k.SubmitTxsStrideEpoch(ctx, hostZone.ConnectionId, msgs, types.ICAAccountType_DELEGATION, ICACallbackID_Delegate, marshalledCallbackArgs) - if err != nil { - return errorsmod.Wrapf(err, "Failed to SubmitTxs for connectionId %s on %s. Messages: %s", hostZone.ConnectionId, hostZone.ChainId, msgs) - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "ICA MsgDelegates Successfully Sent")) - - // flag the delegation change in progress on each validator - for _, splitDelegation := range splitDelegations { - if err := k.IncrementValidatorDelegationChangesInProgress(&hostZone, splitDelegation.Validator); err != nil { - return err - } - } - k.SetHostZone(ctx, hostZone) - - // update the record state to DELEGATION_IN_PROGRESS - depositRecord.Status = recordstypes.DepositRecord_DELEGATION_IN_PROGRESS - k.recordsKeeper.SetDepositRecord(ctx, depositRecord) - - return nil -} - -// Iterate each deposit record marked DELEGATION_QUEUE and use the delegation ICA to delegate on the host zone -func (k Keeper) StakeExistingDepositsOnHostZones(ctx sdk.Context, epochNumber uint64, depositRecords []recordstypes.DepositRecord) { - k.Logger(ctx).Info("Staking deposit records...") - - stakeDepositRecords := utils.FilterDepositRecords(depositRecords, func(record recordstypes.DepositRecord) (condition bool) { - isStakeRecord := record.Status == recordstypes.DepositRecord_DELEGATION_QUEUE - isBeforeCurrentEpoch := record.DepositEpochNumber < epochNumber - return isStakeRecord && isBeforeCurrentEpoch - }) - - if len(stakeDepositRecords) == 0 { - k.Logger(ctx).Info("No deposit records in state DELEGATION_QUEUE") - return - } - - // limit the number of staking deposits to process per epoch - maxDepositRecordsToStake := utils.Min(len(stakeDepositRecords), cast.ToInt(k.GetParams(ctx).MaxStakeIcaCallsPerEpoch)) - if maxDepositRecordsToStake < len(stakeDepositRecords) { - k.Logger(ctx).Info(fmt.Sprintf(" MaxStakeICACallsPerEpoch limit reached - Only staking %d out of %d deposit records", maxDepositRecordsToStake, len(stakeDepositRecords))) - } - - for _, depositRecord := range stakeDepositRecords[:maxDepositRecordsToStake] { - if depositRecord.Amount.IsZero() { - continue - } - k.Logger(ctx).Info(utils.LogWithHostZone(depositRecord.HostZoneId, - "Processing deposit record %d: %v%s", depositRecord.Id, depositRecord.Amount, depositRecord.Denom)) - - hostZone, hostZoneFound := k.GetHostZone(ctx, depositRecord.HostZoneId) - if !hostZoneFound { - k.Logger(ctx).Error(fmt.Sprintf("[StakeExistingDepositsOnHostZones] Host zone not found for deposit record {%d}", depositRecord.Id)) - continue - } - - if hostZone.Halted { - k.Logger(ctx).Error(fmt.Sprintf("[StakeExistingDepositsOnHostZones] Host zone halted for deposit record {%d}", depositRecord.Id)) - continue - } - - if hostZone.DelegationIcaAddress == "" { - k.Logger(ctx).Error(fmt.Sprintf("[StakeExistingDepositsOnHostZones] Zone %s is missing a delegation address!", hostZone.ChainId)) - continue - } - - k.Logger(ctx).Info(utils.LogWithHostZone(depositRecord.HostZoneId, "Staking %v%s", depositRecord.Amount, hostZone.HostDenom)) - stakeAmount := sdk.NewCoin(hostZone.HostDenom, depositRecord.Amount) - - err := k.DelegateOnHost(ctx, hostZone, stakeAmount, depositRecord) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Did not stake %s on %s | err: %s", stakeAmount.String(), hostZone.ChainId, err.Error())) - continue - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Successfully submitted stake")) - - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute("hostZone", hostZone.ChainId), - sdk.NewAttribute("newAmountStaked", depositRecord.Amount.String()), - ), - ) - } -} - -// Delegates accrued staking rewards for reinvestment -func (k Keeper) ReinvestRewards(ctx sdk.Context) { - k.Logger(ctx).Info("Reinvesting tokens...") - - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - // only process host zones once withdrawal accounts are registered - if hostZone.WithdrawalIcaAddress == "" { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Withdrawal account not registered for host zone")) - continue - } - - // read clock time on host zone - blockTime, err := k.GetLightClientTimeSafely(ctx, hostZone.ConnectionId) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Could not find blockTime for host zone %s, err: %s", hostZone.ConnectionId, err.Error())) - continue - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "BlockTime for host zone: %d", blockTime)) - - err = k.SubmitWithdrawalHostBalanceICQ(ctx, hostZone) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error updating withdrawal balance for host zone %s: %s", hostZone.ConnectionId, err.Error())) - continue - } - } -} diff --git a/x/stakeibc/keeper/epoch_tracker.go b/x/stakeibc/keeper/epoch_tracker.go deleted file mode 100644 index 730f9cfa3..000000000 --- a/x/stakeibc/keeper/epoch_tracker.go +++ /dev/null @@ -1,144 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/spf13/cast" - - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// SetEpochTracker set a specific epochTracker in the store from its index -func (k Keeper) SetEpochTracker(ctx sdk.Context, epochTracker types.EpochTracker) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochTrackerKeyPrefix)) - b := k.cdc.MustMarshal(&epochTracker) - store.Set(types.EpochTrackerKey( - epochTracker.EpochIdentifier, - ), b) -} - -// GetEpochTracker returns a epochTracker from its index -func (k Keeper) GetEpochTracker( - ctx sdk.Context, - epochIdentifier string, -) (val types.EpochTracker, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochTrackerKeyPrefix)) - - b := store.Get(types.EpochTrackerKey( - epochIdentifier, - )) - if b == nil { - return val, false - } - - k.cdc.MustUnmarshal(b, &val) - return val, true -} - -// RemoveEpochTracker removes a epochTracker from the store -func (k Keeper) RemoveEpochTracker( - ctx sdk.Context, - epochIdentifier string, -) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochTrackerKeyPrefix)) - store.Delete(types.EpochTrackerKey( - epochIdentifier, - )) -} - -// GetAllEpochTracker returns all epochTracker -func (k Keeper) GetAllEpochTracker(ctx sdk.Context) (list []types.EpochTracker) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EpochTrackerKeyPrefix)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.EpochTracker - k.cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} - -// Update the epoch information in the stakeibc epoch tracker -func (k Keeper) UpdateEpochTracker(ctx sdk.Context, epochInfo epochstypes.EpochInfo) (epochNumber uint64, err error) { - epochNumber, err = cast.ToUint64E(epochInfo.CurrentEpoch) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Could not convert epoch number to uint64: %v", err)) - return 0, err - } - epochDurationNano, err := cast.ToUint64E(epochInfo.Duration.Nanoseconds()) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Could not convert epoch duration to uint64: %v", err)) - return 0, err - } - nextEpochStartTime, err := cast.ToUint64E(epochInfo.CurrentEpochStartTime.Add(epochInfo.Duration).UnixNano()) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Could not convert epoch duration to uint64: %v", err)) - return 0, err - } - epochTracker := types.EpochTracker{ - EpochIdentifier: epochInfo.Identifier, - EpochNumber: epochNumber, - Duration: epochDurationNano, - NextEpochStartTime: nextEpochStartTime, - } - k.SetEpochTracker(ctx, epochTracker) - - return epochNumber, nil -} - -// helper to get what share of the curr epoch we're through -func (k Keeper) GetStrideEpochElapsedShare(ctx sdk.Context) (sdkmath.LegacyDec, error) { - // Get the current stride epoch - epochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - errMsg := fmt.Sprintf("Failed to get epoch tracker for %s", epochstypes.STRIDE_EPOCH) - k.Logger(ctx).Error(errMsg) - return sdkmath.LegacyZeroDec(), errorsmod.Wrapf(sdkerrors.ErrNotFound, errMsg) - } - - // Get epoch start time, end time, and duration - epochDuration, err := cast.ToInt64E(epochTracker.Duration) - if err != nil { - errMsg := fmt.Sprintf("unable to convert epoch duration to int64, err: %s", err.Error()) - k.Logger(ctx).Error(errMsg) - return sdkmath.LegacyZeroDec(), errorsmod.Wrapf(types.ErrIntCast, errMsg) - } - epochEndTime, err := cast.ToInt64E(epochTracker.NextEpochStartTime) - if err != nil { - errMsg := fmt.Sprintf("unable to convert next epoch start time to int64, err: %s", err.Error()) - k.Logger(ctx).Error(errMsg) - return sdkmath.LegacyZeroDec(), errorsmod.Wrapf(types.ErrIntCast, errMsg) - } - epochStartTime := epochEndTime - epochDuration - - // Confirm the current block time is inside the current epoch's start and end times - currBlockTime := ctx.BlockTime().UnixNano() - if currBlockTime < epochStartTime || currBlockTime > epochEndTime { - errMsg := fmt.Sprintf("current block time %d is not within current epoch (ending at %d)", currBlockTime, epochTracker.NextEpochStartTime) - k.Logger(ctx).Error(errMsg) - return sdkmath.LegacyZeroDec(), errorsmod.Wrapf(types.ErrInvalidEpoch, errMsg) - } - - // Get elapsed share - elapsedTime := currBlockTime - epochStartTime - elapsedShare := sdkmath.LegacyNewDec(elapsedTime).Quo(sdkmath.LegacyNewDec(epochDuration)) - if elapsedShare.LT(sdkmath.LegacyZeroDec()) || elapsedShare.GT(sdkmath.LegacyOneDec()) { - errMsg := fmt.Sprintf("elapsed share (%s) for epoch is not between 0 and 1", elapsedShare) - k.Logger(ctx).Error(errMsg) - return sdkmath.LegacyZeroDec(), errorsmod.Wrapf(types.ErrInvalidEpoch, errMsg) - } - - k.Logger(ctx).Info(fmt.Sprintf("Epoch elapsed share: %v (Block Time: %d, Epoch End Time: %d)", elapsedShare, currBlockTime, epochEndTime)) - return elapsedShare, nil -} diff --git a/x/stakeibc/keeper/events.go b/x/stakeibc/keeper/events.go deleted file mode 100644 index 608d7bffc..000000000 --- a/x/stakeibc/keeper/events.go +++ /dev/null @@ -1,157 +0,0 @@ -package keeper - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// Emits a successful liquid stake event, and displays metadata such as the stToken amount -func EmitSuccessfulLiquidStakeEvent(ctx sdk.Context, msg *types.MsgLiquidStake, hostZone types.HostZone, stAmount sdkmath.Int) { - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeLiquidStakeRequest, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyLiquidStaker, msg.Creator), - sdk.NewAttribute(types.AttributeKeyHostZone, hostZone.ChainId), - sdk.NewAttribute(types.AttributeKeyNativeBaseDenom, msg.HostDenom), - sdk.NewAttribute(types.AttributeKeyNativeIBCDenom, hostZone.IbcDenom), - sdk.NewAttribute(types.AttributeKeyNativeAmount, msg.Amount.String()), - sdk.NewAttribute(types.AttributeKeyStTokenAmount, stAmount.String()), - ), - ) -} - -// Emits a successful redeem stake event, and displays metadata such as the native amount -func EmitSuccessfulRedeemStakeEvent(ctx sdk.Context, msg *types.MsgRedeemStake, hostZone types.HostZone, nativeAmount, stAmount sdkmath.Int) { - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeRedeemStakeRequest, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyRedeemer, msg.Creator), - sdk.NewAttribute(types.AttributeKeyReceiver, msg.Receiver), - sdk.NewAttribute(types.AttributeKeyHostZone, hostZone.ChainId), - sdk.NewAttribute(types.AttributeKeyNativeBaseDenom, hostZone.HostDenom), - sdk.NewAttribute(types.AttributeKeyNativeIBCDenom, hostZone.IbcDenom), - sdk.NewAttribute(types.AttributeKeyNativeAmount, nativeAmount.String()), - sdk.NewAttribute(types.AttributeKeyStTokenAmount, stAmount.String()), - ), - ) -} - -// Builds common LSM liquid stake attribute for the event emission -func getLSMLiquidStakeEventAttributes(hostZone types.HostZone, lsmTokenDeposit recordstypes.LSMTokenDeposit) []sdk.Attribute { - return []sdk.Attribute{ - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyLiquidStaker, lsmTokenDeposit.StakerAddress), - sdk.NewAttribute(types.AttributeKeyHostZone, hostZone.ChainId), - sdk.NewAttribute(types.AttributeKeyNativeBaseDenom, hostZone.HostDenom), - sdk.NewAttribute(types.AttributeKeyValidator, lsmTokenDeposit.ValidatorAddress), - sdk.NewAttribute(types.AttributeKeyNativeIBCDenom, lsmTokenDeposit.IbcDenom), - sdk.NewAttribute(types.AttributeKeyLSMTokenBaseDenom, lsmTokenDeposit.Denom), - sdk.NewAttribute(types.AttributeKeyNativeAmount, lsmTokenDeposit.Amount.String()), - sdk.NewAttribute(types.AttributeKeyStTokenAmount, lsmTokenDeposit.StToken.Amount.String()), - sdk.NewAttribute(types.AttributeKeyLSMLiquidStakeTxId, lsmTokenDeposit.DepositId), - } -} - -// Emits a successful LSM liquid stake event, and displays metadata such as the stToken amount -func EmitSuccessfulLSMLiquidStakeEvent(ctx sdk.Context, hostZone types.HostZone, lsmTokenDeposit recordstypes.LSMTokenDeposit) { - attributes := append( - getLSMLiquidStakeEventAttributes(hostZone, lsmTokenDeposit), - sdk.NewAttribute(types.AttributeKeyTransactionStatus, types.AttributeValueTransactionSucceeded), - ) - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeLSMLiquidStakeRequest, - attributes..., - ), - ) -} - -// Emits a failed LSM liquid stake event, and displays the error -func EmitFailedLSMLiquidStakeEvent(ctx sdk.Context, hostZone types.HostZone, lsmTokenDeposit recordstypes.LSMTokenDeposit, errorMessage string) { - attributes := append( - getLSMLiquidStakeEventAttributes(hostZone, lsmTokenDeposit), - sdk.NewAttribute(types.AttributeKeyTransactionStatus, types.AttributeValueTransactionFailed), - sdk.NewAttribute(types.AttributeKeyError, errorMessage), - ) - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeLSMLiquidStakeRequest, - attributes..., - ), - ) -} - -// Emits a pending LSM liquid stake event, meaning a slash query was submitted -func EmitPendingLSMLiquidStakeEvent(ctx sdk.Context, hostZone types.HostZone, lsmTokenDeposit recordstypes.LSMTokenDeposit) { - attributes := append( - getLSMLiquidStakeEventAttributes(hostZone, lsmTokenDeposit), - sdk.NewAttribute(types.AttributeKeyTransactionStatus, types.AttributeValueTransactionPending), - ) - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeLSMLiquidStakeRequest, - attributes..., - ), - ) -} - -// Emits an event if a validator's shares to tokens rate changed -func EmitValidatorSharesToTokensRateChangeEvent( - ctx sdk.Context, - chainId string, - validatorAddress string, - previousSharesToTokensRate, - currentSharesToTokensRate sdkmath.LegacyDec, -) { - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeValidatorSharesToTokensRateChange, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyHostZone, chainId), - sdk.NewAttribute(types.AttributeKeyValidator, validatorAddress), - sdk.NewAttribute(types.AttributeKeyPreviousSharesToTokensRate, previousSharesToTokensRate.String()), - sdk.NewAttribute(types.AttributeKeyCurrentSharesToTokensRate, currentSharesToTokensRate.String()), - ), - ) -} - -// Emits an event if a validator was slashed -func EmitValidatorSlashEvent( - ctx sdk.Context, - hostZone types.HostZone, - validatorAddress string, - slashPercent sdkmath.LegacyDec, - slashAmount sdkmath.Int, - currentDelegation sdkmath.Int, -) { - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeValidatorSlash, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyHostZone, hostZone.ChainId), - sdk.NewAttribute(types.AttributeKeyNativeBaseDenom, hostZone.HostDenom), - sdk.NewAttribute(types.AttributeKeyValidator, validatorAddress), - sdk.NewAttribute(types.AttributeKeySlashPercent, slashPercent.String()), - sdk.NewAttribute(types.AttributeKeySlashAmount, slashAmount.String()), - sdk.NewAttribute(types.AttributeKeyCurrentDelegation, currentDelegation.String()), - ), - ) -} - -// Emits an event if an undelegation ICA was submitted for a host zone -func EmitUndelegationEvent(ctx sdk.Context, hostZone types.HostZone, totalUnbondAmount sdkmath.Int) { - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeUndelegation, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyHostZone, hostZone.ChainId), - sdk.NewAttribute(types.AttributeKeyNativeBaseDenom, hostZone.HostDenom), - sdk.NewAttribute(types.AttributeKeyTotalUnbondAmount, totalUnbondAmount.String()), - ), - ) -} diff --git a/x/stakeibc/keeper/grpc_query.go b/x/stakeibc/keeper/grpc_query.go deleted file mode 100644 index 8985ac4ea..000000000 --- a/x/stakeibc/keeper/grpc_query.go +++ /dev/null @@ -1,252 +0,0 @@ -package keeper - -import ( - "context" - "fmt" - "strings" - "time" - - "cosmossdk.io/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/cosmos-sdk/types/query" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" - - epochtypes "github.com/milkyway-labs/milkyway/x/epochs/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -const nanosecondsInDay = 86400000000000 - -var _ types.QueryServer = Keeper{} - -func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(c) - - return &types.QueryParamsResponse{Params: k.GetParams(ctx)}, nil -} - -func (k Keeper) ModuleAddress(goCtx context.Context, req *types.QueryModuleAddressRequest) (*types.QueryModuleAddressResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(goCtx) - - addr := k.accountKeeper.GetModuleAccount(ctx, req.Name).GetAddress().String() - - return &types.QueryModuleAddressResponse{Addr: addr}, nil -} - -func (k Keeper) HostZoneAll(c context.Context, req *types.QueryAllHostZoneRequest) (*types.QueryAllHostZoneResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var hostZones []types.HostZone - ctx := sdk.UnwrapSDKContext(c) - - store := ctx.KVStore(k.storeKey) - hostZoneStore := prefix.NewStore(store, types.KeyPrefix(types.HostZoneKey)) - - pageRes, err := query.Paginate(hostZoneStore, req.Pagination, func(key []byte, value []byte) error { - var hostZone types.HostZone - if err := k.cdc.Unmarshal(value, &hostZone); err != nil { - return err - } - - hostZones = append(hostZones, hostZone) - return nil - }) - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryAllHostZoneResponse{HostZone: hostZones, Pagination: pageRes}, nil -} - -func (k Keeper) HostZone(c context.Context, req *types.QueryGetHostZoneRequest) (*types.QueryGetHostZoneResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(c) - hostZone, found := k.GetHostZone(ctx, req.ChainId) - if !found { - return nil, sdkerrors.ErrKeyNotFound - } - - return &types.QueryGetHostZoneResponse{HostZone: hostZone}, nil -} - -func (k Keeper) Validators(c context.Context, req *types.QueryGetValidatorsRequest) (*types.QueryGetValidatorsResponse, error) { - if req == nil || req.ChainId == "" { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(c) - - hostZone, found := k.GetHostZone(ctx, req.ChainId) - if !found { - return nil, sdkerrors.ErrKeyNotFound - } - - return &types.QueryGetValidatorsResponse{Validators: hostZone.Validators}, nil -} - -func (k Keeper) AddressUnbondings(c context.Context, req *types.QueryAddressUnbondings) (*types.QueryAddressUnbondingsResponse, error) { - // The function queries all the unbondings associated with Stride addresses. - // This should provide more visiblity into the unbonding process for a user. - - if req == nil || req.Address == "" { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(c) - - // The address field can either be a single address or several comma separated - addresses := strings.Split(req.Address, ",") - - addressUnbondings := []types.AddressUnbonding{} - - // get the relevant day - dayEpochTracker, found := k.GetEpochTracker(ctx, epochtypes.DAY_EPOCH) - if !found { - return nil, sdkerrors.ErrKeyNotFound - } - currentDay := dayEpochTracker.EpochNumber - - epochUnbondingRecords := k.recordsKeeper.GetAllEpochUnbondingRecord(ctx) - - for _, epochUnbondingRecord := range epochUnbondingRecords { - for _, hostZoneUnbonding := range epochUnbondingRecord.GetHostZoneUnbondings() { - for _, userRedemptionRecordId := range hostZoneUnbonding.GetUserRedemptionRecords() { - userRedemptionRecordComponents := strings.Split(userRedemptionRecordId, ".") - if len(userRedemptionRecordComponents) != 3 { - k.Logger(ctx).Error(fmt.Sprintf("invalid user redemption record id %s", userRedemptionRecordId)) - continue - } - userRedemptionRecordAddress := userRedemptionRecordComponents[2] - - // Check if the userRedemptionRecordAddress is one targeted by the address(es) in the query - targetAddress := false - for _, address := range addresses { - if userRedemptionRecordAddress == strings.TrimSpace(address) { - targetAddress = true - break - } - } - if targetAddress { - userRedemptionRecord, found := k.recordsKeeper.GetUserRedemptionRecord(ctx, userRedemptionRecordId) - if !found { - continue // the record has already been claimed - } - - // get the anticipated unbonding time - unbondingTime := hostZoneUnbonding.UnbondingTime - if unbondingTime == 0 { - hostZone, found := k.GetHostZone(ctx, hostZoneUnbonding.HostZoneId) - if !found { - return nil, sdkerrors.ErrKeyNotFound - } - unbondingFrequency := hostZone.GetUnbondingFrequency() - daysUntilUnbonding := unbondingFrequency - (currentDay % unbondingFrequency) - unbondingStartTime := dayEpochTracker.NextEpochStartTime + ((daysUntilUnbonding - 1) * nanosecondsInDay) - unbondingDurationEstimate := (unbondingFrequency - 1) * 7 - unbondingTime = unbondingStartTime + (unbondingDurationEstimate * nanosecondsInDay) - } - unbondingTime = unbondingTime + nanosecondsInDay - unbondingTimeStr := time.Unix(0, int64(unbondingTime)).UTC().String() - - addressUnbonding := types.AddressUnbonding{ - Address: userRedemptionRecordAddress, - Receiver: userRedemptionRecord.Receiver, - UnbondingEstimatedTime: unbondingTimeStr, - Amount: userRedemptionRecord.NativeTokenAmount, - Denom: userRedemptionRecord.Denom, - ClaimIsPending: userRedemptionRecord.ClaimIsPending, - EpochNumber: userRedemptionRecord.EpochNumber, - } - addressUnbondings = append(addressUnbondings, addressUnbonding) - } - } - } - } - - return &types.QueryAddressUnbondingsResponse{AddressUnbondings: addressUnbondings}, nil -} - -func (k Keeper) EpochTrackerAll(c context.Context, req *types.QueryAllEpochTrackerRequest) (*types.QueryAllEpochTrackerResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(c) - epochTrackers := k.GetAllEpochTracker(ctx) - - return &types.QueryAllEpochTrackerResponse{EpochTracker: epochTrackers}, nil -} - -func (k Keeper) EpochTracker(c context.Context, req *types.QueryGetEpochTrackerRequest) (*types.QueryGetEpochTrackerResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(c) - - val, found := k.GetEpochTracker( - ctx, - req.EpochIdentifier, - ) - if !found { - return nil, status.Error(codes.NotFound, "not found") - } - - return &types.QueryGetEpochTrackerResponse{EpochTracker: val}, nil -} - -func (k Keeper) AllTradeRoutes(c context.Context, req *types.QueryAllTradeRoutes) (*types.QueryAllTradeRoutesResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - ctx := sdk.UnwrapSDKContext(c) - - routes := k.GetAllTradeRoutes(ctx) - - return &types.QueryAllTradeRoutesResponse{TradeRoutes: routes}, nil -} - -// InterchainAccountFromAddress implements the Query/InterchainAccountFromAddress gRPC method -func (k Keeper) InterchainAccountFromAddress(goCtx context.Context, req *types.QueryInterchainAccountFromAddressRequest) (*types.QueryInterchainAccountFromAddressResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - portID, err := icatypes.NewControllerPortID(req.Owner) - if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "could not find account: %s", err) - } - - addr, found := k.icaControllerKeeper.GetInterchainAccountAddress(ctx, req.ConnectionId, portID) - if !found { - return nil, status.Errorf(codes.NotFound, "no account found for portID %s", portID) - } - - return types.NewQueryInterchainAccountResponse(addr), nil -} - -func (k Keeper) NextPacketSequence(c context.Context, req *types.QueryGetNextPacketSequenceRequest) (*types.QueryGetNextPacketSequenceResponse, error) { - if req == nil || req.ChannelId == "" || req.PortId == "" { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(c) - sequence, found := k.ibcKeeper.ChannelKeeper.GetNextSequenceSend(ctx, req.PortId, req.ChannelId) - if !found { - return nil, status.Error(codes.InvalidArgument, "channel and port combination not found") - } - - return &types.QueryGetNextPacketSequenceResponse{Sequence: sequence}, nil -} diff --git a/x/stakeibc/keeper/hooks.go b/x/stakeibc/keeper/hooks.go deleted file mode 100644 index c9a577cfc..000000000 --- a/x/stakeibc/keeper/hooks.go +++ /dev/null @@ -1,135 +0,0 @@ -package keeper - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" -) - -const StrideEpochsPerDayEpoch = uint64(4) - -func (k Keeper) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo) { - // Update the stakeibc epoch tracker - epochNumber, err := k.UpdateEpochTracker(ctx, epochInfo) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to update epoch tracker, err: %s", err.Error())) - return - } - - // Day Epoch - Process Unbondings - if epochInfo.Identifier == epochstypes.DAY_EPOCH { - // Initiate unbondings from any hostZone where it's appropriate - k.InitiateAllHostZoneUnbondings(ctx, epochNumber) - // Check previous epochs to see if unbondings finished, and sweep the tokens if so - k.SweepAllUnbondedTokens(ctx) - // Cleanup any records that are no longer needed - k.CleanupEpochUnbondingRecords(ctx, epochNumber) - // Create an empty unbonding record for this epoch - k.CreateEpochUnbondingRecord(ctx, epochNumber) - } - - // Stride Epoch - Process Deposits and Delegations - if epochInfo.Identifier == epochstypes.STRIDE_EPOCH { - // Get cadence intervals - params := k.GetParams(ctx) - redemptionRateInterval := params.RedemptionRateInterval - depositInterval := params.DepositInterval - delegationInterval := params.DelegateInterval - reinvestInterval := params.ReinvestInterval - - // Claim accrued staking rewards at the beginning of the epoch - k.ClaimAccruedStakingRewards(ctx) - - // Create a new deposit record for each host zone and the grab all deposit records - k.CreateDepositRecordsForEpoch(ctx, epochNumber) - depositRecords := k.recordsKeeper.GetAllDepositRecord(ctx) - - // TODO: move this to an external function that anyone can call, so that we don't have to call it every epoch - k.SetWithdrawalAddress(ctx) - - // Update the redemption rate - if epochNumber%redemptionRateInterval == 0 { - k.UpdateRedemptionRates(ctx, depositRecords) - } - - // Transfer deposited funds from the controller account to the delegation account on the host zone - if epochNumber%depositInterval == 0 { - k.TransferExistingDepositsToHostZones(ctx, epochNumber, depositRecords) - } - - // Delegate tokens from the delegation account - if epochNumber%delegationInterval == 0 { - k.StakeExistingDepositsOnHostZones(ctx, epochNumber, depositRecords) - } - - // Reinvest staking rewards - if epochNumber%reinvestInterval == 0 { // allow a few blocks from UpdateUndelegatedBal to avoid conflicts - k.ReinvestRewards(ctx) - } - - // Rebalance stake according to validator weights - // This should only be run once per day, but it should not be run on a stride epoch that - // overlaps the day epoch, otherwise the unbondings could cause a redelegation to fail - // On mainnet, the stride epoch overlaps the day epoch when `epochNumber % 4 == 1`, - // so this will trigger the epoch before the unbonding - if epochNumber%StrideEpochsPerDayEpoch == 0 { - k.RebalanceAllHostZones(ctx) - } - - // Transfers in and out of tokens for hostZones which have community pools - k.ProcessAllCommunityPoolTokens(ctx) - - // Do transfers for all reward and swapped tokens defined by the trade routes every stride epoch - k.TransferAllRewardTokens(ctx) - } - if epochInfo.Identifier == epochstypes.MINT_EPOCH { - k.AllocateHostZoneReward(ctx) - } -} - -func (k Keeper) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo) {} - -// Hooks wrapper struct for incentives keeper -type Hooks struct { - k Keeper -} - -var _ epochstypes.EpochHooks = Hooks{} - -func (k Keeper) Hooks() Hooks { - return Hooks{k} -} - -func (h Hooks) BeforeEpochStart(ctx sdk.Context, epochInfo epochstypes.EpochInfo) { - h.k.BeforeEpochStart(ctx, epochInfo) -} - -func (h Hooks) AfterEpochEnd(ctx sdk.Context, epochInfo epochstypes.EpochInfo) { - h.k.AfterEpochEnd(ctx, epochInfo) -} - -// SetWithdrawalAddress sets the withdrawal account address for each host zone -func (k Keeper) SetWithdrawalAddress(ctx sdk.Context) { - k.Logger(ctx).Info("Setting Withdrawal Addresses...") - - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - err := k.SetWithdrawalAddressOnHost(ctx, hostZone) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to set withdrawal address on %s, err: %s", hostZone.ChainId, err)) - } - } -} - -// ClaimAccruedStakingRewards allows to claim staking rewards for each host zone -func (k Keeper) ClaimAccruedStakingRewards(ctx sdk.Context) { - k.Logger(ctx).Info("Claiming Accrued Staking Rewards...") - - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - err := k.ClaimAccruedStakingRewardsOnHost(ctx, hostZone) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to claim accrued staking rewards on %s, err: %s", hostZone.ChainId, err)) - } - } -} diff --git a/x/stakeibc/keeper/host_zone.go b/x/stakeibc/keeper/host_zone.go deleted file mode 100644 index 200216ff5..000000000 --- a/x/stakeibc/keeper/host_zone.go +++ /dev/null @@ -1,291 +0,0 @@ -package keeper - -import ( - "fmt" - "sort" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - "github.com/milkyway-labs/milkyway/utils" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -const ( - MinValidatorsBeforeWeightCapCheck = 10 -) - -// SetHostZone set a specific hostZone in the store -func (k Keeper) SetHostZone(ctx sdk.Context, hostZone types.HostZone) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.HostZoneKey)) - b := k.cdc.MustMarshal(&hostZone) - store.Set([]byte(hostZone.ChainId), b) -} - -// GetHostZone returns a hostZone from its id -func (k Keeper) GetHostZone(ctx sdk.Context, chainId string) (val types.HostZone, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.HostZoneKey)) - b := store.Get([]byte(chainId)) - if b == nil { - return val, false - } - k.cdc.MustUnmarshal(b, &val) - return val, true -} - -// GetActiveHostZone returns an error if the host zone is not found or if it's found, but is halted -func (k Keeper) GetActiveHostZone(ctx sdk.Context, chainId string) (hostZone types.HostZone, err error) { - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return hostZone, types.ErrHostZoneNotFound.Wrapf("host zone %s not found", chainId) - } - if hostZone.Halted { - return hostZone, types.ErrHaltedHostZone.Wrapf("host zone %s is halted", chainId) - } - return hostZone, nil -} - -// GetHostZoneFromHostDenom returns a HostZone from a HostDenom -func (k Keeper) GetHostZoneFromHostDenom(ctx sdk.Context, denom string) (*types.HostZone, error) { - var matchZone types.HostZone - k.IterateHostZones(ctx, func(ctx sdk.Context, index int64, zoneInfo types.HostZone) error { - if zoneInfo.HostDenom == denom { - matchZone = zoneInfo - return nil - } - return nil - }) - if matchZone.ChainId != "" { - return &matchZone, nil - } - return nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "No HostZone for %s denom found", denom) -} - -// GetHostZoneFromIBCDenom returns a HostZone from a IBCDenom -func (k Keeper) GetHostZoneFromIBCDenom(ctx sdk.Context, denom string) (*types.HostZone, error) { - var matchZone types.HostZone - k.IterateHostZones(ctx, func(ctx sdk.Context, index int64, zoneInfo types.HostZone) error { - if zoneInfo.IbcDenom == denom { - matchZone = zoneInfo - return nil - } - return nil - }) - if matchZone.ChainId != "" { - return &matchZone, nil - } - return nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "No HostZone for %s found", denom) -} - -// GetHostZoneFromTransferChannelID returns a HostZone from a transfer channel ID -func (k Keeper) GetHostZoneFromTransferChannelID(ctx sdk.Context, channelID string) (hostZone types.HostZone, found bool) { - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - if hostZone.TransferChannelId == channelID { - return hostZone, true - } - } - return types.HostZone{}, false -} - -// RemoveHostZone removes a hostZone from the store -func (k Keeper) RemoveHostZone(ctx sdk.Context, chainId string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.HostZoneKey)) - store.Delete([]byte(chainId)) -} - -// GetAllHostZone returns all hostZone -func (k Keeper) GetAllHostZone(ctx sdk.Context) (list []types.HostZone) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.HostZoneKey)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.HostZone - k.cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} - -// Unregisters a host zone, including removing the module accounts and records -func (k Keeper) UnregisterHostZone(ctx sdk.Context, chainId string) error { - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return types.ErrHostZoneNotFound.Wrapf("host zone %s not found", chainId) - } - - // Burn all outstanding stTokens - stTokenDenom := utils.StAssetDenomFromHostZoneDenom(hostZone.HostDenom) - for _, account := range k.accountKeeper.GetAllAccounts(ctx) { - stTokenBalance := k.bankKeeper.GetBalance(ctx, account.GetAddress(), stTokenDenom) - stTokensToBurn := sdk.NewCoins(stTokenBalance) - if err := k.bankKeeper.SendCoinsFromAccountToModule(ctx, account.GetAddress(), types.ModuleName, stTokensToBurn); err != nil { - return err - } - if err := k.bankKeeper.BurnCoins(ctx, types.ModuleName, stTokensToBurn); err != nil { - return err - } - } - - // Set the escrow'd tokens to 0 (all the escrowed tokens should have been burned from the above) - k.recordsKeeper.TransferKeeper.SetTotalEscrowForDenom(ctx, sdk.NewCoin(stTokenDenom, sdkmath.ZeroInt())) - - // Remove module accounts - depositAddress := types.NewHostZoneDepositAddress(chainId) - communityPoolStakeAddress := types.NewHostZoneModuleAddress(chainId, CommunityPoolStakeHoldingAddressKey) - communityPoolRedeemAddress := types.NewHostZoneModuleAddress(chainId, CommunityPoolRedeemHoldingAddressKey) - - k.accountKeeper.RemoveAccount(ctx, k.accountKeeper.GetAccount(ctx, depositAddress)) - k.accountKeeper.RemoveAccount(ctx, k.accountKeeper.GetAccount(ctx, communityPoolStakeAddress)) - k.accountKeeper.RemoveAccount(ctx, k.accountKeeper.GetAccount(ctx, communityPoolRedeemAddress)) - - // Remove all deposit records for the host zone - for _, depositRecord := range k.recordsKeeper.GetAllDepositRecord(ctx) { - if depositRecord.HostZoneId == chainId { - k.recordsKeeper.RemoveDepositRecord(ctx, depositRecord.Id) - } - } - - // Remove all epoch unbonding records for the host zone - for _, epochUnbondingRecord := range k.recordsKeeper.GetAllEpochUnbondingRecord(ctx) { - updatedHostZoneUnbondings := []*recordstypes.HostZoneUnbonding{} - for _, hostZoneUnbonding := range epochUnbondingRecord.HostZoneUnbondings { - if hostZoneUnbonding.HostZoneId != chainId { - updatedHostZoneUnbondings = append(updatedHostZoneUnbondings, hostZoneUnbonding) - } - } - epochUnbondingRecord.HostZoneUnbondings = updatedHostZoneUnbondings - k.recordsKeeper.SetEpochUnbondingRecord(ctx, epochUnbondingRecord) - } - - // Remove all user redemption records for the host zone - for _, userRedemptionRecord := range k.recordsKeeper.GetAllUserRedemptionRecord(ctx) { - if userRedemptionRecord.HostZoneId == chainId { - k.recordsKeeper.RemoveUserRedemptionRecord(ctx, userRedemptionRecord.Id) - } - } - - // Remove whitelisted address pairs from rate limit module - rewardCollectorAddress := k.accountKeeper.GetModuleAccount(ctx, types.RewardCollectorName).GetAddress() - k.rateLimitKeeper.RemoveWhitelistedAddressPair(ctx, hostZone.DepositAddress, hostZone.DelegationIcaAddress) - k.rateLimitKeeper.RemoveWhitelistedAddressPair(ctx, hostZone.FeeIcaAddress, rewardCollectorAddress.String()) - k.rateLimitKeeper.RemoveWhitelistedAddressPair(ctx, hostZone.CommunityPoolDepositIcaAddress, hostZone.CommunityPoolStakeHoldingAddress) - k.rateLimitKeeper.RemoveWhitelistedAddressPair(ctx, hostZone.CommunityPoolDepositIcaAddress, hostZone.CommunityPoolRedeemHoldingAddress) - k.rateLimitKeeper.RemoveWhitelistedAddressPair(ctx, hostZone.CommunityPoolStakeHoldingAddress, hostZone.CommunityPoolReturnIcaAddress) - - // Finally, remove the host zone struct - k.RemoveHostZone(ctx, chainId) - - return nil -} - -// GetAllActiveHostZone returns all hostZones that are active (halted = false) -func (k Keeper) GetAllActiveHostZone(ctx sdk.Context) (list []types.HostZone) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.HostZoneKey)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.HostZone - k.cdc.MustUnmarshal(iterator.Value(), &val) - if !val.Halted { - list = append(list, val) - } - } - - return -} - -// Validate whether a denom is a supported liquid staking token -func (k Keeper) CheckIsStToken(ctx sdk.Context, denom string) bool { - for _, hostZone := range k.GetAllHostZone(ctx) { - if types.StAssetDenomFromHostZoneDenom(hostZone.HostDenom) == denom { - return true - } - } - return false -} - -// IterateHostZones iterates zones -// TODO [cleanup]: Remove this in favor of GetAllHostZones -func (k Keeper) IterateHostZones(ctx sdk.Context, fn func(ctx sdk.Context, index int64, zoneInfo types.HostZone) error) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.HostZoneKey)) - - iterator := storetypes.KVStorePrefixIterator(store, nil) - defer iterator.Close() - - i := int64(0) - - for ; iterator.Valid(); iterator.Next() { - k.Logger(ctx).Debug(fmt.Sprintf("Iterating HostZone %d", i)) - zone := types.HostZone{} - k.cdc.MustUnmarshal(iterator.Value(), &zone) - - error := fn(ctx, i, zone) - - if error != nil { - break - } - i++ - } -} - -// This will split a total delegation amount across validators, according to weights -// It returns a map of each portion, key'd on validator address -// Validator's with a slash query in progress are excluded -func (k Keeper) GetTargetValAmtsForHostZone(ctx sdk.Context, hostZone types.HostZone, totalDelegation sdkmath.Int) (map[string]sdkmath.Int, error) { - // Confirm the expected delegation amount is greater than 0 - if !totalDelegation.IsPositive() { - return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, - "Cannot calculate target delegation if final amount is less than or equal to zero (%v)", totalDelegation) - } - - // Ignore any validators with a slash query in progress - validators := []types.Validator{} - for _, validator := range hostZone.Validators { - if !validator.SlashQueryInProgress { - validators = append(validators, *validator) - } - } - - // Sum the total weight across all validators - totalWeight := k.GetTotalValidatorWeight(validators) - if totalWeight == 0 { - return nil, errorsmod.Wrapf(types.ErrNoValidatorWeights, - "No non-zero validators found for host zone %s", hostZone.ChainId) - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Total Validator Weight: %d", totalWeight)) - - // sort validators by weight ascending - sort.SliceStable(validators, func(i, j int) bool { // Do not use `Slice` here, it is stochastic - if validators[i].Weight != validators[j].Weight { - return validators[i].Weight < validators[j].Weight - } - // use name for tie breaker if weights are equal - return validators[i].Address < validators[j].Address - }) - - // Assign each validator their portion of the delegation (and give any overflow to the last validator) - targetUnbondingsByValidator := make(map[string]sdkmath.Int) - totalAllocated := sdkmath.ZeroInt() - for i, validator := range validators { - // For the last element, we need to make sure that the totalAllocated is equal to the finalDelegation - if i == len(validators)-1 { - targetUnbondingsByValidator[validator.Address] = totalDelegation.Sub(totalAllocated) - } else { - delegateAmt := sdkmath.NewIntFromUint64(validator.Weight).Mul(totalDelegation).Quo(sdkmath.NewIntFromUint64(totalWeight)) - totalAllocated = totalAllocated.Add(delegateAmt) - targetUnbondingsByValidator[validator.Address] = delegateAmt - } - } - - return targetUnbondingsByValidator, nil -} diff --git a/x/stakeibc/keeper/ibc.go b/x/stakeibc/keeper/ibc.go deleted file mode 100644 index 85a27c713..000000000 --- a/x/stakeibc/keeper/ibc.go +++ /dev/null @@ -1,265 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" - ibctmtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" - "github.com/spf13/cast" - - ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func (k Keeper) OnChanOpenAck(ctx sdk.Context, portID, channelID string) error { - // Lookup connection ID, counterparty chain ID, and ICA address from the channel ID - controllerConnectionId, _, err := k.ibcKeeper.ChannelKeeper.GetChannelConnection(ctx, portID, channelID) - if err != nil { - return err - } - address, found := k.icaControllerKeeper.GetInterchainAccountAddress(ctx, controllerConnectionId, portID) - if !found { - k.Logger(ctx).Info(fmt.Sprintf("No ICA address associated with connection %s and port %s", controllerConnectionId, portID)) - return nil - } - chainId, err := k.GetChainIdFromConnectionId(ctx, controllerConnectionId) - if err != nil { - return err - } - k.Logger(ctx).Info(fmt.Sprintf("Found matching address for chain: %s, address %s, port %s", chainId, address, portID)) - - // Check if the chainId matches one of the host zones, and if so, - // store the relevant ICA address on the host zone struct - if err := k.StoreHostZoneIcaAddress(ctx, chainId, portID, address); err != nil { - return err - } - - // Check if the chainId matches any ICAs from trade routes, and if so, - // store the relevant ICA addresses in the trade route structs - if err := k.StoreTradeRouteIcaAddress(ctx, chainId, portID, address); err != nil { - return err - } - - return nil -} - -// Checks if the chainId matches a given host zone, and the address matches a relevant ICA account -// If so, stores the ICA address on the host zone struct -// Also whitelists ICA addresses from rate limiting -func (k Keeper) StoreHostZoneIcaAddress(ctx sdk.Context, chainId, portId, address string) error { - // Check if the chainId matches a host zone - // If the chainId does not match (for instance, a reward zone in a trade route is not a host zone) - // then we can ignore the ICA address checks - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - k.Logger(ctx).Info(fmt.Sprintf("chainId %s has no associated host zone", chainId)) - return nil - } - - // expected port IDs for each ICA account type - delegationOwner := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_DELEGATION) - delegationPortID, err := icatypes.NewControllerPortID(delegationOwner) - if err != nil { - return err - } - withdrawalOwner := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_WITHDRAWAL) - withdrawalPortID, err := icatypes.NewControllerPortID(withdrawalOwner) - if err != nil { - return err - } - feeOwner := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_FEE) - feePortID, err := icatypes.NewControllerPortID(feeOwner) - if err != nil { - return err - } - redemptionOwner := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_REDEMPTION) - redemptionPortID, err := icatypes.NewControllerPortID(redemptionOwner) - if err != nil { - return err - } - communityPoolDepositOwner := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_COMMUNITY_POOL_DEPOSIT) - communityPoolDepositPortID, err := icatypes.NewControllerPortID(communityPoolDepositOwner) - if err != nil { - return err - } - communityPoolReturnOwner := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_COMMUNITY_POOL_RETURN) - communityPoolReturnPortID, err := icatypes.NewControllerPortID(communityPoolReturnOwner) - if err != nil { - return err - } - - // Set ICA account addresses - switch { - case portId == withdrawalPortID: - hostZone.WithdrawalIcaAddress = address - case portId == feePortID: - hostZone.FeeIcaAddress = address - case portId == delegationPortID: - hostZone.DelegationIcaAddress = address - case portId == redemptionPortID: - hostZone.RedemptionIcaAddress = address - case portId == communityPoolDepositPortID: - hostZone.CommunityPoolDepositIcaAddress = address - case portId == communityPoolReturnPortID: - hostZone.CommunityPoolReturnIcaAddress = address - default: - k.Logger(ctx).Info(fmt.Sprintf("portId %s has an associated host zone, but does not match any ICA accounts", portId)) - return nil - } - - k.SetHostZone(ctx, hostZone) - - // Once the delegation channel is registered, whitelist epochly transfers so they're not rate limited - // Epochly transfers go from the deposit address to the delegation address - if portId == delegationPortID { - k.rateLimitKeeper.SetWhitelistedAddressPair(ctx, ratelimittypes.WhitelistedAddressPair{ - Sender: hostZone.DepositAddress, - Receiver: hostZone.DelegationIcaAddress, - }) - } - - // Once the fee channel is registered, whitelist reward transfers so they're not rate limited - // Reward transfers go from the fee address to the reward collector - if portId == feePortID { - rewardCollectorAddress := k.accountKeeper.GetModuleAccount(ctx, types.RewardCollectorName).GetAddress() - k.rateLimitKeeper.SetWhitelistedAddressPair(ctx, ratelimittypes.WhitelistedAddressPair{ - Sender: hostZone.FeeIcaAddress, - Receiver: rewardCollectorAddress.String(), - }) - } - - // Once the community pool deposit ICA is registered, whitelist epochly community pool transfers - // from the deposit ICA to the community pool holding accounts - if portId == communityPoolDepositPortID { - k.rateLimitKeeper.SetWhitelistedAddressPair(ctx, ratelimittypes.WhitelistedAddressPair{ - Sender: hostZone.CommunityPoolDepositIcaAddress, - Receiver: hostZone.CommunityPoolStakeHoldingAddress, - }) - k.rateLimitKeeper.SetWhitelistedAddressPair(ctx, ratelimittypes.WhitelistedAddressPair{ - Sender: hostZone.CommunityPoolDepositIcaAddress, - Receiver: hostZone.CommunityPoolRedeemHoldingAddress, - }) - } - - // Once the community pool return ICA is registered, whitelist epochly community pool transfers - // from the community pool stake holding account to the community pool return ICA - if portId == communityPoolReturnPortID { - k.rateLimitKeeper.SetWhitelistedAddressPair(ctx, ratelimittypes.WhitelistedAddressPair{ - Sender: hostZone.CommunityPoolStakeHoldingAddress, - Receiver: hostZone.CommunityPoolReturnIcaAddress, - }) - } - - return nil -} - -// Checks if the port matches an ICA account on the trade route, and if so, stores the -// relevant ICA address on the trade route -func (k Keeper) StoreTradeRouteIcaAddress(ctx sdk.Context, callbackChainId, callbackPortId, address string) error { - // Check if the port Id matches either the trade or unwind ICA on the tradeRoute - // If the chainId and port Id from the callback match the account - // on a trade route, set the ICA address in the relevant places, - // including the from/to addresses on each hop - for _, route := range k.GetAllTradeRoutes(ctx) { - // Build the expected port ID for the reward and trade accounts, - // using the chainId and route ID - rewardAccount := route.RewardAccount - rewardOwner := types.FormatTradeRouteICAOwnerFromRouteId(rewardAccount.ChainId, route.GetRouteId(), rewardAccount.Type) - rewardPortId, err := icatypes.NewControllerPortID(rewardOwner) - if err != nil { - return err - } - - tradeAccount := route.TradeAccount - tradeOwner := types.FormatTradeRouteICAOwnerFromRouteId(tradeAccount.ChainId, route.GetRouteId(), tradeAccount.Type) - tradePortId, err := icatypes.NewControllerPortID(tradeOwner) - if err != nil { - return err - } - - // Check if route IDs match the callback chainId/portId - if route.RewardAccount.ChainId == callbackChainId && callbackPortId == rewardPortId { - k.Logger(ctx).Info(fmt.Sprintf("ICA Address %s found for Unwind ICA on %s", address, route.Description())) - route.RewardAccount.Address = address - - } else if route.TradeAccount.ChainId == callbackChainId && callbackPortId == tradePortId { - k.Logger(ctx).Info(fmt.Sprintf("ICA Address %s found for Trade ICA on %s", address, route.Description())) - route.TradeAccount.Address = address - } - - k.SetTradeRoute(ctx, route) - } - - return nil -} - -// TODO [cleanup]: Cleanup error messages, and rename to GetLightClientTime -// Retrieves the light client time for a given connection -func (k Keeper) GetLightClientTimeSafely(ctx sdk.Context, connectionID string) (uint64, error) { - // get light client's latest height - conn, found := k.ibcKeeper.ConnectionKeeper.GetConnection(ctx, connectionID) - if !found { - errMsg := fmt.Sprintf("invalid connection id, %s not found", connectionID) - k.Logger(ctx).Error(errMsg) - return 0, fmt.Errorf(errMsg) - } - // TODO(TEST-112) make sure to update host LCs here! - latestConsensusClientState, found := k.ibcKeeper.ClientKeeper.GetLatestClientConsensusState(ctx, conn.ClientId) - if !found { - errMsg := fmt.Sprintf("client id %s not found for connection %s", conn.ClientId, connectionID) - k.Logger(ctx).Error(errMsg) - return 0, fmt.Errorf(errMsg) - } else { - latestTime := latestConsensusClientState.GetTimestamp() - return latestTime, nil - } -} - -// TODO [cleanup]: Cleanup error messages, and rename to GetLightClientHeight -// Retrieves the light client time for a given connection -func (k Keeper) GetLightClientHeightSafely(ctx sdk.Context, connectionID string) (uint64, error) { - // get light client's latest height - conn, found := k.ibcKeeper.ConnectionKeeper.GetConnection(ctx, connectionID) - if !found { - errMsg := fmt.Sprintf("invalid connection id, %s not found", connectionID) - k.Logger(ctx).Error(errMsg) - return 0, fmt.Errorf(errMsg) - } - clientState, found := k.ibcKeeper.ClientKeeper.GetClientState(ctx, conn.ClientId) - if !found { - errMsg := fmt.Sprintf("client id %s not found for connection %s", conn.ClientId, connectionID) - k.Logger(ctx).Error(errMsg) - return 0, fmt.Errorf(errMsg) - } else { - latestHeightHostZone, err := cast.ToUint64E(clientState.GetLatestHeight().GetRevisionHeight()) - if err != nil { - errMsg := fmt.Sprintf("error casting latest height to int64: %s", err.Error()) - k.Logger(ctx).Error(errMsg) - return 0, fmt.Errorf(errMsg) - } - return latestHeightHostZone, nil - } -} - -// Lookup a chain ID from a connection ID by looking up the client state -func (k Keeper) GetChainIdFromConnectionId(ctx sdk.Context, connectionID string) (string, error) { - connection, found := k.ibcKeeper.ConnectionKeeper.GetConnection(ctx, connectionID) - if !found { - return "", errorsmod.Wrapf(connectiontypes.ErrConnectionNotFound, "connection %s not found", connectionID) - } - clientState, found := k.ibcKeeper.ClientKeeper.GetClientState(ctx, connection.ClientId) - if !found { - return "", errorsmod.Wrapf(clienttypes.ErrClientNotFound, "client %s not found", connection.ClientId) - } - client, ok := clientState.(*ibctmtypes.ClientState) - if !ok { - return "", types.ErrClientStateNotTendermint - } - - return client.ChainId, nil -} diff --git a/x/stakeibc/keeper/icacallbacks.go b/x/stakeibc/keeper/icacallbacks.go deleted file mode 100644 index 530fe6696..000000000 --- a/x/stakeibc/keeper/icacallbacks.go +++ /dev/null @@ -1,27 +0,0 @@ -package keeper - -import ( - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" -) - -const ( - ICACallbackID_Delegate = "delegate" - ICACallbackID_Claim = "claim" - ICACallbackID_Undelegate = "undelegate" - ICACallbackID_Reinvest = "reinvest" - ICACallbackID_Redemption = "redemption" - ICACallbackID_Rebalance = "rebalance" - ICACallbackID_Detokenize = "detokenize" -) - -func (k Keeper) Callbacks() icacallbackstypes.ModuleCallbacks { - return []icacallbackstypes.ICACallback{ - {CallbackId: ICACallbackID_Delegate, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.DelegateCallback)}, - {CallbackId: ICACallbackID_Claim, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.ClaimCallback)}, - {CallbackId: ICACallbackID_Undelegate, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.UndelegateCallback)}, - {CallbackId: ICACallbackID_Reinvest, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.ReinvestCallback)}, - {CallbackId: ICACallbackID_Redemption, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.RedemptionCallback)}, - {CallbackId: ICACallbackID_Rebalance, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.RebalanceCallback)}, - {CallbackId: ICACallbackID_Detokenize, CallbackFunc: icacallbackstypes.ICACallbackFunction(k.DetokenizeCallback)}, - } -} diff --git a/x/stakeibc/keeper/icacallbacks_claim.go b/x/stakeibc/keeper/icacallbacks_claim.go deleted file mode 100644 index 65fd49552..000000000 --- a/x/stakeibc/keeper/icacallbacks_claim.go +++ /dev/null @@ -1,112 +0,0 @@ -package keeper - -import ( - "fmt" - - "github.com/milkyway-labs/milkyway/utils" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" -) - -// Marshal claim callback args -func (k Keeper) MarshalClaimCallbackArgs(ctx sdk.Context, claimCallback types.ClaimCallback) ([]byte, error) { - out, err := proto.Marshal(&claimCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("MarshalClaimCallbackArgs %v", err.Error())) - return nil, err - } - return out, nil -} - -// Unmarshalls claim callback arguments into a ClaimCallback struct -func (k Keeper) UnmarshalClaimCallbackArgs(ctx sdk.Context, claimCallback []byte) (*types.ClaimCallback, error) { - unmarshalledDelegateCallback := types.ClaimCallback{} - if err := proto.Unmarshal(claimCallback, &unmarshalledDelegateCallback); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UnmarshalClaimCallbackArgs %v", err.Error())) - return nil, err - } - return &unmarshalledDelegateCallback, nil -} - -// ICA Callback after claiming unbonded tokens -// * If successful: Removes the user redemption record -// * If timeout/failure: Reverts pending flag in the user redemption record so the claim can be re-tried -func (k Keeper) ClaimCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - // Fetch callback args - claimCallback, err := k.UnmarshalClaimCallbackArgs(ctx, args) - if err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, fmt.Sprintf("Unable to unmarshal claim callback args: %s", err.Error())) - } - chainId := claimCallback.ChainId - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Claim, - "Starting claim callback for Redemption Record: %s", claimCallback.UserRedemptionRecordId)) - - // Grab the associated user redemption record - userRedemptionRecord, found := k.recordsKeeper.GetUserRedemptionRecord(ctx, claimCallback.GetUserRedemptionRecordId()) - if !found { - return errorsmod.Wrapf(types.ErrRecordNotFound, "user redemption record not found %s", claimCallback.GetUserRedemptionRecordId()) - } - - // Check for a timeout - // If the ICA timed out, update the redemption record so the user can retry the claim - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Claim, - icacallbackstypes.AckResponseStatus_TIMEOUT, packet)) - - userRedemptionRecord.ClaimIsPending = false - k.recordsKeeper.SetUserRedemptionRecord(ctx, userRedemptionRecord) - return nil - } - - // Check for a failed transaction (ack error) - // Upon failure, update the redemption record to allow the user to retry the claim - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Claim, - icacallbackstypes.AckResponseStatus_FAILURE, packet)) - - // after an error, a user should be able to retry the claim - userRedemptionRecord.ClaimIsPending = false - k.recordsKeeper.SetUserRedemptionRecord(ctx, userRedemptionRecord) - return nil - } - - k.Logger(ctx).Info(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Claim, - icacallbackstypes.AckResponseStatus_SUCCESS, packet)) - - // Upon success, remove the record and decrement the unbonded amount on the host zone unbonding record - k.recordsKeeper.RemoveUserRedemptionRecord(ctx, claimCallback.GetUserRedemptionRecordId()) - err = k.DecrementHostZoneUnbonding(ctx, userRedemptionRecord, *claimCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("ClaimCallback failed (DecrementHostZoneUnbonding), packet %v, err: %s", packet, err.Error())) - return err - } - - k.Logger(ctx).Info(fmt.Sprintf("[CLAIM] success on %s", userRedemptionRecord.GetHostZoneId())) - return nil -} - -// After a user claims their unbonded tokens, the claim amount is decremented from the corresponding host zone unbonding record -func (k Keeper) DecrementHostZoneUnbonding(ctx sdk.Context, userRedemptionRecord recordstypes.UserRedemptionRecord, callbackArgs types.ClaimCallback) error { - // fetch the hzu associated with the user unbonding record - hostZoneUnbonding, found := k.recordsKeeper.GetHostZoneUnbondingByChainId(ctx, callbackArgs.EpochNumber, callbackArgs.ChainId) - if !found { - return errorsmod.Wrapf(types.ErrRecordNotFound, "host zone unbonding not found %s", callbackArgs.ChainId) - } - - // decrement the hzu by the amount claimed - hostZoneUnbonding.NativeTokenAmount = hostZoneUnbonding.NativeTokenAmount.Sub(userRedemptionRecord.NativeTokenAmount) - - // save the updated hzu on the epoch unbonding record - epochUnbondingRecord, success := k.recordsKeeper.AddHostZoneToEpochUnbondingRecord(ctx, callbackArgs.EpochNumber, callbackArgs.ChainId, hostZoneUnbonding) - if !success { - return errorsmod.Wrapf(types.ErrRecordNotFound, "epoch unbonding record not found %s", callbackArgs.ChainId) - } - k.recordsKeeper.SetEpochUnbondingRecord(ctx, *epochUnbondingRecord) - return nil -} diff --git a/x/stakeibc/keeper/icacallbacks_delegate.go b/x/stakeibc/keeper/icacallbacks_delegate.go deleted file mode 100644 index 7efdb7e99..000000000 --- a/x/stakeibc/keeper/icacallbacks_delegate.go +++ /dev/null @@ -1,109 +0,0 @@ -package keeper - -import ( - "fmt" - - "github.com/spf13/cast" - - "github.com/milkyway-labs/milkyway/utils" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" - - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" -) - -// Marshalls delegate callback arguments -func (k Keeper) MarshalDelegateCallbackArgs(ctx sdk.Context, delegateCallback types.DelegateCallback) ([]byte, error) { - out, err := proto.Marshal(&delegateCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("MarshalDelegateCallbackArgs %v", err.Error())) - return nil, err - } - return out, nil -} - -// Unmarshalls delegate callback arguments into a DelegateCallback struct -func (k Keeper) UnmarshalDelegateCallbackArgs(ctx sdk.Context, delegateCallback []byte) (*types.DelegateCallback, error) { - unmarshalledDelegateCallback := types.DelegateCallback{} - if err := proto.Unmarshal(delegateCallback, &unmarshalledDelegateCallback); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UnmarshalDelegateCallbackArgs %v", err.Error())) - return nil, err - } - return &unmarshalledDelegateCallback, nil -} - -// ICA Callback after delegating deposit records -// * If successful: Updates deposit record status and records delegation changes on the host zone and validators -// * If timeout: Does nothing -// * If failure: Reverts deposit record status -func (k Keeper) DelegateCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - // Deserialize the callback args - delegateCallback, err := k.UnmarshalDelegateCallbackArgs(ctx, args) - if err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, fmt.Sprintf("Unable to unmarshal delegate callback args: %s", err.Error())) - } - chainId := delegateCallback.HostZoneId - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Delegate, - "Starting delegate callback for Deposit Record: %d", delegateCallback.DepositRecordId)) - - // Confirm chainId and deposit record Id exist - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "host zone not found %s", chainId) - } - recordId := delegateCallback.DepositRecordId - depositRecord, found := k.recordsKeeper.GetDepositRecord(ctx, recordId) - if !found { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "deposit record not found %d", recordId) - } - - // Regardless of failure/success/timeout, indicate that this ICA has completed - for _, splitDelegation := range delegateCallback.SplitDelegations { - if err := k.DecrementValidatorDelegationChangesInProgress(&hostZone, splitDelegation.Validator); err != nil { - return err - } - } - k.SetHostZone(ctx, hostZone) - - // Check for timeout (ack nil) - // No need to reset the deposit record status since it will get reverted when the channel is restored - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Delegate, - icacallbackstypes.AckResponseStatus_TIMEOUT, packet)) - return nil - } - - // Check for a failed transaction (ack error) - // Reset the deposit record status upon failure - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Delegate, - icacallbackstypes.AckResponseStatus_FAILURE, packet)) - - // Reset deposit record status - depositRecord.Status = recordstypes.DepositRecord_DELEGATION_QUEUE - k.recordsKeeper.SetDepositRecord(ctx, depositRecord) - return nil - } - - k.Logger(ctx).Info(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Delegate, - icacallbackstypes.AckResponseStatus_SUCCESS, packet)) - - // Update delegations on the host zone - for _, splitDelegation := range delegateCallback.SplitDelegations { - err := k.AddDelegationToValidator(ctx, &hostZone, splitDelegation.Validator, splitDelegation.Amount, ICACallbackID_Delegate) - if err != nil { - return errorsmod.Wrapf(err, "Failed to add delegation to validator") - } - } - k.SetHostZone(ctx, hostZone) - - k.recordsKeeper.RemoveDepositRecord(ctx, cast.ToUint64(recordId)) - k.Logger(ctx).Info(fmt.Sprintf("[DELEGATION] success on %s", chainId)) - return nil -} diff --git a/x/stakeibc/keeper/icacallbacks_detokenize.go b/x/stakeibc/keeper/icacallbacks_detokenize.go deleted file mode 100644 index 2069b0689..000000000 --- a/x/stakeibc/keeper/icacallbacks_detokenize.go +++ /dev/null @@ -1,87 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - - "github.com/milkyway-labs/milkyway/utils" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// ICACallback after an LSM token is detokenized into native stake -// -// If successful: Remove the token deposit from the store and incremenet the validator delegation -// If failure: flag the deposit as DETOKENIZATION_FAILED -// If timeout: do nothing -// - A timeout will force the channel closed, and once the channel is restored, -// the ICA will get resubmitted -func (k Keeper) DetokenizeCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - // Fetch callback args - detokenizeCallback := types.DetokenizeSharesCallback{} - if err := proto.Unmarshal(args, &detokenizeCallback); err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, "unable to unmarshal detokenize callback: %s", err.Error()) - } - chainId := detokenizeCallback.Deposit.ChainId - deposit := detokenizeCallback.Deposit - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Detokenize, "Starting detokenize callback")) - - // Regardless of failure/success/timeout, indicate that this ICA has completed - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "Host zone not found: %s", chainId) - } - if err := k.DecrementValidatorDelegationChangesInProgress(&hostZone, deposit.ValidatorAddress); err != nil { - return err - } - k.SetHostZone(ctx, hostZone) - - // No action is necessary on a timeout - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Detokenize, - icacallbackstypes.AckResponseStatus_TIMEOUT, packet)) - return nil - } - - // If the ICA failed, update the deposit status - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Detokenize, - icacallbackstypes.AckResponseStatus_FAILURE, packet)) - - k.recordsKeeper.UpdateLSMTokenDepositStatus(ctx, *deposit, recordstypes.LSMTokenDeposit_DETOKENIZATION_FAILED) - return nil - } - - k.Logger(ctx).Info(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Detokenize, - icacallbackstypes.AckResponseStatus_SUCCESS, packet)) - - // If the ICA succeeded, remove the token deposit - k.recordsKeeper.RemoveLSMTokenDeposit(ctx, deposit.ChainId, deposit.Denom) - - // Determine the actual number of tokens that were turned to native stake - // (this can be slightly different than the amount initiated in the redeem tokens tx - // due a precision error in the SDK) - if len(ackResponse.MsgResponses) != 1 { - return fmt.Errorf("Invalid number of messages (%d) in detokenize response: %v", - len(ackResponse.MsgResponses), ackResponse.MsgResponses) - } - var detokenizeResponse types.MsgRedeemTokensForSharesResponse - if err := proto.Unmarshal(ackResponse.MsgResponses[0], &detokenizeResponse); err != nil { - return err - } - stakeAmount := detokenizeResponse.Amount.Amount - - // Update delegation on the host zone and validator - err := k.AddDelegationToValidator(ctx, &hostZone, deposit.ValidatorAddress, stakeAmount, ICACallbackID_Detokenize) - if err != nil { - return err - } - k.SetHostZone(ctx, hostZone) - - return nil -} diff --git a/x/stakeibc/keeper/icacallbacks_rebalance.go b/x/stakeibc/keeper/icacallbacks_rebalance.go deleted file mode 100644 index 95f4f730b..000000000 --- a/x/stakeibc/keeper/icacallbacks_rebalance.go +++ /dev/null @@ -1,115 +0,0 @@ -package keeper - -import ( - "fmt" - - "github.com/milkyway-labs/milkyway/utils" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" -) - -// Marshalls rebalance callback arguments -func (k Keeper) MarshalRebalanceCallbackArgs(ctx sdk.Context, rebalanceCallback types.RebalanceCallback) ([]byte, error) { - out, err := proto.Marshal(&rebalanceCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("MarshalRebalanceCallbackArgs %v", err.Error())) - return nil, err - } - return out, nil -} - -// Unmarshalls rebalance callback arguments into a RebalanceCallback struct -func (k Keeper) UnmarshalRebalanceCallbackArgs(ctx sdk.Context, rebalanceCallback []byte) (*types.RebalanceCallback, error) { - unmarshalledRebalanceCallback := types.RebalanceCallback{} - if err := proto.Unmarshal(rebalanceCallback, &unmarshalledRebalanceCallback); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UnmarshalRebalanceCallbackArgs %v", err.Error())) - return nil, err - } - return &unmarshalledRebalanceCallback, nil -} - -// ICA Callback after rebalance validators on a host zone -// * If successful: Updates relevant validator delegations on the host zone struct -// * If timeout/failure: Does nothing -func (k Keeper) RebalanceCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - // Fetch callback args - rebalanceCallback, err := k.UnmarshalRebalanceCallbackArgs(ctx, args) - if err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, fmt.Sprintf("Unable to unmarshal rebalance callback args: %s", err.Error())) - } - chainId := rebalanceCallback.HostZoneId - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Rebalance, "Starting rebalance callback")) - - // Regardless of failure/success/timeout, indicate that this ICA has completed - hostZone, found := k.GetHostZone(ctx, rebalanceCallback.HostZoneId) - if !found { - return errorsmod.Wrapf(sdkerrors.ErrKeyNotFound, "Host zone not found: %s", rebalanceCallback.HostZoneId) - } - for _, rebalancing := range rebalanceCallback.Rebalancings { - if err := k.DecrementValidatorDelegationChangesInProgress(&hostZone, rebalancing.SrcValidator); err != nil { - return err - } - if err := k.DecrementValidatorDelegationChangesInProgress(&hostZone, rebalancing.DstValidator); err != nil { - return err - } - } - k.SetHostZone(ctx, hostZone) - - // Check for timeout (ack nil) - // No action is necessary on a timeout - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Rebalance, - icacallbackstypes.AckResponseStatus_TIMEOUT, packet)) - return nil - } - - // Check for a failed transaction (ack error) - // No action is necessary on a failure - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Rebalance, - icacallbackstypes.AckResponseStatus_FAILURE, packet)) - return nil - } - - k.Logger(ctx).Info(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Rebalance, - icacallbackstypes.AckResponseStatus_SUCCESS, packet)) - - // Assemble a map from validatorAddress -> validator - valAddrMap := make(map[string]*types.Validator) - for _, val := range hostZone.Validators { - valAddrMap[val.Address] = val - } - - // For each re-delegation transaction, update the relevant validators on the host zone - for _, rebalancing := range rebalanceCallback.Rebalancings { - srcValidator := rebalancing.SrcValidator - dstValidator := rebalancing.DstValidator - - if _, valFound := valAddrMap[srcValidator]; !valFound { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "source validator not found %s", srcValidator) - } - if _, valFound := valAddrMap[dstValidator]; !valFound { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "destination validator not found %s", dstValidator) - } - - // Decrement the delegation from the source validator and increment the delegation - // for the destination validator - valAddrMap[srcValidator].Delegation = valAddrMap[srcValidator].Delegation.Sub(rebalancing.Amt) - valAddrMap[dstValidator].Delegation = valAddrMap[dstValidator].Delegation.Add(rebalancing.Amt) - - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Rebalance, - " Decrementing delegation on %s by %v", srcValidator, rebalancing.Amt)) - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Rebalance, - " Incrementing delegation on %s by %v", dstValidator, rebalancing.Amt)) - } - - k.SetHostZone(ctx, hostZone) - - return nil -} diff --git a/x/stakeibc/keeper/icacallbacks_redemption.go b/x/stakeibc/keeper/icacallbacks_redemption.go deleted file mode 100644 index abb593acd..000000000 --- a/x/stakeibc/keeper/icacallbacks_redemption.go +++ /dev/null @@ -1,91 +0,0 @@ -package keeper - -import ( - "fmt" - - "github.com/milkyway-labs/milkyway/utils" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" -) - -// Marshalls redemption callback arguments -func (k Keeper) MarshalRedemptionCallbackArgs(ctx sdk.Context, redemptionCallback types.RedemptionCallback) ([]byte, error) { - out, err := proto.Marshal(&redemptionCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("MarshalRedemptionCallbackArgs | %s", err.Error())) - return nil, err - } - return out, nil -} - -// Unmarshalls redemption callback arguments into a RedemptionCallback struct -func (k Keeper) UnmarshalRedemptionCallbackArgs(ctx sdk.Context, redemptionCallback []byte) (types.RedemptionCallback, error) { - unmarshalledRedemptionCallback := types.RedemptionCallback{} - if err := proto.Unmarshal(redemptionCallback, &unmarshalledRedemptionCallback); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UnmarshalRedemptionCallbackArgs | %s", err.Error())) - return unmarshalledRedemptionCallback, err - } - return unmarshalledRedemptionCallback, nil -} - -// ICA Callback after undelegating -// * If successful: Updates epoch unbonding record status -// * If timeout: Does nothing -// * If failure: Reverts epoch unbonding record status -func (k Keeper) RedemptionCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - // Fetch callback args - redemptionCallback, err := k.UnmarshalRedemptionCallbackArgs(ctx, args) - if err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, fmt.Sprintf("Unable to unmarshal redemption callback args: %s", err.Error())) - } - chainId := redemptionCallback.HostZoneId - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Redemption, - "Starting redemption callback for Epoch Unbonding Records: %+v", redemptionCallback.EpochUnbondingRecordIds)) - - // Check for timeout (ack nil) - // No need to reset the unbonding record status since it will get reverted when the channel is restored - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Redemption, - icacallbackstypes.AckResponseStatus_TIMEOUT, packet)) - return nil - } - - // Check for a failed transaction (ack error) - // Reset the unbonding record status upon failure - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Redemption, - icacallbackstypes.AckResponseStatus_FAILURE, packet)) - - // Reset unbondings record status - err = k.recordsKeeper.SetHostZoneUnbondingStatus(ctx, chainId, redemptionCallback.EpochUnbondingRecordIds, recordstypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE) - if err != nil { - return err - } - return nil - } - - k.Logger(ctx).Info(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Redemption, - icacallbackstypes.AckResponseStatus_SUCCESS, packet)) - - // Confirm host zone exists - _, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(sdkerrors.ErrKeyNotFound, "Host zone not found: %s", chainId) - } - - // Upon success, update the unbonding record status to CLAIMABLE - err = k.recordsKeeper.SetHostZoneUnbondingStatus(ctx, chainId, redemptionCallback.EpochUnbondingRecordIds, recordstypes.HostZoneUnbonding_CLAIMABLE) - if err != nil { - return err - } - - k.Logger(ctx).Info(fmt.Sprintf("[REDEMPTION] completed on %s", chainId)) - return nil -} diff --git a/x/stakeibc/keeper/icacallbacks_reinvest.go b/x/stakeibc/keeper/icacallbacks_reinvest.go deleted file mode 100644 index 842f4bd28..000000000 --- a/x/stakeibc/keeper/icacallbacks_reinvest.go +++ /dev/null @@ -1,141 +0,0 @@ -package keeper - -import ( - "fmt" - "time" - - "github.com/cosmos/cosmos-sdk/types/bech32" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - - "github.com/milkyway-labs/milkyway/utils" - epochtypes "github.com/milkyway-labs/milkyway/x/epochs/types" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" -) - -// Marshalls reinvest callback arguments -func (k Keeper) MarshalReinvestCallbackArgs(ctx sdk.Context, reinvestCallback types.ReinvestCallback) ([]byte, error) { - out, err := proto.Marshal(&reinvestCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("MarshalReinvestCallbackArgs %v", err.Error())) - return nil, err - } - return out, nil -} - -// Unmarshalls reinvest callback arguments into a ReinvestCallback struct -func (k Keeper) UnmarshalReinvestCallbackArgs(ctx sdk.Context, reinvestCallback []byte) (*types.ReinvestCallback, error) { - unmarshalledReinvestCallback := types.ReinvestCallback{} - if err := proto.Unmarshal(reinvestCallback, &unmarshalledReinvestCallback); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UnmarshalReinvestCallbackArgs %s", err.Error())) - return nil, err - } - return &unmarshalledReinvestCallback, nil -} - -// ICA Callback after reinvestment -// -// If successful: -// * Creates a new DepositRecord with the reinvestment amount -// * Issues an ICQ to query the rewards balance -// If timeout/failure: -// * Does nothing -func (k Keeper) ReinvestCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - // Fetch callback args - reinvestCallback, err := k.UnmarshalReinvestCallbackArgs(ctx, args) - if err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, fmt.Sprintf("Unable to unmarshal reinvest callback args: %s", err.Error())) - } - chainId := reinvestCallback.HostZoneId - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Reinvest, "Starting reinvest callback")) - - // Grab the associated host zone - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "host zone %s not found", chainId) - } - - // Check for timeout (ack nil) - // No action is necessary on a timeout - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Reinvest, - icacallbackstypes.AckResponseStatus_TIMEOUT, packet)) - return nil - } - - // Check for a failed transaction (ack error) - // No action is necessary on a failure - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Reinvest, - icacallbackstypes.AckResponseStatus_FAILURE, packet)) - return nil - } - - k.Logger(ctx).Info(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Reinvest, - icacallbackstypes.AckResponseStatus_SUCCESS, packet)) - - // Get the current stride epoch number - strideEpochTracker, found := k.GetEpochTracker(ctx, epochtypes.STRIDE_EPOCH) - if !found { - k.Logger(ctx).Error("failed to find epoch") - return errorsmod.Wrapf(types.ErrInvalidLengthEpochTracker, "no number for epoch (%s)", epochtypes.STRIDE_EPOCH) - } - - // Create a new deposit record so that rewards are reinvested - record := recordstypes.DepositRecord{ - Amount: reinvestCallback.ReinvestAmount.Amount, - Denom: reinvestCallback.ReinvestAmount.Denom, - HostZoneId: reinvestCallback.HostZoneId, - Status: recordstypes.DepositRecord_DELEGATION_QUEUE, - Source: recordstypes.DepositRecord_WITHDRAWAL_ICA, - DepositEpochNumber: strideEpochTracker.EpochNumber, - } - k.recordsKeeper.AppendDepositRecord(ctx, record) - - // Encode the fee account address for the query request - // The query request consists of the fee account address and denom - if hostZone.FeeIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no fee account found for %s", chainId) - } - _, feeAddressBz, err := bech32.DecodeAndConvert(hostZone.FeeIcaAddress) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid fee account address, could not decode (%s)", err.Error()) - } - queryData, err := types.MoveBankBalanceKey(feeAddressBz, hostZone.HostDenom) - if err != nil { - panic(fmt.Sprintf( - "cannot construct move bank balance key for address %s and denom %s", - hostZone.FeeIcaAddress, hostZone.HostDenom)) - } - - // Submit an ICQ for the rewards balance in the fee account - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Reinvest, "Submitting ICQ for fee account balance")) - - timeout := time.Unix(0, int64(strideEpochTracker.NextEpochStartTime)) - timeoutDuration := timeout.Sub(ctx.BlockTime()) - - query := icqtypes.Query{ - ChainId: chainId, - ConnectionId: hostZone.ConnectionId, - QueryType: icqtypes.BANK_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_FeeBalance, - TimeoutDuration: timeoutDuration, - TimeoutPolicy: icqtypes.TimeoutPolicy_REJECT_QUERY_RESPONSE, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error submitting ICQ for fee balance, error %s", err.Error())) - return err - } - - return nil -} diff --git a/x/stakeibc/keeper/icacallbacks_undelegate.go b/x/stakeibc/keeper/icacallbacks_undelegate.go deleted file mode 100644 index d445d233f..000000000 --- a/x/stakeibc/keeper/icacallbacks_undelegate.go +++ /dev/null @@ -1,228 +0,0 @@ -package keeper - -import ( - "fmt" - "time" - - sdkmath "cosmossdk.io/math" - "github.com/spf13/cast" - - "github.com/milkyway-labs/milkyway/utils" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - stakingtypes "github.com/initia-labs/initia/x/mstaking/types" -) - -// ICA Callback after undelegating -// -// If successful: -// * Updates epoch unbonding record status -// * Records delegation changes on the host zone and validators, -// * Burns stTokens -// If timeout: -// * Does nothing -// If failure: -// * Reverts epoch unbonding record status -func (k Keeper) UndelegateCallback(ctx sdk.Context, packet channeltypes.Packet, ackResponse *icacallbackstypes.AcknowledgementResponse, args []byte) error { - // Fetch callback args - var undelegateCallback types.UndelegateCallback - if err := proto.Unmarshal(args, &undelegateCallback); err != nil { - return errorsmod.Wrapf(types.ErrUnmarshalFailure, fmt.Sprintf("Unable to unmarshal undelegate callback args: %s", err.Error())) - } - chainId := undelegateCallback.HostZoneId - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Undelegate, - "Starting undelegate callback for Epoch Unbonding Records: %+v", undelegateCallback.EpochUnbondingRecordIds)) - - // Regardless of failure/success/timeout, indicate that this ICA has completed - hostZone, found := k.GetHostZone(ctx, undelegateCallback.HostZoneId) - if !found { - return errorsmod.Wrapf(sdkerrors.ErrKeyNotFound, "Host zone not found: %s", undelegateCallback.HostZoneId) - } - for _, splitDelegation := range undelegateCallback.SplitDelegations { - if err := k.DecrementValidatorDelegationChangesInProgress(&hostZone, splitDelegation.Validator); err != nil { - return err - } - } - k.SetHostZone(ctx, hostZone) - - // Check for timeout (ack nil) - // No need to reset the unbonding record status since it will get reverted when the channel is restored - if ackResponse.Status == icacallbackstypes.AckResponseStatus_TIMEOUT { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Undelegate, - icacallbackstypes.AckResponseStatus_TIMEOUT, packet)) - return nil - } - - // Check for a failed transaction (ack error) - // Reset the unbonding record status upon failure - if ackResponse.Status == icacallbackstypes.AckResponseStatus_FAILURE { - k.Logger(ctx).Error(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Undelegate, - icacallbackstypes.AckResponseStatus_FAILURE, packet)) - - // Reset unbondings record status - if err := k.recordsKeeper.SetHostZoneUnbondingStatus( - ctx, - chainId, - undelegateCallback.EpochUnbondingRecordIds, - recordstypes.HostZoneUnbonding_UNBONDING_QUEUE, - ); err != nil { - return err - } - return nil - } - - k.Logger(ctx).Info(utils.LogICACallbackStatusWithHostZone(chainId, ICACallbackID_Undelegate, - icacallbackstypes.AckResponseStatus_SUCCESS, packet)) - - // Update delegation balances - err := k.UpdateDelegationBalances(ctx, hostZone, undelegateCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UndelegateCallback | %s", err.Error())) - return err - } - - // Get the latest transaction completion time (to determine the unbonding time) - latestCompletionTime, err := k.GetLatestCompletionTime(ctx, ackResponse.MsgResponses) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UndelegateCallback | %s", err.Error())) - return err - } - - // Burn the stTokens - stTokenBurnAmount, err := k.UpdateHostZoneUnbondings(ctx, *latestCompletionTime, chainId, undelegateCallback) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UndelegateCallback | %s", err.Error())) - return err - } - err = k.BurnTokens(ctx, hostZone, stTokenBurnAmount) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("UndelegateCallback | %s", err.Error())) - return err - } - - // Upon success, add host zone unbondings to the exit transfer queue - err = k.recordsKeeper.SetHostZoneUnbondingStatus(ctx, chainId, undelegateCallback.EpochUnbondingRecordIds, recordstypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE) - if err != nil { - return err - } - - return nil -} - -// Decrement the delegation field on the host zone and each validator's delegations after a successful unbonding ICA -func (k Keeper) UpdateDelegationBalances(ctx sdk.Context, hostZone types.HostZone, undelegateCallback types.UndelegateCallback) error { - // Undelegate from each validator and update host zone staked balance, if successful - for _, undelegation := range undelegateCallback.SplitDelegations { - err := k.AddDelegationToValidator(ctx, &hostZone, undelegation.Validator, undelegation.Amount.Neg(), ICACallbackID_Undelegate) - if err != nil { - return err - } - } - k.SetHostZone(ctx, hostZone) - return nil -} - -// Get the latest completion time across each MsgUndelegate in the ICA transaction -// The time is used to set the -func (k Keeper) GetLatestCompletionTime(ctx sdk.Context, msgResponses [][]byte) (*time.Time, error) { - // Update the completion time using the latest completion time across each message within the transaction - latestCompletionTime := time.Time{} - - for _, msgResponse := range msgResponses { - // unmarshall the ack response into a MsgUndelegateResponse and grab the completion time - var undelegateResponse stakingtypes.MsgUndelegateResponse - err := proto.Unmarshal(msgResponse, &undelegateResponse) - if err != nil { - return nil, errorsmod.Wrapf(types.ErrUnmarshalFailure, "Unable to unmarshal undelegation tx response: %s", err.Error()) - } - if undelegateResponse.CompletionTime.After(latestCompletionTime) { - latestCompletionTime = undelegateResponse.CompletionTime - } - } - - if latestCompletionTime.IsZero() { - return nil, errorsmod.Wrapf(types.ErrInvalidPacketCompletionTime, "Invalid completion time (%s) from txMsg", latestCompletionTime.String()) - } - return &latestCompletionTime, nil -} - -// UpdateHostZoneUnbondings does two things: -// 1. Update the time of each hostZoneUnbonding on each epochUnbondingRecord -// 2. Return the number of stTokens that need to be burned -func (k Keeper) UpdateHostZoneUnbondings( - ctx sdk.Context, - latestCompletionTime time.Time, - chainId string, - undelegateCallback types.UndelegateCallback, -) (stTokenBurnAmount sdkmath.Int, err error) { - stTokenBurnAmount = sdkmath.ZeroInt() - for _, epochNumber := range undelegateCallback.EpochUnbondingRecordIds { - epochUnbondingRecord, found := k.recordsKeeper.GetEpochUnbondingRecord(ctx, epochNumber) - if !found { - errMsg := fmt.Sprintf("Unable to find epoch unbonding record for epoch: %d", epochNumber) - k.Logger(ctx).Error(errMsg) - return sdkmath.ZeroInt(), errorsmod.Wrapf(sdkerrors.ErrKeyNotFound, errMsg) - } - hostZoneUnbonding, found := k.recordsKeeper.GetHostZoneUnbondingByChainId(ctx, epochUnbondingRecord.EpochNumber, chainId) - if !found { - errMsg := fmt.Sprintf("Host zone unbonding not found (%s) in epoch unbonding record: %d", chainId, epochNumber) - k.Logger(ctx).Error(errMsg) - return sdkmath.ZeroInt(), errorsmod.Wrapf(sdkerrors.ErrKeyNotFound, errMsg) - } - - // Keep track of the stTokens that need to be burned - stTokenAmount := hostZoneUnbonding.StTokenAmount - stTokenBurnAmount = stTokenBurnAmount.Add(stTokenAmount) - - // Update the bonded time - hostZoneUnbonding.UnbondingTime = cast.ToUint64(latestCompletionTime.UnixNano()) - updatedEpochUnbondingRecord, success := k.recordsKeeper.AddHostZoneToEpochUnbondingRecord(ctx, epochUnbondingRecord.EpochNumber, chainId, hostZoneUnbonding) - if !success { - k.Logger(ctx).Error(fmt.Sprintf("Failed to set host zone epoch unbonding record: epochNumber %d, chainId %s, hostZoneUnbonding %+v", - epochUnbondingRecord.EpochNumber, chainId, hostZoneUnbonding)) - return sdkmath.ZeroInt(), errorsmod.Wrapf(types.ErrEpochNotFound, "couldn't set host zone epoch unbonding record") - } - k.recordsKeeper.SetEpochUnbondingRecord(ctx, *updatedEpochUnbondingRecord) - - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(chainId, ICACallbackID_Undelegate, - "Epoch Unbonding Record: %d - Seting unbonding time to %s", epochNumber, latestCompletionTime.String())) - } - return stTokenBurnAmount, nil -} - -// Burn stTokens after they've been unbonded -func (k Keeper) BurnTokens(ctx sdk.Context, hostZone types.HostZone, stTokenBurnAmount sdkmath.Int) error { - // Build the coin from the stDenom on the host zone - stCoinDenom := types.StAssetDenomFromHostZoneDenom(hostZone.HostDenom) - stCoinString := stTokenBurnAmount.String() + stCoinDenom - stCoin, err := sdk.ParseCoinNormalized(stCoinString) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidCoins, "could not parse burnCoin: %s. err: %s", stCoinString, err.Error()) - } - - // Send the stTokens from the host zone module account to the stakeibc module account - depositAddress, err := sdk.AccAddressFromBech32(hostZone.DepositAddress) - if err != nil { - return fmt.Errorf("could not bech32 decode address %s of zone with id: %s", hostZone.DepositAddress, hostZone.ChainId) - } - err = k.bankKeeper.SendCoinsFromAccountToModule(ctx, depositAddress, types.ModuleName, sdk.NewCoins(stCoin)) - if err != nil { - return fmt.Errorf("could not send coins from account %s to module %s. err: %s", hostZone.DepositAddress, types.ModuleName, err.Error()) - } - - // Finally burn the stTokens - err = k.bankKeeper.BurnCoins(ctx, types.ModuleName, sdk.NewCoins(stCoin)) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Failed to burn stAssets upon successful unbonding %s", err.Error())) - return errorsmod.Wrapf(types.ErrInsufficientFunds, "couldn't burn %v%s tokens in module account. err: %s", stTokenBurnAmount, stCoinDenom, err.Error()) - } - k.Logger(ctx).Info(fmt.Sprintf("Total supply %s", k.bankKeeper.GetSupply(ctx, stCoinDenom))) - return nil -} diff --git a/x/stakeibc/keeper/icqcallbacks.go b/x/stakeibc/keeper/icqcallbacks.go deleted file mode 100644 index 1b4933f1a..000000000 --- a/x/stakeibc/keeper/icqcallbacks.go +++ /dev/null @@ -1,62 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" -) - -const ( - ICQCallbackID_WithdrawalHostBalance = "withdrawalbalance" - ICQCallbackID_FeeBalance = "feebalance" - ICQCallbackID_Delegation = "delegation" - ICQCallbackID_Validator = "validator" - ICQCallbackID_Calibrate = "calibrate" - ICQCallbackID_CommunityPoolIcaBalance = "communitypoolicabalance" - ICQCallbackID_WithdrawalRewardBalance = "withdrawalrewardbalance" - ICQCallbackID_TradeRewardBalance = "traderewardbalance" - ICQCallbackID_TradeConvertedBalance = "tradeconvertedbalance" - ICQCallbackID_PoolPrice = "poolprice" -) - -// ICQCallbacks wrapper struct for stakeibc keeper -type ICQCallback func(Keeper, sdk.Context, []byte, icqtypes.Query) error - -type ICQCallbacks struct { - k Keeper - callbacks map[string]ICQCallback -} - -var _ icqtypes.QueryCallbacks = ICQCallbacks{} - -func (k Keeper) ICQCallbackHandler() ICQCallbacks { - return ICQCallbacks{k, make(map[string]ICQCallback)} -} - -func (c ICQCallbacks) CallICQCallback(ctx sdk.Context, id string, args []byte, query icqtypes.Query) error { - return c.callbacks[id](c.k, ctx, args, query) -} - -func (c ICQCallbacks) HasICQCallback(id string) bool { - _, found := c.callbacks[id] - return found -} - -func (c ICQCallbacks) AddICQCallback(id string, fn interface{}) icqtypes.QueryCallbacks { - c.callbacks[id] = fn.(ICQCallback) - return c -} - -func (c ICQCallbacks) RegisterICQCallbacks() icqtypes.QueryCallbacks { - return c. - AddICQCallback(ICQCallbackID_WithdrawalHostBalance, ICQCallback(WithdrawalHostBalanceCallback)). - AddICQCallback(ICQCallbackID_FeeBalance, ICQCallback(FeeBalanceCallback)). - AddICQCallback(ICQCallbackID_Delegation, ICQCallback(DelegatorSharesCallback)). - AddICQCallback(ICQCallbackID_Validator, ICQCallback(ValidatorSharesToTokensRateCallback)). - AddICQCallback(ICQCallbackID_Calibrate, ICQCallback(CalibrateDelegationCallback)). - AddICQCallback(ICQCallbackID_CommunityPoolIcaBalance, ICQCallback(CommunityPoolIcaBalanceCallback)). - AddICQCallback(ICQCallbackID_WithdrawalRewardBalance, ICQCallback(WithdrawalRewardBalanceCallback)). - AddICQCallback(ICQCallbackID_TradeRewardBalance, ICQCallback(TradeRewardBalanceCallback)). - AddICQCallback(ICQCallbackID_TradeConvertedBalance, ICQCallback(TradeConvertedBalanceCallback)). - AddICQCallback(ICQCallbackID_PoolPrice, ICQCallback(PoolPriceCallback)) -} diff --git a/x/stakeibc/keeper/icqcallbacks_callibrate_delegation.go b/x/stakeibc/keeper/icqcallbacks_callibrate_delegation.go deleted file mode 100644 index 4414b06b8..000000000 --- a/x/stakeibc/keeper/icqcallbacks_callibrate_delegation.go +++ /dev/null @@ -1,85 +0,0 @@ -package keeper - -import ( - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - stakingtypes "github.com/initia-labs/initia/x/mstaking/types" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// CalibrationThreshold is the max amount of tokens by which a calibration can alter internal record keeping of delegations -var CalibrationThreshold = sdkmath.NewInt(5000) - -// DelegatorSharesCallback is a callback handler for UpdateValidatorSharesExchRate queries. -// -// In an attempt to get the ICA's delegation amount on a given validator, we have to query: -// 1. the validator's internal shares to tokens rate -// 2. the Delegation ICA's delegated shares -// And apply the following equation: -// numTokens = numShares * sharesToTokensRate -// -// This is the callback from query #2 -// -// Note: for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key" -func CalibrateDelegationCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_Calibrate, - "Starting delegator shares callback, QueryId: %vs, QueryType: %s, Connection: %s", query.Id, query.QueryType, query.ConnectionId)) - - // Confirm host exists - chainId := query.ChainId - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "no registered zone for queried chain ID (%s)", chainId) - } - - // Unmarshal the query response which returns a delegation object for the delegator/validator pair - queriedDelegation := stakingtypes.Delegation{} - err := k.cdc.Unmarshal(args, &queriedDelegation) - if err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal delegator shares query response into Delegation type") - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Calibrate, "Query response - Delegator: %s, Validator: %s, Shares: %v", - queriedDelegation.DelegatorAddress, queriedDelegation.ValidatorAddress, queriedDelegation.Shares)) - - // Grab the validator object from the hostZone using the address returned from the query - validator, valIndex, found := GetValidatorFromAddress(hostZone.Validators, queriedDelegation.ValidatorAddress) - if !found { - return errorsmod.Wrapf(types.ErrValidatorNotFound, "no registered validator for address (%s)", queriedDelegation.ValidatorAddress) - } - - // Calculate the number of tokens delegated (using the internal sharesToTokensRate) - // note: truncateInt per https://github.com/cosmos/cosmos-sdk/blob/cb31043d35bad90c4daa923bb109f38fd092feda/x/staking/types/validator.go#L431 - delegatedTokens := queriedDelegation.Shares.AmountOf(hostZone.HostDenom).Mul(validator.SharesToTokensRate).TruncateInt() - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Calibrate, - "Previous Delegation: %v, Current Delegation: %v", validator.Delegation, delegatedTokens)) - - // Confirm the validator has actually been slashed - if delegatedTokens.Equal(validator.Delegation) { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Calibrate, "Validator delegation is correct")) - return nil - } - - // if the delegation change is more than the calibration threshold constant, - // return nil so the query submission succeeds - // Note: There should be no stateful changes above this line - delegationChange := validator.Delegation.Sub(delegatedTokens) - if delegationChange.Abs().GT(CalibrationThreshold) { - k.Logger(ctx).Error(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Calibrate, - "Delegation change is GT CalibrationThreshold, failing calibration callback")) - return nil - } - validator.Delegation = validator.Delegation.Sub(delegationChange) - hostZone.TotalDelegations = hostZone.TotalDelegations.Sub(delegationChange) - - hostZone.Validators[valIndex] = &validator - k.SetHostZone(ctx, hostZone) - - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Calibrate, - "Delegation updated to: %v", validator.Delegation)) - - return nil -} diff --git a/x/stakeibc/keeper/icqcallbacks_community_pool_ica_balance.go b/x/stakeibc/keeper/icqcallbacks_community_pool_ica_balance.go deleted file mode 100644 index 8470f17e6..000000000 --- a/x/stakeibc/keeper/icqcallbacks_community_pool_ica_balance.go +++ /dev/null @@ -1,86 +0,0 @@ -package keeper - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" - - errorsmod "cosmossdk.io/errors" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// CommunityPoolBalanceCallback is a callback handler for CommunityPoolBalance queries. -// The query response will return the balance for a specific denom in the deposit or return ica - -// If the address queried was the deposit ICA address, call TransferCommunityPoolDepositToHolding -// If the address queried was the return ICA address, call FundCommunityPool - -// Note: for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key" -func CommunityPoolIcaBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_CommunityPoolIcaBalance, - "Starting community pool balance callback, QueryId: %vs, QueryType: %s, Connection: %s", - query.Id, query.QueryType, query.ConnectionId)) - - // Confirm host exists - chainId := query.ChainId - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "no registered zone for queried chain ID (%s)", chainId) - } - - // Unmarshal the query response args to determine the balance, denom, and icaType - // get amount from the query response, get denom and icaType from marshalled callback data - amount, err := types.UnmarshalAmountFromMoveBankBalanceQuery(args) - if err != nil { - return errorsmod.Wrap(err, "unable to determine amount from query response") - } - - // Unmarshal the callback data containing the denom being queried - var callbackData types.CommunityPoolBalanceQueryCallback - if err := proto.Unmarshal(query.CallbackData, &callbackData); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal community pool balance query callback data") - } - icaType := callbackData.IcaType - denom := callbackData.Denom - - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_CommunityPoolIcaBalance, - "Query response - Community Pool Balance: %+v %s %s", amount, icaType.String(), denom)) - - // Confirm the balance is greater than zero for now... - // ...perhaps use a positive threshold in the future to avoid work when transfer would be small - if amount.LTE(sdkmath.ZeroInt()) { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_CommunityPoolIcaBalance, - "No need to transfer tokens -- not enough found %v %s", amount, denom)) - return nil - } - - token := sdk.NewCoin(denom, amount) - - // Based on the account type, we kick off the relevant ICA (transfer or fund) - // If either of the ICAs fails midway through it's invocation, we swallow the - // error and revert any partial state so that the query response submission can finish - if icaType == types.ICAAccountType_COMMUNITY_POOL_DEPOSIT { - // Send ICA msg to kick off transfer from deposit ICA to stake holding address - err := utils.ApplyFuncIfNoError(ctx, func(c sdk.Context) error { - return k.TransferCommunityPoolDepositToHolding(ctx, hostZone, token) - }) - if err != nil { - k.Logger(ctx).Error(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_CommunityPoolIcaBalance, - "Initiating transfer to holding address failed: %s", err.Error())) - } - } else if icaType == types.ICAAccountType_COMMUNITY_POOL_RETURN { - // Send ICA msg to FundCommunityPool with token found in return ICA - err := utils.ApplyFuncIfNoError(ctx, func(c sdk.Context) error { - return k.FundCommunityPool(ctx, hostZone, token, icaType) - }) - if err != nil { - k.Logger(ctx).Error(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_CommunityPoolIcaBalance, - "Initiating community pool fund failed: %s", err.Error())) - } - } - - return nil -} diff --git a/x/stakeibc/keeper/icqcallbacks_delegator_shares.go b/x/stakeibc/keeper/icqcallbacks_delegator_shares.go deleted file mode 100644 index 41f6a845c..000000000 --- a/x/stakeibc/keeper/icqcallbacks_delegator_shares.go +++ /dev/null @@ -1,255 +0,0 @@ -package keeper - -import ( - "fmt" - - sdkmath "cosmossdk.io/math" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - stakingtypes "github.com/initia-labs/initia/x/mstaking/types" - "github.com/spf13/cast" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// DelegatorSharesCallback is a callback handler for UpdateValidatorSharesExchRate queries. -// -// In an attempt to get the ICA's delegation amount on a given validator, we have to query: -// 1. the validator's internal shares to tokens rate -// 2. the Delegation ICA's delegated shares -// And apply the following equation: -// numTokens = numShares * sharesToTokensRate -// -// This is the callback from query #2 -// -// Note: for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key" -func DelegatorSharesCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_Delegation, - "Starting delegator shares callback, QueryId: %vs, QueryType: %s, Connection: %s", query.Id, query.QueryType, query.ConnectionId)) - - // Confirm host exists - chainId := query.ChainId - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "no registered zone for queried chain ID (%s)", chainId) - } - - // Unmarshal the query response which returns a delegation object for the delegator/validator pair - queriedDelegation := stakingtypes.Delegation{} - err := k.cdc.Unmarshal(args, &queriedDelegation) - if err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal delegator shares query response into Delegation type") - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Delegation, "Query response - Delegator: %s, Validator: %s, Shares: %v", - queriedDelegation.DelegatorAddress, queriedDelegation.ValidatorAddress, queriedDelegation.Shares)) - - // Unmarshal the callback data containing the previous delegation to the validator (from the time the query was submitted) - var callbackData types.DelegatorSharesQueryCallback - if err := proto.Unmarshal(query.CallbackData, &callbackData); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal delegator shares callback data") - } - - // Grab the validator object from the hostZone using the address returned from the query - validator, valIndex, found := GetValidatorFromAddress(hostZone.Validators, queriedDelegation.ValidatorAddress) - if !found { - return errorsmod.Wrapf(types.ErrValidatorNotFound, "no registered validator for address (%s)", queriedDelegation.ValidatorAddress) - } - - // Check if the ICQ overlapped a delegation, undelegation, or detokenization ICA - // that would have modfied the number of delegated tokens - prevInternalDelegation := callbackData.InitialValidatorDelegation - currInternalDelegation := validator.Delegation - icaOverlappedIcq, err := k.CheckDelegationChangedDuringQuery(ctx, validator, prevInternalDelegation, currInternalDelegation) - if err != nil { - return err - } - - // If the ICA/ICQ overlapped, submit a new query - if icaOverlappedIcq { - // Store the updated validator delegation amount - callbackDataBz, err := proto.Marshal(&types.DelegatorSharesQueryCallback{ - InitialValidatorDelegation: currInternalDelegation, - }) - if err != nil { - return errorsmod.Wrapf(err, "unable to marshal delegator shares callback data") - } - query.CallbackData = callbackDataBz - - if err := k.interchainQueryKeeper.RetryICQRequest(ctx, query); err != nil { - return errorsmod.Wrapf(err, "unable to resubmit delegator shares query") - } - return nil - } - - // If there was no ICA/ICQ overlap, update the validator to indicate that the query - // is no longer in progress (which will unblock LSM liquid stakes to that validator) - validator.SlashQueryInProgress = false - hostZone.Validators[valIndex] = &validator - k.SetHostZone(ctx, hostZone) - - // Confirm the validator was slashed by looking at the number of tokens associated with the delegation - validatorWasSlashed, delegatedTokens, err := k.CheckForSlash(ctx, hostZone, valIndex, queriedDelegation) - if err != nil { - return err - } - // If the validator was not slashed, exit now - if !validatorWasSlashed { - return nil - } - - // If the validator was slashed and the query did not overlap any ICAs, update the internal record keeping - if err := k.SlashValidatorOnHostZone(ctx, hostZone, valIndex, delegatedTokens); err != nil { - return err - } - - return nil -} - -// The number of tokens returned from the query must be consistent with the tokens -// stored in our internal record keeping during this callback, otherwise the comparison -// between the two is invalidated -// -// As a result, we must avoid a race condition between the ICQ and a delegate, undelegate, -// redelegate, or detokenization ICA -// -// More specifically, we must avoid the following cases: -// -// Case 1) -// ICQ Lands on Host ICQ Ack on Stride -// ICA Lands on Host ICA Ack on Stride -// Case 2) -// ICA Lands on Host ICA Ack on Stride -// ICQ Lands on Host ICQ Ack on Stride -// -// We can prevent Case #1 by checking if the delegation total on the validator has changed -// while the query was in flight -// -// We can prevent Case #2 by checking if the validator has a delegation change in progress -func (k Keeper) CheckDelegationChangedDuringQuery( - ctx sdk.Context, - validator types.Validator, - previousInternalDelegation sdkmath.Int, - currentInternalDelegation sdkmath.Int, -) (overlapped bool, err error) { - // Confirm the delegation total in the internal record keeping has not changed while the query was inflight - // If it has changed, exit this callback (to prevent any accounting errors) and resubmit the query - if !currentInternalDelegation.Equal(previousInternalDelegation) { - k.Logger(ctx).Error(fmt.Sprintf( - "Validator (%s) delegation changed while delegator shares query was in flight. Resubmitting query", validator.Address)) - return true, nil - } - - // Confirm there isn't currently an active delegation change ICA for this validator - if validator.DelegationChangesInProgress > 0 { - k.Logger(ctx).Error(fmt.Sprintf( - "Validator (%s) has %d delegation changing ICAs in progress. Resubmitting query ", - validator.Address, validator.DelegationChangesInProgress)) - return true, nil - } - - return false, nil -} - -// Check if a slash occurred by comparing the validator's sharesToTokens rate and delegator shares -// from the query responses (tokens = shares * sharesToTokensRate) -// -// If the change in delegation only differs by a small precision error, it was likely -// due to an decimal -> int truncation that occurs during unbonding. In this case, still update the validator -// -// If the change in delegation was an increase, the response can't be trusted so an error is thrown -func (k Keeper) CheckForSlash( - ctx sdk.Context, - hostZone types.HostZone, - valIndex int64, - queriedDelegation stakingtypes.Delegation, -) (validatorWasSlashed bool, delegatedTokens sdkmath.Int, err error) { - chainId := hostZone.ChainId - validator := hostZone.Validators[valIndex] - - // Calculate the number of tokens delegated (using the internal sharesToTokensRate) - // note: truncateInt per https://github.com/cosmos/cosmos-sdk/blob/cb31043d35bad90c4daa923bb109f38fd092feda/x/staking/types/validator.go#L431 - delegatedTokens = queriedDelegation.Shares.AmountOf(hostZone.HostDenom).Mul(validator.SharesToTokensRate).TruncateInt() - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Delegation, - "Previous Delegation: %v, Current Delegation: %v", validator.Delegation, delegatedTokens)) - - // Confirm the validator has actually been slashed - if delegatedTokens.Equal(validator.Delegation) { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Delegation, "Validator was not slashed")) - return false, delegatedTokens, nil - } - - // If the true delegation is slightly higher than our record keeping, this could be due to float imprecision - // Correct record keeping accordingly - precisionErrorThreshold := sdkmath.NewInt(1000) - precisionError := delegatedTokens.Sub(validator.Delegation) - if precisionError.IsPositive() && precisionError.LTE(precisionErrorThreshold) { - // Update the validator on the host zone - validator.Delegation = validator.Delegation.Add(precisionError) - hostZone.TotalDelegations = hostZone.TotalDelegations.Add(precisionError) - - hostZone.Validators[valIndex] = validator - k.SetHostZone(ctx, hostZone) - - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Delegation, - "Delegation updated to %v", validator.Delegation)) - - return false, delegatedTokens, nil - } - - // If the delegation returned from the query is much higher than our record keeping, exit with an error - if delegatedTokens.GT(validator.Delegation) { - return false, delegatedTokens, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, - "Validator (%s) tokens returned from query is greater than the Delegation", validator.Address) - } - - return true, delegatedTokens, nil -} - -// Update the accounting on the host zone and validator to record the slash -// NOTE: we assume any decrease in delegation amt that's not tracked via records is a slash -func (k Keeper) SlashValidatorOnHostZone(ctx sdk.Context, hostZone types.HostZone, valIndex int64, delegatedTokens sdkmath.Int) error { - chainId := hostZone.ChainId - validator := hostZone.Validators[valIndex] - - // There is a check upstream to verify that validator.Delegation is not 0 - // This check is to explicitly avoid a division by zero error - if validator.Delegation.IsZero() { - return errorsmod.Wrapf(types.ErrDivisionByZero, "Zero Delegation has caused division by zero from validator, %+v", validator) - } - - // Get slash percentage - slashAmount := validator.Delegation.Sub(delegatedTokens) - slashPct := sdkmath.LegacyNewDecFromInt(slashAmount).Quo(sdkmath.LegacyNewDecFromInt(validator.Delegation)) - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Delegation, - "Validator was slashed! Validator: %s, Delegator: %s, Delegation in State: %v, Delegation from ICQ %v, Slash Amount: %v, Slash Pct: %v", - validator.Address, hostZone.DelegationIcaAddress, validator.Delegation, delegatedTokens, slashAmount, slashPct)) - - // Update the validator weight and delegation reflect to reflect the slash - weight, err := cast.ToInt64E(validator.Weight) - if err != nil { - return errorsmod.Wrapf(types.ErrIntCast, "unable to convert validator weight to int64, err: %s", err.Error()) - } - weightAdjustment := sdkmath.LegacyNewDecFromInt(delegatedTokens).Quo(sdkmath.LegacyNewDecFromInt(validator.Delegation)) - - validator.Weight = sdkmath.LegacyNewDec(weight).Mul(weightAdjustment).TruncateInt().Uint64() - validator.Delegation = validator.Delegation.Sub(slashAmount) - - // Update the validator on the host zone - hostZone.TotalDelegations = hostZone.TotalDelegations.Sub(slashAmount) - hostZone.Validators[valIndex] = validator - k.SetHostZone(ctx, hostZone) - - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Delegation, - "Delegation updated to: %v, Weight updated to: %v", validator.Delegation, validator.Weight)) - - // Update the redemption rate - depositRecords := k.recordsKeeper.GetAllDepositRecord(ctx) - k.UpdateRedemptionRateForHostZone(ctx, hostZone, depositRecords) - - return nil -} diff --git a/x/stakeibc/keeper/icqcallbacks_fee_balance.go b/x/stakeibc/keeper/icqcallbacks_fee_balance.go deleted file mode 100644 index 5a61a7a10..000000000 --- a/x/stakeibc/keeper/icqcallbacks_fee_balance.go +++ /dev/null @@ -1,92 +0,0 @@ -package keeper - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" - - errorsmod "cosmossdk.io/errors" - ibctypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - - "github.com/milkyway-labs/milkyway/utils" - epochtypes "github.com/milkyway-labs/milkyway/x/epochs/types" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// FeeBalanceCallback is a callback handler for FeeBalnce queries. -// The query response will return the fee account balance -// If the balance is non-zero, an ICA MsgTransfer is initated to the RewardsCollector account -// Note: for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key" -func FeeBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_FeeBalance, - "Starting fee balance callback, QueryId: %vs, QueryType: %s, Connection: %s", query.Id, query.QueryType, query.ConnectionId)) - - // Confirm host exists - chainId := query.ChainId - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "no registered zone for queried chain ID (%s)", chainId) - } - - // Unmarshal the query response args to determine the balance - feeBalanceAmount, err := types.UnmarshalAmountFromMoveBankBalanceQuery(args) - if err != nil { - return errorsmod.Wrap(err, "unable to determine balance from query response") - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_FeeBalance, - "Query response - Fee Balance: %v %s", feeBalanceAmount, hostZone.HostDenom)) - - // Confirm the balance is greater than zero - if feeBalanceAmount.LTE(sdkmath.ZeroInt()) { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_FeeBalance, - "No balance to transfer for address: %s, balance: %v", hostZone.FeeIcaAddress, feeBalanceAmount)) - return nil - } - - // Confirm the fee account has been initiated - if hostZone.FeeIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no fee account found for %s", chainId) - } - - // The ICA and transfer should both timeout before the end of the epoch - timeout, err := k.GetICATimeoutNanos(ctx, epochtypes.STRIDE_EPOCH) - if err != nil { - return errorsmod.Wrapf(err, "Failed to get ICATimeout from %s epoch", epochtypes.STRIDE_EPOCH) - } - - // get counterparty chain's transfer channel - transferChannel, found := k.ibcKeeper.ChannelKeeper.GetChannel(ctx, transfertypes.PortID, hostZone.TransferChannelId) - if !found { - return errorsmod.Wrapf(channeltypes.ErrChannelNotFound, "transfer channel %s not found", hostZone.TransferChannelId) - } - counterpartyChannelId := transferChannel.Counterparty.ChannelId - - // Prepare a MsgTransfer from the fee account to the rewards collector account - rewardsCoin := sdk.NewCoin(hostZone.HostDenom, feeBalanceAmount) - rewardsCollectorAddress := k.accountKeeper.GetModuleAccount(ctx, types.RewardCollectorName).GetAddress() - transferMsg := ibctypes.NewMsgTransfer( - transfertypes.PortID, - counterpartyChannelId, - rewardsCoin, - hostZone.FeeIcaAddress, - rewardsCollectorAddress.String(), - clienttypes.Height{}, - timeout, - "", - ) - - msgs := []proto.Message{transferMsg} - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_FeeBalance, - "Preparing MsgTransfer of %v from the fee account to the rewards collector module account (for commission)", rewardsCoin.String())) - - // Send the transaction through SubmitTx - if _, err := k.SubmitTxsStrideEpoch(ctx, hostZone.ConnectionId, msgs, types.ICAAccountType_FEE, ICACallbackID_Reinvest, nil); err != nil { - return errorsmod.Wrapf(types.ErrICATxFailed, "Failed to SubmitTxs, Messages: %v, err: %s", msgs, err.Error()) - } - - return nil -} diff --git a/x/stakeibc/keeper/icqcallbacks_pool_price.go b/x/stakeibc/keeper/icqcallbacks_pool_price.go deleted file mode 100644 index 91e7bab4d..000000000 --- a/x/stakeibc/keeper/icqcallbacks_pool_price.go +++ /dev/null @@ -1,98 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// PoolPriceCallback is a callback handler for PoolPrice query. -// The query response returns an Osmosis TwapRecord for the associated pool denom's -// -// The assets in the response are identified by indicies and are sorted alphabetically -// (e.g. if the two denom's are ibc/AXXX, and ibc/BXXX, -// then Asset0Denom is ibc/AXXX and Asset1Denom is ibc/BXXX) -// -// The price fields (P0LastSpotPrice and P1LastSpotPrice) represent the relative -// ratios of tokens in the pool -// -// P0LastSpotPrice gives the ratio of Asset0Denom / Asset1Denom -// P1LastSpotPrice gives the ratio of Asset1Denom / Asset0Denom -// -// When storing down the price, we want to store down the ratio of HostDenom. -// Meaning, if Asset0Denom is the host denom, we want to store P0LastSpotPrice -func PoolPriceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_PoolPrice, - "Starting pool spot price callback, QueryId: %vs, QueryType: %s, Connection: %s", query.Id, query.QueryType, query.ConnectionId)) - - chainId := query.ChainId // should be the tradeZoneId, used in logging - - // Unmarshal the query response args, should be a TwapRecord type - var twapRecord types.OsmosisTwapRecord - err := twapRecord.Unmarshal(args) - if err != nil { - return errorsmod.Wrap(err, "unable to unmarshal the query response") - } - - // Unmarshal the callback data containing the tradeRoute we are on - var tradeRouteCallback types.TradeRouteCallback - if err := proto.Unmarshal(query.CallbackData, &tradeRouteCallback); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal trade reward balance callback data") - } - - // Lookup the trade route from the keys in the callback - tradeRoute, found := k.GetTradeRoute(ctx, tradeRouteCallback.RewardDenom, tradeRouteCallback.HostDenom) - if !found { - return types.ErrTradeRouteNotFound.Wrapf("trade route from %s to %s not found", - tradeRouteCallback.RewardDenom, tradeRouteCallback.HostDenom) - } - - // Confirm the denom's from the query response match the denom's in the route - if err := AssertTwapAssetsMatchTradeRoute(twapRecord, tradeRoute); err != nil { - return err - } - - // Get the associate "SpotPrice" from the twap record, based on the asset ordering - // The "SpotPrice" is actually a ratio of the assets in the pool - var price sdkmath.LegacyDec - if twapRecord.Asset0Denom == tradeRoute.HostDenomOnTradeZone { - price = twapRecord.P0LastSpotPrice - } else { - price = twapRecord.P1LastSpotPrice - } - - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_PoolPrice, - "Query response - price ratio of %s to %s is %s", - tradeRoute.RewardDenomOnTradeZone, tradeRoute.HostDenomOnTradeZone, price)) - - // Update the price and time on the trade route data - tradeRoute.TradeConfig.SwapPrice = price - tradeRoute.TradeConfig.PriceUpdateTimestamp = uint64(ctx.BlockTime().UnixNano()) - k.SetTradeRoute(ctx, tradeRoute) - - return nil -} - -// Helper function to confirm that the two assets in the twap record match the assets in the trade route -// The assets in the twap record are sorted alphabetically, so we have to check both orderings -func AssertTwapAssetsMatchTradeRoute(twapRecord types.OsmosisTwapRecord, tradeRoute types.TradeRoute) error { - hostDenomMatchFirst := twapRecord.Asset0Denom == tradeRoute.HostDenomOnTradeZone - rewardDenomMatchSecond := twapRecord.Asset1Denom == tradeRoute.RewardDenomOnTradeZone - - rewardDenomMatchFirst := twapRecord.Asset0Denom == tradeRoute.RewardDenomOnTradeZone - hostDenomMatchSecond := twapRecord.Asset1Denom == tradeRoute.HostDenomOnTradeZone - - if (hostDenomMatchFirst && rewardDenomMatchSecond) || (rewardDenomMatchFirst && hostDenomMatchSecond) { - return nil - } - - return fmt.Errorf("Assets in query response (%s, %s) do not match denom's from trade route (%s, %s)", - twapRecord.Asset0Denom, twapRecord.Asset1Denom, tradeRoute.HostDenomOnTradeZone, tradeRoute.RewardDenomOnTradeZone) -} diff --git a/x/stakeibc/keeper/icqcallbacks_trade_converted_balance.go b/x/stakeibc/keeper/icqcallbacks_trade_converted_balance.go deleted file mode 100644 index 7459dc869..000000000 --- a/x/stakeibc/keeper/icqcallbacks_trade_converted_balance.go +++ /dev/null @@ -1,64 +0,0 @@ -package keeper - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/gogoproto/proto" - - icqkeeper "github.com/milkyway-labs/milkyway/x/interchainquery/keeper" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// TradeConvertedBalanceCallback is a callback handler for TradeConvertedBalance queries. -// The query response will return the trade account balance for a converted (foreign ibc) denom -// If the balance is non-zero, ICA MsgSends are submitted to transfer the discovered balance back to hostZone -// -// Note: for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key" -func TradeConvertedBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_TradeConvertedBalance, - "Starting trade converted balance callback, QueryId: %vs, QueryType: %s, Connection: %s", query.Id, query.QueryType, query.ConnectionId)) - - chainId := query.ChainId // should be the tradeZoneId - - // Unmarshal the query response args to determine the balance - tradeConvertedBalanceAmount, err := icqkeeper.UnmarshalAmountFromBalanceQuery(k.cdc, args) - if err != nil { - return errorsmod.Wrap(err, "unable to determine balance from query response") - } - - // Unmarshal the callback data containing the tradeRoute we are on - var tradeRouteCallback types.TradeRouteCallback - if err := proto.Unmarshal(query.CallbackData, &tradeRouteCallback); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal trade reward balance callback data") - } - - // Lookup the trade route from the keys in the callback - tradeRoute, found := k.GetTradeRoute(ctx, tradeRouteCallback.RewardDenom, tradeRouteCallback.HostDenom) - if !found { - return types.ErrTradeRouteNotFound.Wrapf("trade route from %s to %s not found", - tradeRouteCallback.RewardDenom, tradeRouteCallback.HostDenom) - } - - // Confirm the balance is greater than zero, or else exit with no further action - if tradeConvertedBalanceAmount.LTE(sdkmath.ZeroInt()) { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_TradeConvertedBalance, - "Not enough balance of traded tokens yet, balance: %v", tradeConvertedBalanceAmount)) - return nil - } - - // Using ICA commands on the trade address, transfer the found converted tokens from the trade zone to the host zone - if err := k.TransferConvertedTokensTradeToHost(ctx, tradeConvertedBalanceAmount, tradeRoute); err != nil { - return errorsmod.Wrapf(err, "initiating transfer of converted tokens to back to host zone failed") - } - - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_TradeConvertedBalance, - "Sending discovered converted tokens %v %s from tradeZone back to hostZone", - tradeConvertedBalanceAmount, tradeRoute.HostDenomOnTradeZone)) - - return nil -} diff --git a/x/stakeibc/keeper/icqcallbacks_trade_reward_balance.go b/x/stakeibc/keeper/icqcallbacks_trade_reward_balance.go deleted file mode 100644 index 76409f308..000000000 --- a/x/stakeibc/keeper/icqcallbacks_trade_reward_balance.go +++ /dev/null @@ -1,66 +0,0 @@ -package keeper - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/gogoproto/proto" - - icqkeeper "github.com/milkyway-labs/milkyway/x/interchainquery/keeper" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// TradeRewardBalanceCallback is a callback handler for TradeRewardBalance queries. -// The query response will return the trade ICA account balance for a specific (foreign ibc) denom -// If the balance is non-zero, ICA MsgSends are submitted to initiate a swap on the tradeZone -// -// Note: for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key" -func TradeRewardBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_TradeRewardBalance, - "Starting withdrawal reward balance callback, QueryId: %vs, QueryType: %s, Connection: %s", query.Id, query.QueryType, query.ConnectionId)) - - chainId := query.ChainId // should be the tradeZoneId, used in logging - - // Unmarshal the query response args to determine the balance - tradeRewardBalanceAmount, err := icqkeeper.UnmarshalAmountFromBalanceQuery(k.cdc, args) - if err != nil { - return errorsmod.Wrap(err, "unable to determine balance from query response") - } - - // Confirm the balance is greater than zero, or else exit without further action for now - if tradeRewardBalanceAmount.LTE(sdkmath.ZeroInt()) { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_TradeRewardBalance, - "Not enough reward tokens found in trade ICA, balance: %+v", tradeRewardBalanceAmount)) - return nil - } - - // Unmarshal the callback data containing the tradeRoute we are on - var tradeRouteCallback types.TradeRouteCallback - if err := proto.Unmarshal(query.CallbackData, &tradeRouteCallback); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal trade reward balance callback data") - } - - // Lookup the trade route from the keys in the callback - tradeRoute, found := k.GetTradeRoute(ctx, tradeRouteCallback.RewardDenom, tradeRouteCallback.HostDenom) - if !found { - return types.ErrTradeRouteNotFound.Wrapf("trade route from %s to %s not found", - tradeRouteCallback.RewardDenom, tradeRouteCallback.HostDenom) - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_TradeRewardBalance, - "Query response - Withdrawal Reward Balance: %v %s", tradeRewardBalanceAmount, tradeRoute.RewardDenomOnTradeZone)) - - // Trade all found reward tokens in the trade ICA to the output denom of their trade pool - if err := k.SwapRewardTokens(ctx, tradeRewardBalanceAmount, tradeRoute); err != nil { - return errorsmod.Wrapf(err, "unable to swap reward tokens") - } - - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_TradeRewardBalance, - "Swapping discovered reward tokens %v %s for %s", - tradeRewardBalanceAmount, tradeRoute.RewardDenomOnTradeZone, tradeRoute.HostDenomOnTradeZone)) - - return nil -} diff --git a/x/stakeibc/keeper/icqcallbacks_validator_exchange_rate.go b/x/stakeibc/keeper/icqcallbacks_validator_exchange_rate.go deleted file mode 100644 index f84941768..000000000 --- a/x/stakeibc/keeper/icqcallbacks_validator_exchange_rate.go +++ /dev/null @@ -1,196 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/gogoproto/proto" - - stakingtypes "github.com/initia-labs/initia/x/mstaking/types" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// ValidatorCallback is a callback handler for validator queries. -// -// In an attempt to get the ICA's delegation amount on a given validator, we have to query: -// 1. the validator's internal sharesToTokens rate -// 2. the Delegation ICA's delegated shares -// And apply the following equation: -// numTokens = numShares * sharesToTokensRate -// -// This is the callback from query #1 -// We only issue query #2 if the validator sharesToTokens rate from #1 has changed (indicating a slash) -func ValidatorSharesToTokensRateCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_Validator, - "Starting validator sharesToTokens rate balance callback, QueryId: %vs, QueryType: %s, Connection: %s", - query.Id, query.QueryType, query.ConnectionId)) - - // Confirm host exists - chainId := query.ChainId - hostZone, found := k.GetHostZone(ctx, query.ChainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "no registered zone for queried chain ID (%s)", chainId) - } - - // Determine if we're in a callback for the LSMLiquidStake by checking if the callback data is non-empty - // If this query was triggered manually, the callback data will be empty - inLSMLiquidStakeCallback := len(query.CallbackData) != 0 - - // If the query timed out, either fail the LSM liquid stake or, if this query was submitted manually, do nothing - if query.HasTimedOut(ctx.BlockTime()) { - if inLSMLiquidStakeCallback { - return k.LSMSlashQueryTimeout(ctx, hostZone, query) - } - return nil - } - - // Unmarshal the query response args into a Validator struct - queriedValidator := stakingtypes.Validator{} - if err := k.cdc.Unmarshal(args, &queriedValidator); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal query response into Validator type") - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_Validator, - "Query response - Validator: %s, Jailed: %v, Tokens: %v, Shares: %v", - queriedValidator.OperatorAddress, queriedValidator.Jailed, queriedValidator.Tokens, queriedValidator.DelegatorShares)) - - // Check the query response to identify if the validator was slashed - validatorWasSlashed, err := k.CheckIfValidatorWasSlashed(ctx, hostZone, queriedValidator) - if err != nil { - return err - } - - // If we are in the LSMLiquidStake callback, finish the transaction - if inLSMLiquidStakeCallback { - if err := k.LSMSlashQueryCallback(ctx, hostZone, query, validatorWasSlashed); err != nil { - return errorsmod.Wrapf(err, "unable to finish LSM liquid stake") - } - } - - // If the validator was slashed, we'll have to issue a delegator shares query to determine - // the magnitude of the slash - if validatorWasSlashed { - if err := k.SubmitDelegationICQ(ctx, hostZone, queriedValidator.OperatorAddress); err != nil { - return errorsmod.Wrapf(err, "Failed to submit ICQ validator delegations") - } - } - - return nil -} - -// Determines if the validator was slashed by comparing the validator sharesToTokens rate from the query response -// with the sharesToTokens rate stored on the validator -func (k Keeper) CheckIfValidatorWasSlashed( - ctx sdk.Context, - hostZone types.HostZone, - queriedValidator stakingtypes.Validator, -) (validatorWasSlashed bool, err error) { - // Get the validator from the host zone - validator, valIndex, found := GetValidatorFromAddress(hostZone.Validators, queriedValidator.OperatorAddress) - if !found { - return false, errorsmod.Wrapf(types.ErrValidatorNotFound, "no registered validator for address (%s)", queriedValidator.OperatorAddress) - } - previousSharesToTokensRate := validator.SharesToTokensRate - - // If the validator's delegation shares is 0, we'll get a division by zero error when trying to get the sharesToTokens rate - // because `validator.TokensFromShares` uses delegation shares in the denominator - if queriedValidator.DelegatorShares.IsZero() { - return false, errorsmod.Wrapf(types.ErrDivisionByZero, - "can't calculate validator internal sharesToTokens rate because delegation amount is 0 (validator: %s)", validator.Address) - } - - // We want the validator's internal sharesToTokens rate which is held internally - // behind the inverse of the function `validator.TokensFromShares` - // Since, - // sharesToTokensRate = numTokens / numShares - // We can use `validator.TokensFromShares`, plug in 1.0 for the number of shares, - // and the returned number of tokens will be equal to the internal sharesToTokens rate - currentSharesToTokensRate := queriedValidator.TokensFromShares( - sdk.NewDecCoins(sdk.NewInt64DecCoin(hostZone.HostDenom, 1))).AmountOf(hostZone.HostDenom) - validator.SharesToTokensRate = currentSharesToTokensRate - hostZone.Validators[valIndex] = &validator - k.SetHostZone(ctx, hostZone) - - // Check if the validator was slashed by comparing the sharesToTokens rate from the query - // with the preivously stored sharesToTokens rate - previousSharesToTokensRateKnown := !previousSharesToTokensRate.IsNil() && previousSharesToTokensRate.IsPositive() - validatorWasSlashed = previousSharesToTokensRateKnown && !previousSharesToTokensRate.Equal(currentSharesToTokensRate) - - if !validatorWasSlashed { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(hostZone.ChainId, ICQCallbackID_Validator, - "Validator was not slashed")) - return false, nil - } - - // Emit an event if the validator was slashed - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(hostZone.ChainId, ICQCallbackID_Validator, - "Previous Validator SharesToTokens Rate: %v, Current Validator SharesToTokens Rate: %v", - previousSharesToTokensRate, currentSharesToTokensRate)) - - EmitValidatorSharesToTokensRateChangeEvent(ctx, hostZone.ChainId, validator.Address, previousSharesToTokensRate, currentSharesToTokensRate) - - return true, nil -} - -// Fails the LSM Liquid Stake if the query timed out -func (k Keeper) LSMSlashQueryTimeout(ctx sdk.Context, hostZone types.HostZone, query icqtypes.Query) error { - var callbackData types.ValidatorSharesToTokensQueryCallback - if err := proto.Unmarshal(query.CallbackData, &callbackData); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal validator sharesToTokens rate callback data") - } - lsmLiquidStake := *callbackData.LsmLiquidStake - - k.FailLSMLiquidStake(ctx, hostZone, lsmLiquidStake, "query timed out") - return nil -} - -// Callback handler for if the slash query was initiated by an LSMLiquidStake transaction -// If the validator was slashed, the LSMLiquidStake should be rejected -// If the validator was not slashed, the LSMLiquidStake should finish to mint the user stTokens -func (k Keeper) LSMSlashQueryCallback( - ctx sdk.Context, - hostZone types.HostZone, - query icqtypes.Query, - validatorWasSlashed bool, -) error { - var callbackData types.ValidatorSharesToTokensQueryCallback - if err := proto.Unmarshal(query.CallbackData, &callbackData); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal validator sharesToTokens rate callback data") - } - lsmLiquidStake := *callbackData.LsmLiquidStake - - // If the validator was slashed, fail the liquid stake - if validatorWasSlashed { - k.FailLSMLiquidStake(ctx, hostZone, lsmLiquidStake, "validator was slashed, failing LSMLiquidStake") - return nil - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(hostZone.ChainId, ICQCallbackID_Validator, - "Validator was not slashed, finishing LSM liquid stake")) - - // Finish the LSMLiquidStake with a temporary context so that the state changes can - // be discarded if it errors - err := utils.ApplyFuncIfNoError(ctx, func(ctx sdk.Context) error { - async := true - return k.FinishLSMLiquidStake(ctx, lsmLiquidStake, async) - }) - - // If finishing the transaction failed, emit an event and remove the LSMTokenDeposit - if err != nil { - k.FailLSMLiquidStake(ctx, hostZone, lsmLiquidStake, - fmt.Sprintf("lsm liquid stake callback failed after slash query: %s", err.Error())) - } - - return nil -} - -// Fail an LSMLiquidStake transaction by emitting an event and removing the LSMTokenDeposit record -func (k Keeper) FailLSMLiquidStake(ctx sdk.Context, hostZone types.HostZone, lsmLiquidStake types.LSMLiquidStake, errorMessage string) { - EmitFailedLSMLiquidStakeEvent(ctx, hostZone, *lsmLiquidStake.Deposit, errorMessage) - k.Logger(ctx).Error(errorMessage) - - // Remove the LSMTokenDeposit - k.recordsKeeper.RemoveLSMTokenDeposit(ctx, lsmLiquidStake.Deposit.ChainId, lsmLiquidStake.Deposit.Denom) -} diff --git a/x/stakeibc/keeper/icqcallbacks_withdrawal_host_balance.go b/x/stakeibc/keeper/icqcallbacks_withdrawal_host_balance.go deleted file mode 100644 index e33ec4102..000000000 --- a/x/stakeibc/keeper/icqcallbacks_withdrawal_host_balance.go +++ /dev/null @@ -1,123 +0,0 @@ -package keeper - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/gogoproto/proto" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// WithdrawalHostBalanceCallback is a callback handler for WithdrawalBalance queries. -// The query response will return the withdrawal account balance for the native denom (i.e. "host denom") -// If the balance is non-zero, ICA MsgSends are submitted to transfer from the withdrawal account -// to the delegation account (for reinvestment) and fee account (for commission) -// -// Note: for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key" -func WithdrawalHostBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_WithdrawalHostBalance, - "Starting withdrawal balance callback, QueryId: %vs, QueryType: %s, Connection: %s", query.Id, query.QueryType, query.ConnectionId)) - - // Confirm host exists - chainId := query.ChainId - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "no registered zone for queried chain ID (%s)", chainId) - } - - // Unmarshal the query response args to determine the balance - withdrawalBalanceAmount, err := types.UnmarshalAmountFromMoveBankBalanceQuery(args) - if err != nil { - return errorsmod.Wrap(err, "unable to determine balance from query response") - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_WithdrawalHostBalance, - "Query response - Withdrawal Balance: %v %s", withdrawalBalanceAmount, hostZone.HostDenom)) - - // Confirm the balance is greater than zero - if withdrawalBalanceAmount.LTE(sdkmath.ZeroInt()) { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_WithdrawalHostBalance, - "No balance to transfer for address: %s, balance: %v", hostZone.WithdrawalIcaAddress, withdrawalBalanceAmount)) - return nil - } - - // Get the host zone's ICA accounts - if hostZone.WithdrawalIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no withdrawal account found for %s", chainId) - } - if hostZone.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation account found for %s", chainId) - } - if hostZone.FeeIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no fee account found for %s", chainId) - } - - // Split the withdrawal amount into the stride fee and reinvest portion - rewardsSplit, err := k.CalculateRewardsSplit(ctx, hostZone, withdrawalBalanceAmount) - if err != nil { - return errorsmod.Wrapf(err, "unable to split reward amount into fee and reinvest amounts") - } - - // Prepare MsgSends from the withdrawal account - feeCoin := sdk.NewCoin(hostZone.HostDenom, rewardsSplit.StrideFeeAmount) - reinvestCoin := sdk.NewCoin(hostZone.HostDenom, rewardsSplit.ReinvestAmount) - rebateCoin := sdk.NewCoin(hostZone.HostDenom, rewardsSplit.RebateAmount) - - var msgs []proto.Message - if feeCoin.Amount.GT(sdkmath.ZeroInt()) { - msgs = append(msgs, &banktypes.MsgSend{ - FromAddress: hostZone.WithdrawalIcaAddress, - ToAddress: hostZone.FeeIcaAddress, - Amount: sdk.NewCoins(feeCoin), - }) - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_WithdrawalHostBalance, - "Preparing MsgSends of %v from the withdrawal account to the fee account (for commission)", feeCoin.String())) - } - if reinvestCoin.Amount.GT(sdkmath.ZeroInt()) { - msgs = append(msgs, &banktypes.MsgSend{ - FromAddress: hostZone.WithdrawalIcaAddress, - ToAddress: hostZone.DelegationIcaAddress, - Amount: sdk.NewCoins(reinvestCoin), - }) - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_WithdrawalHostBalance, - "Preparing MsgSends of %v from the withdrawal account to the delegation account (for reinvestment)", reinvestCoin.String())) - } - if rebateCoin.Amount.GT(sdkmath.ZeroInt()) { - fundMsg, err := k.BuildFundCommunityPoolMsg(ctx, hostZone, sdk.NewCoins(rebateCoin), types.ICAAccountType_WITHDRAWAL) - if err != nil { - return err - } - msgs = append(msgs, fundMsg...) - } - - // add callback data before calling reinvestment ICA - reinvestCallback := types.ReinvestCallback{ - ReinvestAmount: reinvestCoin, - HostZoneId: hostZone.ChainId, - } - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_WithdrawalHostBalance, "Marshalling ReinvestCallback args: %v", reinvestCallback)) - marshalledCallbackArgs, err := k.MarshalReinvestCallbackArgs(ctx, reinvestCallback) - if err != nil { - return err - } - - // Send the transaction through SubmitTx - _, err = k.SubmitTxsStrideEpoch(ctx, hostZone.ConnectionId, msgs, types.ICAAccountType_WITHDRAWAL, ICACallbackID_Reinvest, marshalledCallbackArgs) - if err != nil { - return errorsmod.Wrapf(types.ErrICATxFailed, "Failed to SubmitTxs, Messages: %v, err: %s", msgs, err.Error()) - } - - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute("hostZone", hostZone.ChainId), - sdk.NewAttribute("totalWithdrawalBalance", withdrawalBalanceAmount.String()), - ), - ) - - return nil -} diff --git a/x/stakeibc/keeper/icqcallbacks_withdrawal_reward_balance.go b/x/stakeibc/keeper/icqcallbacks_withdrawal_reward_balance.go deleted file mode 100644 index 083775184..000000000 --- a/x/stakeibc/keeper/icqcallbacks_withdrawal_reward_balance.go +++ /dev/null @@ -1,66 +0,0 @@ -package keeper - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - "github.com/cosmos/gogoproto/proto" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// WithdrawalRewardBalanceCallback is a callback handler for WithdrawalRewardBalance queries. -// The query response will return the withdrawal account balance for the reward denom in the case -// of a host zone with a trade route (e.g. USDC in the case of the dYdX trade route) -// If the balance is non-zero, ICA MsgSends are submitted to transfer the discovered balance to the tradeZone -// -// Note: for now, to get proofs in your ICQs, you need to query the entire store on the host zone! e.g. "store/bank/key" -func WithdrawalRewardBalanceCallback(k Keeper, ctx sdk.Context, args []byte, query icqtypes.Query) error { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(query.ChainId, ICQCallbackID_WithdrawalRewardBalance, - "Starting withdrawal reward balance callback, QueryId: %vs, QueryType: %s, Connection: %s", query.Id, query.QueryType, query.ConnectionId)) - - chainId := query.ChainId - - // Unmarshal the query response args to determine the balance - withdrawalRewardBalanceAmount, err := types.UnmarshalAmountFromMoveBankBalanceQuery(args) - if err != nil { - return errorsmod.Wrap(err, "unable to determine balance from query response") - } - - // Confirm the balance is greater than zero, or else exit early without further action - if withdrawalRewardBalanceAmount.LTE(sdkmath.ZeroInt()) { - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_WithdrawalRewardBalance, - "Not enough reward tokens yet found in withdrawalICA, balance: %v", withdrawalRewardBalanceAmount)) - return nil - } - - // Unmarshal the callback data containing the tradeRoute we are on - var tradeRouteCallback types.TradeRouteCallback - if err := proto.Unmarshal(query.CallbackData, &tradeRouteCallback); err != nil { - return errorsmod.Wrapf(err, "unable to unmarshal trade reward balance callback data") - } - - // Lookup the trade route from the keys in the callback - tradeRoute, found := k.GetTradeRoute(ctx, tradeRouteCallback.RewardDenom, tradeRouteCallback.HostDenom) - if !found { - return types.ErrTradeRouteNotFound.Wrapf("trade route from %s to %s not found", - tradeRouteCallback.RewardDenom, tradeRouteCallback.HostDenom) - } - - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_WithdrawalRewardBalance, - "Query response - Withdrawal Reward Balance: %v %s", withdrawalRewardBalanceAmount, tradeRoute.RewardDenomOnHostZone)) - - // Transfer the reward amount to the trade zone so it can be swapped for the native token - if err := k.TransferRewardTokensHostToTrade(ctx, withdrawalRewardBalanceAmount, tradeRoute); err != nil { - return errorsmod.Wrapf(err, "initiating transfer of reward tokens to trade ICA failed") - } - - k.Logger(ctx).Info(utils.LogICQCallbackWithHostZone(chainId, ICQCallbackID_WithdrawalRewardBalance, - "Sending discovered reward tokens %v %s from hostZone to tradeZone", - withdrawalRewardBalanceAmount, tradeRoute.RewardDenomOnRewardZone)) - - return nil -} diff --git a/x/stakeibc/keeper/interchainaccounts.go b/x/stakeibc/keeper/interchainaccounts.go deleted file mode 100644 index b1f50ff65..000000000 --- a/x/stakeibc/keeper/interchainaccounts.go +++ /dev/null @@ -1,312 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" - "github.com/cosmos/gogoproto/proto" - icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" - icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" - connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" - - "github.com/milkyway-labs/milkyway/utils" - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - icacallbackstypes "github.com/milkyway-labs/milkyway/x/icacallbacks/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -const ( - ClaimRewardsICABatchSize = 10 -) - -func (k Keeper) SetWithdrawalAddressOnHost(ctx sdk.Context, hostZone types.HostZone) error { - // Fetch the relevant ICA - if hostZone.DelegationIcaAddress == "" { - k.Logger(ctx).Error(fmt.Sprintf("Zone %s is missing a delegation address!", hostZone.ChainId)) - return nil - } - - if hostZone.WithdrawalIcaAddress == "" { - k.Logger(ctx).Error(fmt.Sprintf("Zone %s is missing a withdrawal address!", hostZone.ChainId)) - return nil - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Withdrawal Address: %s, Delegator Address: %s", - hostZone.WithdrawalIcaAddress, hostZone.DelegationIcaAddress)) - - // Construct the ICA message - msgs := []proto.Message{ - &distributiontypes.MsgSetWithdrawAddress{ - DelegatorAddress: hostZone.DelegationIcaAddress, - WithdrawAddress: hostZone.WithdrawalIcaAddress, - }, - } - _, err := k.SubmitTxsStrideEpoch(ctx, hostZone.ConnectionId, msgs, types.ICAAccountType_DELEGATION, "", nil) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "Failed to SubmitTxs for %s, %s, %s", hostZone.ConnectionId, hostZone.ChainId, msgs) - } - - return nil -} - -func (k Keeper) ClaimAccruedStakingRewardsOnHost(ctx sdk.Context, hostZone types.HostZone) error { - // Fetch the relevant ICA - if hostZone.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "delegation ICA not found for %s", hostZone.ChainId) - } - if hostZone.WithdrawalIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "withdrawal ICA not found for %s", hostZone.ChainId) - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Withdrawal Address: %s, Delegator Address: %s", - hostZone.WithdrawalIcaAddress, hostZone.DelegationIcaAddress)) - - validators := hostZone.Validators - - // Build multi-message transaction to withdraw rewards from each validator - // batching txs into groups of ClaimRewardsICABatchSize messages, to ensure they will fit in the host's blockSize - for start := 0; start < len(validators); start += ClaimRewardsICABatchSize { - end := start + ClaimRewardsICABatchSize - if end > len(validators) { - end = len(validators) - } - batch := validators[start:end] - msgs := []proto.Message{} - // Iterate over the items within the batch - for _, val := range batch { - // skip withdrawing rewards - if val.Delegation.IsZero() { - continue - } - msg := &distributiontypes.MsgWithdrawDelegatorReward{ - DelegatorAddress: hostZone.DelegationIcaAddress, - ValidatorAddress: val.Address, - } - msgs = append(msgs, msg) - } - - if len(msgs) > 0 { - _, err := k.SubmitTxsStrideEpoch(ctx, hostZone.ConnectionId, msgs, types.ICAAccountType_DELEGATION, "", nil) - if err != nil { - return errorsmod.Wrapf(err, "Failed to SubmitTxs for %s, %s, %s", hostZone.ConnectionId, hostZone.ChainId, msgs) - } - } - } - - return nil -} - -func (k Keeper) SubmitTxsDayEpoch( - ctx sdk.Context, - connectionId string, - msgs []proto.Message, - icaAccountType types.ICAAccountType, - callbackId string, - callbackArgs []byte, -) (uint64, error) { - sequence, err := k.SubmitTxsEpoch(ctx, connectionId, msgs, icaAccountType, epochstypes.DAY_EPOCH, callbackId, callbackArgs) - if err != nil { - return 0, err - } - return sequence, nil -} - -func (k Keeper) SubmitTxsStrideEpoch( - ctx sdk.Context, - connectionId string, - msgs []proto.Message, - icaAccountType types.ICAAccountType, - callbackId string, - callbackArgs []byte, -) (uint64, error) { - sequence, err := k.SubmitTxsEpoch(ctx, connectionId, msgs, icaAccountType, epochstypes.STRIDE_EPOCH, callbackId, callbackArgs) - if err != nil { - return 0, err - } - return sequence, nil -} - -func (k Keeper) SubmitTxsEpoch( - ctx sdk.Context, - connectionId string, - msgs []proto.Message, - icaAccountType types.ICAAccountType, - epochType string, - callbackId string, - callbackArgs []byte, -) (uint64, error) { - timeoutNanosUint64, err := k.GetICATimeoutNanos(ctx, epochType) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Failed to get ICA timeout nanos for epochType %s using param, error: %s", epochType, err.Error())) - return 0, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "Failed to convert timeoutNanos to uint64, error: %s", err.Error()) - } - sequence, err := k.SubmitTxs(ctx, connectionId, msgs, icaAccountType, timeoutNanosUint64, callbackId, callbackArgs) - if err != nil { - return 0, err - } - return sequence, nil -} - -// SubmitTxs submits an ICA transaction containing multiple messages -// This function only supports messages to ICAs on the host zone -func (k Keeper) SubmitTxs( - ctx sdk.Context, - connectionId string, - msgs []proto.Message, - icaAccountType types.ICAAccountType, - timeoutTimestamp uint64, - callbackId string, - callbackArgs []byte, -) (uint64, error) { - chainId, err := k.GetChainIdFromConnectionId(ctx, connectionId) - if err != nil { - return 0, err - } - owner := types.FormatHostZoneICAOwner(chainId, icaAccountType) - portID, err := icatypes.NewControllerPortID(owner) - if err != nil { - return 0, err - } - - k.Logger(ctx).Info(utils.LogWithHostZone(chainId, " Submitting ICA Tx on %s, %s with TTL: %d", portID, connectionId, timeoutTimestamp)) - protoMsgs := []proto.Message{} - for _, msg := range msgs { - k.Logger(ctx).Info(utils.LogWithHostZone(chainId, " Msg: %+v", msg)) - protoMsgs = append(protoMsgs, msg) - } - - channelID, found := k.icaControllerKeeper.GetActiveChannelID(ctx, connectionId, portID) - if !found { - return 0, errorsmod.Wrapf(icatypes.ErrActiveChannelNotFound, "failed to retrieve active channel for port %s", portID) - } - - data, err := icatypes.SerializeCosmosTx(k.cdc, protoMsgs, icatypes.EncodingProtobuf) - if err != nil { - return 0, err - } - - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: data, - } - - // Submit ICA tx - msgServer := icacontrollerkeeper.NewMsgServerImpl(&k.icaControllerKeeper) - relativeTimeoutOffset := timeoutTimestamp - uint64(ctx.BlockTime().UnixNano()) - msgSendTx := icacontrollertypes.NewMsgSendTx(owner, connectionId, relativeTimeoutOffset, packetData) - res, err := msgServer.SendTx(ctx, msgSendTx) - if err != nil { - return 0, err - } - sequence := res.Sequence - - // Store the callback data - if callbackId != "" && callbackArgs != nil { - callback := icacallbackstypes.CallbackData{ - CallbackKey: icacallbackstypes.PacketID(portID, channelID, sequence), - PortId: portID, - ChannelId: channelID, - Sequence: sequence, - CallbackId: callbackId, - CallbackArgs: callbackArgs, - } - k.Logger(ctx).Info(utils.LogWithHostZone(chainId, "Storing callback data: %+v", callback)) - k.icaCallbacksKeeper.SetCallbackData(ctx, callback) - } - - return sequence, nil -} - -func (k Keeper) SubmitICATxWithoutCallback( - ctx sdk.Context, - connectionId string, - icaAccountOwner string, - msgs []proto.Message, - timeoutTimestamp uint64, -) error { - // Serialize tx messages - txBz, err := icatypes.SerializeCosmosTx(k.cdc, msgs, icatypes.EncodingProtobuf) - if err != nil { - return errorsmod.Wrapf(err, "unable to serialize cosmos transaction") - } - packetData := icatypes.InterchainAccountPacketData{ - Type: icatypes.EXECUTE_TX, - Data: txBz, - } - relativeTimeoutOffset := timeoutTimestamp - uint64(ctx.BlockTime().UnixNano()) - - // Submit ICA, no need to store callback data or register callback function - icaMsgServer := icacontrollerkeeper.NewMsgServerImpl(&k.icaControllerKeeper) - msgSendTx := icacontrollertypes.NewMsgSendTx(icaAccountOwner, connectionId, relativeTimeoutOffset, packetData) - _, err = icaMsgServer.SendTx(ctx, msgSendTx) - if err != nil { - return errorsmod.Wrapf(err, "unable to send ICA tx") - } - - return nil -} - -// Registers a new TradeRoute ICAAccount, given the type -// Stores down the connection and chainId now, and the address upon callback -func (k Keeper) RegisterTradeRouteICAAccount( - ctx sdk.Context, - tradeRouteId string, - connectionId string, - icaAccountType types.ICAAccountType, -) (account types.ICAAccount, err error) { - // Get the chain ID and counterparty connection-id from the connection ID on Stride - chainId, err := k.GetChainIdFromConnectionId(ctx, connectionId) - if err != nil { - return account, err - } - connection, found := k.ibcKeeper.ConnectionKeeper.GetConnection(ctx, connectionId) - if !found { - return account, errorsmod.Wrap(connectiontypes.ErrConnectionNotFound, connectionId) - } - counterpartyConnectionId := connection.Counterparty.ConnectionId - - // Build the appVersion, owner, and portId needed for registration - appVersion := string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ - Version: icatypes.Version, - ControllerConnectionId: connectionId, - HostConnectionId: counterpartyConnectionId, - Encoding: icatypes.EncodingProtobuf, - TxType: icatypes.TxTypeSDKMultiMsg, - })) - owner := types.FormatTradeRouteICAOwnerFromRouteId(chainId, tradeRouteId, icaAccountType) - portID, err := icatypes.NewControllerPortID(owner) - if err != nil { - return account, err - } - - // Create the associate ICAAccount object - account = types.ICAAccount{ - ChainId: chainId, - Type: icaAccountType, - ConnectionId: connectionId, - } - - // Check if an ICA account has already been created - // (in the event that this trade route was removed and then added back) - // If so, there's no need to register a new ICA - _, channelFound := k.icaControllerKeeper.GetOpenActiveChannel(ctx, connectionId, portID) - icaAddress, icaFound := k.icaControllerKeeper.GetInterchainAccountAddress(ctx, connectionId, portID) - if channelFound && icaFound { - account = types.ICAAccount{ - ChainId: chainId, - Type: icaAccountType, - ConnectionId: connectionId, - Address: icaAddress, - } - return account, nil - } - - // Otherwise, if there's no account already, register a new one - if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, connectionId, owner, appVersion); err != nil { - return account, err - } - - return account, nil -} diff --git a/x/stakeibc/keeper/interchainqueries.go b/x/stakeibc/keeper/interchainqueries.go deleted file mode 100644 index 038d2c99e..000000000 --- a/x/stakeibc/keeper/interchainqueries.go +++ /dev/null @@ -1,242 +0,0 @@ -package keeper - -import ( - "fmt" - "strings" - "time" - - "cosmossdk.io/collections" - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - stakingtypes "github.com/initia-labs/initia/x/mstaking/types" - - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - - "github.com/milkyway-labs/milkyway/utils" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// Submit a validator sharesToTokens rate ICQ as triggered either manually or epochly with a conservative timeout -func (k Keeper) QueryValidatorSharesToTokensRate(ctx sdk.Context, chainId string, validatorAddress string) error { - timeoutDuration := time.Hour * 24 - timeoutPolicy := icqtypes.TimeoutPolicy_REJECT_QUERY_RESPONSE - callbackData := []byte{} - return k.SubmitValidatorSharesToTokensRateICQ(ctx, chainId, validatorAddress, callbackData, timeoutDuration, timeoutPolicy) -} - -// Submits an ICQ to get a validator's shares to tokens rate -func (k Keeper) SubmitValidatorSharesToTokensRateICQ( - ctx sdk.Context, - chainId string, - validatorAddress string, - callbackDataBz []byte, - timeoutDuration time.Duration, - timeoutPolicy icqtypes.TimeoutPolicy, -) error { - k.Logger(ctx).Info(utils.LogWithHostZone(chainId, "Submitting ICQ for validator sharesToTokens rate to %s", validatorAddress)) - - // Confirm the host zone exists - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrInvalidHostZone, "Host zone not found (%s)", chainId) - } - - // check that the validator address matches the bech32 prefix of the hz - if !strings.Contains(validatorAddress, hostZone.Bech32Prefix) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "validator operator address must match the host zone bech32 prefix") - } - - // Encode the validator address to form the query request - _, validatorAddressBz, err := bech32.DecodeAndConvert(validatorAddress) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid validator operator address, could not decode (%s)", err.Error()) - } - queryData, _ := collections.EncodeKeyWithPrefix(stakingtypes.ValidatorsPrefix, collections.BytesKey, validatorAddressBz) - - // Submit validator sharesToTokens rate ICQ - // Considering this query is executed manually, we can be conservative with the timeout - query := icqtypes.Query{ - ChainId: hostZone.ChainId, - ConnectionId: hostZone.ConnectionId, - QueryType: icqtypes.STAKING_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_Validator, - CallbackData: callbackDataBz, - TimeoutDuration: timeoutDuration, - TimeoutPolicy: timeoutPolicy, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, true); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error submitting ICQ for validator sharesToTokens rate, error %s", err.Error())) - return err - } - return nil -} - -// Submits an ICQ to get a validator's delegations -// This is called after the validator's sharesToTokens rate is determined -// The timeoutDuration parameter represents the length of the timeout (not to be confused with an actual timestamp) -func (k Keeper) SubmitDelegationICQ(ctx sdk.Context, hostZone types.HostZone, validatorAddress string) error { - if hostZone.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation address found for %s", hostZone.ChainId) - } - validator, valIndex, found := GetValidatorFromAddress(hostZone.Validators, validatorAddress) - if !found { - return errorsmod.Wrapf(types.ErrValidatorNotFound, "no registered validator for address (%s)", validatorAddress) - } - - // Only submit the query if there's not already one in progress - if validator.SlashQueryInProgress { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Delegations ICQ already in progress")) - return nil - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Submitting ICQ for delegations to %s", validatorAddress)) - - // Get the validator and delegator encoded addresses to form the query request - _, validatorAddressBz, err := bech32.DecodeAndConvert(validatorAddress) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid validator address, could not decode (%s)", err.Error()) - } - _, delegatorAddressBz, err := bech32.DecodeAndConvert(hostZone.DelegationIcaAddress) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid delegator address, could not decode (%s)", err.Error()) - } - queryData, _ := collections.EncodeKeyWithPrefix( - stakingtypes.DelegationsPrefix, - collections.PairKeyCodec(collections.BytesKey, collections.BytesKey), - collections.Join(delegatorAddressBz, validatorAddressBz)) - - // Store the current validator's delegation in the callback data so we can determine if it changed - // while the query was in flight - callbackData := types.DelegatorSharesQueryCallback{ - InitialValidatorDelegation: validator.Delegation, - } - callbackDataBz, err := proto.Marshal(&callbackData) - if err != nil { - return errorsmod.Wrapf(err, "unable to marshal delegator shares callback data") - } - - // Update the validator to indicate that the slash query is in progress - validator.SlashQueryInProgress = true - hostZone.Validators[valIndex] = &validator - k.SetHostZone(ctx, hostZone) - - // Submit delegator shares ICQ - query := icqtypes.Query{ - ChainId: hostZone.ChainId, - ConnectionId: hostZone.ConnectionId, - QueryType: icqtypes.STAKING_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_Delegation, - CallbackData: callbackDataBz, - TimeoutDuration: time.Hour, - TimeoutPolicy: icqtypes.TimeoutPolicy_RETRY_QUERY_REQUEST, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error submitting ICQ for delegation, error : %s", err.Error())) - return err - } - - return nil -} - -// Submits an ICQ to get a validator's delegations -// This is called after the validator's sharesToTokens rate is determined -// The timeoutDuration parameter represents the length of the timeout (not to be confused with an actual timestamp) -func (k Keeper) SubmitCalibrationICQ(ctx sdk.Context, hostZone types.HostZone, validatorAddress string) error { - if hostZone.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation address found for %s", hostZone.ChainId) - } - - // ensure the validator is in the set for this host - _, _, found := GetValidatorFromAddress(hostZone.Validators, validatorAddress) - if !found { - return errorsmod.Wrapf(types.ErrValidatorNotFound, "no registered validator for address (%s)", validatorAddress) - } - - // Get the validator and delegator encoded addresses to form the query request - _, validatorAddressBz, err := bech32.DecodeAndConvert(validatorAddress) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid validator address, could not decode (%s)", err.Error()) - } - _, delegatorAddressBz, err := bech32.DecodeAndConvert(hostZone.DelegationIcaAddress) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid delegator address, could not decode (%s)", err.Error()) - } - queryData, _ := collections.EncodeKeyWithPrefix( - stakingtypes.DelegationsPrefix, - collections.PairKeyCodec(collections.BytesKey, collections.BytesKey), - collections.Join(delegatorAddressBz, validatorAddressBz)) - - // Submit delegator shares ICQ - query := icqtypes.Query{ - ChainId: hostZone.ChainId, - ConnectionId: hostZone.ConnectionId, - QueryType: icqtypes.STAKING_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_Calibrate, - CallbackData: []byte{}, - TimeoutDuration: time.Hour, - TimeoutPolicy: icqtypes.TimeoutPolicy_RETRY_QUERY_REQUEST, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - return err - } - - return nil -} - -// Submits an ICQ for the withdrawal account balance -func (k Keeper) SubmitWithdrawalHostBalanceICQ(ctx sdk.Context, hostZone types.HostZone) error { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Submitting ICQ for withdrawal account balance")) - - // Get the withdrawal account address from the host zone - if hostZone.WithdrawalIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no withdrawal account found for %s", hostZone.ChainId) - } - - // Encode the withdrawal account address for the query request - // The query request consists of the withdrawal account address and denom - _, withdrawalAddressBz, err := bech32.DecodeAndConvert(hostZone.WithdrawalIcaAddress) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid withdrawal account address, could not decode (%s)", err.Error()) - } - queryData, err := types.MoveBankBalanceKey(withdrawalAddressBz, hostZone.HostDenom) - if err != nil { - panic(fmt.Sprintf( - "cannot construct move bank balance key for address %s and denom %s", - hostZone.WithdrawalIcaAddress, hostZone.HostDenom)) - } - - // Timeout query at end of epoch - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.STRIDE_EPOCH) - } - timeout := time.Unix(0, int64(strideEpochTracker.NextEpochStartTime)) - timeoutDuration := timeout.Sub(ctx.BlockTime()) - - // Submit the ICQ for the withdrawal account balance - query := icqtypes.Query{ - ChainId: hostZone.ChainId, - ConnectionId: hostZone.ConnectionId, - QueryType: icqtypes.BANK_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_WithdrawalHostBalance, - TimeoutDuration: timeoutDuration, - TimeoutPolicy: icqtypes.TimeoutPolicy_REJECT_QUERY_RESPONSE, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error querying for withdrawal balance, error: %s", err.Error())) - return err - } - - return nil -} diff --git a/x/stakeibc/keeper/invariants.go b/x/stakeibc/keeper/invariants.go deleted file mode 100644 index b3c1eeb8f..000000000 --- a/x/stakeibc/keeper/invariants.go +++ /dev/null @@ -1,69 +0,0 @@ -package keeper - -// DONTCOVER - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - - epochtypes "github.com/milkyway-labs/milkyway/x/epochs/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// RegisterInvariants registers all governance invariants. -func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) { -} - -// AllInvariants runs all invariants of the stakeibc module -func AllInvariants(k Keeper) sdk.Invariant { - return func(ctx sdk.Context) (string, bool) { - // msg, broke := RedemptionRateInvariant(k)(ctx) - // note: once we have >1 invariant here, follow the pattern from staking module invariants here: https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/x/staking/keeper/invariants.go - return "", false - } -} - -// TODO: Consider removing stride and day epochs completely and using a single hourly epoch -// Confirm the number of stride epochs in 1 day epoch -func (k Keeper) AssertStrideAndDayEpochRelationship(ctx sdk.Context) { - strideEpoch, found := k.GetEpochTracker(ctx, epochtypes.STRIDE_EPOCH) - if !found || strideEpoch.Duration == 0 { - return - } - dayEpoch, found := k.GetEpochTracker(ctx, epochtypes.DAY_EPOCH) - if !found || dayEpoch.Duration == 0 { - return - } - if dayEpoch.Duration/strideEpoch.Duration != StrideEpochsPerDayEpoch { - panic("The stride epoch must be 1/4th the length of the day epoch") - } -} - -// safety check: ensure the redemption rate is NOT below our min safety threshold && NOT above our max safety threshold on host zone -func (k Keeper) IsRedemptionRateWithinSafetyBounds(ctx sdk.Context, zone types.HostZone) (bool, error) { - // Get the wide bounds - minSafetyThreshold, maxSafetyThreshold := k.GetOuterSafetyBounds(ctx, zone) - - redemptionRate := zone.RedemptionRate - - if redemptionRate.LT(minSafetyThreshold) || redemptionRate.GT(maxSafetyThreshold) { - errMsg := fmt.Sprintf("IsRedemptionRateWithinSafetyBounds check failed %s is outside safety bounds [%s, %s]", redemptionRate.String(), minSafetyThreshold.String(), maxSafetyThreshold.String()) - k.Logger(ctx).Error(errMsg) - return false, errorsmod.Wrapf(types.ErrRedemptionRateOutsideSafetyBounds, errMsg) - } - - // Verify the redemption rate is within the inner safety bounds - // The inner safety bounds should always be within the safety bounds, but - // the redundancy above is cheap. - // There is also one scenario where the outer bounds go within the inner bounds - if they're updated as part of a param change proposal. - minInnerSafetyThreshold, maxInnerSafetyThreshold := k.GetInnerSafetyBounds(ctx, zone) - if redemptionRate.LT(minInnerSafetyThreshold) || redemptionRate.GT(maxInnerSafetyThreshold) { - errMsg := fmt.Sprintf("IsRedemptionRateWithinSafetyBounds check failed %s is outside inner safety bounds [%s, %s]", redemptionRate.String(), minInnerSafetyThreshold.String(), maxInnerSafetyThreshold.String()) - k.Logger(ctx).Error(errMsg) - return false, errorsmod.Wrapf(types.ErrRedemptionRateOutsideSafetyBounds, errMsg) - } - - return true, nil -} diff --git a/x/stakeibc/keeper/keeper.go b/x/stakeibc/keeper/keeper.go deleted file mode 100644 index 336d7cde8..000000000 --- a/x/stakeibc/keeper/keeper.go +++ /dev/null @@ -1,163 +0,0 @@ -package keeper - -import ( - "fmt" - - "cosmossdk.io/collections" - corestoretypes "cosmossdk.io/core/store" - errorsmod "cosmossdk.io/errors" - "cosmossdk.io/log" - sdkmath "cosmossdk.io/math" - storetypes "cosmossdk.io/store/types" - "github.com/cosmos/cosmos-sdk/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper" - ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" - "github.com/spf13/cast" - - icacallbackskeeper "github.com/milkyway-labs/milkyway/x/icacallbacks/keeper" - icqkeeper "github.com/milkyway-labs/milkyway/x/interchainquery/keeper" - recordsmodulekeeper "github.com/milkyway-labs/milkyway/x/records/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -type ( - Keeper struct { - cdc codec.Codec - storeKey storetypes.StoreKey - memKey storetypes.StoreKey - authority string - icaControllerKeeper icacontrollerkeeper.Keeper - ibcKeeper ibckeeper.Keeper - bankKeeper bankkeeper.Keeper - accountKeeper types.AccountKeeper - interchainQueryKeeper icqkeeper.Keeper - recordsKeeper recordsmodulekeeper.Keeper - icaCallbacksKeeper icacallbackskeeper.Keeper - hooks types.StakeIBCHooks - rateLimitKeeper types.RatelimitKeeper - params collections.Item[types.Params] - } -) - -func NewKeeper( - cdc codec.Codec, - storeKey, - memKey storetypes.StoreKey, - storeService corestoretypes.KVStoreService, - authority string, - accountKeeper types.AccountKeeper, - bankKeeper bankkeeper.Keeper, - icaControllerKeeper icacontrollerkeeper.Keeper, - ibcKeeper ibckeeper.Keeper, - interchainQueryKeeper icqkeeper.Keeper, - RecordsKeeper recordsmodulekeeper.Keeper, - icaCallbacksKeeper icacallbackskeeper.Keeper, - rateLimitKeeper types.RatelimitKeeper, -) Keeper { - sb := collections.NewSchemaBuilder(storeService) - return Keeper{ - cdc: cdc, - storeKey: storeKey, - memKey: memKey, - authority: authority, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - icaControllerKeeper: icaControllerKeeper, - ibcKeeper: ibcKeeper, - interchainQueryKeeper: interchainQueryKeeper, - recordsKeeper: RecordsKeeper, - icaCallbacksKeeper: icaCallbacksKeeper, - rateLimitKeeper: rateLimitKeeper, - params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), - } -} - -func (k Keeper) Logger(ctx sdk.Context) log.Logger { - return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) -} - -// SetHooks sets the hooks for ibc staking -func (k *Keeper) SetHooks(gh types.StakeIBCHooks) *Keeper { - if k.hooks != nil { - panic("cannot set ibc staking hooks twice") - } - - k.hooks = gh - - return k -} - -// GetAuthority returns the x/stakeibc module's authority. -func (k Keeper) GetAuthority() string { - return k.authority -} - -// ValidateAdminAddress makes sure that the given address is the one of an account that can perform admin operations. -func (k Keeper) ValidateAdminAddress(ctx sdk.Context, address string) error { - // The authority can always perform admin operations. - if k.GetAuthority() == address { - return nil - } - - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "address (%s) is not an admin", address) -} - -func (k Keeper) GetICATimeoutNanos(ctx sdk.Context, epochType string) (uint64, error) { - epochTracker, found := k.GetEpochTracker(ctx, epochType) - if !found { - k.Logger(ctx).Error(fmt.Sprintf("Failed to get epoch tracker for %s", epochType)) - return 0, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "Failed to get epoch tracker for %s", epochType) - } - // BUFFER by 5% of the epoch length - bufferSizeParam := k.GetParams(ctx).BufferSize - bufferSize := epochTracker.Duration / bufferSizeParam - // buffer size should not be negative or longer than the epoch duration - if bufferSize > epochTracker.Duration { - k.Logger(ctx).Error(fmt.Sprintf("Invalid buffer size %d", bufferSize)) - return 0, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "Invalid buffer size %d", bufferSize) - } - timeoutNanos := epochTracker.NextEpochStartTime - bufferSize - timeoutNanosUint64, err := cast.ToUint64E(timeoutNanos) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Failed to convert timeoutNanos to uint64, error: %s", err.Error())) - return 0, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "Failed to convert timeoutNanos to uint64, error: %s", err.Error()) - } - return timeoutNanosUint64, nil -} - -func (k Keeper) GetOuterSafetyBounds(ctx sdk.Context, zone types.HostZone) (sdkmath.LegacyDec, sdkmath.LegacyDec) { - // Fetch the wide bounds - params := k.GetParams(ctx) - minSafetyThresholdInt := params.DefaultMinRedemptionRateThreshold - minSafetyThreshold := sdkmath.LegacyNewDec(int64(minSafetyThresholdInt)).Quo(sdkmath.LegacyNewDec(100)) - - if !zone.MinRedemptionRate.IsNil() && zone.MinRedemptionRate.IsPositive() { - minSafetyThreshold = zone.MinRedemptionRate - } - - maxSafetyThresholdInt := params.DefaultMaxRedemptionRateThreshold - maxSafetyThreshold := sdkmath.LegacyNewDec(int64(maxSafetyThresholdInt)).Quo(sdkmath.LegacyNewDec(100)) - - if !zone.MaxRedemptionRate.IsNil() && zone.MaxRedemptionRate.IsPositive() { - maxSafetyThreshold = zone.MaxRedemptionRate - } - - return minSafetyThreshold, maxSafetyThreshold -} - -func (k Keeper) GetInnerSafetyBounds(ctx sdk.Context, zone types.HostZone) (sdkmath.LegacyDec, sdkmath.LegacyDec) { - // Fetch the inner bounds - minSafetyThreshold, maxSafetyThreshold := k.GetOuterSafetyBounds(ctx, zone) - - if !zone.MinInnerRedemptionRate.IsNil() && zone.MinInnerRedemptionRate.IsPositive() && zone.MinInnerRedemptionRate.GT(minSafetyThreshold) { - minSafetyThreshold = zone.MinInnerRedemptionRate - } - if !zone.MaxInnerRedemptionRate.IsNil() && zone.MaxInnerRedemptionRate.IsPositive() && zone.MaxInnerRedemptionRate.LT(maxSafetyThreshold) { - maxSafetyThreshold = zone.MaxInnerRedemptionRate - } - - return minSafetyThreshold, maxSafetyThreshold -} diff --git a/x/stakeibc/keeper/lsm.go b/x/stakeibc/keeper/lsm.go deleted file mode 100644 index f6c4e0387..000000000 --- a/x/stakeibc/keeper/lsm.go +++ /dev/null @@ -1,505 +0,0 @@ -package keeper - -import ( - "fmt" - "regexp" - "strings" - "time" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "github.com/cometbft/cometbft/crypto" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" - transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var ( - // A valid IBC path for the LSM token must only consist of 1 channel hop along a transfer channel - // (e.g. "transfer/channel-0") - IsValidIBCPath = regexp.MustCompile(fmt.Sprintf(`^%s/(%s[0-9]{1,20})$`, transfertypes.PortID, channeltypes.ChannelPrefix)).MatchString - - // Timeout for the validator slash query that occurs at periodic deposit intervals - LSMSlashQueryTimeout = time.Minute * 5 // 5 minutes - - // Time for the detokenization ICA - DetokenizationTimeout = time.Hour * 24 // 1 day -) - -// Validates the parameters supplied with this LSMLiquidStake, including that the denom -// corresponds with a valid LSM Token and that the user has sufficient balance -// -// This is called once at the beginning of the liquid stake, and is, potentially, called -// again at the end (if the transaction was asynchronous due to an intermediate slash query) -// -// This function returns the associated host zone and validator along with the initial deposit record -func (k Keeper) ValidateLSMLiquidStake(ctx sdk.Context, msg types.MsgLSMLiquidStake) (types.LSMLiquidStake, error) { - // Get the denom trace from the IBC hash - this includes the full path and base denom - // Ex: LSMTokenIbcDenom of `ibc/XXX` might create a DenomTrace with: - // BaseDenom: cosmosvaloperXXX/42, Path: transfer/channel-0 - denomTrace, err := k.GetLSMTokenDenomTrace(ctx, msg.LsmTokenIbcDenom) - if err != nil { - return types.LSMLiquidStake{}, err - } - - // Get the host zone and validator address from the path and base denom respectively - lsmTokenBaseDenom := denomTrace.BaseDenom - hostZone, err := k.GetHostZoneFromLSMTokenPath(ctx, denomTrace.Path) - if err != nil { - return types.LSMLiquidStake{}, err - } - validator, err := k.GetValidatorFromLSMTokenDenom(lsmTokenBaseDenom, hostZone.Validators) - if err != nil { - return types.LSMLiquidStake{}, err - } - - // Confirm the staker has a sufficient balance to execute the liquid stake - liquidStakerAddress := sdk.MustAccAddressFromBech32(msg.Creator) - balance := k.bankKeeper.GetBalance(ctx, liquidStakerAddress, msg.LsmTokenIbcDenom).Amount - if balance.LT(msg.Amount) { - return types.LSMLiquidStake{}, errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, - "balance is lower than staking amount. staking amount: %v, balance: %v", msg.Amount, balance) - } - - // Build the LSMTokenDeposit record - // The stToken will be added outside of this function - depositId := GetLSMTokenDepositId(ctx.BlockHeight(), hostZone.ChainId, msg.Creator, lsmTokenBaseDenom) - lsmTokenDeposit := recordstypes.LSMTokenDeposit{ - DepositId: depositId, - ChainId: hostZone.ChainId, - Denom: lsmTokenBaseDenom, - IbcDenom: msg.LsmTokenIbcDenom, - StakerAddress: msg.Creator, - ValidatorAddress: validator.Address, - Amount: msg.Amount, - Status: recordstypes.LSMTokenDeposit_DEPOSIT_PENDING, - } - - // Return the wrapped deposit object with additional context (host zone and validator) - return types.LSMLiquidStake{ - Deposit: &lsmTokenDeposit, - HostZone: &hostZone, - Validator: &validator, - }, nil -} - -// Generates a unique ID for the LSM token deposit so that, if a slash query is issued, -// the query callback can be joined back with this tx -// The key in the store for an LSMTokenDeposit is chainId + denom (meaning, there -// can only be 1 LSMLiquidStake in progress per tokenization) -func GetLSMTokenDepositId(blockHeight int64, chainId, stakerAddress, denom string) string { - id := fmt.Sprintf("%d-%s-%s-%s", blockHeight, chainId, stakerAddress, denom) - return fmt.Sprintf("%x", crypto.Sha256([]byte(id))) -} - -// Parse the LSM Token's IBC denom hash into a DenomTrace object that contains the path and base denom -func (k Keeper) GetLSMTokenDenomTrace(ctx sdk.Context, denom string) (transfertypes.DenomTrace, error) { - ibcPrefix := transfertypes.DenomPrefix + "/" - - // Confirm the LSM Token is a valid IBC token (has "ibc/" prefix) - if !strings.HasPrefix(denom, ibcPrefix) { - return transfertypes.DenomTrace{}, errorsmod.Wrapf(types.ErrInvalidLSMToken, "lsm token is not an IBC token (%s)", denom) - } - - // Parse the hash string after the "ibc/" prefix into hex bytes - hexHash := denom[len(ibcPrefix):] - hash, err := transfertypes.ParseHexHash(hexHash) - if err != nil { - return transfertypes.DenomTrace{}, errorsmod.Wrapf(err, "unable to get ibc hex hash from denom %s", denom) - } - - // Lookup the trace from the hash - denomTrace, found := k.recordsKeeper.TransferKeeper.GetDenomTrace(ctx, hash) - if !found { - return transfertypes.DenomTrace{}, errorsmod.Wrapf(types.ErrInvalidLSMToken, "denom trace not found for %s", denom) - } - - return denomTrace, nil -} - -// Parses the LSM token's IBC path (e.g. transfer/channel-0) and confirms the channel ID matches -// the transfer channel of a supported host zone -func (k Keeper) GetHostZoneFromLSMTokenPath(ctx sdk.Context, path string) (types.HostZone, error) { - // Validate path regex which confirms the token originated only one hop away (e.g. transfer/channel-0) - if !IsValidIBCPath(path) { - return types.HostZone{}, errorsmod.Wrapf(types.ErrInvalidLSMToken, - "ibc path of LSM token (%s) cannot be more than 1 hop away", path) - } - - // Remove the "transfer/" prefix - channelId := strings.ReplaceAll(path, transfertypes.PortID+"/", "") - - // Confirm the channel is from one of Stride's supported host zones - for _, hostZone := range k.GetAllHostZone(ctx) { - if hostZone.TransferChannelId == channelId { - if !hostZone.LsmLiquidStakeEnabled { - return hostZone, types.ErrLSMLiquidStakeDisabledForHostZone.Wrapf( - "LSM liquid stake disabled for %s", hostZone.ChainId) - } - return hostZone, nil - } - } - - return types.HostZone{}, errorsmod.Wrapf(types.ErrInvalidLSMToken, - "transfer channel-id from LSM token (%s) does not match any registered host zone", channelId) -} - -// Parses the LSM token's denom (of the form {validatorAddress}/{recordId}) and confirms that the validator -// is in the Stride validator set and does not have an active slash query -func (k Keeper) GetValidatorFromLSMTokenDenom(denom string, validators []*types.Validator) (types.Validator, error) { - // Denom is of the form {validatorAddress}/{recordId} - split := strings.Split(denom, "/") - if len(split) != 2 { - return types.Validator{}, errorsmod.Wrapf(types.ErrInvalidLSMToken, - "lsm token base denom is not of the format {val-address}/{record-id} (%s)", denom) - } - validatorAddress := split[0] - - // Confirm the validator: - // 1. Is registered on Stride - // 2. Does not have an active slash query in flight - // 3. Has a known sharesToTokens rate - for _, validator := range validators { - if validator.Address == validatorAddress { - if validator.SlashQueryInProgress { - return types.Validator{}, errorsmod.Wrapf(types.ErrValidatorWasSlashed, - "validator %s was slashed, liquid stakes from this validator are temporarily unavailable", validator.Address) - } - if validator.SharesToTokensRate.IsNil() || validator.SharesToTokensRate.IsZero() { - return types.Validator{}, errorsmod.Wrapf(types.ErrValidatorSharesToTokensRateNotKnown, - "validator %s sharesToTokens rate is not known", validator.Address) - } - return *validator, nil - } - } - - return types.Validator{}, errorsmod.Wrapf(types.ErrInvalidLSMToken, - "validator (%s) is not registered in the Stride validator set", validatorAddress) -} - -// Given an LSMToken representing a number of delegator shares, returns the stToken coin -// using the validator's sharesToTokens rate and the host zone redemption rate -// -// StTokens = LSMTokenShares * Validator SharesToTokens Rate / Redemption Rate -// -// Note: in the event of a slash query, these tokens will be minted only if the -// validator's sharesToTokens rate did not change -func (k Keeper) CalculateLSMStToken(liquidStakedShares sdkmath.Int, lsmLiquidStake types.LSMLiquidStake) sdk.Coin { - hostZone := lsmLiquidStake.HostZone - validator := lsmLiquidStake.Validator - - liquidStakedTokens := sdkmath.LegacyNewDecFromInt(liquidStakedShares).Mul(validator.SharesToTokensRate) - stAmount := (liquidStakedTokens.Quo(hostZone.RedemptionRate)).TruncateInt() - - stDenom := types.StAssetDenomFromHostZoneDenom(hostZone.HostDenom) - stCoin := sdk.NewCoin(stDenom, stAmount) - - return stCoin -} - -// Determines the new slash query checkpoint, by multiplying the query threshold percent by the current TVL -func (k Keeper) GetUpdatedSlashQueryCheckpoint(ctx sdk.Context, totalDelegations sdkmath.Int) sdkmath.Int { - params := k.GetParams(ctx) - queryThreshold := sdkmath.LegacyNewDecWithPrec(int64(params.ValidatorSlashQueryThreshold), 2) // percentage - checkpoint := queryThreshold.Mul(sdkmath.LegacyNewDecFromInt(totalDelegations)).TruncateInt() - return checkpoint -} - -// Checks if we need to issue an ICQ to check if a validator was slashed -// The query runs at periodic intervals defined by the ValidatorSlashQueryInterval -// The interval is represented as percent of TVL -// (e.g. 1% means every LS that causes the progress to breach 1% of TVL triggers the query) -func (k Keeper) ShouldCheckIfValidatorWasSlashed( - ctx sdk.Context, - validator types.Validator, - transactionStakeAmount sdkmath.Int, -) bool { - // If the checkpoint is zero - that means either the threshold parameter is 0 - // (which should not be possible), or that the total host zone stake is 0 - // In either case, do not submit the query - if validator.SlashQueryCheckpoint.IsZero() { - return false - } - - oldInterval := validator.SlashQueryProgressTracker.Quo(validator.SlashQueryCheckpoint) - newInterval := validator.SlashQueryProgressTracker.Add(transactionStakeAmount).Quo(validator.SlashQueryCheckpoint) - - // Submit query if the query interval checkpoint has been breached - // Ex: Query Threshold: 1%, TVL: 100k => 1k Checkpoint - // Old Progress Tracker: 900, Old Interval: 900 / 1000 => Interval 0, - // Stake: 200, New Progress Tracker: 1100, New Interval: 1100 / 1000 = 1.1 = 1 - // => OldInterval: 0, NewInterval: 1 => Issue Slash Query - return oldInterval.LT(newInterval) -} - -// StartLSMLiquidStake runs the transactional logic that occurs before the optional query -// This includes validation on the LSM Token and the stToken amount calculation -func (k Keeper) StartLSMLiquidStake(ctx sdk.Context, msg types.MsgLSMLiquidStake) (types.LSMLiquidStake, error) { - // Validate the provided message parameters - including the denom and staker balance - lsmLiquidStake, err := k.ValidateLSMLiquidStake(ctx, msg) - if err != nil { - return types.LSMLiquidStake{}, err - } - hostZone := lsmLiquidStake.HostZone - - if hostZone.Halted { - return types.LSMLiquidStake{}, errorsmod.Wrapf(types.ErrHaltedHostZone, "host zone %s is halted", hostZone.ChainId) - } - - // Check if we already have tokens with this denom in records - _, found := k.recordsKeeper.GetLSMTokenDeposit(ctx, hostZone.ChainId, lsmLiquidStake.Deposit.Denom) - if found { - return types.LSMLiquidStake{}, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, - "there is already a previous record with this denom being processed: %s", lsmLiquidStake.Deposit.Denom) - } - - // Determine the amount of stTokens to mint using the redemption rate and the validator's sharesToTokens rate - // StTokens = LSMTokenShares * Validator SharesToTokens Rate / Redemption Rate - // Note: in the event of a slash query, these tokens will be minted only if the - // validator's sharesToTokens rate did not change - stCoin := k.CalculateLSMStToken(msg.Amount, lsmLiquidStake) - if stCoin.Amount.IsZero() { - return types.LSMLiquidStake{}, errorsmod.Wrapf(types.ErrInsufficientLiquidStake, - "Liquid stake of %s%s would return 0 stTokens", msg.Amount.String(), hostZone.HostDenom) - } - - // Add the stToken to this deposit record - lsmLiquidStake.Deposit.StToken = stCoin - k.recordsKeeper.SetLSMTokenDeposit(ctx, *lsmLiquidStake.Deposit) - - return lsmLiquidStake, nil -} - -// SubmitValidatorSlashQuery submits an interchain query for the validator's sharesToTokens rate -// This is done periodically at checkpoints denominated in native tokens -// (e.g. every 100k ATOM that's LSM liquid staked with validator X) -func (k Keeper) SubmitValidatorSlashQuery(ctx sdk.Context, lsmLiquidStake types.LSMLiquidStake) error { - chainId := lsmLiquidStake.HostZone.ChainId - validatorAddress := lsmLiquidStake.Validator.Address - timeoutDuration := LSMSlashQueryTimeout - timeoutPolicy := icqtypes.TimeoutPolicy_EXECUTE_QUERY_CALLBACK - - // Build and serialize the callback data required to complete the LSM Liquid stake upon query callback - callbackData := types.ValidatorSharesToTokensQueryCallback{ - LsmLiquidStake: &lsmLiquidStake, - } - callbackDataBz, err := proto.Marshal(&callbackData) - if err != nil { - return errorsmod.Wrapf(err, "unable to serialize LSMLiquidStake struct for validator sharesToTokens rate query callback") - } - - return k.SubmitValidatorSharesToTokensRateICQ(ctx, chainId, validatorAddress, callbackDataBz, timeoutDuration, timeoutPolicy) -} - -// FinishLSMLiquidStake finishes the liquid staking flow by escrowing the LSM token, -// sending a user their stToken, and then IBC transferring the LSM Token to the host zone -// -// If the slash query interrupted the transaction, this function is called -// asynchronously after the query callback -// -// If no slash query was needed, this is called synchronously after StartLSMLiquidStake -// If this is run asynchronously, we need to re-validate the transaction info (e.g. staker's balance) -func (k Keeper) FinishLSMLiquidStake(ctx sdk.Context, lsmLiquidStake types.LSMLiquidStake, async bool) error { - hostZone := lsmLiquidStake.HostZone - lsmTokenDeposit := *lsmLiquidStake.Deposit - - // If the transaction was interrupted by the slash query, - // validate the LSM Liquid stake message parameters again - // The most significant check here is that the user still has sufficient balance for this LSM liquid stake - if async { - lsmLiquidStakeMsg := types.MsgLSMLiquidStake{ - Creator: lsmTokenDeposit.StakerAddress, - LsmTokenIbcDenom: lsmTokenDeposit.IbcDenom, - Amount: lsmTokenDeposit.Amount, - } - if _, err := k.ValidateLSMLiquidStake(ctx, lsmLiquidStakeMsg); err != nil { - return err - } - } - - // Get the staker's address and the host zone's deposit account address (which will custody the tokens) - liquidStakerAddress := sdk.MustAccAddressFromBech32(lsmTokenDeposit.StakerAddress) - hostZoneDepositAddress, err := sdk.AccAddressFromBech32(hostZone.DepositAddress) - if err != nil { - return errorsmod.Wrapf(err, "host zone address is invalid") - } - - // Transfer the LSM token to the deposit account - lsmIBCToken := sdk.NewCoin(lsmTokenDeposit.IbcDenom, lsmTokenDeposit.Amount) - if err := k.bankKeeper.SendCoins(ctx, liquidStakerAddress, hostZoneDepositAddress, sdk.NewCoins(lsmIBCToken)); err != nil { - return errorsmod.Wrap(err, "failed to send tokens from Account to Module") - } - - // Mint stToken and send to the user - stToken := sdk.NewCoins(lsmTokenDeposit.StToken) - if err := k.bankKeeper.MintCoins(ctx, types.ModuleName, stToken); err != nil { - return errorsmod.Wrapf(err, "Failed to mint stTokens") - } - if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, liquidStakerAddress, stToken); err != nil { - return errorsmod.Wrapf(err, "Failed to send %s from module to account", lsmTokenDeposit.StToken.String()) - } - - // Get delegation account address as the destination for the LSM Token - if hostZone.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation address found for %s", hostZone.ChainId) - } - - // Update the deposit status - k.recordsKeeper.UpdateLSMTokenDepositStatus(ctx, lsmTokenDeposit, recordstypes.LSMTokenDeposit_TRANSFER_QUEUE) - - // Update the slash query progress on the validator - if err := k.IncrementValidatorSlashQueryProgress( - ctx, - hostZone.ChainId, - lsmTokenDeposit.ValidatorAddress, - lsmTokenDeposit.Amount, - ); err != nil { - return err - } - - // Emit an LSM liquid stake event - EmitSuccessfulLSMLiquidStakeEvent(ctx, *hostZone, lsmTokenDeposit) - - k.hooks.AfterLiquidStake(ctx, liquidStakerAddress) - return nil -} - -// Loops through all active host zones, grabs queued LSMTokenDeposits for that host -// that are in status TRANSFER_QUEUE, and submits the IBC Transfer to the host -func (k Keeper) TransferAllLSMDeposits(ctx sdk.Context) { - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - // Ignore hosts that have not been successfully registered - if hostZone.DelegationIcaAddress == "" { - continue - } - - // Submit an IBC transfer for all queued deposits - queuedDeposits := k.recordsKeeper.GetLSMDepositsForHostZoneWithStatus( - ctx, - hostZone.ChainId, - recordstypes.LSMTokenDeposit_TRANSFER_QUEUE, - ) - for _, deposit := range queuedDeposits { - - // If the IBC transfer fails to get off the ground, flag the deposit as FAILED - // This is highly unlikely and would indicate a larger problem - if err := k.recordsKeeper.IBCTransferLSMToken( - ctx, - deposit, - hostZone.TransferChannelId, - hostZone.DepositAddress, - hostZone.DelegationIcaAddress, - ); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to submit IBC Transfer of LSMToken for %v%s on %s: %s", - deposit.Amount, deposit.Denom, hostZone.ChainId, err.Error())) - k.recordsKeeper.UpdateLSMTokenDepositStatus(ctx, deposit, recordstypes.LSMTokenDeposit_TRANSFER_FAILED) - continue - } - k.Logger(ctx).Info(fmt.Sprintf("Submitted IBC Transfer for LSM deposit %v%s on %s", - deposit.Amount, deposit.Denom, hostZone.ChainId)) - - k.recordsKeeper.UpdateLSMTokenDepositStatus(ctx, deposit, recordstypes.LSMTokenDeposit_TRANSFER_IN_PROGRESS) - } - } -} - -// Submits an ICA to "Redeem" an LSM Token - meaning converting the token into native stake -// This function is called in the EndBlocker which means if the ICA submission fails, -// any modified state is not reverted -// -// The deposit Status is intentionally updated before the ICA is submitted even though it will NOT be reverted -// if the ICA fails to send. This is because a failure is likely caused by a closed ICA channel, and the status -// update will prevent the ICA from being continuously re-submitted. When the ICA channel is restored, the -// deposit status will get reset, and the ICA will be attempted again. -func (k Keeper) DetokenizeLSMDeposit(ctx sdk.Context, hostZone types.HostZone, deposit recordstypes.LSMTokenDeposit) error { - // Get the delegation account (which owns the LSM token) - if hostZone.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation account found for %s", hostZone.ChainId) - } - - // Build the detokenization ICA message - token := sdk.NewCoin(deposit.Denom, deposit.Amount) - detokenizeMsg := []proto.Message{&types.MsgRedeemTokensForShares{ - DelegatorAddress: hostZone.DelegationIcaAddress, - Amount: token, - }} - - // Store the LSMTokenDeposit for the callback - callbackArgs := types.DetokenizeSharesCallback{ - Deposit: &deposit, - } - callbackArgsBz, err := proto.Marshal(&callbackArgs) - if err != nil { - return err - } - - // Submit the ICA with a coonservative timeout - timeout := uint64(ctx.BlockTime().UnixNano() + (DetokenizationTimeout).Nanoseconds()) - if _, err := k.SubmitTxs( - ctx, - hostZone.ConnectionId, - detokenizeMsg, - types.ICAAccountType_DELEGATION, - timeout, - ICACallbackID_Detokenize, - callbackArgsBz, - ); err != nil { - return errorsmod.Wrapf(err, "unable to submit detokenization ICA for %s", deposit.Denom) - } - - // Mark the deposit as IN_PROGRESS - k.recordsKeeper.UpdateLSMTokenDepositStatus(ctx, deposit, recordstypes.LSMTokenDeposit_DETOKENIZATION_IN_PROGRESS) - - // Update the validator to say that it has a delegation change in progress - if err := k.IncrementValidatorDelegationChangesInProgress(&hostZone, deposit.ValidatorAddress); err != nil { - return err - } - k.SetHostZone(ctx, hostZone) - - return nil -} - -// Loops through all active host zones, grabs the queued LSMTokenDeposits for that host -// that are in status DETOKENIZATION_QUEUE, and submits the detokenization ICA for each -func (k Keeper) DetokenizeAllLSMDeposits(ctx sdk.Context) { - // Submit detokenization ICAs for each active host zone - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - // Get the host zone's delegation ICA portID - delegationICAOwner := types.FormatHostZoneICAOwner(hostZone.ChainId, types.ICAAccountType_DELEGATION) - delegationICAPortID, err := icatypes.NewControllerPortID(delegationICAOwner) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to get delegation port ID for %s: %s", hostZone.ChainId, err)) - continue - } - - // If the delegation channel is not open, skip this host zone - _, isOpen := k.icaControllerKeeper.GetOpenActiveChannel(ctx, hostZone.ConnectionId, delegationICAPortID) - if !isOpen { - k.Logger(ctx).Error(fmt.Sprintf("Skipping detokenization ICAs for %s - Delegation ICA channel is closed", hostZone.ChainId)) - continue - } - - // If the delegation channel is open, submit the detokenize ICA - queuedDeposits := k.recordsKeeper.GetLSMDepositsForHostZoneWithStatus( - ctx, - hostZone.ChainId, - recordstypes.LSMTokenDeposit_DETOKENIZATION_QUEUE, - ) - for _, deposit := range queuedDeposits { - if err := k.DetokenizeLSMDeposit(ctx, hostZone, deposit); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to submit detokenization ICAs for %v%s on %s: %s", - deposit.Amount, deposit.Denom, hostZone.ChainId, err.Error())) - continue - } - k.Logger(ctx).Info(fmt.Sprintf("Submitted detokenization ICA for deposit %v%s on %s", deposit.Amount, deposit.Denom, hostZone.ChainId)) - } - } -} diff --git a/x/stakeibc/keeper/msg_server.go b/x/stakeibc/keeper/msg_server.go deleted file mode 100644 index 1bf2b2d6c..000000000 --- a/x/stakeibc/keeper/msg_server.go +++ /dev/null @@ -1,1298 +0,0 @@ -package keeper - -import ( - "context" - "fmt" - "time" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - "github.com/cosmos/gogoproto/proto" - icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" - "github.com/spf13/cast" - - "github.com/milkyway-labs/milkyway/utils" - epochtypes "github.com/milkyway-labs/milkyway/x/epochs/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - recordtypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var ( - CommunityPoolStakeHoldingAddressKey = "community-pool-stake" - CommunityPoolRedeemHoldingAddressKey = "community-pool-redeem" - - DefaultMaxAllowedSwapLossRate = "0.05" - DefaultMaxSwapAmount = sdkmath.NewIntWithDecimal(10, 24) // 10e24 - DefaultMaxMessagesPerIcaTx = uint64(32) -) - -type msgServer struct { - Keeper -} - -// NewMsgServerImpl returns an implementation of the MsgServer interface -// for the provided Keeper. -func NewMsgServerImpl(keeper Keeper) types.MsgServer { - return msgServer{Keeper: keeper} -} - -var _ types.MsgServer = msgServer{} - -func (k msgServer) RegisterHostZone(goCtx context.Context, msg *types.MsgRegisterHostZone) (*types.MsgRegisterHostZoneResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - // Get ConnectionEnd (for counterparty connection) - connectionEnd, found := k.ibcKeeper.ConnectionKeeper.GetConnection(ctx, msg.ConnectionId) - if !found { - errMsg := fmt.Sprintf("invalid connection id, %s not found", msg.ConnectionId) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - counterpartyConnection := connectionEnd.Counterparty - - // Get chain id from connection - chainId, err := k.GetChainIdFromConnectionId(ctx, msg.ConnectionId) - if err != nil { - errMsg := fmt.Sprintf("unable to obtain chain id from connection %s, err: %s", msg.ConnectionId, err.Error()) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - - // get zone - _, found = k.GetHostZone(ctx, chainId) - if found { - errMsg := fmt.Sprintf("invalid chain id, zone for %s already registered", chainId) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - - // check the denom is not already registered - hostZones := k.GetAllHostZone(ctx) - for _, hostZone := range hostZones { - if hostZone.HostDenom == msg.HostDenom { - errMsg := fmt.Sprintf("host denom %s already registered", msg.HostDenom) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - if hostZone.ConnectionId == msg.ConnectionId { - errMsg := fmt.Sprintf("connectionId %s already registered", msg.ConnectionId) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - if hostZone.TransferChannelId == msg.TransferChannelId { - errMsg := fmt.Sprintf("transfer channel %s already registered", msg.TransferChannelId) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - if hostZone.Bech32Prefix == msg.Bech32Prefix { - errMsg := fmt.Sprintf("bech32prefix %s already registered", msg.Bech32Prefix) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - } - - // create and save the zones's module account - depositAddress := types.NewHostZoneDepositAddress(chainId) - if err := utils.CreateModuleAccount(ctx, k.accountKeeper, depositAddress); err != nil { - return nil, errorsmod.Wrapf(err, "unable to create deposit account for host zone %s", chainId) - } - - // Create the host zone's community pool holding accounts - communityPoolStakeAddress := types.NewHostZoneModuleAddress(chainId, CommunityPoolStakeHoldingAddressKey) - communityPoolRedeemAddress := types.NewHostZoneModuleAddress(chainId, CommunityPoolRedeemHoldingAddressKey) - if err := utils.CreateModuleAccount(ctx, k.accountKeeper, communityPoolStakeAddress); err != nil { - return nil, errorsmod.Wrapf(err, "unable to create community pool stake account for host zone %s", chainId) - } - if err := utils.CreateModuleAccount(ctx, k.accountKeeper, communityPoolRedeemAddress); err != nil { - return nil, errorsmod.Wrapf(err, "unable to create community pool redeem account for host zone %s", chainId) - } - - // Validate the community pool treasury address if it's non-empty - if msg.CommunityPoolTreasuryAddress != "" { - _, err := utils.AccAddressFromBech32(msg.CommunityPoolTreasuryAddress, msg.Bech32Prefix) - if err != nil { - return nil, errorsmod.Wrapf(err, "invalid community pool treasury address (%s)", msg.CommunityPoolTreasuryAddress) - } - } - - params := k.GetParams(ctx) - if msg.MinRedemptionRate.IsNil() || msg.MinRedemptionRate.IsZero() { - msg.MinRedemptionRate = sdkmath.LegacyNewDecWithPrec(int64(params.DefaultMinRedemptionRateThreshold), 2) - } - if msg.MaxRedemptionRate.IsNil() || msg.MaxRedemptionRate.IsZero() { - msg.MaxRedemptionRate = sdkmath.LegacyNewDecWithPrec(int64(params.DefaultMaxRedemptionRateThreshold), 2) - } - - // Set the max messages per ICA tx to the default value if it's not specified - maxMessagesPerIcaTx := msg.MaxMessagesPerIcaTx - if maxMessagesPerIcaTx == 0 { - maxMessagesPerIcaTx = DefaultMaxMessagesPerIcaTx - } - - // set the zone - zone := types.HostZone{ - ChainId: chainId, - ConnectionId: msg.ConnectionId, - Bech32Prefix: msg.Bech32Prefix, - IbcDenom: msg.IbcDenom, - HostDenom: msg.HostDenom, - TransferChannelId: msg.TransferChannelId, - // Start sharesToTokens rate at 1 upon registration - RedemptionRate: sdkmath.LegacyNewDec(1), - LastRedemptionRate: sdkmath.LegacyNewDec(1), - UnbondingPeriod: msg.UnbondingPeriod, - DepositAddress: depositAddress.String(), - CommunityPoolStakeHoldingAddress: communityPoolStakeAddress.String(), - CommunityPoolRedeemHoldingAddress: communityPoolRedeemAddress.String(), - MinRedemptionRate: msg.MinRedemptionRate, - MaxRedemptionRate: msg.MaxRedemptionRate, - // Default the inner bounds to the outer bounds - MinInnerRedemptionRate: msg.MinRedemptionRate, - MaxInnerRedemptionRate: msg.MaxRedemptionRate, - LsmLiquidStakeEnabled: msg.LsmLiquidStakeEnabled, - CommunityPoolTreasuryAddress: msg.CommunityPoolTreasuryAddress, - MaxMessagesPerIcaTx: maxMessagesPerIcaTx, - } - // write the zone back to the store - k.SetHostZone(ctx, zone) - - appVersion := string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ - Version: icatypes.Version, - ControllerConnectionId: zone.ConnectionId, - HostConnectionId: counterpartyConnection.ConnectionId, - Encoding: icatypes.EncodingProtobuf, - TxType: icatypes.TxTypeSDKMultiMsg, - })) - - // generate delegate account - // NOTE: in the future, if we implement proxy governance, we'll need many more delegate accounts - delegateAccount := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_DELEGATION) - if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, zone.ConnectionId, delegateAccount, appVersion); err != nil { - errMsg := fmt.Sprintf("unable to register delegation account, err: %s", err.Error()) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - - // generate fee account - feeAccount := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_FEE) - if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, zone.ConnectionId, feeAccount, appVersion); err != nil { - errMsg := fmt.Sprintf("unable to register fee account, err: %s", err.Error()) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - - // generate withdrawal account - withdrawalAccount := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_WITHDRAWAL) - if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, zone.ConnectionId, withdrawalAccount, appVersion); err != nil { - errMsg := fmt.Sprintf("unable to register withdrawal account, err: %s", err.Error()) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - - // generate redemption account - redemptionAccount := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_REDEMPTION) - if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, zone.ConnectionId, redemptionAccount, appVersion); err != nil { - errMsg := fmt.Sprintf("unable to register redemption account, err: %s", err.Error()) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - - // create community pool deposit account - communityPoolDepositAccount := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_COMMUNITY_POOL_DEPOSIT) - if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, zone.ConnectionId, communityPoolDepositAccount, appVersion); err != nil { - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, "failed to register community pool deposit ICA") - } - - // create community pool return account - communityPoolReturnAccount := types.FormatHostZoneICAOwner(chainId, types.ICAAccountType_COMMUNITY_POOL_RETURN) - if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, zone.ConnectionId, communityPoolReturnAccount, appVersion); err != nil { - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, "failed to register community pool return ICA") - } - - // add this host zone to unbonding hostZones, otherwise users won't be able to unbond - // for this host zone until the following day - dayEpochTracker, found := k.GetEpochTracker(ctx, epochtypes.DAY_EPOCH) - if !found { - return nil, errorsmod.Wrapf(types.ErrEpochNotFound, "epoch tracker (%s) not found", epochtypes.DAY_EPOCH) - } - epochUnbondingRecord, found := k.recordsKeeper.GetEpochUnbondingRecord(ctx, dayEpochTracker.EpochNumber) - if !found { - errMsg := "unable to find latest epoch unbonding record" - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(recordstypes.ErrEpochUnbondingRecordNotFound, errMsg) - } - hostZoneUnbonding := &recordstypes.HostZoneUnbonding{ - NativeTokenAmount: sdkmath.ZeroInt(), - StTokenAmount: sdkmath.ZeroInt(), - Denom: zone.HostDenom, - HostZoneId: zone.ChainId, - Status: recordstypes.HostZoneUnbonding_UNBONDING_QUEUE, - } - updatedEpochUnbondingRecord, success := k.recordsKeeper.AddHostZoneToEpochUnbondingRecord(ctx, epochUnbondingRecord.EpochNumber, chainId, hostZoneUnbonding) - if !success { - errMsg := fmt.Sprintf("Failed to set host zone epoch unbonding record: epochNumber %d, chainId %s, hostZoneUnbonding %v", - epochUnbondingRecord.EpochNumber, chainId, hostZoneUnbonding) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrEpochNotFound, errMsg) - } - k.recordsKeeper.SetEpochUnbondingRecord(ctx, *updatedEpochUnbondingRecord) - - // create an empty deposit record for the host zone - strideEpochTracker, found := k.GetEpochTracker(ctx, epochtypes.STRIDE_EPOCH) - if !found { - return nil, errorsmod.Wrapf(types.ErrEpochNotFound, "epoch tracker (%s) not found", epochtypes.STRIDE_EPOCH) - } - depositRecord := recordstypes.DepositRecord{ - Id: 0, - Amount: sdkmath.ZeroInt(), - Denom: zone.HostDenom, - HostZoneId: zone.ChainId, - Status: recordstypes.DepositRecord_TRANSFER_QUEUE, - DepositEpochNumber: strideEpochTracker.EpochNumber, - } - k.recordsKeeper.AppendDepositRecord(ctx, depositRecord) - - // register stToken to consumer reward denom whitelist so that - // stToken rewards can be distributed to provider validators - err = k.RegisterStTokenDenomsToWhitelist(ctx, []string{types.StAssetDenomFromHostZoneDenom(zone.HostDenom)}) - if err != nil { - errMsg := fmt.Sprintf("unable to register reward denom, err: %s", err.Error()) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrFailedToRegisterHostZone, errMsg) - } - - // emit events - ctx.EventManager().EmitEvent( - sdk.NewEvent( - sdk.EventTypeMessage, - sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), - ), - ) - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeRegisterZone, - sdk.NewAttribute(types.AttributeKeyConnectionId, msg.ConnectionId), - sdk.NewAttribute(types.AttributeKeyRecipientChain, chainId), - ), - ) - - return &types.MsgRegisterHostZoneResponse{}, nil -} - -func (ms msgServer) UpdateHostZoneParams(goCtx context.Context, msg *types.MsgUpdateHostZoneParams) (*types.MsgUpdateHostZoneParamsResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - if ms.authority != msg.Authority { - return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, msg.Authority) - } - - hostZone, found := ms.Keeper.GetHostZone(ctx, msg.ChainId) - if !found { - return nil, types.ErrHostZoneNotFound.Wrapf("host zone %s not found", msg.ChainId) - } - - maxMessagesPerTx := msg.MaxMessagesPerIcaTx - if maxMessagesPerTx == 0 { - maxMessagesPerTx = DefaultMaxMessagesPerIcaTx - } - hostZone.MaxMessagesPerIcaTx = maxMessagesPerTx - ms.Keeper.SetHostZone(ctx, hostZone) - - return &types.MsgUpdateHostZoneParamsResponse{}, nil -} - -func (k msgServer) AddValidators(goCtx context.Context, msg *types.MsgAddValidators) (*types.MsgAddValidatorsResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - for _, validator := range msg.Validators { - if err := k.AddValidatorToHostZone(ctx, msg.HostZone, *validator, false); err != nil { - return nil, err - } - - // Query and store the validator's sharesToTokens rate - if err := k.QueryValidatorSharesToTokensRate(ctx, msg.HostZone, validator.Address); err != nil { - return nil, err - } - } - - // Confirm none of the validator's exceed the weight cap - if err := k.CheckValidatorWeightsBelowCap(ctx, msg.HostZone); err != nil { - return nil, err - } - - return &types.MsgAddValidatorsResponse{}, nil -} - -func (k msgServer) DeleteValidator(goCtx context.Context, msg *types.MsgDeleteValidator) (*types.MsgDeleteValidatorResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - err := k.RemoveValidatorFromHostZone(ctx, msg.HostZone, msg.ValAddr) - if err != nil { - errMsg := fmt.Sprintf("Validator (%s) not removed from host zone (%s) | err: %s", msg.ValAddr, msg.HostZone, err.Error()) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrValidatorNotRemoved, errMsg) - } - - return &types.MsgDeleteValidatorResponse{}, nil -} - -func (k msgServer) ChangeValidatorWeight(goCtx context.Context, msg *types.MsgChangeValidatorWeights) (*types.MsgChangeValidatorWeightsResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - hostZone, found := k.GetHostZone(ctx, msg.HostZone) - if !found { - return nil, types.ErrInvalidHostZone - } - - for _, weightChange := range msg.ValidatorWeights { - - validatorFound := false - for _, validator := range hostZone.Validators { - if validator.Address == weightChange.Address { - validator.Weight = weightChange.Weight - k.SetHostZone(ctx, hostZone) - - validatorFound = true - break - } - } - - if !validatorFound { - return nil, types.ErrValidatorNotFound - } - } - - // Confirm the new weights wouldn't cause any validator to exceed the weight cap - if err := k.CheckValidatorWeightsBelowCap(ctx, msg.HostZone); err != nil { - return nil, errorsmod.Wrapf(err, "unable to change validator weight") - } - - return &types.MsgChangeValidatorWeightsResponse{}, nil -} - -func (k msgServer) RebalanceValidators(goCtx context.Context, msg *types.MsgRebalanceValidators) (*types.MsgRebalanceValidatorsResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - k.Logger(ctx).Info(fmt.Sprintf("RebalanceValidators executing %v", msg)) - - if err := k.RebalanceDelegationsForHostZone(ctx, msg.HostZone); err != nil { - return nil, err - } - return &types.MsgRebalanceValidatorsResponse{}, nil -} - -func (k msgServer) ClearBalance(goCtx context.Context, msg *types.MsgClearBalance) (*types.MsgClearBalanceResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - zone, found := k.GetHostZone(ctx, msg.ChainId) - if !found { - return nil, errorsmod.Wrapf(types.ErrInvalidHostZone, "chainId: %s", msg.ChainId) - } - if zone.FeeIcaAddress == "" { - return nil, errorsmod.Wrapf(types.ErrICAAccountNotFound, "fee acount not found for chainId: %s", msg.ChainId) - } - - sourcePort := ibctransfertypes.PortID - // Should this be a param? - // I think as long as we have a timeout on this, it should be hard to attack (even if someone send a tx on a bad channel, it would be reverted relatively quickly) - sourceChannel := msg.Channel - coinString := cast.ToString(msg.Amount) + zone.GetHostDenom() - tokens, err := sdk.ParseCoinNormalized(coinString) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("failed to parse coin (%s)", coinString)) - return nil, errorsmod.Wrapf(err, "failed to parse coin (%s)", coinString) - } - // KeyICATimeoutNanos are for our Stride ICA calls, KeyFeeTransferTimeoutNanos is for the IBC transfer - feeTransferTimeoutNanos := k.GetParams(ctx).FeeTransferTimeoutNanos - timeoutTimestamp := cast.ToUint64(ctx.BlockTime().UnixNano()) + feeTransferTimeoutNanos - msgs := []proto.Message{ - &ibctransfertypes.MsgTransfer{ - SourcePort: sourcePort, - SourceChannel: sourceChannel, - Token: tokens, - Sender: zone.FeeIcaAddress, // fee account on the host zone - Receiver: types.FeeAccount, // fee account on stride - TimeoutTimestamp: timeoutTimestamp, - }, - } - - connectionId := zone.GetConnectionId() - - icaTimeoutNanos := k.GetParams(ctx).IcaTimeoutNanos - icaTimeoutNanos = cast.ToUint64(ctx.BlockTime().UnixNano()) + icaTimeoutNanos - - _, err = k.SubmitTxs(ctx, connectionId, msgs, types.ICAAccountType_FEE, icaTimeoutNanos, "", nil) - if err != nil { - return nil, errorsmod.Wrapf(err, "failed to submit txs") - } - return &types.MsgClearBalanceResponse{}, nil -} - -// Exchanges a user's native tokens for stTokens using the current redemption rate -// The native tokens must live on Stride with an IBC denomination before this function is called -// The typical flow consists, first, of a transfer of native tokens from the host zone to Stride, -// -// and then the invocation of this LiquidStake function -// -// WARNING: This function is invoked from the begin/end blocker in a way that does not revert partial state when -// -// an error is thrown (i.e. the execution is non-atomic). -// As a result, it is important that the validation steps are positioned at the top of the function, -// and logic that creates state changes (e.g. bank sends, mint) appear towards the end of the function -func (k msgServer) LiquidStake(goCtx context.Context, msg *types.MsgLiquidStake) (*types.MsgLiquidStakeResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Get the host zone from the base denom in the message (e.g. uatom) - hostZone, err := k.GetHostZoneFromHostDenom(ctx, msg.HostDenom) - if err != nil { - return nil, errorsmod.Wrapf(types.ErrInvalidToken, "no host zone found for denom (%s)", msg.HostDenom) - } - - // Error immediately if the host zone is halted - if hostZone.Halted { - return nil, errorsmod.Wrapf(types.ErrHaltedHostZone, "halted host zone found for denom (%s)", msg.HostDenom) - } - - // Get user and module account addresses - liquidStakerAddress, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return nil, errorsmod.Wrapf(err, "user's address is invalid") - } - hostZoneDepositAddress, err := sdk.AccAddressFromBech32(hostZone.DepositAddress) - if err != nil { - return nil, errorsmod.Wrapf(err, "host zone address is invalid") - } - - // Safety check: redemption rate must be within safety bounds - rateIsSafe, err := k.IsRedemptionRateWithinSafetyBounds(ctx, *hostZone) - if !rateIsSafe || (err != nil) { - return nil, errorsmod.Wrapf(types.ErrRedemptionRateOutsideSafetyBounds, "HostZone: %s, err: %s", hostZone.ChainId, err.Error()) - } - - // Grab the deposit record that will be used for record keeping - strideEpochTracker, found := k.GetEpochTracker(ctx, epochtypes.STRIDE_EPOCH) - if !found { - return nil, errorsmod.Wrapf(sdkerrors.ErrNotFound, "no epoch number for epoch (%s)", epochtypes.STRIDE_EPOCH) - } - depositRecord, found := k.recordsKeeper.GetTransferDepositRecordByEpochAndChain(ctx, strideEpochTracker.EpochNumber, hostZone.ChainId) - if !found { - return nil, errorsmod.Wrapf(sdkerrors.ErrNotFound, "no deposit record for epoch (%d)", strideEpochTracker.EpochNumber) - } - - // The tokens that are sent to the protocol are denominated in the ibc hash of the native token on stride (e.g. ibc/xxx) - nativeDenom := hostZone.IbcDenom - nativeCoin := sdk.NewCoin(nativeDenom, msg.Amount) - if !types.IsIBCToken(nativeDenom) { - return nil, errorsmod.Wrapf(types.ErrInvalidToken, "denom is not an IBC token (%s)", nativeDenom) - } - - // Confirm the user has a sufficient balance to execute the liquid stake - balance := k.bankKeeper.GetBalance(ctx, liquidStakerAddress, nativeDenom) - if balance.IsLT(nativeCoin) { - return nil, errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, "balance is lower than staking amount. staking amount: %v, balance: %v", msg.Amount, balance.Amount) - } - - // Determine the amount of stTokens to mint using the redemption rate - stAmount := (sdkmath.LegacyNewDecFromInt(msg.Amount).Quo(hostZone.RedemptionRate)).TruncateInt() - if stAmount.IsZero() { - return nil, errorsmod.Wrapf(types.ErrInsufficientLiquidStake, - "Liquid stake of %s%s would return 0 stTokens", msg.Amount.String(), hostZone.HostDenom) - } - - // Transfer the native tokens from the user to module account - if err := k.bankKeeper.SendCoins(ctx, liquidStakerAddress, hostZoneDepositAddress, sdk.NewCoins(nativeCoin)); err != nil { - return nil, errorsmod.Wrap(err, "failed to send tokens from Account to Module") - } - - // Mint the stTokens and transfer them to the user - stDenom := types.StAssetDenomFromHostZoneDenom(msg.HostDenom) - stCoin := sdk.NewCoin(stDenom, stAmount) - if err := k.bankKeeper.MintCoins(ctx, types.ModuleName, sdk.NewCoins(stCoin)); err != nil { - return nil, errorsmod.Wrapf(err, "Failed to mint coins") - } - if err := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, types.ModuleName, liquidStakerAddress, sdk.NewCoins(stCoin)); err != nil { - return nil, errorsmod.Wrapf(err, "Failed to send %s from module to account", stCoin.String()) - } - - // Update the liquid staked amount on the deposit record - depositRecord.Amount = depositRecord.Amount.Add(msg.Amount) - k.recordsKeeper.SetDepositRecord(ctx, *depositRecord) - - // Emit liquid stake event - EmitSuccessfulLiquidStakeEvent(ctx, msg, *hostZone, stAmount) - - k.hooks.AfterLiquidStake(ctx, liquidStakerAddress) - return &types.MsgLiquidStakeResponse{StToken: stCoin}, nil -} - -func (k msgServer) RedeemStake(goCtx context.Context, msg *types.MsgRedeemStake) (*types.MsgRedeemStakeResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - k.Logger(ctx).Info(fmt.Sprintf("redeem stake: %s", msg.String())) - - // ----------------- PRELIMINARY CHECKS ----------------- - // get our addresses, make sure they're valid - sender, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "creator address is invalid: %s. err: %s", msg.Creator, err.Error()) - } - // then make sure host zone is valid - hostZone, found := k.GetHostZone(ctx, msg.HostZone) - if !found { - return nil, errorsmod.Wrapf(types.ErrInvalidHostZone, "host zone is invalid: %s", msg.HostZone) - } - - if hostZone.Halted { - k.Logger(ctx).Error(fmt.Sprintf("Host Zone halted for zone (%s)", msg.HostZone)) - return nil, errorsmod.Wrapf(types.ErrHaltedHostZone, "halted host zone found for zone (%s)", msg.HostZone) - } - - // first construct a user redemption record - epochTracker, found := k.GetEpochTracker(ctx, "day") - if !found { - return nil, errorsmod.Wrapf(types.ErrEpochNotFound, "epoch tracker found: %s", "day") - } - - // ensure the recipient address is a valid bech32 address on the hostZone - _, err = utils.AccAddressFromBech32(msg.Receiver, hostZone.Bech32Prefix) - if err != nil { - return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid receiver address (%s)", err) - } - - // construct desired unstaking amount from host zone - stDenom := types.StAssetDenomFromHostZoneDenom(hostZone.HostDenom) - nativeAmount := sdkmath.LegacyNewDecFromInt(msg.Amount).Mul(hostZone.RedemptionRate).TruncateInt() - - if nativeAmount.GT(hostZone.TotalDelegations) { - return nil, errorsmod.Wrapf(types.ErrInvalidAmount, "cannot unstake an amount g.t. staked balance on host zone: %v", msg.Amount) - } - - // safety check: redemption rate must be within safety bounds - rateIsSafe, err := k.IsRedemptionRateWithinSafetyBounds(ctx, hostZone) - if !rateIsSafe || (err != nil) { - errMsg := fmt.Sprintf("IsRedemptionRateWithinSafetyBounds check failed. hostZone: %s, err: %s", hostZone.String(), err.Error()) - return nil, errorsmod.Wrapf(types.ErrRedemptionRateOutsideSafetyBounds, errMsg) - } - - // safety checks on the coin - // - Redemption amount must be positive - if !nativeAmount.IsPositive() { - return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidCoins, "amount must be greater than 0. found: %v", msg.Amount) - } - // - Creator owns at least "amount" stAssets - balance := k.bankKeeper.GetBalance(ctx, sender, stDenom) - if balance.Amount.LT(msg.Amount) { - return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidCoins, "balance is lower than redemption amount. redemption amount: %v, balance %v: ", msg.Amount, balance.Amount) - } - - // ----------------- UNBONDING RECORD KEEPING ----------------- - // Fetch the record - redemptionId := recordstypes.UserRedemptionRecordKeyFormatter(hostZone.ChainId, epochTracker.EpochNumber, msg.Receiver) - userRedemptionRecord, userHasRedeemedThisEpoch := k.recordsKeeper.GetUserRedemptionRecord(ctx, redemptionId) - if userHasRedeemedThisEpoch { - k.Logger(ctx).Info(fmt.Sprintf("UserRedemptionRecord found for %s", redemptionId)) - // Add the unbonded amount to the UserRedemptionRecord - // The record is set below - userRedemptionRecord.StTokenAmount = userRedemptionRecord.StTokenAmount.Add(msg.Amount) - userRedemptionRecord.NativeTokenAmount = userRedemptionRecord.NativeTokenAmount.Add(nativeAmount) - } else { - // First time a user is redeeming this epoch - userRedemptionRecord = recordstypes.UserRedemptionRecord{ - Id: redemptionId, - Receiver: msg.Receiver, - NativeTokenAmount: nativeAmount, - Denom: hostZone.HostDenom, - HostZoneId: hostZone.ChainId, - EpochNumber: epochTracker.EpochNumber, - StTokenAmount: msg.Amount, - // claimIsPending represents whether a redemption is currently being claimed, - // contingent on the host zone unbonding having status CLAIMABLE - ClaimIsPending: false, - } - k.Logger(ctx).Info(fmt.Sprintf("UserRedemptionRecord not found - creating for %s", redemptionId)) - } - - // then add undelegation amount to epoch unbonding records - epochUnbondingRecord, found := k.recordsKeeper.GetEpochUnbondingRecord(ctx, epochTracker.EpochNumber) - if !found { - k.Logger(ctx).Error("latest epoch unbonding record not found") - return nil, errorsmod.Wrapf(recordstypes.ErrEpochUnbondingRecordNotFound, "latest epoch unbonding record not found") - } - // get relevant host zone on this epoch unbonding record - hostZoneUnbonding, found := k.recordsKeeper.GetHostZoneUnbondingByChainId(ctx, epochUnbondingRecord.EpochNumber, hostZone.ChainId) - if !found { - return nil, errorsmod.Wrapf(types.ErrInvalidHostZone, "host zone not found in unbondings: %s", hostZone.ChainId) - } - hostZoneUnbonding.NativeTokenAmount = hostZoneUnbonding.NativeTokenAmount.Add(nativeAmount) - if !userHasRedeemedThisEpoch { - // Only append a UserRedemptionRecord to the HZU if it wasn't previously appended - hostZoneUnbonding.UserRedemptionRecords = append(hostZoneUnbonding.UserRedemptionRecords, userRedemptionRecord.Id) - } - - // Escrow user's balance - redeemCoin := sdk.NewCoins(sdk.NewCoin(stDenom, msg.Amount)) - depositAddress, err := sdk.AccAddressFromBech32(hostZone.DepositAddress) - if err != nil { - return nil, fmt.Errorf("could not bech32 decode address %s of zone with id: %s", hostZone.DepositAddress, hostZone.ChainId) - } - err = k.bankKeeper.SendCoins(ctx, sender, depositAddress, redeemCoin) - if err != nil { - k.Logger(ctx).Error("Failed to send sdk.NewCoins(inCoins) from account to module") - return nil, errorsmod.Wrapf(types.ErrInsufficientFunds, "couldn't send %v derivative %s tokens to module account. err: %s", msg.Amount, hostZone.HostDenom, err.Error()) - } - - // record the number of stAssets that should be burned after unbonding - hostZoneUnbonding.StTokenAmount = hostZoneUnbonding.StTokenAmount.Add(msg.Amount) - - // Actually set the records, we wait until now to prevent any errors - k.recordsKeeper.SetUserRedemptionRecord(ctx, userRedemptionRecord) - - // Set the UserUnbondingRecords on the proper HostZoneUnbondingRecord - hostZoneUnbondings := epochUnbondingRecord.GetHostZoneUnbondings() - if hostZoneUnbondings == nil { - hostZoneUnbondings = []*recordstypes.HostZoneUnbonding{} - epochUnbondingRecord.HostZoneUnbondings = hostZoneUnbondings - } - updatedEpochUnbondingRecord, success := k.recordsKeeper.AddHostZoneToEpochUnbondingRecord(ctx, epochUnbondingRecord.EpochNumber, hostZone.ChainId, hostZoneUnbonding) - if !success { - k.Logger(ctx).Error(fmt.Sprintf("Failed to set host zone epoch unbonding record: epochNumber %d, chainId %s, hostZoneUnbonding %v", epochUnbondingRecord.EpochNumber, hostZone.ChainId, hostZoneUnbonding)) - return nil, errorsmod.Wrapf(types.ErrEpochNotFound, "couldn't set host zone epoch unbonding record") - } - k.recordsKeeper.SetEpochUnbondingRecord(ctx, *updatedEpochUnbondingRecord) - - k.Logger(ctx).Info(fmt.Sprintf("executed redeem stake: %s", msg.String())) - EmitSuccessfulRedeemStakeEvent(ctx, msg, hostZone, nativeAmount, msg.Amount) - - return &types.MsgRedeemStakeResponse{}, nil -} - -// Exchanges a user's LSM tokenized shares for stTokens using the current redemption rate -// The LSM tokens must live on Stride as an IBC voucher (whose denomtrace we recognize) -// before this function is called -// -// The typical flow: -// - A staker tokenizes their delegation on the host zone -// - The staker IBC transfers their tokenized shares to Stride -// - They then call LSMLiquidStake -// - - The staker's LSM Tokens are sent to the Stride module account -// - - The staker receives stTokens -// -// As a safety measure, at period checkpoints, the validator's sharesToTokens rate is queried and the transaction -// is not settled until the query returns -// As a result, this transaction has been split up into a (1) Start and (2) Finish function -// - If no query is needed, (2) is called immediately after (1) -// - If a query is needed, (2) is called in the query callback -// -// The transaction response indicates if the query occurred by returning an attribute `TransactionComplete` set to false -func (k msgServer) LSMLiquidStake(goCtx context.Context, msg *types.MsgLSMLiquidStake) (*types.MsgLSMLiquidStakeResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - lsmLiquidStake, err := k.StartLSMLiquidStake(ctx, *msg) - if err != nil { - return nil, err - } - - if k.ShouldCheckIfValidatorWasSlashed(ctx, *lsmLiquidStake.Validator, msg.Amount) { - if err := k.SubmitValidatorSlashQuery(ctx, lsmLiquidStake); err != nil { - return nil, err - } - - EmitPendingLSMLiquidStakeEvent(ctx, *lsmLiquidStake.HostZone, *lsmLiquidStake.Deposit) - - return &types.MsgLSMLiquidStakeResponse{TransactionComplete: false}, nil - } - - async := false - if err := k.FinishLSMLiquidStake(ctx, lsmLiquidStake, async); err != nil { - return nil, err - } - - return &types.MsgLSMLiquidStakeResponse{TransactionComplete: true}, nil -} - -// Gov tx to register a trade route that swaps reward tokens for a different denom -// -// Example proposal: -// -// { -// "title": "Create a new trade route for host chain X", -// "metadata": "Create a new trade route for host chain X", -// "summary": "Create a new trade route for host chain X", -// "messages":[ -// { -// "@type": "/stride.stakeibc.MsgCreateTradeRoute", -// "authority": "stride10d07y265gmmuvt4z0w9aw880jnsr700jefnezl", -// -// "stride_to_host_connection_id": "connection-0", -// "stride_to_reward_connection_id": "connection-1", -// "stride_to_trade_connection_id": "connection-2", -// -// "host_to_reward_transfer_channel_id": "channel-0", -// "reward_to_trade_transfer_channel_id": "channel-1", -// "trade_to_host_transfer_channel_id": "channel-2", -// -// "reward_denom_on_host": "ibc/rewardTokenXXX", -// "reward_denom_on_reward": "rewardToken", -// "reward_denom_on_trade": "ibc/rewardTokenYYY", -// "host_denom_on_trade": "ibc/hostTokenZZZ", -// "host_denom_on_host": "hostToken", -// -// "pool_id": 1, -// "max_allowed_swap_loss_rate": "0.05" -// "min_swap_amount": "10000000", -// "max_swap_amount": "1000000000" -// } -// ], -// "deposit": "2000000000ustrd" -// } -// -// >>> strided tx gov submit-proposal {proposal_file.json} --from wallet -func (ms msgServer) CreateTradeRoute(goCtx context.Context, msg *types.MsgCreateTradeRoute) (*types.MsgCreateTradeRouteResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - if ms.authority != msg.Authority { - return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, msg.Authority) - } - - // Validate trade route does not already exist for this denom - _, found := ms.Keeper.GetTradeRoute(ctx, msg.RewardDenomOnReward, msg.HostDenomOnHost) - if found { - return nil, errorsmod.Wrapf(types.ErrTradeRouteAlreadyExists, - "trade route already exists for rewardDenom %s, hostDenom %s", msg.RewardDenomOnReward, msg.HostDenomOnHost) - } - - // Confirm the host chain exists and the withdrawal address has been initialized - hostZone, err := ms.Keeper.GetActiveHostZone(ctx, msg.HostChainId) - if err != nil { - return nil, err - } - if hostZone.WithdrawalIcaAddress == "" { - return nil, errorsmod.Wrapf(types.ErrICAAccountNotFound, "withdrawal account not initialized on host zone") - } - - // Register the new ICA accounts - tradeRouteId := types.GetTradeRouteId(msg.RewardDenomOnReward, msg.HostDenomOnHost) - hostICA := types.ICAAccount{ - ChainId: msg.HostChainId, - Type: types.ICAAccountType_WITHDRAWAL, - ConnectionId: hostZone.ConnectionId, - Address: hostZone.WithdrawalIcaAddress, - } - - unwindConnectionId := msg.StrideToRewardConnectionId - unwindICAType := types.ICAAccountType_CONVERTER_UNWIND - unwindICA, err := ms.Keeper.RegisterTradeRouteICAAccount(ctx, tradeRouteId, unwindConnectionId, unwindICAType) - if err != nil { - return nil, errorsmod.Wrapf(err, "unable to register the unwind ICA account") - } - - tradeConnectionId := msg.StrideToTradeConnectionId - tradeICAType := types.ICAAccountType_CONVERTER_TRADE - tradeICA, err := ms.Keeper.RegisterTradeRouteICAAccount(ctx, tradeRouteId, tradeConnectionId, tradeICAType) - if err != nil { - return nil, errorsmod.Wrapf(err, "unable to register the trade ICA account") - } - - // If a max allowed swap loss is not provided, use the default - maxAllowedSwapLossRate := msg.MaxAllowedSwapLossRate - if maxAllowedSwapLossRate == "" { - maxAllowedSwapLossRate = DefaultMaxAllowedSwapLossRate - } - maxSwapAmount := msg.MaxSwapAmount - if maxSwapAmount.IsZero() { - maxSwapAmount = DefaultMaxSwapAmount - } - - // Create the trade config to specify parameters needed for the swap - tradeConfig := types.TradeConfig{ - PoolId: msg.PoolId, - SwapPrice: sdkmath.LegacyZeroDec(), // this should only ever be set by ICQ so initialize to blank - PriceUpdateTimestamp: 0, - - MaxAllowedSwapLossRate: sdkmath.LegacyMustNewDecFromStr(maxAllowedSwapLossRate), - MinSwapAmount: msg.MinSwapAmount, - MaxSwapAmount: maxSwapAmount, - } - - // Finally build and store the main trade route - tradeRoute := types.TradeRoute{ - RewardDenomOnHostZone: msg.RewardDenomOnHost, - RewardDenomOnRewardZone: msg.RewardDenomOnReward, - RewardDenomOnTradeZone: msg.RewardDenomOnTrade, - HostDenomOnTradeZone: msg.HostDenomOnTrade, - HostDenomOnHostZone: msg.HostDenomOnHost, - - HostAccount: hostICA, - RewardAccount: unwindICA, - TradeAccount: tradeICA, - - HostToRewardChannelId: msg.HostToRewardTransferChannelId, - RewardToTradeChannelId: msg.RewardToTradeTransferChannelId, - TradeToHostChannelId: msg.TradeToHostTransferChannelId, - - TradeConfig: tradeConfig, - } - - ms.Keeper.SetTradeRoute(ctx, tradeRoute) - - return &types.MsgCreateTradeRouteResponse{}, nil -} - -// Gov tx to remove a trade route -// -// Example proposal: -// -// { -// "title": "Remove a new trade route for host chain X", -// "metadata": "Remove a new trade route for host chain X", -// "summary": "Remove a new trade route for host chain X", -// "messages":[ -// { -// "@type": "/stride.stakeibc.MsgDeleteTradeRoute", -// "authority": "stride10d07y265gmmuvt4z0w9aw880jnsr700jefnezl", -// "reward_denom": "rewardToken", -// "host_denom": "hostToken -// } -// ], -// "deposit": "2000000000ustrd" -// } -// -// >>> strided tx gov submit-proposal {proposal_file.json} --from wallet -func (ms msgServer) DeleteTradeRoute(goCtx context.Context, msg *types.MsgDeleteTradeRoute) (*types.MsgDeleteTradeRouteResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - if ms.authority != msg.Authority { - return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, msg.Authority) - } - - _, found := ms.Keeper.GetTradeRoute(ctx, msg.RewardDenom, msg.HostDenom) - if !found { - return nil, errorsmod.Wrapf(types.ErrTradeRouteNotFound, - "no trade route for rewardDenom %s and hostDenom %s", msg.RewardDenom, msg.HostDenom) - } - - ms.Keeper.RemoveTradeRoute(ctx, msg.RewardDenom, msg.HostDenom) - - return &types.MsgDeleteTradeRouteResponse{}, nil -} - -// Gov tx to update the trade config of a trade route -// -// Example proposal: -// -// { -// "title": "Update a the trade config for host chain X", -// "metadata": "Update a the trade config for host chain X", -// "summary": "Update a the trade config for host chain X", -// "messages":[ -// { -// "@type": "/stride.stakeibc.MsgUpdateTradeRoute", -// "authority": "stride10d07y265gmmuvt4z0w9aw880jnsr700jefnezl", -// -// "pool_id": 1, -// "max_allowed_swap_loss_rate": "0.05", -// "min_swap_amount": "10000000", -// "max_swap_amount": "1000000000" -// } -// ], -// "deposit": "2000000000ustrd" -// } -// -// >>> strided tx gov submit-proposal {proposal_file.json} --from wallet -func (ms msgServer) UpdateTradeRoute(goCtx context.Context, msg *types.MsgUpdateTradeRoute) (*types.MsgUpdateTradeRouteResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - if ms.authority != msg.Authority { - return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.authority, msg.Authority) - } - - route, found := ms.Keeper.GetTradeRoute(ctx, msg.RewardDenom, msg.HostDenom) - if !found { - return nil, errorsmod.Wrapf(types.ErrTradeRouteNotFound, - "no trade route for rewardDenom %s and hostDenom %s", msg.RewardDenom, msg.HostDenom) - } - - maxAllowedSwapLossRate := msg.MaxAllowedSwapLossRate - if maxAllowedSwapLossRate == "" { - maxAllowedSwapLossRate = DefaultMaxAllowedSwapLossRate - } - maxSwapAmount := msg.MaxSwapAmount - if maxSwapAmount.IsZero() { - maxSwapAmount = DefaultMaxSwapAmount - } - - updatedConfig := types.TradeConfig{ - PoolId: msg.PoolId, - - SwapPrice: sdkmath.LegacyZeroDec(), - PriceUpdateTimestamp: 0, - - MaxAllowedSwapLossRate: sdkmath.LegacyMustNewDecFromStr(maxAllowedSwapLossRate), - MinSwapAmount: msg.MinSwapAmount, - MaxSwapAmount: maxSwapAmount, - } - - route.TradeConfig = updatedConfig - ms.Keeper.SetTradeRoute(ctx, route) - - return &types.MsgUpdateTradeRouteResponse{}, nil -} - -func (k msgServer) RestoreInterchainAccount(goCtx context.Context, msg *types.MsgRestoreInterchainAccount) (*types.MsgRestoreInterchainAccountResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Get ConnectionEnd (for counterparty connection) - connectionEnd, found := k.ibcKeeper.ConnectionKeeper.GetConnection(ctx, msg.ConnectionId) - if !found { - return nil, errorsmod.Wrapf(connectiontypes.ErrConnectionNotFound, "connection %s not found", msg.ConnectionId) - } - counterpartyConnection := connectionEnd.Counterparty - - // only allow restoring an account if it already exists - portID, err := icatypes.NewControllerPortID(msg.AccountOwner) - if err != nil { - return nil, err - } - _, exists := k.icaControllerKeeper.GetInterchainAccountAddress(ctx, msg.ConnectionId, portID) - if !exists { - return nil, errorsmod.Wrapf(types.ErrInvalidInterchainAccountAddress, - "ICA controller account address not found: %s", msg.AccountOwner) - } - - appVersion := string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ - Version: icatypes.Version, - ControllerConnectionId: msg.ConnectionId, - HostConnectionId: counterpartyConnection.ConnectionId, - Encoding: icatypes.EncodingProtobuf, - TxType: icatypes.TxTypeSDKMultiMsg, - })) - - if err := k.icaControllerKeeper.RegisterInterchainAccount(ctx, msg.ConnectionId, msg.AccountOwner, appVersion); err != nil { - return nil, errorsmod.Wrapf(err, "unable to register account for owner %s", msg.AccountOwner) - } - - // If we're restoring a delegation account, we also have to reset record state - if msg.AccountOwner == types.FormatHostZoneICAOwner(msg.ChainId, types.ICAAccountType_DELEGATION) { - hostZone, found := k.GetHostZone(ctx, msg.ChainId) - if !found { - return nil, types.ErrHostZoneNotFound.Wrapf("delegation ICA supplied, but no associated host zone") - } - - // Since any ICAs along the original channel will never get relayed, - // we have to reset the delegation_changes_in_progress field on each validator - for _, validator := range hostZone.Validators { - validator.DelegationChangesInProgress = 0 - } - k.SetHostZone(ctx, hostZone) - - // revert DELEGATION_IN_PROGRESS records for the closed ICA channel (so that they can be staked) - depositRecords := k.recordsKeeper.GetAllDepositRecord(ctx) - for _, depositRecord := range depositRecords { - // only revert records for the select host zone - if depositRecord.HostZoneId == hostZone.ChainId && depositRecord.Status == recordtypes.DepositRecord_DELEGATION_IN_PROGRESS { - depositRecord.Status = recordtypes.DepositRecord_DELEGATION_QUEUE - k.Logger(ctx).Info(fmt.Sprintf("Setting DepositRecord %d to status DepositRecord_DELEGATION_IN_PROGRESS", depositRecord.Id)) - k.recordsKeeper.SetDepositRecord(ctx, depositRecord) - } - } - - // revert epoch unbonding records for the closed ICA channel - epochUnbondingRecords := k.recordsKeeper.GetAllEpochUnbondingRecord(ctx) - epochNumberForPendingUnbondingRecords := []uint64{} - epochNumberForPendingTransferRecords := []uint64{} - for _, epochUnbondingRecord := range epochUnbondingRecords { - // only revert records for the select host zone - hostZoneUnbonding, found := k.recordsKeeper.GetHostZoneUnbondingByChainId(ctx, epochUnbondingRecord.EpochNumber, hostZone.ChainId) - if !found { - k.Logger(ctx).Info(fmt.Sprintf("No HostZoneUnbonding found for chainId: %s, epoch: %d", hostZone.ChainId, epochUnbondingRecord.EpochNumber)) - continue - } - - // Revert UNBONDING_IN_PROGRESS and EXIT_TRANSFER_IN_PROGRESS records - if hostZoneUnbonding.Status == recordtypes.HostZoneUnbonding_UNBONDING_IN_PROGRESS { - k.Logger(ctx).Info(fmt.Sprintf("HostZoneUnbonding for %s at EpochNumber %d is stuck in status %s", - hostZone.ChainId, epochUnbondingRecord.EpochNumber, recordtypes.HostZoneUnbonding_UNBONDING_IN_PROGRESS.String(), - )) - epochNumberForPendingUnbondingRecords = append(epochNumberForPendingUnbondingRecords, epochUnbondingRecord.EpochNumber) - - } else if hostZoneUnbonding.Status == recordtypes.HostZoneUnbonding_EXIT_TRANSFER_IN_PROGRESS { - k.Logger(ctx).Info(fmt.Sprintf("HostZoneUnbonding for %s at EpochNumber %d to in status %s", - hostZone.ChainId, epochUnbondingRecord.EpochNumber, recordtypes.HostZoneUnbonding_EXIT_TRANSFER_IN_PROGRESS.String(), - )) - epochNumberForPendingTransferRecords = append(epochNumberForPendingTransferRecords, epochUnbondingRecord.EpochNumber) - } - } - // Revert UNBONDING_IN_PROGRESS records to UNBONDING_QUEUE - err := k.recordsKeeper.SetHostZoneUnbondingStatus(ctx, hostZone.ChainId, epochNumberForPendingUnbondingRecords, recordtypes.HostZoneUnbonding_UNBONDING_QUEUE) - if err != nil { - errMsg := fmt.Sprintf("unable to update host zone unbonding record status to %s for chainId: %s and epochUnbondingRecordIds: %v, err: %s", - recordtypes.HostZoneUnbonding_UNBONDING_QUEUE.String(), hostZone.ChainId, epochNumberForPendingUnbondingRecords, err) - k.Logger(ctx).Error(errMsg) - return nil, err - } - - // Revert EXIT_TRANSFER_IN_PROGRESS records to EXIT_TRANSFER_QUEUE - err = k.recordsKeeper.SetHostZoneUnbondingStatus(ctx, hostZone.ChainId, epochNumberForPendingTransferRecords, recordtypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE) - if err != nil { - errMsg := fmt.Sprintf("unable to update host zone unbonding record status to %s for chainId: %s and epochUnbondingRecordIds: %v, err: %s", - recordtypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE.String(), hostZone.ChainId, epochNumberForPendingTransferRecords, err) - k.Logger(ctx).Error(errMsg) - return nil, err - } - - // Revert all pending LSM Detokenizations from status DETOKENIZATION_IN_PROGRESS to status DETOKENIZATION_QUEUE - pendingDeposits := k.recordsKeeper.GetLSMDepositsForHostZoneWithStatus(ctx, hostZone.ChainId, recordtypes.LSMTokenDeposit_DETOKENIZATION_IN_PROGRESS) - for _, lsmDeposit := range pendingDeposits { - k.Logger(ctx).Info(fmt.Sprintf("Setting LSMTokenDeposit %s to status DETOKENIZATION_QUEUE", lsmDeposit.Denom)) - k.recordsKeeper.UpdateLSMTokenDepositStatus(ctx, lsmDeposit, recordtypes.LSMTokenDeposit_DETOKENIZATION_QUEUE) - } - } - - return &types.MsgRestoreInterchainAccountResponse{}, nil -} - -// This kicks off two ICQs, each with a callback, that will update the number of tokens on a validator -// after being slashed. The flow is: -// 1. QueryValidatorSharesToTokensRate (ICQ) -// 2. ValidatorSharesToTokensRate (CALLBACK) -// 3. SubmitDelegationICQ (ICQ) -// 4. DelegatorSharesCallback (CALLBACK) -func (k msgServer) UpdateValidatorSharesExchRate(goCtx context.Context, msg *types.MsgUpdateValidatorSharesExchRate) (*types.MsgUpdateValidatorSharesExchRateResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - if err := k.QueryValidatorSharesToTokensRate(ctx, msg.ChainId, msg.Valoper); err != nil { - return nil, err - } - return &types.MsgUpdateValidatorSharesExchRateResponse{}, nil -} - -// Submits an ICQ to get the validator's delegated shares -func (k msgServer) CalibrateDelegation(goCtx context.Context, msg *types.MsgCalibrateDelegation) (*types.MsgCalibrateDelegationResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - hostZone, found := k.GetHostZone(ctx, msg.ChainId) - if !found { - return nil, types.ErrHostZoneNotFound - } - - if err := k.SubmitCalibrationICQ(ctx, hostZone, msg.Valoper); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error submitting ICQ for delegation, error : %s", err.Error())) - return nil, err - } - - return &types.MsgCalibrateDelegationResponse{}, nil -} - -func (k msgServer) UpdateInnerRedemptionRateBounds(goCtx context.Context, msg *types.MsgUpdateInnerRedemptionRateBounds) (*types.MsgUpdateInnerRedemptionRateBoundsResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - // Note: we're intentionally not checking the zone is halted - zone, found := k.GetHostZone(ctx, msg.ChainId) - if !found { - k.Logger(ctx).Error(fmt.Sprintf("Host Zone not found: %s", msg.ChainId)) - return nil, types.ErrInvalidHostZone - } - - // Get the wide bounds - outerMinSafetyThreshold, outerMaxSafetyThreshold := k.GetOuterSafetyBounds(ctx, zone) - - innerMinSafetyThreshold := msg.MinInnerRedemptionRate - innerMaxSafetyThreshold := msg.MaxInnerRedemptionRate - - // Confirm the inner bounds are within the outer bounds - if innerMinSafetyThreshold.LT(outerMinSafetyThreshold) { - errMsg := fmt.Sprintf("inner min safety threshold (%s) is less than outer min safety threshold (%s)", innerMinSafetyThreshold, outerMinSafetyThreshold) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrInvalidBounds, errMsg) - } - - if innerMaxSafetyThreshold.GT(outerMaxSafetyThreshold) { - errMsg := fmt.Sprintf("inner max safety threshold (%s) is greater than outer max safety threshold (%s)", innerMaxSafetyThreshold, outerMaxSafetyThreshold) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrInvalidBounds, errMsg) - } - - // Set the inner bounds on the host zone - zone.MinInnerRedemptionRate = innerMinSafetyThreshold - zone.MaxInnerRedemptionRate = innerMaxSafetyThreshold - - k.SetHostZone(ctx, zone) - - return &types.MsgUpdateInnerRedemptionRateBoundsResponse{}, nil -} - -func (k msgServer) ResumeHostZone(goCtx context.Context, msg *types.MsgResumeHostZone) (*types.MsgResumeHostZoneResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - // Get Host Zone - hostZone, found := k.GetHostZone(ctx, msg.ChainId) - if !found { - errMsg := fmt.Sprintf("invalid chain id, zone for %s not found", msg.ChainId) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrHostZoneNotFound, errMsg) - } - - // Check the zone is halted - if !hostZone.Halted { - errMsg := fmt.Sprintf("invalid chain id, zone for %s not halted", msg.ChainId) - k.Logger(ctx).Error(errMsg) - return nil, errorsmod.Wrapf(types.ErrHostZoneNotHalted, errMsg) - } - - // remove from blacklist - stDenom := types.StAssetDenomFromHostZoneDenom(hostZone.HostDenom) - k.rateLimitKeeper.RemoveDenomFromBlacklist(ctx, stDenom) - - // Resume zone - hostZone.Halted = false - k.SetHostZone(ctx, hostZone) - - return &types.MsgResumeHostZoneResponse{}, nil -} - -// Registers or updates a community pool rebate, configuring the rebate percentage and liquid stake amount -func (k msgServer) SetCommunityPoolRebate( - goCtx context.Context, - msg *types.MsgSetCommunityPoolRebate, -) (*types.MsgSetCommunityPoolRebateResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - hostZone, found := k.GetHostZone(ctx, msg.ChainId) - if !found { - return nil, types.ErrHostZoneNotFound.Wrapf("host zone %s not found", msg.ChainId) - } - - // Get the current stToken supply and confirm it's greater than or equal to the liquid staked amount - stDenom := utils.StAssetDenomFromHostZoneDenom(hostZone.HostDenom) - stTokenSupply := k.bankKeeper.GetSupply(ctx, stDenom).Amount - if msg.LiquidStakedStTokenAmount.GT(stTokenSupply) { - return nil, types.ErrFailedToRegisterRebate.Wrapf("liquid staked stToken amount (%v) is greater than current supply (%v)", - msg.LiquidStakedStTokenAmount, stTokenSupply) - } - - // If a zero rebate rate or zero LiquidStakedStTokenAmount is specified, set the rebate to nil - // Otherwise, update the struct - if msg.LiquidStakedStTokenAmount.IsZero() || msg.RebateRate.IsZero() { - hostZone.CommunityPoolRebate = nil - } else { - hostZone.CommunityPoolRebate = &types.CommunityPoolRebate{ - LiquidStakedStTokenAmount: msg.LiquidStakedStTokenAmount, - RebateRate: msg.RebateRate, - } - } - - k.SetHostZone(ctx, hostZone) - - return &types.MsgSetCommunityPoolRebateResponse{}, nil -} - -// Submits an ICA tx to either grant or revoke authz permisssions to an address -// to execute trades on behalf of the trade ICA -func (k msgServer) ToggleTradeController( - goCtx context.Context, - msg *types.MsgToggleTradeController, -) (*types.MsgToggleTradeControllerResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Validate the admin address - if err := k.ValidateAdminAddress(ctx, msg.Creator); err != nil { - return nil, err - } - - // Fetch the trade ICA which will be the granter - tradeRoute, found := k.GetTradeRouteFromTradeAccountChainId(ctx, msg.ChainId) - if !found { - return nil, types.ErrTradeRouteNotFound.Wrapf("trade route not found for chain ID %s", msg.ChainId) - } - - // Build the authz message that grants or revokes trade permissions to the specified address - authzMsg, err := k.BuildTradeAuthzMsg(ctx, tradeRoute, msg.PermissionChange, msg.Address) - if err != nil { - return nil, err - } - - // Build the ICA channel owner from the trade route - tradeRouteAccountOwner := types.FormatTradeRouteICAOwnerFromRouteId( - msg.ChainId, - tradeRoute.GetRouteId(), - types.ICAAccountType_CONVERTER_TRADE, - ) - - // Submit the ICA tx from the trade ICA account - // Timeout the ICA at 1 hour - timeoutTimestamp := uint64(ctx.BlockTime().Add(time.Hour).UnixNano()) - err = k.SubmitICATxWithoutCallback( - ctx, - tradeRoute.TradeAccount.ConnectionId, - tradeRouteAccountOwner, - authzMsg, - timeoutTimestamp, - ) - if err != nil { - return nil, err - } - - return &types.MsgToggleTradeControllerResponse{}, nil -} - -func (ms msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { - if ms.GetAuthority() != msg.Authority { - return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.GetAuthority(), msg.Authority) - } - - if err := msg.Params.Validate(); err != nil { - return nil, err - } - - ctx := sdk.UnwrapSDKContext(goCtx) - if err := ms.SetParams(ctx, msg.Params); err != nil { - return nil, err - } - - return &types.MsgUpdateParamsResponse{}, nil -} diff --git a/x/stakeibc/keeper/params.go b/x/stakeibc/keeper/params.go deleted file mode 100644 index 2a5ba0d94..000000000 --- a/x/stakeibc/keeper/params.go +++ /dev/null @@ -1,22 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// GetParams get all parameters as types.Params -func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { - var err error - params, err = k.params.Get(ctx) - if err != nil { - return types.Params{} - } - return params -} - -// SetParams set the params -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error { - return k.params.Set(ctx, params) -} diff --git a/x/stakeibc/keeper/rebalance.go b/x/stakeibc/keeper/rebalance.go deleted file mode 100644 index 3da86702e..000000000 --- a/x/stakeibc/keeper/rebalance.go +++ /dev/null @@ -1,262 +0,0 @@ -package keeper - -import ( - "fmt" - "sort" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - stakingtypes "github.com/initia-labs/initia/x/mstaking/types" - - "github.com/milkyway-labs/milkyway/utils" - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -const RebalanceIcaBatchSize = 5 - -type RebalanceValidatorDelegationChange struct { - ValidatorAddress string - Delta sdkmath.Int -} - -// Iterate each active host zone and issues redelegation messages to rebalance each -// validator's stake according to their weights -// -// This is required when accepting LSM LiquidStakes as the distribution of stake -// from the LSM Tokens will be inconsistend with the host zone's validator set -// -// Note: this cannot be run more than once in a single unbonding period -func (k Keeper) RebalanceAllHostZones(ctx sdk.Context) { - dayEpoch, found := k.GetEpochTracker(ctx, epochstypes.DAY_EPOCH) - if !found { - k.Logger(ctx).Error("Unable to get day epoch tracker") - return - } - - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - if dayEpoch.EpochNumber%hostZone.UnbondingPeriod != 0 { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, - "Host does not rebalance this epoch (Unbonding Period: %d, Epoch: %d)", hostZone.UnbondingPeriod, dayEpoch.EpochNumber)) - continue - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Rebalancing delegations")) - - if err := k.RebalanceDelegationsForHostZone(ctx, hostZone.ChainId); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to rebalance delegations for %s: %s", hostZone.ChainId, err.Error())) - continue - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Successfully rebalanced delegations")) - } -} - -// Rebalance validators according to their validator weights for a specific host zone -func (k Keeper) RebalanceDelegationsForHostZone(ctx sdk.Context, chainId string) error { - // Get the host zone and confirm the delegation account is initialized - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrap(types.ErrHostZoneNotFound, fmt.Sprintf("Host zone %s not found", chainId)) - } - if hostZone.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation account found for %s", chainId) - } - - // Get the difference between the actual and expected validator delegations - valDeltaList, err := k.GetValidatorDelegationDifferences(ctx, hostZone) - if err != nil { - return errorsmod.Wrapf(err, "unable to get validator deltas for host zone %s", chainId) - } - - msgs, rebalancings := k.GetRebalanceICAMessages(hostZone, valDeltaList) - - for start := 0; start < len(msgs); start += RebalanceIcaBatchSize { - end := start + RebalanceIcaBatchSize - if end > len(msgs) { - end = len(msgs) - } - - msgsBatch := msgs[start:end] - rebalancingsBatch := rebalancings[start:end] - - // marshall the callback - rebalanceCallback := types.RebalanceCallback{ - HostZoneId: hostZone.ChainId, - Rebalancings: rebalancingsBatch, - } - rebalanceCallbackBz, err := k.MarshalRebalanceCallbackArgs(ctx, rebalanceCallback) - if err != nil { - return errorsmod.Wrapf(err, "unable to marshal rebalance callback args") - } - - // Submit the rebalance ICA - _, err = k.SubmitTxsStrideEpoch( - ctx, - hostZone.ConnectionId, - msgsBatch, - types.ICAAccountType_DELEGATION, - ICACallbackID_Rebalance, - rebalanceCallbackBz, - ) - if err != nil { - return errorsmod.Wrapf(err, "Failed to SubmitTxs for %s, messages: %+v", hostZone.ChainId, msgs) - } - - // flag the delegation change in progress on each validator - for _, rebalancing := range rebalancingsBatch { - if err := k.IncrementValidatorDelegationChangesInProgress(&hostZone, rebalancing.SrcValidator); err != nil { - return err - } - if err := k.IncrementValidatorDelegationChangesInProgress(&hostZone, rebalancing.DstValidator); err != nil { - return err - } - } - k.SetHostZone(ctx, hostZone) - } - - return nil -} - -// Given a list of target delegation changes, builds the individual re-delegation messages by redelegating -// from surplus validators to deficit validators -// Returns the list of messages and the callback data for the ICA -func (k Keeper) GetRebalanceICAMessages( - hostZone types.HostZone, - validatorDeltas []RebalanceValidatorDelegationChange, -) (msgs []proto.Message, rebalancings []*types.Rebalancing) { - // Sort the list of delegation changes by the size of the change - // Sort descending so the surplus validators appear first - lessFunc := func(i, j int) bool { - if !validatorDeltas[i].Delta.Equal(validatorDeltas[j].Delta) { - return validatorDeltas[i].Delta.GT(validatorDeltas[j].Delta) - } - // use name as a tie breaker if deltas are equal - return validatorDeltas[i].ValidatorAddress < validatorDeltas[j].ValidatorAddress - } - sort.SliceStable(validatorDeltas, lessFunc) - - // Pair surplus and deficit validators, with a redelegation from the surplus - // validator to the deficit one - // The list is sorted with the surplus validators (who should lose stake) at index 0 - // and the deficit validators (who should gain stake) at index N-1 - // The surplus validator's have a positive delta and the deficit validators have a negative delta - surplusIndex := 0 - deficitIndex := len(validatorDeltas) - 1 - for surplusIndex <= deficitIndex { - // surplus validator delta is positive, deficit validator delta is negative - deficitValidator := validatorDeltas[deficitIndex] - surplusValidator := validatorDeltas[surplusIndex] - - // If the indicies flipped, or either delta is 0, we're done rebalancing - if surplusIndex > deficitIndex || deficitValidator.Delta.IsZero() || surplusValidator.Delta.IsZero() { - break - } - - var redelegationAmount sdkmath.Int - if deficitValidator.Delta.Abs().GT(surplusValidator.Delta.Abs()) { - // If the deficit validator needs more stake than the surplus validator has to give, - // transfer the full surplus to deficit validator - redelegationAmount = surplusValidator.Delta.Abs() - - // Update the deficit validator, and zero out the surplus validator - validatorDeltas[deficitIndex].Delta = deficitValidator.Delta.Add(redelegationAmount) - validatorDeltas[surplusIndex].Delta = sdkmath.ZeroInt() - surplusIndex += 1 - - } else if surplusValidator.Delta.Abs().GT(deficitValidator.Delta.Abs()) { - // If one validator's deficit is less than the other validator's surplus, - // move only enough of the surplus to cover the shortage - redelegationAmount = deficitValidator.Delta.Abs() - - // Update the surplus validator, and zero out the deficit validator - validatorDeltas[surplusIndex].Delta = surplusValidator.Delta.Sub(redelegationAmount) - validatorDeltas[deficitIndex].Delta = sdkmath.ZeroInt() - deficitIndex -= 1 - - } else { - // if one validator's surplus is equal to the other validator's deficit, - // we'll transfer that amount and both validators will now be balanced - redelegationAmount = deficitValidator.Delta.Abs() - - validatorDeltas[surplusIndex].Delta = sdkmath.ZeroInt() - validatorDeltas[deficitIndex].Delta = sdkmath.ZeroInt() - - surplusIndex += 1 - deficitIndex -= 1 - } - - // Append the new Redelegation message and Rebalancing struct for the callback - // We always send from the surplus validator to the deficit validator - srcValidator := surplusValidator.ValidatorAddress - dstValidator := deficitValidator.ValidatorAddress - - msgs = append(msgs, &stakingtypes.MsgBeginRedelegate{ - DelegatorAddress: hostZone.DelegationIcaAddress, - ValidatorSrcAddress: srcValidator, - ValidatorDstAddress: dstValidator, - Amount: sdk.NewCoins(sdk.NewCoin(hostZone.HostDenom, redelegationAmount)), - }) - rebalancings = append(rebalancings, &types.Rebalancing{ - SrcValidator: srcValidator, - DstValidator: dstValidator, - Amt: redelegationAmount, - }) - } - - return msgs, rebalancings -} - -// This function returns a list with the number of extra tokens that should be sent to each validator -// - Positive delta implies the validator has a surplus (and should lose stake) -// - Negative delta implies the validator has a deficit (and should gain stake) -func (k Keeper) GetValidatorDelegationDifferences(ctx sdk.Context, hostZone types.HostZone) ([]RebalanceValidatorDelegationChange, error) { - // The total rebalance amount consists of all delegations from validator's without a slash query in progress - // Validators with a slash query in progress will be excluded from rebalancing - targetRebalanceAmount := sdkmath.ZeroInt() - for _, validator := range hostZone.Validators { - if !validator.SlashQueryInProgress { - targetRebalanceAmount = targetRebalanceAmount.Add(validator.Delegation) - } - } - - // Get the target delegation amount for each validator - targetDelegations, err := k.GetTargetValAmtsForHostZone(ctx, hostZone, targetRebalanceAmount) - if err != nil { - return nil, errorsmod.Wrapf(err, "unable to get target val amounts for host zone %s", hostZone.ChainId) - } - - // For each validator, store the amount that their delegation should change - delegationDeltas := []RebalanceValidatorDelegationChange{} - totalDelegationChange := sdkmath.ZeroInt() - for _, validator := range hostZone.Validators { - // Compare the target with the current delegation - targetDelegation, ok := targetDelegations[validator.Address] - if !ok { - continue - } - delegationChange := validator.Delegation.Sub(targetDelegation) - - // Only include validators who's delegation should change - if !delegationChange.IsZero() { - delegationDeltas = append(delegationDeltas, RebalanceValidatorDelegationChange{ - ValidatorAddress: validator.Address, - Delta: delegationChange, - }) - totalDelegationChange = totalDelegationChange.Add(delegationChange) - - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, - "Validator %s delegation surplus/deficit: %v", validator.Address, delegationChange)) - } - } - - // Sanity check that the sum of all the delegation change's is equal to 0 - // (meaning the total delegation across ALL validators has not changed) - if !totalDelegationChange.IsZero() { - return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, - "non-zero net delegation change (%v) across validators during rebalancing", totalDelegationChange) - } - - return delegationDeltas, nil -} diff --git a/x/stakeibc/keeper/records.go b/x/stakeibc/keeper/records.go deleted file mode 100644 index a489187e7..000000000 --- a/x/stakeibc/keeper/records.go +++ /dev/null @@ -1,84 +0,0 @@ -package keeper - -import ( - "fmt" - - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/spf13/cast" - - "github.com/milkyway-labs/milkyway/utils" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" -) - -// Create a new deposit record for each host zone for the given epoch -func (k Keeper) CreateDepositRecordsForEpoch(ctx sdk.Context, epochNumber uint64) { - k.Logger(ctx).Info(fmt.Sprintf("Creating Deposit Records for Epoch %d", epochNumber)) - - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Creating Deposit Record")) - - depositRecord := recordstypes.DepositRecord{ - Amount: sdkmath.ZeroInt(), - Denom: hostZone.HostDenom, - HostZoneId: hostZone.ChainId, - Status: recordstypes.DepositRecord_TRANSFER_QUEUE, - DepositEpochNumber: epochNumber, - } - k.recordsKeeper.AppendDepositRecord(ctx, depositRecord) - } -} - -// Creates a new epoch unbonding record for the epoch -func (k Keeper) CreateEpochUnbondingRecord(ctx sdk.Context, epochNumber uint64) bool { - k.Logger(ctx).Info(fmt.Sprintf("Creating Epoch Unbonding Records for Epoch %d", epochNumber)) - - hostZoneUnbondings := []*recordstypes.HostZoneUnbonding{} - - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Creating Epoch Unbonding Record")) - - hostZoneUnbonding := recordstypes.HostZoneUnbonding{ - NativeTokenAmount: sdkmath.ZeroInt(), - StTokenAmount: sdkmath.ZeroInt(), - Denom: hostZone.HostDenom, - HostZoneId: hostZone.ChainId, - Status: recordstypes.HostZoneUnbonding_UNBONDING_QUEUE, - } - hostZoneUnbondings = append(hostZoneUnbondings, &hostZoneUnbonding) - } - - epochUnbondingRecord := recordstypes.EpochUnbondingRecord{ - EpochNumber: cast.ToUint64(epochNumber), - HostZoneUnbondings: hostZoneUnbondings, - } - k.recordsKeeper.SetEpochUnbondingRecord(ctx, epochUnbondingRecord) - return true -} - -// Deletes any epoch unbonding records that have had all unbondings claimed -func (k Keeper) CleanupEpochUnbondingRecords(ctx sdk.Context, epochNumber uint64) bool { - k.Logger(ctx).Info("Cleaning Claimed Epoch Unbonding Records...") - - for _, epochUnbondingRecord := range k.recordsKeeper.GetAllEpochUnbondingRecord(ctx) { - shouldDeleteEpochUnbondingRecord := true - hostZoneUnbondings := epochUnbondingRecord.HostZoneUnbondings - - for _, hostZoneUnbonding := range hostZoneUnbondings { - // if an EpochUnbondingRecord has any HostZoneUnbonding with non-zero balances, we don't delete the EpochUnbondingRecord - // because it has outstanding tokens that need to be claimed - if !hostZoneUnbonding.NativeTokenAmount.Equal(sdkmath.ZeroInt()) { - shouldDeleteEpochUnbondingRecord = false - break - } - } - if shouldDeleteEpochUnbondingRecord { - k.Logger(ctx).Info(fmt.Sprintf(" EpochUnbondingRecord %d - All unbondings claimed, removing record", epochUnbondingRecord.EpochNumber)) - k.recordsKeeper.RemoveEpochUnbondingRecord(ctx, epochUnbondingRecord.EpochNumber) - } else { - k.Logger(ctx).Info(fmt.Sprintf(" EpochUnbondingRecord %d - Has unclaimed unbondings", epochUnbondingRecord.EpochNumber)) - } - } - - return true -} diff --git a/x/stakeibc/keeper/redemption_rate.go b/x/stakeibc/keeper/redemption_rate.go deleted file mode 100644 index c21d30920..000000000 --- a/x/stakeibc/keeper/redemption_rate.go +++ /dev/null @@ -1,161 +0,0 @@ -package keeper - -import ( - "fmt" - - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/utils" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// Updates the redemption rate for each host zone -// At a high level, the redemption rate is equal to the amount of native tokens locked divided by the stTokens in existence. -// The equation is broken down further into the following sub-components: -// -// Native Tokens Locked: -// 1. Deposit Account Balance: native tokens deposited from liquid stakes, that are still living on Stride -// 2. Undelegated Balance: native tokens that have been transferred to the host zone, but have not been delegated yet -// 3. Tokenized Delegations: Delegations inherent in LSM Tokens that have not yet been converted to native stake -// 4. Native Delegations: Delegations either from native tokens, or LSM Tokens that have been detokenized -// StToken Amount: -// 1. Total Supply of the stToken -// -// Redemption Rate = -// (Deposit Account Balance + Undelegated Balance + Tokenized Delegation + Native Delegation) / (stToken Supply) -func (k Keeper) UpdateRedemptionRates(ctx sdk.Context, depositRecords []recordstypes.DepositRecord) { - k.Logger(ctx).Info("Updating Redemption Rates...") - - // Update the redemption rate for each host zone - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - k.UpdateRedemptionRateForHostZone(ctx, hostZone, depositRecords) - } -} - -func (k Keeper) UpdateRedemptionRateForHostZone(ctx sdk.Context, hostZone types.HostZone, depositRecords []recordstypes.DepositRecord) { - // Gather redemption rate components - stSupply := k.bankKeeper.GetSupply(ctx, types.StAssetDenomFromHostZoneDenom(hostZone.HostDenom)).Amount - if stSupply.IsZero() { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, - "No st%s in circulation - redemption rate is unchanged", hostZone.HostDenom)) - return - } - - depositAccountBalance := k.GetDepositAccountBalance(hostZone.ChainId, depositRecords) - undelegatedBalance := k.GetUndelegatedBalance(hostZone.ChainId, depositRecords) - tokenizedDelegation := k.GetTotalTokenizedDelegations(ctx, hostZone) - nativeDelegation := sdkmath.LegacyNewDecFromInt(hostZone.TotalDelegations) - - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, - "Redemption Rate Components - Deposit Account Balance: %v, Undelegated Balance: %v, "+ - "LSM Delegated Balance: %v, Native Delegations: %v, stToken Supply: %v", - depositAccountBalance, undelegatedBalance, tokenizedDelegation, - nativeDelegation, stSupply)) - - // Calculate the redemption rate - nativeTokensLocked := depositAccountBalance.Add(undelegatedBalance).Add(tokenizedDelegation).Add(nativeDelegation) - redemptionRate := nativeTokensLocked.Quo(sdkmath.LegacyNewDecFromInt(stSupply)) - - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, - "New Redemption Rate: %v (vs Prev Rate: %v)", redemptionRate, hostZone.RedemptionRate)) - - // Update the host zone - hostZone.LastRedemptionRate = hostZone.RedemptionRate - hostZone.RedemptionRate = redemptionRate - k.SetHostZone(ctx, hostZone) - - // If the redemption rate is outside of safety bounds, exit so the redemption rate is not pushed to the oracle - redemptionRateSafe, _ := k.IsRedemptionRateWithinSafetyBounds(ctx, hostZone) - if !redemptionRateSafe { - return - } - - // Otherwise, submit the redemption rate to the oracle - if err := k.PostRedemptionRateToOracles(ctx, hostZone.HostDenom, redemptionRate); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to send redemption rate to oracle: %s", err.Error())) - return - } -} - -// Determine the deposit account balance, representing native tokens that have been deposited -// from liquid stakes, but have not yet been transferred to the host -func (k Keeper) GetDepositAccountBalance(chainId string, depositRecords []recordstypes.DepositRecord) sdkmath.LegacyDec { - // sum on deposit records with status TRANSFER_QUEUE or TRANSFER_IN_PROGRESS - totalAmount := sdkmath.ZeroInt() - for _, depositRecord := range depositRecords { - transferStatus := (depositRecord.Status == recordstypes.DepositRecord_TRANSFER_QUEUE || - depositRecord.Status == recordstypes.DepositRecord_TRANSFER_IN_PROGRESS) - - if depositRecord.HostZoneId == chainId && transferStatus { - totalAmount = totalAmount.Add(depositRecord.Amount) - } - } - - return sdkmath.LegacyNewDecFromInt(totalAmount) -} - -// Determine the undelegated balance from the deposit records queued for staking -func (k Keeper) GetUndelegatedBalance(chainId string, depositRecords []recordstypes.DepositRecord) sdkmath.LegacyDec { - // sum on deposit records with status DELEGATION_QUEUE or DELEGATION_IN_PROGRESS - totalAmount := sdkmath.ZeroInt() - for _, depositRecord := range depositRecords { - delegationStatus := (depositRecord.Status == recordstypes.DepositRecord_DELEGATION_QUEUE || - depositRecord.Status == recordstypes.DepositRecord_DELEGATION_IN_PROGRESS) - - if depositRecord.HostZoneId == chainId && delegationStatus { - totalAmount = totalAmount.Add(depositRecord.Amount) - } - } - - return sdkmath.LegacyNewDecFromInt(totalAmount) -} - -// Returns the total delegated balance that's stored in LSM tokens -// This is used for the redemption rate calculation -// -// The relevant tokens are identified by the deposit records in status "DEPOSIT_PENDING" -// "DEPOSIT_PENDING" means the liquid staker's tokens have not been sent to Stride yet -// so they should *not* be included in the redemption rate. All other statuses indicate -// the LSM tokens have been deposited and should be included in the final calculation -// -// Each LSM token represents a delegator share so the validator's shares to tokens rate -// must be used to denominate it's value in native tokens -func (k Keeper) GetTotalTokenizedDelegations(ctx sdk.Context, hostZone types.HostZone) sdkmath.LegacyDec { - total := sdkmath.ZeroInt() - for _, deposit := range k.recordsKeeper.GetLSMDepositsForHostZone(ctx, hostZone.ChainId) { - if deposit.Status != recordstypes.LSMTokenDeposit_DEPOSIT_PENDING { - validator, _, found := GetValidatorFromAddress(hostZone.Validators, deposit.ValidatorAddress) - if !found { - k.Logger(ctx).Error(fmt.Sprintf("Validator %s found in LSMTokenDeposit but no longer exists", deposit.ValidatorAddress)) - continue - } - liquidStakedShares := deposit.Amount - liquidStakedTokens := sdkmath.LegacyNewDecFromInt(liquidStakedShares).Mul(validator.SharesToTokensRate) - total = total.Add(liquidStakedTokens.TruncateInt()) - } - } - - return sdkmath.LegacyNewDecFromInt(total) -} - -// Pushes a redemption rate update to the ICA oracle -func (k Keeper) PostRedemptionRateToOracles(ctx sdk.Context, hostDenom string, redemptionRate sdkmath.LegacyDec) error { - // XXX - //stDenom := types.StAssetDenomFromHostZoneDenom(hostDenom) - //attributes, err := json.Marshal(icaoracletypes.RedemptionRateAttributes{ - // SttokenDenom: stDenom, - //}) - //if err != nil { - // return err - //} - // - //// Metric Key is of format: {stToken}_redemption_rate - //metricKey := fmt.Sprintf("%s_%s", stDenom, icaoracletypes.MetricType_RedemptionRate) - //metricValue := redemptionRate.String() - //metricType := icaoracletypes.MetricType_RedemptionRate - //k.ICAOracleKeeper.QueueMetricUpdate(ctx, metricKey, metricValue, metricType, string(attributes)) - - return nil -} diff --git a/x/stakeibc/keeper/redemption_sweep.go b/x/stakeibc/keeper/redemption_sweep.go deleted file mode 100644 index 8a3d25f9b..000000000 --- a/x/stakeibc/keeper/redemption_sweep.go +++ /dev/null @@ -1,144 +0,0 @@ -package keeper - -import ( - "fmt" - - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/cosmos/gogoproto/proto" - - "github.com/milkyway-labs/milkyway/utils" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// Batch transfers any unbonded tokens from the delegation account to the redemption account -func (k Keeper) SweepAllUnbondedTokensForHostZone(ctx sdk.Context, hostZone types.HostZone, epochUnbondingRecords []recordstypes.EpochUnbondingRecord) (success bool, sweepAmount sdkmath.Int) { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Sweeping unbonded tokens")) - - // Sum up all host zone unbonding records that have finished unbonding - totalAmtTransferToRedemptionAcct := sdkmath.ZeroInt() - epochUnbondingRecordIds := []uint64{} - for _, epochUnbondingRecord := range epochUnbondingRecords { - - // Get all the unbondings associated with the epoch + host zone pair - hostZoneUnbonding, found := k.recordsKeeper.GetHostZoneUnbondingByChainId(ctx, epochUnbondingRecord.EpochNumber, hostZone.ChainId) - if !found { - continue - } - - // Get latest blockTime from light client - blockTime, err := k.GetLightClientTimeSafely(ctx, hostZone.ConnectionId) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("\tCould not find blockTime for host zone %s", hostZone.ChainId)) - continue - } - - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Epoch %d - Status: %s, Amount: %v, Unbonding Time: %d, Block Time: %d", - epochUnbondingRecord.EpochNumber, hostZoneUnbonding.Status.String(), hostZoneUnbonding.NativeTokenAmount, hostZoneUnbonding.UnbondingTime, blockTime)) - - // If the unbonding period has elapsed, then we can send the ICA call to sweep this - // hostZone's unbondings to the redemption account (in a batch). - // Verify: - // 1. the unbonding time is set (g.t. 0) - // 2. the unbonding time is less than the current block time - // 3. the host zone is in the EXIT_TRANSFER_QUEUE state, meaning it's ready to be transferred - inTransferQueue := hostZoneUnbonding.Status == recordstypes.HostZoneUnbonding_EXIT_TRANSFER_QUEUE - validUnbondingTime := hostZoneUnbonding.UnbondingTime > 0 && hostZoneUnbonding.UnbondingTime < blockTime - if inTransferQueue && validUnbondingTime { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, " %v%s included in sweep", hostZoneUnbonding.NativeTokenAmount, hostZoneUnbonding.Denom)) - - totalAmtTransferToRedemptionAcct = totalAmtTransferToRedemptionAcct.Add(hostZoneUnbonding.NativeTokenAmount) - epochUnbondingRecordIds = append(epochUnbondingRecordIds, epochUnbondingRecord.EpochNumber) - } - } - - // If we have any amount to sweep, then we can send the ICA call to sweep them - if totalAmtTransferToRedemptionAcct.LTE(sdkmath.ZeroInt()) { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "No tokens ready for sweep")) - return true, totalAmtTransferToRedemptionAcct - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Batch transferring %v to host zone", totalAmtTransferToRedemptionAcct)) - - // Get the delegation account and redemption account - if hostZone.DelegationIcaAddress == "" { - k.Logger(ctx).Error(fmt.Sprintf("Zone %s is missing a delegation address!", hostZone.ChainId)) - return false, sdkmath.ZeroInt() - } - if hostZone.RedemptionIcaAddress == "" { - k.Logger(ctx).Error(fmt.Sprintf("Zone %s is missing a redemption address!", hostZone.ChainId)) - return false, sdkmath.ZeroInt() - } - - // Build transfer message to transfer from the delegation account to redemption account - sweepCoin := sdk.NewCoin(hostZone.HostDenom, totalAmtTransferToRedemptionAcct) - msgs := []proto.Message{ - &banktypes.MsgSend{ - FromAddress: hostZone.DelegationIcaAddress, - ToAddress: hostZone.RedemptionIcaAddress, - Amount: sdk.NewCoins(sweepCoin), - }, - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Preparing MsgSend from Delegation Account to Redemption Account")) - - // Store the epoch numbers in the callback to identify the epoch unbonding records - redemptionCallback := types.RedemptionCallback{ - HostZoneId: hostZone.ChainId, - EpochUnbondingRecordIds: epochUnbondingRecordIds, - } - marshalledCallbackArgs, err := k.MarshalRedemptionCallbackArgs(ctx, redemptionCallback) - if err != nil { - k.Logger(ctx).Error(err.Error()) - return false, sdkmath.ZeroInt() - } - - // Send the transfer ICA - _, err = k.SubmitTxsDayEpoch(ctx, hostZone.ConnectionId, msgs, types.ICAAccountType_DELEGATION, ICACallbackID_Redemption, marshalledCallbackArgs) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Failed to SubmitTxs, transfer to redemption account on %s", hostZone.ChainId)) - return false, sdkmath.ZeroInt() - } - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "ICA MsgSend Successfully Sent")) - - // Update the host zone unbonding records to status IN_PROGRESS - err = k.recordsKeeper.SetHostZoneUnbondingStatus(ctx, hostZone.ChainId, epochUnbondingRecordIds, recordstypes.HostZoneUnbonding_EXIT_TRANSFER_IN_PROGRESS) - if err != nil { - k.Logger(ctx).Error(err.Error()) - return false, sdkmath.ZeroInt() - } - - return true, totalAmtTransferToRedemptionAcct -} - -// Sends all unbonded tokens to the redemption account -// returns: -// - success indicator if all chains succeeded -// - list of successful chains -// - list of tokens swept -// - list of failed chains -func (k Keeper) SweepAllUnbondedTokens(ctx sdk.Context) (success bool, successfulSweeps []string, sweepAmounts []sdkmath.Int, failedSweeps []string) { - // this function returns true if all chains succeeded, false otherwise - // it also returns a list of successful chains (arg 2), tokens swept (arg 3), and failed chains (arg 4) - k.Logger(ctx).Info("Sweeping All Unbonded Tokens...") - - success = true - successfulSweeps = []string{} - sweepAmounts = []sdkmath.Int{} - failedSweeps = []string{} - hostZones := k.GetAllActiveHostZone(ctx) - - epochUnbondingRecords := k.recordsKeeper.GetAllEpochUnbondingRecord(ctx) - for _, hostZone := range hostZones { - hostZoneSuccess, sweepAmount := k.SweepAllUnbondedTokensForHostZone(ctx, hostZone, epochUnbondingRecords) - if hostZoneSuccess { - successfulSweeps = append(successfulSweeps, hostZone.ChainId) - sweepAmounts = append(sweepAmounts, sweepAmount) - } else { - success = false - failedSweeps = append(failedSweeps, hostZone.ChainId) - } - } - - return success, successfulSweeps, sweepAmounts, failedSweeps -} diff --git a/x/stakeibc/keeper/reward_allocation.go b/x/stakeibc/keeper/reward_allocation.go deleted file mode 100644 index 894ac573c..000000000 --- a/x/stakeibc/keeper/reward_allocation.go +++ /dev/null @@ -1,86 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// Liquid Stake Reward Collector Balance -func (k Keeper) LiquidStakeRewardCollectorBalance(ctx sdk.Context, msgSvr types.MsgServer) bool { - k.Logger(ctx).Info("Liquid Staking reward collector balance") - rewardCollectorAddress := k.accountKeeper.GetModuleAccount(ctx, types.RewardCollectorName).GetAddress() - rewardedTokens := k.bankKeeper.GetAllBalances(ctx, rewardCollectorAddress) - if rewardedTokens.Equal(sdk.Coins{}) { - k.Logger(ctx).Info("No reward to allocate from RewardCollector") - return false - } - - rewardsAccrued := false - for _, token := range rewardedTokens { - // get hostzone by reward token (in ibc denom format) - hz, err := k.GetHostZoneFromIBCDenom(ctx, token.Denom) - if err != nil { - k.Logger(ctx).Info("Token denom %s in module account is not from a supported host zone", token.Denom) - continue - } - - // liquid stake all tokens - msg := types.NewMsgLiquidStake(rewardCollectorAddress.String(), token.Amount, hz.HostDenom) - if err := msg.ValidateBasic(); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Liquid stake from reward collector address failed validate basic: %s", err.Error())) - continue - } - _, err = msgSvr.LiquidStake(ctx, msg) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Failed to liquid stake %s for hostzone %s: %s", token.String(), hz.ChainId, err.Error())) - continue - } - k.Logger(ctx).Info(fmt.Sprintf("Liquid staked %s for hostzone %s's accrued rewards", token.String(), hz.ChainId)) - rewardsAccrued = true - } - return rewardsAccrued -} - -// Sweep stTokens from Reward Collector to Fee Collector -func (k Keeper) SweepStTokensFromRewardCollToFeeColl(ctx sdk.Context) error { - // Send all stTokens to fee collector to distribute to delegator later - rewardCollectorAddress := k.accountKeeper.GetModuleAccount(ctx, types.RewardCollectorName).GetAddress() - - rewardCollCoins := k.bankKeeper.GetAllBalances(ctx, rewardCollectorAddress) - k.Logger(ctx).Info(fmt.Sprintf("Reward collector has %s", rewardCollCoins.String())) - stTokens := sdk.NewCoins() - for _, token := range rewardCollCoins { - // get hostzone by reward token (in stToken denom format) - isStToken := k.CheckIsStToken(ctx, token.Denom) - k.Logger(ctx).Info(fmt.Sprintf("%s is stToken: %t", token.String(), isStToken)) - if isStToken { - stTokens = append(stTokens, token) - } - } - k.Logger(ctx).Info(fmt.Sprintf("Sending %s stTokens from %s to %s", stTokens.String(), types.RewardCollectorName, authtypes.FeeCollectorName)) - - err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.RewardCollectorName, authtypes.FeeCollectorName, stTokens) - if err != nil { - return errorsmod.Wrapf(err, fmt.Sprintf("Can't send coins from module %s to module %s, err %s", types.RewardCollectorName, authtypes.FeeCollectorName, err.Error())) - } - return nil -} - -// (1) liquid stake reward collector balance, then (2) sweet stTokens from reward collector to fee collector -func (k Keeper) AllocateHostZoneReward(ctx sdk.Context) { - // TODO: Move LS function to keeper method instead of message server - msgSvr := NewMsgServerImpl(k) - if rewardsFound := k.LiquidStakeRewardCollectorBalance(ctx, msgSvr); !rewardsFound { - k.Logger(ctx).Info("No accrued rewards in the reward collector account") - return - } - if err := k.SweepStTokensFromRewardCollToFeeColl(ctx); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to allocate host zone reward, err: %s", err.Error())) - } -} diff --git a/x/stakeibc/keeper/reward_converter.go b/x/stakeibc/keeper/reward_converter.go deleted file mode 100644 index ebea24aaf..000000000 --- a/x/stakeibc/keeper/reward_converter.go +++ /dev/null @@ -1,676 +0,0 @@ -package keeper - -import ( - "encoding/json" - "errors" - "fmt" - "time" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" - "github.com/cosmos/cosmos-sdk/x/authz" - v3 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v3" - "github.com/cosmos/gogoproto/proto" - - transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - - "github.com/milkyway-labs/milkyway/utils" - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - icqtypes "github.com/milkyway-labs/milkyway/x/interchainquery/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// JSON Memo for PFM transfers -type PacketForwardMetadata struct { - Forward *ForwardMetadata `json:"forward"` -} -type ForwardMetadata struct { - Receiver string `json:"receiver"` - Port string `json:"port"` - Channel string `json:"channel"` - Timeout string `json:"timeout"` - Retries int64 `json:"retries"` -} - -type RewardsSplit struct { - RebateAmount sdkmath.Int - StrideFeeAmount sdkmath.Int - ReinvestAmount sdkmath.Int -} - -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// The goal of this code is to allow certain reward token types to be automatically traded into other types -// This happens before the rest of the staking, allocation, distribution etc. would continue as normal -// -// Reward tokens are any special denoms which are paid out in the withdrawal address -// Most host zones inflate their tokens and their native token is what appears in the withdrawal ICA -// The following allows for chains to use foreign denoms as revenue, which can be traded to any other denom first -// -// 1. Epochly check the reward denom balance in the withdrawal address -// on callback, send all this reward denom from withdrawal ICA to trade ICA on the trade zone (OSMOSIS) -// 2. Epochly check the reward denom balance in trade ICA -// on callback, trade all reward denom for host denom defined by pool and routes in params -// 3. Epochly check the host denom balance in trade ICA -// on callback, transfer these host denom tokens from trade ICA to withdrawal ICA on original host zone -// -// Normal staking flow continues from there. So the host denom tokens will land on the original host zone -// and the normal staking and distribution flow will continue from there. -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -// Breaks down the split of native rewards into the portions intended for (a) a rebate, (b) stride commission, -// and (c) reinvestment -// For most host zones, the rewards here were generated from normal staking rewards, but in the case of dYdX, -// this is called on the rewards that were converted from USDC to DYDX during the trade route -// -// The rebate percentage is determined by: (% of total TVL contributed by commuity pool) * (rebate percentage) -// -// E.g. Community pool liquid staked 1M, TVL is 10M, rebate is 20% -// Total rewards this epoch are 1000, and the stride fee is 10% -// => Then the rebate is 1000 rewards * 10% stride fee * (1M / 10M) * 20% rebate = 2 tokens -// => Stride fee is 1000 rewards * 10% stride fee - 2 rebate = 98 tokens -// => Reinvestment is 1000 rewards * (100% - 10% stride fee) = 900 tokens -func (k Keeper) CalculateRewardsSplit( - ctx sdk.Context, - hostZone types.HostZone, - rewardsAmount sdkmath.Int, -) (rewardSplit RewardsSplit, err error) { - // Get the fee rate and total fees from params (e.g. 0.1 for 10% fee) - strideFeeParam := sdkmath.NewIntFromUint64(k.GetParams(ctx).StrideCommission) - totalFeeRate := sdkmath.LegacyNewDecFromInt(strideFeeParam).Quo(sdkmath.LegacyNewDec(100)) - - // Get the total fee amount from the fee percentage - totalFeesAmount := sdkmath.LegacyNewDecFromInt(rewardsAmount).Mul(totalFeeRate).TruncateInt() - reinvestAmount := rewardsAmount.Sub(totalFeesAmount) - - // Check if the chain has a rebate - // If there's no rebate, return 0 rebate and send all fees as stride commission - rebateInfo, chainHasRebate := hostZone.SafelyGetCommunityPoolRebate() - if !chainHasRebate { - rewardSplit = RewardsSplit{ - RebateAmount: sdkmath.ZeroInt(), - StrideFeeAmount: totalFeesAmount, - ReinvestAmount: reinvestAmount, - } - return rewardSplit, nil - } - - // Get supply of stTokens to determine the portion of TVL that the community pool liquid stake makes up - stDenom := utils.StAssetDenomFromHostZoneDenom(hostZone.HostDenom) - stTokenSupply := k.bankKeeper.GetSupply(ctx, stDenom).Amount - - // It shouldn't be possible to have 0 token supply (since there are rewards and there was a community pool stake) - // This will also prevent a division by 0 error - if stTokenSupply.IsZero() { - return rewardSplit, errorsmod.Wrapf(types.ErrDivisionByZero, - "unable to calculate rebate amount for %s since total delegations are 0", hostZone.ChainId) - } - - // It also shouldn't be possible for the liquid stake amount to be greater than the full TVL - if rebateInfo.LiquidStakedStTokenAmount.GT(stTokenSupply) { - return rewardSplit, errorsmod.Wrapf(types.ErrFeeSplitInvariantFailed, - "community pool liquid staked amount greater than total delegations") - } - - // The rebate amount is determined by the contribution of the community pool stake towards the total TVL, - // multiplied by the rebate fee percentage - contributionRate := sdkmath.LegacyNewDecFromInt(rebateInfo.LiquidStakedStTokenAmount).Quo(sdkmath.LegacyNewDecFromInt(stTokenSupply)) - rebateAmount := sdkmath.LegacyNewDecFromInt(totalFeesAmount).Mul(contributionRate).Mul(rebateInfo.RebateRate).TruncateInt() - strideFeeAmount := totalFeesAmount.Sub(rebateAmount) - - rewardSplit = RewardsSplit{ - RebateAmount: rebateAmount, - StrideFeeAmount: strideFeeAmount, - ReinvestAmount: reinvestAmount, - } - - return rewardSplit, nil -} - -// Builds an authz MsgGrant or MsgRevoke to grant an account trade capabilties on behalf of the trade ICA -func (k Keeper) BuildTradeAuthzMsg( - ctx sdk.Context, - tradeRoute types.TradeRoute, - permissionChange types.AuthzPermissionChange, - grantee string, -) (authzMsg []proto.Message, err error) { - swapMsgTypeUrl := "/" + proto.MessageName(&types.MsgSwapExactAmountIn{}) - - switch permissionChange { - case types.AuthzPermissionChange_GRANT: - authorization := authz.NewGenericAuthorization(swapMsgTypeUrl) - expiration := ctx.BlockTime().Add(time.Hour * 24 * 365 * 100) // 100 years - - grant, err := authz.NewGrant(ctx.BlockTime(), authorization, &expiration) - if err != nil { - return nil, errorsmod.Wrapf(err, "unable to build grant struct") - } - authzMsg = []proto.Message{&authz.MsgGrant{ - Granter: tradeRoute.TradeAccount.Address, - Grantee: grantee, - Grant: grant, - }} - - case types.AuthzPermissionChange_REVOKE: - authzMsg = []proto.Message{&authz.MsgRevoke{ - Granter: tradeRoute.TradeAccount.Address, - Grantee: grantee, - MsgTypeUrl: swapMsgTypeUrl, - }} - - default: - return nil, errors.New("invalid permission change") - } - - return authzMsg, nil -} - -// Builds a PFM transfer message to send reward tokens from the host zone, -// through the reward zone (to unwind) and finally to the trade zone -func (k Keeper) BuildHostToTradeTransferMsg( - ctx sdk.Context, - amount sdkmath.Int, - route types.TradeRoute, -) (msg transfertypes.MsgTransfer, err error) { - // Get the epoch tracker to determine the timeouts - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - return msg, errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.STRIDE_EPOCH) - } - - // Timeout the first transfer halfway through the epoch, and the second transfer at the end of the epoch - // The pfm transfer requires a duration instead of a timestamp for the timeout, so we just use half the epoch length - halfEpochDuration := strideEpochTracker.Duration / 2 - transfer1TimeoutTimestamp := uint64(strideEpochTracker.NextEpochStartTime - halfEpochDuration) // unix nano - transfer2TimeoutDuration := fmt.Sprintf("%ds", halfEpochDuration/1e9) // string in seconds - - startingDenom := route.RewardDenomOnHostZone - sendTokens := sdk.NewCoin(startingDenom, amount) - - withdrawlIcaAddress := route.HostAccount.Address - unwindIcaAddress := route.RewardAccount.Address - tradeIcaAddress := route.TradeAccount.Address - - // Validate ICAs were registered - if withdrawlIcaAddress == "" { - return msg, errorsmod.Wrapf(types.ErrICAAccountNotFound, "no host account found for %s", route.Description()) - } - if unwindIcaAddress == "" { - return msg, errorsmod.Wrapf(types.ErrICAAccountNotFound, "no reward account found for %s", route.Description()) - } - if tradeIcaAddress == "" { - return msg, errorsmod.Wrapf(types.ErrICAAccountNotFound, "no trade account found for %s", route.Description()) - } - - // Build the pfm memo to specify the forwarding logic - // This transfer channel id is a channel on the reward Zone for transfers to the trade zone - // (not to be confused with a transfer channel on Stride or the Host Zone) - memo := PacketForwardMetadata{ - Forward: &ForwardMetadata{ - Receiver: tradeIcaAddress, - Port: transfertypes.PortID, - Channel: route.RewardToTradeChannelId, - Timeout: transfer2TimeoutDuration, - Retries: 0, - }, - } - memoJSON, err := json.Marshal(memo) - if err != nil { - return msg, err - } - - msg = transfertypes.MsgTransfer{ - SourcePort: transfertypes.PortID, - SourceChannel: route.HostToRewardChannelId, // channel on hostZone for transfers to rewardZone - Token: sendTokens, - Sender: withdrawlIcaAddress, - Receiver: unwindIcaAddress, // could be "pfm" or a real address depending on version - TimeoutTimestamp: transfer1TimeoutTimestamp, - Memo: string(memoJSON), - } - - return msg, nil -} - -// ICA tx will kick off transferring the reward tokens from the hostZone withdrawal ICA to the tradeZone trade ICA -// This will be two hops to unwind the ibc denom through the rewardZone using pfm in the transfer memo -func (k Keeper) TransferRewardTokensHostToTrade(ctx sdk.Context, amount sdkmath.Int, route types.TradeRoute) error { - // If the min swap amount was not set it would be ZeroInt, if positive we need to compare to the amount given - // then if the min swap amount is greater than the current amount, do nothing this epoch to avoid small transfers - // Particularly important for the PFM hop if the reward chain has frictional transfer fees (like noble chain) - if route.TradeConfig.MinSwapAmount.GT(amount) { - k.Logger(ctx).Info(fmt.Sprintf("Balance of %v is below trade minimum of %v, skipping transfer", - amount, route.TradeConfig.MinSwapAmount)) - return nil - } - - // Build the PFM transfer message from host to trade zone - msg, err := k.BuildHostToTradeTransferMsg(ctx, amount, route) - if err != nil { - return err - } - msgs := []proto.Message{&msg} - - hostZoneId := route.HostAccount.ChainId - rewardZoneId := route.RewardAccount.ChainId - tradeZoneId := route.TradeAccount.ChainId - k.Logger(ctx).Info(utils.LogWithHostZone(hostZoneId, - "Preparing MsgTransfer of %+v from %s to %s to %s", msg.Token, hostZoneId, rewardZoneId, tradeZoneId)) - - // Send the ICA tx to kick off transfer from hostZone through rewardZone to the tradeZone (no callbacks) - hostAccount := route.HostAccount - withdrawalOwner := types.FormatHostZoneICAOwner(hostAccount.ChainId, hostAccount.Type) - err = k.SubmitICATxWithoutCallback(ctx, hostAccount.ConnectionId, withdrawalOwner, msgs, msg.TimeoutTimestamp) - if err != nil { - return errorsmod.Wrapf(err, "Failed to submit ICA tx, Messages: %+v", msgs) - } - - return nil -} - -// ICA tx to kick off transferring the converted tokens back from tradeZone to the hostZone withdrawal ICA -func (k Keeper) TransferConvertedTokensTradeToHost(ctx sdk.Context, amount sdkmath.Int, route types.TradeRoute) error { - // Timeout for ica tx and the transfer msgs is at end of epoch - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.STRIDE_EPOCH) - } - timeout := uint64(strideEpochTracker.NextEpochStartTime) - - convertedDenom := route.HostDenomOnTradeZone - sendTokens := sdk.NewCoin(convertedDenom, amount) - - // Validate ICAs were registered - tradeIcaAddress := route.TradeAccount.Address - withdrawlIcaAddress := route.HostAccount.Address - if withdrawlIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no host account found for %s", route.Description()) - } - if tradeIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no trade account found for %s", route.Description()) - } - - var msgs []proto.Message - msgs = append(msgs, &transfertypes.MsgTransfer{ - SourcePort: transfertypes.PortID, - SourceChannel: route.TradeToHostChannelId, // channel on tradeZone for transfers to hostZone - Token: sendTokens, - Sender: tradeIcaAddress, - Receiver: withdrawlIcaAddress, - TimeoutTimestamp: timeout, - Memo: "", - }) - - hostZoneId := route.HostAccount.ChainId - tradeZoneId := route.TradeAccount.ChainId - k.Logger(ctx).Info(utils.LogWithHostZone(hostZoneId, - "Preparing MsgTransfer of %+v from %s to %s", sendTokens, tradeZoneId, hostZoneId)) - - // Send the ICA tx to kick off transfer from hostZone through rewardZone to the tradeZone (no callbacks) - tradeAccount := route.TradeAccount - tradeOwner := types.FormatTradeRouteICAOwnerFromRouteId(tradeAccount.ChainId, route.GetRouteId(), tradeAccount.Type) - err := k.SubmitICATxWithoutCallback(ctx, tradeAccount.ConnectionId, tradeOwner, msgs, timeout) - if err != nil { - return errorsmod.Wrapf(err, "Failed to submit ICA tx, Messages: %+v", msgs) - } - - return nil -} - -// Builds the Osmosis swap message to trade reward tokens for host tokens -// Depending on min and max swap amounts set in the route, it is possible not the full amount given will swap -// The minimum amount of tokens that can come out of the trade is calculated using a price from the pool -func (k Keeper) BuildSwapMsg(rewardAmount sdkmath.Int, route types.TradeRoute) (msg types.MsgSwapExactAmountIn, err error) { - // Validate the trade ICA was registered - tradeIcaAddress := route.TradeAccount.Address - if tradeIcaAddress == "" { - return msg, errorsmod.Wrapf(types.ErrICAAccountNotFound, "no trade account found for %s", route.Description()) - } - - // If the max swap amount was not set it would be ZeroInt, if positive we need to compare to the amount given - // then if max swap amount is LTE to amount full swap is possible so amount is fine, otherwise set amount to max - tradeConfig := route.TradeConfig - if tradeConfig.MaxSwapAmount.IsPositive() && rewardAmount.GT(tradeConfig.MaxSwapAmount) { - rewardAmount = tradeConfig.MaxSwapAmount - } - - // See if pool swap price has been set to a valid ratio - // The only time this should not be set is right after the pool is added, - // before an ICQ has been submitted for the price - if tradeConfig.SwapPrice.IsZero() { - return msg, fmt.Errorf("Price not found for pool %d", tradeConfig.PoolId) - } - - // If there is a valid price, use it to set a floor for the acceptable minimum output tokens - // minOut is the minimum number of HostDenom tokens we must receive or the swap will fail - // - // To calculate minOut, we first convert the rewardAmount into units of HostDenom, - // and then we multiply by (1 - MaxAllowedSwapLossRate) - // - // The price on the trade route represents the ratio of host denom to reward denom - // So, to convert from units of RewardTokens to units of HostTokens, - // we multiply the reward amount by the price: - // AmountInHost = AmountInReward * SwapPrice - rewardAmountConverted := sdkmath.LegacyNewDecFromInt(rewardAmount).Mul(tradeConfig.SwapPrice) - minOutPercentage := sdkmath.LegacyOneDec().Sub(tradeConfig.MaxAllowedSwapLossRate) - minOut := rewardAmountConverted.Mul(minOutPercentage).TruncateInt() - - tradeTokens := sdk.NewCoin(route.RewardDenomOnTradeZone, rewardAmount) - - // Prepare Osmosis GAMM module MsgSwapExactAmountIn from the trade account to perform the trade - // If we want to generalize in the future, write swap message generation funcs for each DEX type, - // decide which msg generation function to call based on check of which tradeZone was passed in - routes := []types.SwapAmountInRoute{{ - PoolId: tradeConfig.PoolId, - TokenOutDenom: route.HostDenomOnTradeZone, - }} - msg = types.MsgSwapExactAmountIn{ - Sender: tradeIcaAddress, - Routes: routes, - TokenIn: tradeTokens, - TokenOutMinAmount: minOut, - } - - return msg, nil -} - -// DEPRECATED: The on-chain swap has been deprecated in favor of an authz controller -// Trade reward tokens in the Trade ICA for the host denom tokens using ICA remote tx on trade zone -// The amount represents the total amount of the reward token in the trade ICA found by the calling ICQ -func (k Keeper) SwapRewardTokens(ctx sdk.Context, rewardAmount sdkmath.Int, route types.TradeRoute) error { - // If the min swap amount was not set it would be ZeroInt, if positive we need to compare to the amount given - // then if the min swap amount is greater than the current amount, do nothing this epoch to avoid small swaps - tradeConfig := route.TradeConfig - if tradeConfig.MinSwapAmount.IsPositive() && tradeConfig.MinSwapAmount.GT(rewardAmount) { - return nil - } - - // Build the Osmosis swap message to convert reward tokens to host tokens - msg, err := k.BuildSwapMsg(rewardAmount, route) - if err != nil { - return err - } - msgs := []proto.Message{&msg} - - tradeAccount := route.TradeAccount - k.Logger(ctx).Info(utils.LogWithHostZone(tradeAccount.ChainId, - "Preparing MsgSwapExactAmountIn of %+v from the trade account", msg.TokenIn)) - - // Timeout the swap at the end of the epoch - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.HOUR_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.HOUR_EPOCH) - } - timeout := uint64(strideEpochTracker.NextEpochStartTime) - - // Send the ICA tx to perform the swap on the tradeZone - tradeOwner := types.FormatTradeRouteICAOwnerFromRouteId(tradeAccount.ChainId, route.GetRouteId(), tradeAccount.Type) - err = k.SubmitICATxWithoutCallback(ctx, tradeAccount.ConnectionId, tradeOwner, msgs, timeout) - if err != nil { - return errorsmod.Wrapf(err, "Failed to submit ICA tx for the swap, Messages: %v", msgs) - } - - return nil -} - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ICQ calls for remote ICA balances -// There is a single trade zone (hardcoded as Osmosis for now but maybe additional DEXes allowed in the future) -// We have to initialize a single hostZone object for the trade zone once in initialization and -// then it can be used in all these calls -/////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -// Kick off ICQ for the reward denom balance in the withdrawal address -func (k Keeper) WithdrawalRewardBalanceQuery(ctx sdk.Context, route types.TradeRoute) error { - withdrawalAccount := route.HostAccount - k.Logger(ctx).Info(utils.LogWithHostZone(withdrawalAccount.ChainId, "Submitting ICQ for reward denom in withdrawal account")) - - // Encode the withdrawal account address for the query request - // The query request consists of the withdrawal account address and reward denom - _, withdrawalAddressBz, err := bech32.DecodeAndConvert(withdrawalAccount.Address) - if err != nil { - return errorsmod.Wrapf(err, "invalid withdrawal account address (%s), could not decode", withdrawalAccount.Address) - } - queryData, err := types.MoveBankBalanceKey(withdrawalAddressBz, route.RewardDenomOnHostZone) - if err != nil { - panic(fmt.Sprintf( - "cannot construct move bank balance key for address %s and denom %s", - withdrawalAccount.Address, route.RewardDenomOnHostZone)) - } - - // Timeout the query halfway through the epoch (since that's when the first transfer - // in the pfm sequence will timeout) - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.STRIDE_EPOCH) - } - timeoutDuration := time.Duration(strideEpochTracker.Duration) / 2 - - // We need the trade route keys in the callback to look up the tradeRoute struct - callbackData := types.TradeRouteCallback{ - RewardDenom: route.RewardDenomOnRewardZone, - HostDenom: route.HostDenomOnHostZone, - } - callbackDataBz, err := proto.Marshal(&callbackData) - if err != nil { - return errorsmod.Wrapf(err, "unable to marshal TradeRoute callback data") - } - - // Submit the ICQ for the withdrawal account balance - query := icqtypes.Query{ - ChainId: withdrawalAccount.ChainId, - ConnectionId: withdrawalAccount.ConnectionId, - QueryType: icqtypes.BANK_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_WithdrawalRewardBalance, - CallbackData: callbackDataBz, - TimeoutDuration: timeoutDuration, - TimeoutPolicy: icqtypes.TimeoutPolicy_REJECT_QUERY_RESPONSE, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - return err - } - - return nil -} - -// Kick off ICQ for how many reward tokens are in the trade ICA associated with this host zone -func (k Keeper) TradeRewardBalanceQuery(ctx sdk.Context, route types.TradeRoute) error { - tradeAccount := route.TradeAccount - k.Logger(ctx).Info(utils.LogWithHostZone(tradeAccount.ChainId, "Submitting ICQ for reward denom in trade ICA account")) - - // Encode the trade account address for the query request - // The query request consists of the trade account address and reward denom - // keep in mind this ICA address actually exists on trade zone but is associated with trades performed for host zone - _, tradeAddressBz, err := bech32.DecodeAndConvert(tradeAccount.Address) - if err != nil { - return errorsmod.Wrapf(err, "invalid trade account address (%s), could not decode", tradeAccount.Address) - } - queryData := append(v3.CreateAccountBalancesPrefix(tradeAddressBz), []byte(route.RewardDenomOnTradeZone)...) - - // Timeout query at end of epoch - hourEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.HOUR_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.HOUR_EPOCH) - } - timeout := time.Unix(0, int64(hourEpochTracker.NextEpochStartTime)) - timeoutDuration := timeout.Sub(ctx.BlockTime()) - - // We need the trade route keys in the callback to look up the tradeRoute struct - callbackData := types.TradeRouteCallback{ - RewardDenom: route.RewardDenomOnRewardZone, - HostDenom: route.HostDenomOnHostZone, - } - callbackDataBz, err := proto.Marshal(&callbackData) - if err != nil { - return errorsmod.Wrapf(err, "unable to marshal TradeRewardBalanceQuery callback data") - } - - // Submit the ICQ for the withdrawal account balance - query := icqtypes.Query{ - ChainId: tradeAccount.ChainId, - ConnectionId: tradeAccount.ConnectionId, // query needs to go to the trade zone, not the host zone - QueryType: icqtypes.BANK_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_TradeRewardBalance, - CallbackData: callbackDataBz, - TimeoutDuration: timeoutDuration, - TimeoutPolicy: icqtypes.TimeoutPolicy_REJECT_QUERY_RESPONSE, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - return err - } - - return nil -} - -// Kick off ICQ for how many converted tokens are in the trade ICA associated with this host zone -func (k Keeper) TradeConvertedBalanceQuery(ctx sdk.Context, route types.TradeRoute) error { - tradeAccount := route.TradeAccount - k.Logger(ctx).Info(utils.LogWithHostZone(tradeAccount.ChainId, "Submitting ICQ for converted denom in trade ICA account")) - - // Encode the trade account address for the query request - // The query request consists of the trade account address and converted denom - // keep in mind this ICA address actually exists on trade zone but is associated with trades performed for host zone - _, tradeAddressBz, err := bech32.DecodeAndConvert(tradeAccount.Address) - if err != nil { - return errorsmod.Wrapf(err, "invalid trade account address (%s), could not decode", tradeAccount.Address) - } - queryData := append(v3.CreateAccountBalancesPrefix(tradeAddressBz), []byte(route.HostDenomOnTradeZone)...) - - // Timeout query at end of epoch - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.STRIDE_EPOCH) - } - timeout := time.Unix(0, int64(strideEpochTracker.NextEpochStartTime)) - timeoutDuration := timeout.Sub(ctx.BlockTime()) - - // We need the trade route keys in the callback to look up the tradeRoute struct - callbackData := types.TradeRouteCallback{ - RewardDenom: route.RewardDenomOnRewardZone, - HostDenom: route.HostDenomOnHostZone, - } - callbackDataBz, err := proto.Marshal(&callbackData) - if err != nil { - return errorsmod.Wrapf(err, "unable to marshal trade route as callback data") - } - - // Submit the ICQ for the withdrawal account balance - query := icqtypes.Query{ - ChainId: tradeAccount.ChainId, - ConnectionId: tradeAccount.ConnectionId, // query needs to go to the trade zone, not the host zone - QueryType: icqtypes.BANK_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_TradeConvertedBalance, - CallbackData: callbackDataBz, - TimeoutDuration: timeoutDuration, - TimeoutPolicy: icqtypes.TimeoutPolicy_REJECT_QUERY_RESPONSE, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - return err - } - - return nil -} - -// DEPRECATED: The on-chain swap has been deprecated in favor of an authz controller. Price is no longer needed -// Kick off ICQ for the spot price on the pool given the input and output denoms implied by the given TradeRoute -// the callback for this query is responsible for updating the returned spot price on the keeper data -func (k Keeper) PoolPriceQuery(ctx sdk.Context, route types.TradeRoute) error { - tradeAccount := route.TradeAccount - k.Logger(ctx).Info(utils.LogWithHostZone(tradeAccount.ChainId, "Submitting ICQ for spot price in this pool")) - - // Build query request data which consists of the TWAP store key built from each denom - queryData := icqtypes.FormatOsmosisMostRecentTWAPKey( - route.TradeConfig.PoolId, - route.RewardDenomOnTradeZone, - route.HostDenomOnTradeZone, - ) - - // Timeout query at end of epoch - hourEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.HOUR_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.HOUR_EPOCH) - } - timeout := time.Unix(0, int64(hourEpochTracker.NextEpochStartTime)) - timeoutDuration := timeout.Sub(ctx.BlockTime()) - - // We need the trade route keys in the callback to look up the tradeRoute struct - callbackData := types.TradeRouteCallback{ - RewardDenom: route.RewardDenomOnRewardZone, - HostDenom: route.HostDenomOnHostZone, - } - callbackDataBz, err := proto.Marshal(&callbackData) - if err != nil { - return errorsmod.Wrapf(err, "unable to marshal TradeRewardBalanceQuery callback data") - } - - // Submit the ICQ for the trade pool spot price query - query := icqtypes.Query{ - ChainId: tradeAccount.ChainId, - ConnectionId: tradeAccount.ConnectionId, // query needs to go to the trade zone, not the host zone - QueryType: icqtypes.TWAP_STORE_QUERY_WITH_PROOF, - RequestData: queryData, - CallbackModule: types.ModuleName, - CallbackId: ICQCallbackID_PoolPrice, - CallbackData: callbackDataBz, - TimeoutDuration: timeoutDuration, - TimeoutPolicy: icqtypes.TimeoutPolicy_REJECT_QUERY_RESPONSE, - } - if err := k.interchainQueryKeeper.SubmitICQRequest(ctx, query, false); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error querying pool spot price, error: %s", err.Error())) - return err - } - - return nil -} - -//////////////////////////////////////////////////////////////////////////////////////////////////// -// The current design assumes foreign reward tokens start and end in the hostZone withdrawal address -// Step 1: transfer reward tokens to trade chain -// Step 2: perform the swap with as many reward tokens as possible -// Step 3: return the swapped tokens to the withdrawal ICA on hostZone -// Independently there is an ICQ to get the swap price and update it in the keeper state -// -// Because the swaps have limits on how many tokens can be used to avoid slippage, -// the swaps and price checks happen on a faster (hourly) cadence than the transfers (stride epochly) -//////////////////////////////////////////////////////////////////////////////////////////////////// - -// Helper function to be run stride epochly, kicks off queries on specific denoms on route -func (k Keeper) TransferAllRewardTokens(ctx sdk.Context) { - for _, route := range k.GetAllTradeRoutes(ctx) { - // Step 1: ICQ reward balance on hostZone, transfer funds with unwinding to trade chain - if err := k.WithdrawalRewardBalanceQuery(ctx, route); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to submit query for reward balance in withdrawal ICA: %s", err)) - } - // Step 3: ICQ converted tokens in trade ICA, transfer funds back to hostZone withdrawal ICA - if err := k.TradeConvertedBalanceQuery(ctx, route); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to submit query for converted balance in trade ICA: %s", err)) - } - } -} - -// Helper function to be run hourly, kicks off query which will kick off actual swaps to happen -func (k Keeper) SwapAllRewardTokens(ctx sdk.Context) { - for _, route := range k.GetAllTradeRoutes(ctx) { - // Step 2: ICQ reward balance in trade ICA, swap tokens according to limiting rules - if err := k.TradeRewardBalanceQuery(ctx, route); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to submit query for reward balance in trade ICA: %s", err)) - } - } -} - -// Helper function to be run hourly, kicks off query to get and update the swap price in keeper data -func (k Keeper) UpdateAllSwapPrices(ctx sdk.Context) { - for _, route := range k.GetAllTradeRoutes(ctx) { - // ICQ swap price for the specific pair on this route and update keeper on callback - if err := k.PoolPriceQuery(ctx, route); err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Unable to submit query for pool spot price: %s", err)) - } - } -} diff --git a/x/stakeibc/keeper/trade_route.go b/x/stakeibc/keeper/trade_route.go deleted file mode 100644 index b8e68edc0..000000000 --- a/x/stakeibc/keeper/trade_route.go +++ /dev/null @@ -1,64 +0,0 @@ -package keeper - -import ( - "cosmossdk.io/store/prefix" - storetypes "cosmossdk.io/store/types" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// SetTradeRoute set a specific tradeRoute in the store -func (k Keeper) SetTradeRoute(ctx sdk.Context, tradeRoute types.TradeRoute) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.TradeRouteKeyPrefix)) - key := tradeRoute.GetKey() - b := k.cdc.MustMarshal(&tradeRoute) - store.Set(key, b) -} - -// GetTradeRoute returns a tradeRoute from its start and end denoms -// The start and end denom's are in their native format (e.g. uusdc and udydx) -func (k Keeper) GetTradeRoute(ctx sdk.Context, rewardDenom string, hostDenom string) (val types.TradeRoute, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.TradeRouteKeyPrefix)) - key := types.TradeRouteKeyFromDenoms(rewardDenom, hostDenom) - b := store.Get(key) - if len(b) == 0 { - return val, false - } - k.cdc.MustUnmarshal(b, &val) - return val, true -} - -// RemoveTradeRoute removes a tradeRoute from the store -// The start and end denom's are in their native format (e.g. uusdc and udydx) -func (k Keeper) RemoveTradeRoute(ctx sdk.Context, rewardDenom string, hostDenom string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.TradeRouteKeyPrefix)) - key := types.TradeRouteKeyFromDenoms(rewardDenom, hostDenom) - store.Delete(key) -} - -// GetAllTradeRoute returns all tradeRoutes -func (k Keeper) GetAllTradeRoutes(ctx sdk.Context) (list []types.TradeRoute) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.TradeRouteKeyPrefix)) - iterator := storetypes.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.TradeRoute - k.cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} - -// Searches for a trade route by the trade account chain ID -func (k Keeper) GetTradeRouteFromTradeAccountChainId(ctx sdk.Context, chainId string) (tradeRoute types.TradeRoute, found bool) { - for _, tradeRoute := range k.GetAllTradeRoutes(ctx) { - if tradeRoute.TradeAccount.ChainId == chainId { - return tradeRoute, true - } - } - return tradeRoute, false -} diff --git a/x/stakeibc/keeper/transfer.go b/x/stakeibc/keeper/transfer.go deleted file mode 100644 index 0dd8c0662..000000000 --- a/x/stakeibc/keeper/transfer.go +++ /dev/null @@ -1,224 +0,0 @@ -package keeper - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - - sdkmath "cosmossdk.io/math" - "github.com/cosmos/gogoproto/proto" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - ibctypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - transfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" - - "github.com/milkyway-labs/milkyway/utils" - epochstypes "github.com/milkyway-labs/milkyway/x/epochs/types" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// Iterate each deposit record marked TRANSFER_QUEUE and IBC transfer tokens from the Stride controller account to the delegation ICAs on each host zone -func (k Keeper) TransferExistingDepositsToHostZones(ctx sdk.Context, epochNumber uint64, depositRecords []recordstypes.DepositRecord) { - k.Logger(ctx).Info("Transferring deposit records...") - - transferDepositRecords := utils.FilterDepositRecords(depositRecords, func(record recordstypes.DepositRecord) (condition bool) { - isTransferRecord := record.Status == recordstypes.DepositRecord_TRANSFER_QUEUE - isBeforeCurrentEpoch := record.DepositEpochNumber < epochNumber - return isTransferRecord && isBeforeCurrentEpoch - }) - - ibcTransferTimeoutNanos := k.GetParams(ctx).IbcTransferTimeoutNanos - - for _, depositRecord := range transferDepositRecords { - k.Logger(ctx).Info(utils.LogWithHostZone(depositRecord.HostZoneId, - "Processing deposit record %d: %v%s", depositRecord.Id, depositRecord.Amount, depositRecord.Denom)) - - // if a TRANSFER_QUEUE record has 0 balance and was created in the previous epoch, it's safe to remove since it will never be updated or used - if depositRecord.Amount.LTE(sdkmath.ZeroInt()) && depositRecord.DepositEpochNumber < epochNumber { - k.Logger(ctx).Info(utils.LogWithHostZone(depositRecord.HostZoneId, "Empty deposit record - Removing.")) - k.recordsKeeper.RemoveDepositRecord(ctx, depositRecord.Id) - continue - } - - hostZone, hostZoneFound := k.GetHostZone(ctx, depositRecord.HostZoneId) - if !hostZoneFound { - k.Logger(ctx).Error(fmt.Sprintf("[TransferExistingDepositsToHostZones] Host zone not found for deposit record id %d", depositRecord.Id)) - continue - } - - if hostZone.Halted { - k.Logger(ctx).Error(fmt.Sprintf("[TransferExistingDepositsToHostZones] Host zone halted for deposit record id %d", depositRecord.Id)) - continue - } - - if hostZone.DelegationIcaAddress == "" { - k.Logger(ctx).Error(fmt.Sprintf("[TransferExistingDepositsToHostZones] Zone %s is missing a delegation address!", hostZone.ChainId)) - continue - } - - k.Logger(ctx).Info(utils.LogWithHostZone(depositRecord.HostZoneId, "Transferring %v%s", depositRecord.Amount, hostZone.HostDenom)) - transferCoin := sdk.NewCoin(hostZone.IbcDenom, depositRecord.Amount) - - // timeout 30 min in the future - // NOTE: this assumes no clock drift between chains, which tendermint guarantees - // if we onboard non-tendermint chains, we need to use the time on the host chain to - // calculate the timeout - // https://github.com/cometbft/cometbft/blob/v0.34.x/spec/consensus/bft-time.md - timeoutTimestamp := uint64(ctx.BlockTime().UnixNano()) + ibcTransferTimeoutNanos - msg := ibctypes.NewMsgTransfer( - ibctransfertypes.PortID, - hostZone.TransferChannelId, - transferCoin, - hostZone.DepositAddress, - hostZone.DelegationIcaAddress, - clienttypes.Height{}, - timeoutTimestamp, - "", - ) - k.Logger(ctx).Info(utils.LogWithHostZone(depositRecord.HostZoneId, "Transfer Msg: %+v", msg)) - - // transfer the deposit record and update its status to TRANSFER_IN_PROGRESS - err := k.recordsKeeper.IBCTransferNativeTokens(ctx, msg, depositRecord) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("[TransferExistingDepositsToHostZones] Failed to initiate IBC transfer to host zone, HostZone: %v, Channel: %v, Amount: %v, ModuleAddress: %v, DelegateAddress: %v, Timeout: %v", - hostZone.ChainId, hostZone.TransferChannelId, transferCoin, hostZone.DepositAddress, hostZone.DelegationIcaAddress, timeoutTimestamp)) - k.Logger(ctx).Error(fmt.Sprintf("[TransferExistingDepositsToHostZones] err {%s}", err.Error())) - continue - } - - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, "Successfully submitted transfer")) - } -} - -// Transfers tokens from the community pool deposit ICA account to the host zone stake holding module address for that pool -func (k Keeper) TransferCommunityPoolDepositToHolding(ctx sdk.Context, hostZone types.HostZone, token sdk.Coin) error { - // Verify that the deposit ica address exists on the host zone and stake holding address exists on stride - if hostZone.CommunityPoolDepositIcaAddress == "" || hostZone.CommunityPoolStakeHoldingAddress == "" { - return types.ErrICAAccountNotFound.Wrap( - "Invalid deposit address or stake holding address, cannot build valid ICA transfer kickoff command") - } - - // get the hostZone counterparty transfer channel for sending tokens from hostZone to Stride - transferChannel, found := k.ibcKeeper.ChannelKeeper.GetChannel(ctx, transfertypes.PortID, hostZone.TransferChannelId) - if !found { - return errorsmod.Wrapf(channeltypes.ErrChannelNotFound, "transfer channel %s not found", hostZone.TransferChannelId) - } - counterpartyChannelId := transferChannel.Counterparty.ChannelId - - // Timeout both the ICA kick off command and the ibc transfer message at the epoch boundary - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.STRIDE_EPOCH) - } - endEpochTimestamp := uint64(strideEpochTracker.NextEpochStartTime) - - // Determine the host zone's stToken ibc denom - nativeDenom := hostZone.HostDenom - stIbcDenom, err := k.GetStIbcDenomOnHostZone(ctx, hostZone) - if err != nil { - return err - } - - // If the token is the host zone's native token, we send it to the stake holding address to be liquid staked - // Otherwise, if it's an stToken, we send it to the redeem holding address to be redeemed - var destinationHoldingAddress string - switch token.Denom { - case nativeDenom: - destinationHoldingAddress = hostZone.CommunityPoolStakeHoldingAddress - case stIbcDenom: - destinationHoldingAddress = hostZone.CommunityPoolRedeemHoldingAddress - default: - return fmt.Errorf("Invalid community pool transfer denom: %s", token.Denom) - } - - memo := "" - var msgs []proto.Message - msgs = append(msgs, transfertypes.NewMsgTransfer( - transfertypes.PortID, - counterpartyChannelId, // for transfers of communityPoolHostZone -> Stride - token, - hostZone.CommunityPoolDepositIcaAddress, // ICA controlled address on community pool zone - destinationHoldingAddress, // Stride address, unique to each community pool / hostzone - clienttypes.Height{}, - endEpochTimestamp, - memo, - )) - - // No need to build ICA callback data or input an ICA callback method since the callback Stride can see is only - // the ICA callback, not the actual transfer callback. The transfer ack returns to the hostZone chain not Stride - icaCallbackId := "" - var icaCallbackData []byte - - // Send the transaction through SubmitTx to kick off ICA commands -- no ICA callback method name, or callback args needed - _, err = k.SubmitTxs(ctx, - hostZone.ConnectionId, - msgs, - types.ICAAccountType_COMMUNITY_POOL_DEPOSIT, - endEpochTimestamp, - icaCallbackId, - icaCallbackData) - if err != nil { - return errorsmod.Wrapf(err, "Failed to SubmitTxs, Messages: %v, err: %s", msgs, err.Error()) - } - k.Logger(ctx).Info("Successfully sent ICA command to kick off ibc transfer from deposit ICA to stake holding address") - - return nil -} - -// Transfers a recently minted stToken from the stride-side stake holding address to the return ICA address on the host zone -func (k Keeper) TransferHoldingToCommunityPoolReturn(ctx sdk.Context, hostZone types.HostZone, coin sdk.Coin) error { - memo := "" - strideEpochTracker, found := k.GetEpochTracker(ctx, epochstypes.STRIDE_EPOCH) - if !found { - return errorsmod.Wrapf(types.ErrEpochNotFound, epochstypes.STRIDE_EPOCH) - } - endEpochTimestamp := uint64(strideEpochTracker.NextEpochStartTime) - - // build and send an IBC message for the coin to transfer it back to the hostZone - msg := transfertypes.NewMsgTransfer( - transfertypes.PortID, - hostZone.TransferChannelId, - coin, - hostZone.CommunityPoolStakeHoldingAddress, // from Stride address, unique to each community pool / hostzone - hostZone.CommunityPoolReturnIcaAddress, // to ICA controlled address on foreign hub - clienttypes.Height{}, - endEpochTimestamp, - memo, - ) - - msgTransferResponse, err := k.recordsKeeper.TransferKeeper.Transfer(sdk.WrapSDKContext(ctx), msg) - if err != nil { - return errorsmod.Wrapf(err, "Error submitting ibc transfer for %+v", coin) - } - - result := fmt.Sprintf("Successfully submitted ibctransfer for %+v with response %+v", - coin, msgTransferResponse) - k.Logger(ctx).Info(result) - - return nil -} - -// given a hostZone with native denom, returns the ibc denom on the zone for the staked stDenom -func (k Keeper) GetStIbcDenomOnHostZone(ctx sdk.Context, hostZone types.HostZone) (ibcStakedDenom string, err error) { - nativeDenom := hostZone.HostDenom - stDenomOnStride := types.StAssetDenomFromHostZoneDenom(nativeDenom) - - // use counterparty transfer channel because tokens come through this channel to hostZone - transferChannel, found := k.ibcKeeper.ChannelKeeper.GetChannel(ctx, transfertypes.PortID, hostZone.TransferChannelId) - if !found { - return "", channeltypes.ErrChannelNotFound.Wrap(hostZone.TransferChannelId) - } - - counterpartyChannelId := transferChannel.Counterparty.ChannelId - if counterpartyChannelId == "" { - return "", channeltypes.ErrChannelNotFound.Wrapf("counterparty channel not found for %s", hostZone.TransferChannelId) - } - - sourcePrefix := transfertypes.GetDenomPrefix(transfertypes.PortID, counterpartyChannelId) - prefixedDenom := sourcePrefix + stDenomOnStride - - return transfertypes.ParseDenomTrace(prefixedDenom).IBCDenom(), nil -} diff --git a/x/stakeibc/keeper/unbonding.go b/x/stakeibc/keeper/unbonding.go deleted file mode 100644 index d52f6a693..000000000 --- a/x/stakeibc/keeper/unbonding.go +++ /dev/null @@ -1,569 +0,0 @@ -package keeper - -import ( - "errors" - "fmt" - "sort" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/cosmos/gogoproto/proto" - stakingtypes "github.com/initia-labs/initia/x/mstaking/types" - - "github.com/milkyway-labs/milkyway/utils" - recordstypes "github.com/milkyway-labs/milkyway/x/records/types" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -type ValidatorUnbondCapacity struct { - ValidatorAddress string - CurrentDelegation sdkmath.Int - BalancedDelegation sdkmath.Int - Capacity sdkmath.Int -} - -// The ratio of ideal balanced delegation to the current delegation -// This represents how proportionally unbalanced each validator is -// The smaller number means their current delegation is much larger -// then their fair portion of the current total stake -func (c *ValidatorUnbondCapacity) GetBalanceRatio() (sdkmath.LegacyDec, error) { - // ValidatorUnbondCapaciy structs only exist for validators with positive capacity - // capacity is CurrentDelegation - BalancedDelegation - // positive capacity means CurrentDelegation must be >0 - - // Therefore the current delegation here should never be zero - if c.CurrentDelegation.IsZero() { - errMsg := fmt.Sprintf("CurrentDelegation should not be 0 inside GetBalanceRatio(), %+v", c) - return sdkmath.LegacyZeroDec(), errors.New(errMsg) - } - return sdkmath.LegacyNewDecFromInt(c.BalancedDelegation).Quo(sdkmath.LegacyNewDecFromInt(c.CurrentDelegation)), nil -} - -// Returns all the host zone unbonding records that should unbond this epoch -// Records are returned as a mapping of epoch unbonding record ID to host zone unbonding record -// Records ready to be unbonded are identified by status UNBONDING_QUEUE and a non-zero native amount -func (k Keeper) GetQueuedHostZoneUnbondingRecords( - ctx sdk.Context, - chainId string, -) (epochNumbers []uint64, epochToHostZoneUnbondingMap map[uint64]recordstypes.HostZoneUnbonding) { - epochToHostZoneUnbondingMap = map[uint64]recordstypes.HostZoneUnbonding{} - for _, epochUnbonding := range k.recordsKeeper.GetAllEpochUnbondingRecord(ctx) { - hostZoneRecord, found := k.recordsKeeper.GetHostZoneUnbondingByChainId(ctx, epochUnbonding.EpochNumber, chainId) - if !found { - continue - } - k.Logger(ctx).Info(utils.LogWithHostZone(chainId, "Epoch %d - Status: %s, Amount: %v", - epochUnbonding.EpochNumber, hostZoneRecord.Status, hostZoneRecord.NativeTokenAmount)) - - if hostZoneRecord.ShouldInitiateUnbonding() { - epochNumbers = append(epochNumbers, epochUnbonding.EpochNumber) - epochToHostZoneUnbondingMap[epochUnbonding.EpochNumber] = *hostZoneRecord - } - } - return epochNumbers, epochToHostZoneUnbondingMap -} - -// Gets the total unbonded amount for a host zone by looping through the epoch unbonding records -// Also returns the epoch unbonding record ids -func (k Keeper) GetTotalUnbondAmount(ctx sdk.Context, hostZoneUnbondingRecords map[uint64]recordstypes.HostZoneUnbonding) (totalUnbonded sdkmath.Int) { - totalUnbonded = sdkmath.ZeroInt() - for _, hostZoneRecord := range hostZoneUnbondingRecords { - totalUnbonded = totalUnbonded.Add(hostZoneRecord.NativeTokenAmount) - } - return totalUnbonded -} - -// Given a list of user redemption record IDs and a redemption rate, sets the native token -// amount on each record, calculated from the stAmount and redemption rate, and returns the -// sum of all native token amounts across all user redemption records -func (k Keeper) RefreshUserRedemptionRecordNativeAmounts( - ctx sdk.Context, - chainId string, - userRedemptionRecordIds []string, - redemptionRate sdkmath.LegacyDec, -) (totalNativeAmount sdkmath.Int) { - // Loop and set the native amount for each record, keeping track of the total - totalNativeAmount = sdkmath.ZeroInt() - for _, userRedemptionRecordId := range userRedemptionRecordIds { - userRedemptionRecord, found := k.recordsKeeper.GetUserRedemptionRecord(ctx, userRedemptionRecordId) - if !found { - k.Logger(ctx).Error(utils.LogWithHostZone(chainId, "No user redemption record found for id %s", userRedemptionRecordId)) - continue - } - - // Calculate the number of native tokens using the redemption rate - nativeAmount := sdkmath.LegacyNewDecFromInt(userRedemptionRecord.StTokenAmount).Mul(redemptionRate).TruncateInt() - totalNativeAmount = totalNativeAmount.Add(nativeAmount) - - // Set the native amount on the record - userRedemptionRecord.NativeTokenAmount = nativeAmount - k.recordsKeeper.SetUserRedemptionRecord(ctx, userRedemptionRecord) - } - return totalNativeAmount -} - -// Sets the native token amount unbonded on the host zone unbonding record and the associated user redemption records -func (k Keeper) RefreshHostZoneUnbondingNativeTokenAmount( - ctx sdk.Context, - epochNumber uint64, - hostZoneUnbondingRecord recordstypes.HostZoneUnbonding, -) error { - // Grab the redemption rate from the host zone (to use in the native token calculation) - chainId := hostZoneUnbondingRecord.HostZoneId - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "host zone %s not found", chainId) - } - - // Set all native token amount on each user redemption record - redemptionRecordIds := hostZoneUnbondingRecord.UserRedemptionRecords - totalNativeAmount := k.RefreshUserRedemptionRecordNativeAmounts(ctx, chainId, redemptionRecordIds, hostZone.RedemptionRate) - - // Then set the total on the host zone unbonding record - hostZoneUnbondingRecord.NativeTokenAmount = totalNativeAmount - return k.recordsKeeper.SetHostZoneUnbondingRecord(ctx, epochNumber, chainId, hostZoneUnbondingRecord) -} - -// Given a mapping of epoch unbonding record IDs to host zone unbonding records, -// sets the native token amount across all epoch unbonding records, host zone unbonding records, -// and user redemption records, using the most updated redemption rate -func (k Keeper) RefreshUnbondingNativeTokenAmounts(ctx sdk.Context, hostZoneUnbondings map[uint64]recordstypes.HostZoneUnbonding) error { - for epochNumber, hostZoneUnbondingRecord := range hostZoneUnbondings { - if err := k.RefreshHostZoneUnbondingNativeTokenAmount(ctx, epochNumber, hostZoneUnbondingRecord); err != nil { - return err - } - } - return nil -} - -// Determine the unbonding capacity that each validator has -// The capacity is determined by the difference between their current delegation -// and their fair portion of the total stake based on their weights -// (i.e. their balanced delegation) -// -// Validators with a balanced delegation less than their current delegation -// are already at a deficit, are not included in the returned list, -// and thus, will not incur any unbonding -func (k Keeper) GetValidatorUnbondCapacity( - ctx sdk.Context, - validators []*types.Validator, - balancedDelegation map[string]sdkmath.Int, -) (validatorCapacities []ValidatorUnbondCapacity) { - for _, validator := range validators { - // The capacity equals the difference between their current delegation and - // the balanced delegation - // If the capacity is negative, that means the validator has less than their - // balanced portion. Ignore this case so they don't unbond anything - balancedDelegation, ok := balancedDelegation[validator.Address] - if !ok { - continue - } - - capacity := validator.Delegation.Sub(balancedDelegation) - if capacity.IsPositive() { - validatorCapacities = append(validatorCapacities, ValidatorUnbondCapacity{ - ValidatorAddress: validator.Address, - Capacity: capacity, - CurrentDelegation: validator.Delegation, - BalancedDelegation: balancedDelegation, - }) - } - } - - return validatorCapacities -} - -// Sort validators by the ratio of the ideal balanced delegation to their current delegation -// This will sort the validator's by how proportionally unbalanced they are -// -// Ex: -// -// Val1: Ideal Balanced Delegation 80, Current Delegation 100 (surplus of 20), Ratio: 0.8 -// Val2: Ideal Balanced Delegation 480, Current Delegation 500 (surplus of 20), Ratio: 0.96 -// -// While both validators have the same net unbalanced delegation, Val2 is proportionally -// more balanced since the surplus is a smaller percentage of it's overall delegation -// -// This will also sort such that 0-weight validator's will come first as their -// ideal balanced delegation will always be 0, and thus their ratio will always be 0 -// If the ratio's are equal, the validator with the larger delegation/capacity will come first -func SortUnbondingCapacityByPriority(validatorUnbondCapacity []ValidatorUnbondCapacity) ([]ValidatorUnbondCapacity, error) { - // Loop through all validators to make sure none error when getting the balance ratio needed for sorting - for _, validator := range validatorUnbondCapacity { - if _, err := validator.GetBalanceRatio(); err != nil { - return nil, err - } - } - - // Pairwise-compare function for Slice Stable Sort - lessFunc := func(i, j int) bool { - validatorA := validatorUnbondCapacity[i] - validatorB := validatorUnbondCapacity[j] - - // TODO: Once more than 32 validators are supported, change back to using balance ratio first - - // If the ratio's are equal, use the capacity as a tie breaker - // where the larget capacity comes first - if !validatorA.Capacity.Equal(validatorB.Capacity) { - return validatorA.Capacity.GT(validatorB.Capacity) - } - - // Finally, if the ratio and capacity are both equal, use address as a tie breaker - return validatorA.ValidatorAddress < validatorB.ValidatorAddress - } - sort.SliceStable(validatorUnbondCapacity, lessFunc) - - return validatorUnbondCapacity, nil -} - -// Given a total unbond amount and list of unbond capacity for each validator, sorted by unbond priority -// Iterates through the list and unbonds as much as possible from each validator until all the -// unbonding has been accounted for -// -// Returns the list of messages and the callback data for the ICA -func (k Keeper) GetUnbondingICAMessages( - hostZone types.HostZone, - totalUnbondAmount sdkmath.Int, - prioritizedUnbondCapacity []ValidatorUnbondCapacity, - batchSize int, -) (msgs []proto.Message, unbondings []*types.SplitDelegation, err error) { - // Loop through each validator and unbond as much as possible - remainingUnbondAmount := totalUnbondAmount - for _, validatorCapacity := range prioritizedUnbondCapacity { - // Break once all unbonding has been accounted for - if remainingUnbondAmount.IsZero() { - break - } - - // Unbond either up to the capacity or up to the total remaining unbond amount - // (whichever comes first) - var unbondAmount sdkmath.Int - if validatorCapacity.Capacity.LT(remainingUnbondAmount) { - unbondAmount = validatorCapacity.Capacity - } else { - unbondAmount = remainingUnbondAmount - } - remainingUnbondAmount = remainingUnbondAmount.Sub(unbondAmount) - - // Build the validator splits for the callback - unbondings = append(unbondings, &types.SplitDelegation{ - Validator: validatorCapacity.ValidatorAddress, - Amount: unbondAmount, - }) - } - - // If the number of messages exceeds the batch size, shrink it down the the batch size - // by re-distributing the exceess - if len(unbondings) > batchSize { - unbondings, err = k.ConsolidateUnbondingMessages(totalUnbondAmount, unbondings, prioritizedUnbondCapacity, batchSize) - if err != nil { - return msgs, unbondings, errorsmod.Wrapf(err, "unable to consolidate unbonding messages") - } - - // Sanity check that the number of messages is now under the batch size - if len(unbondings) > batchSize { - return msgs, unbondings, errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, - fmt.Sprintf("too many undelegation messages (%d) for host zone %s", len(msgs), hostZone.ChainId)) - } - } - - // Build the undelegate ICA messages from the splits - for _, unbonding := range unbondings { - msgs = append(msgs, &stakingtypes.MsgUndelegate{ - DelegatorAddress: hostZone.DelegationIcaAddress, - ValidatorAddress: unbonding.Validator, - Amount: sdk.NewCoins(sdk.NewCoin(hostZone.HostDenom, unbonding.Amount)), - }) - } - - // Sanity check that we had enough capacity to unbond - if !remainingUnbondAmount.IsZero() { - return msgs, unbondings, - fmt.Errorf("unable to unbond full amount (%v) from %v", totalUnbondAmount, hostZone.ChainId) - } - - return msgs, unbondings, nil -} - -// In the event that the number of generated undelegate messages exceeds the batch size, -// reduce the number of messages by dividing any excess amongst proportionally based on -// the remaining delegation -// This will no longer be necessary after undelegations to 32+ validators is supported -// NOTE: This assumes unbondCapacities are stored in order of capacity -func (k Keeper) ConsolidateUnbondingMessages( - totalUnbondAmount sdkmath.Int, - initialUnbondings []*types.SplitDelegation, - unbondCapacities []ValidatorUnbondCapacity, - batchSize int, -) (finalUnbondings []*types.SplitDelegation, err error) { - // Grab the first {batch_size} number of messages from the list - // This will consist of the validators with the most capacity - unbondingsBatch := initialUnbondings[:batchSize] - - // Calculate the amount that was initially meant to be unbonded from that batch, - // and determine the remainder that needs to be redistributed - initialUnbondAmountFromBatch := sdkmath.ZeroInt() - initialUnbondAmountFromBatchByVal := map[string]sdkmath.Int{} - for _, unbonding := range unbondingsBatch { - initialUnbondAmountFromBatch = initialUnbondAmountFromBatch.Add(unbonding.Amount) - initialUnbondAmountFromBatchByVal[unbonding.Validator] = unbonding.Amount - } - totalExcessAmount := totalUnbondAmount.Sub(initialUnbondAmountFromBatch) - - // Store the delegation of each validator that was expected *after* the originally - // planned unbonding went through - // e.g. If the validator had 10 before unbonding, and in the first pass, 3 was - // supposed to be unbonded, their delegation after the first pass is 7 - totalRemainingDelegationsAcrossBatch := sdkmath.LegacyZeroDec() - remainingDelegationsInBatchByVal := map[string]sdkmath.LegacyDec{} - for _, capacity := range unbondCapacities { - // Only add validators that were in the initial unbonding plan - // The delegation after the first pass is calculated by taking the "current delegation" - // (aka delegation before unbonding) and subtracting the unbond amount - if initialUnbondAmount, ok := initialUnbondAmountFromBatchByVal[capacity.ValidatorAddress]; ok { - remainingDelegation := sdkmath.LegacyNewDecFromInt(capacity.CurrentDelegation.Sub(initialUnbondAmount)) - - remainingDelegationsInBatchByVal[capacity.ValidatorAddress] = remainingDelegation - totalRemainingDelegationsAcrossBatch = totalRemainingDelegationsAcrossBatch.Add(remainingDelegation) - } - } - - // This is to protect against a division by zero error, but this would technically be possible - // if the 32 validators with the most capacity were all 0 weight and we wanted to unbond more - // than their combined delegation - if totalRemainingDelegationsAcrossBatch.IsZero() { - return finalUnbondings, errors.New("no delegations to redistribute during consolidation") - } - - // Before we start dividing up the excess, make sure we have sufficient stake in the capped set to cover it - if sdkmath.LegacyNewDecFromInt(totalExcessAmount).GT(totalRemainingDelegationsAcrossBatch) { - return finalUnbondings, errors.New("not enough exisiting delegation in the batch to cover the excess") - } - - // Loop through the original unbonding messages and proportionally divide out - // the excess amongst the validators in the set - excessRemaining := totalExcessAmount - for i := range unbondingsBatch { - unbonding := unbondingsBatch[i] - remainingDelegation, ok := remainingDelegationsInBatchByVal[unbonding.Validator] - if !ok { - return finalUnbondings, fmt.Errorf("validator %s not found in initial unbonding plan", unbonding.Validator) - } - - var validatorUnbondIncrease sdkmath.Int - if i != len(unbondingsBatch)-1 { - // For all but the last validator, calculate their unbonding increase by - // splitting the excess proportionally in line with their remaining delegation - unbondIncreaseProportion := remainingDelegation.Quo(totalRemainingDelegationsAcrossBatch) - validatorUnbondIncrease = sdkmath.LegacyNewDecFromInt(totalExcessAmount).Mul(unbondIncreaseProportion).TruncateInt() - - // Decrement excess - excessRemaining = excessRemaining.Sub(validatorUnbondIncrease) - } else { - // The last validator in the set should get any remainder from int truction - // First confirm the validator has sufficient remaining delegation to cover this - if sdkmath.LegacyNewDecFromInt(excessRemaining).GT(remainingDelegation) { - return finalUnbondings, - fmt.Errorf("validator %s does not have enough remaining delegation (%v) to cover the excess (%v)", - unbonding.Validator, remainingDelegation, excessRemaining) - } - validatorUnbondIncrease = excessRemaining - } - - // Build the updated message with the new amount - finalUnbondings = append(finalUnbondings, &types.SplitDelegation{ - Validator: unbonding.Validator, - Amount: unbonding.Amount.Add(validatorUnbondIncrease), - }) - } - - // Sanity check that we've accounted for all the excess - if excessRemaining.IsZero() { - return finalUnbondings, fmt.Errorf("Unable to redistribute all excess - initial: %v, remaining: %v", - totalExcessAmount, excessRemaining) - } - - return finalUnbondings, nil -} - -// Submits undelegation ICA messages for a given host zone -// -// First, the total unbond amount is determined from the epoch unbonding records -// Then that unbond amount is allowed to cascade across the validators in order of how proportionally -// different their current delegations are from the weight implied target delegation, -// until their capacities have consumed the full amount -// As a result, unbondings lead to a more balanced distribution of stake across validators -// -// Context: Over time, as LSM Liquid stakes are accepted, the total stake managed by the protocol becomes unbalanced -// as liquid stakes are not aligned with the validator weights. This is only rebalanced once per unbonding period -func (k Keeper) UnbondFromHostZone(ctx sdk.Context, hostZone types.HostZone) error { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, - "Preparing MsgUndelegates from the delegation account to each validator")) - - // Confirm the delegation account was registered - if hostZone.DelegationIcaAddress == "" { - return errorsmod.Wrapf(types.ErrICAAccountNotFound, "no delegation account found for %s", hostZone.ChainId) - } - - // Get the list of relevant records that should unbond - _, initialEpochNumberToHostZoneUnbondingMap := k.GetQueuedHostZoneUnbondingRecords(ctx, hostZone.ChainId) - - // Update the native unbond amount on all relevant records - // The native amount is calculated from the stTokens - if err := k.RefreshUnbondingNativeTokenAmounts(ctx, initialEpochNumberToHostZoneUnbondingMap); err != nil { - return err - } - - // Fetch the records again with the updated native amounts - epochUnbondingRecordIds, epochNumberToHostZoneUnbondingMap := k.GetQueuedHostZoneUnbondingRecords(ctx, hostZone.ChainId) - - // Sum the total number of native tokens that from the records above that are ready to unbond - totalUnbondAmount := k.GetTotalUnbondAmount(ctx, epochNumberToHostZoneUnbondingMap) - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, - "Total unbonded amount: %v%s", totalUnbondAmount, hostZone.HostDenom)) - - // If there's nothing to unbond, return and move on to the next host zone - if totalUnbondAmount.IsZero() { - return nil - } - - // Determine the ideal balanced delegation for each validator after the unbonding - // (as if we were to unbond and then rebalance) - // This will serve as the starting point for determining how much to unbond each validator - // first, get the total delegations _excluding_ validators with slash_query_in_progress - totalValidDelegationBeforeUnbonding := sdkmath.ZeroInt() - for _, validator := range hostZone.Validators { - if !validator.SlashQueryInProgress { - totalValidDelegationBeforeUnbonding = totalValidDelegationBeforeUnbonding.Add(validator.Delegation) - } - } - // then subtract out the amount to unbond - delegationAfterUnbonding := totalValidDelegationBeforeUnbonding.Sub(totalUnbondAmount) - - balancedDelegationsAfterUnbonding, err := k.GetTargetValAmtsForHostZone(ctx, hostZone, delegationAfterUnbonding) - if err != nil { - return errorsmod.Wrapf(err, "unable to get target val amounts for host zone %s", hostZone.ChainId) - } - - // Determine the unbond capacity for each validator - // Each validator can only unbond up to the difference between their current delegation and their balanced delegation - // The validator's current delegation will be above their balanced delegation if they've received LSM Liquid Stakes - // (which is only rebalanced once per unbonding period) - validatorUnbondCapacity := k.GetValidatorUnbondCapacity(ctx, hostZone.Validators, balancedDelegationsAfterUnbonding) - if len(validatorUnbondCapacity) == 0 { - return fmt.Errorf("there are no validators on %s with sufficient unbond capacity", hostZone.ChainId) - } - - // Sort the unbonding capacity by priority - // Priority is determined by checking the how proportionally unbalanced each validator is - // Zero weight validators will come first in the list - prioritizedUnbondCapacity, err := SortUnbondingCapacityByPriority(validatorUnbondCapacity) - if err != nil { - return err - } - - // Get the undelegation ICA messages and split delegations for the callback - undelegateBatchSize := int(hostZone.MaxMessagesPerIcaTx) - msgs, unbondings, err := k.GetUnbondingICAMessages( - hostZone, - totalUnbondAmount, - prioritizedUnbondCapacity, - undelegateBatchSize, - ) - if err != nil { - return err - } - - // Shouldn't be possible, but if all the validator's had a target unbonding of zero, do not send an ICA - if len(msgs) == 0 { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Target unbonded amount was 0 for each validator") - } - - // Send the messages in batches so the gas limit isn't exceedeed - // NOTE: With the current implementation, an error is thrown upstream if there are - // more messages than undelegateBatchSize - so there should only be one iteration in this loop - // This is because the undelegation callback is not currently setup to handle multiple batches - for start := 0; start < len(msgs); start += undelegateBatchSize { - end := start + undelegateBatchSize - if end > len(msgs) { - end = len(msgs) - } - - msgsBatch := msgs[start:end] - unbondingsBatch := unbondings[start:end] - - // Store the callback data - undelegateCallback := types.UndelegateCallback{ - HostZoneId: hostZone.ChainId, - SplitDelegations: unbondingsBatch, - EpochUnbondingRecordIds: epochUnbondingRecordIds, - } - callbackArgsBz, err := proto.Marshal(&undelegateCallback) - if err != nil { - return errorsmod.Wrap(err, "unable to marshal undelegate callback args") - } - - // Submit the undelegation ICA - if _, err := k.SubmitTxsDayEpoch( - ctx, - hostZone.ConnectionId, - msgsBatch, - types.ICAAccountType_DELEGATION, - ICACallbackID_Undelegate, - callbackArgsBz, - ); err != nil { - return errorsmod.Wrapf(err, "unable to submit unbonding ICA for %s", hostZone.ChainId) - } - - // flag the delegation change in progress on each validator - for _, unbonding := range unbondingsBatch { - if err := k.IncrementValidatorDelegationChangesInProgress(&hostZone, unbonding.Validator); err != nil { - return err - } - } - k.SetHostZone(ctx, hostZone) - } - - // Update the epoch unbonding record status - if err := k.recordsKeeper.SetHostZoneUnbondingStatus( - ctx, - hostZone.ChainId, - epochUnbondingRecordIds, - recordstypes.HostZoneUnbonding_UNBONDING_IN_PROGRESS, - ); err != nil { - return err - } - - EmitUndelegationEvent(ctx, hostZone, totalUnbondAmount) - - return nil -} - -// this function iterates each host zone, and if it's the right time to -// initiate an unbonding, it attempts to unbond all outstanding records -func (k Keeper) InitiateAllHostZoneUnbondings(ctx sdk.Context, dayNumber uint64) { - k.Logger(ctx).Info(fmt.Sprintf("Initiating all host zone unbondings for epoch %d...", dayNumber)) - - for _, hostZone := range k.GetAllActiveHostZone(ctx) { - - // Confirm the unbonding is supposed to be triggered this epoch - unbondingFrequency := hostZone.GetUnbondingFrequency() - if dayNumber%unbondingFrequency != 0 { - k.Logger(ctx).Info(utils.LogWithHostZone(hostZone.ChainId, - "Host does not unbond this epoch (Unbonding Period: %d, Unbonding Frequency: %d, Epoch: %d)", - hostZone.UnbondingPeriod, unbondingFrequency, dayNumber)) - continue - } - - // Get host zone unbonding message by summing up the unbonding records - err := utils.ApplyFuncIfNoError(ctx, func(ctx sdk.Context) error { - return k.UnbondFromHostZone(ctx, hostZone) - }) - if err != nil { - k.Logger(ctx).Error(fmt.Sprintf("Error initiating host zone unbondings for host zone %s: %s", hostZone.ChainId, err.Error())) - continue - } - } -} diff --git a/x/stakeibc/keeper/validator.go b/x/stakeibc/keeper/validator.go deleted file mode 100644 index 0c76cb3bc..000000000 --- a/x/stakeibc/keeper/validator.go +++ /dev/null @@ -1,276 +0,0 @@ -package keeper - -import ( - "errors" - "fmt" - "math" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/utils" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -// Get a validator and its index from a list of validators, by address -func GetValidatorFromAddress(validators []*types.Validator, address string) (val types.Validator, index int64, found bool) { - for i, v := range validators { - if v.Address == address { - return *v, int64(i), true - } - } - return types.Validator{}, 0, false -} - -// Appends a validator to host zone (if the host zone is not already at capacity) -// If the validator is added through governance, the weight is equal to the minimum weight across the set -// If the validator is added through an admin transactions, the weight is specified in the message -func (k Keeper) AddValidatorToHostZone(ctx sdk.Context, chainId string, validator types.Validator, fromGovernance bool) error { - // Get the corresponding host zone - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return errorsmod.Wrapf(types.ErrHostZoneNotFound, "Host Zone (%s) not found", chainId) - } - - // Check that we don't already have this validator - // Grab the minimum weight in the process (to assign to validator's added through governance) - var minWeight uint64 = math.MaxUint64 - for _, existingValidator := range hostZone.Validators { - if existingValidator.Address == validator.Address { - return errorsmod.Wrapf(types.ErrValidatorAlreadyExists, "Validator address (%s) already exists on Host Zone (%s)", validator.Address, chainId) - } - if existingValidator.Name == validator.Name { - return errorsmod.Wrapf(types.ErrValidatorAlreadyExists, "Validator name (%s) already exists on Host Zone (%s)", validator.Name, chainId) - } - // Store the min weight to assign to new validator added through governance (ignore zero-weight validators) - if existingValidator.Weight < minWeight && existingValidator.Weight > 0 { - minWeight = existingValidator.Weight - } - } - - // If the validator was added via governance, set the weight to the min validator weight of the host zone - valWeight := validator.Weight - if fromGovernance { - valWeight = minWeight - } - - // Determine the slash query checkpoint for LSM liquid stakes - checkpoint := k.GetUpdatedSlashQueryCheckpoint(ctx, hostZone.TotalDelegations) - - // Finally, add the validator to the host - hostZone.Validators = append(hostZone.Validators, &types.Validator{ - Name: validator.Name, - Address: validator.Address, - Weight: valWeight, - Delegation: sdkmath.ZeroInt(), - SlashQueryProgressTracker: sdkmath.ZeroInt(), - SlashQueryCheckpoint: checkpoint, - }) - - k.SetHostZone(ctx, hostZone) - - return nil -} - -// Removes a validator from a host zone -// The validator must be zero-weight and have no delegations in order to be removed -// There must also be no LSMTokenDeposits in progress since this would update the delegation on completion -func (k Keeper) RemoveValidatorFromHostZone(ctx sdk.Context, chainId string, validatorAddress string) error { - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - errMsg := fmt.Sprintf("HostZone (%s) not found", chainId) - k.Logger(ctx).Error(errMsg) - return errorsmod.Wrapf(types.ErrHostZoneNotFound, errMsg) - } - - // Check for LSMTokenDeposit records with this specific validator address - lsmTokenDeposits := k.recordsKeeper.GetAllLSMTokenDeposit(ctx) - for _, lsmTokenDeposit := range lsmTokenDeposits { - if lsmTokenDeposit.ValidatorAddress == validatorAddress { - return errorsmod.Wrapf(types.ErrUnableToRemoveValidator, "Validator (%s) still has at least one LSMTokenDeposit (%+v)", validatorAddress, lsmTokenDeposit) - } - } - - for i, val := range hostZone.Validators { - if val.GetAddress() == validatorAddress { - if val.Delegation.IsZero() && val.Weight == 0 { - hostZone.Validators = append(hostZone.Validators[:i], hostZone.Validators[i+1:]...) - k.SetHostZone(ctx, hostZone) - return nil - } - errMsg := fmt.Sprintf("Validator (%s) has non-zero delegation (%v) or weight (%d)", validatorAddress, val.Delegation, val.Weight) - k.Logger(ctx).Error(errMsg) - return errors.New(errMsg) - } - } - errMsg := fmt.Sprintf("Validator address (%s) not found on host zone (%s)", validatorAddress, chainId) - k.Logger(ctx).Error(errMsg) - return errorsmod.Wrapf(types.ErrValidatorNotFound, errMsg) -} - -// Updates a validator's individual delegation, and the corresponding total delegation on the host zone -// Note: This modifies the original host zone struct. The calling function must Set this host zone -// for changes to persist -func (k Keeper) AddDelegationToValidator( - ctx sdk.Context, - hostZone *types.HostZone, - validatorAddress string, - amount sdkmath.Int, - callbackId string, -) error { - for _, validator := range hostZone.Validators { - if validator.Address == validatorAddress { - k.Logger(ctx).Info(utils.LogICACallbackWithHostZone(hostZone.ChainId, callbackId, - " Validator %s, Current Delegation: %v, Delegation Change: %v", validator.Address, validator.Delegation, amount)) - - // If the delegation change is negative, make sure it wont cause the delegation to fall below zero - if amount.IsNegative() { - if amount.Abs().GT(validator.Delegation) { - return errorsmod.Wrapf(types.ErrValidatorDelegationChg, - "Delegation change (%v) is greater than validator (%s) delegation %v", - amount.Abs(), validatorAddress, validator.Delegation) - } - if amount.Abs().GT(hostZone.TotalDelegations) { - return errorsmod.Wrapf(types.ErrValidatorDelegationChg, - "Delegation change (%v) is greater than total delegation amount on host %s (%v)", - amount.Abs(), hostZone.ChainId, hostZone.TotalDelegations) - } - } - - validator.Delegation = validator.Delegation.Add(amount) - hostZone.TotalDelegations = hostZone.TotalDelegations.Add(amount) - - return nil - } - } - - return errorsmod.Wrapf(types.ErrValidatorNotFound, - "Could not find validator %s on host zone %s", validatorAddress, hostZone.ChainId) -} - -// Sum the total weights across each validator for a host zone -func (k Keeper) GetTotalValidatorWeight(validators []types.Validator) uint64 { - totalWeight := uint64(0) - for _, validator := range validators { - totalWeight += validator.Weight - } - return totalWeight -} - -// Increments the validators slash query progress tracker -func (k Keeper) IncrementValidatorSlashQueryProgress( - ctx sdk.Context, - chainId string, - validatorAddress string, - amount sdkmath.Int, -) error { - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return types.ErrHostZoneNotFound - } - - validator, valIndex, found := GetValidatorFromAddress(hostZone.Validators, validatorAddress) - if !found { - return types.ErrValidatorNotFound - } - - // Increment the progress tracker - oldProgress := validator.SlashQueryProgressTracker - newProgress := validator.SlashQueryProgressTracker.Add(amount) - validator.SlashQueryProgressTracker = newProgress - - // If the checkpoint is zero, it implies the TVL was 0 last time it was set, and we should - // update it here - // If the checkpoint is non-zero, only update it if it was just breached - shouldUpdateCheckpoint := true - if !validator.SlashQueryCheckpoint.IsZero() { - oldInterval := oldProgress.Quo(validator.SlashQueryCheckpoint) - newInterval := newProgress.Quo(validator.SlashQueryCheckpoint) - shouldUpdateCheckpoint = oldInterval.LT(newInterval) - } - - // Optionally re-calculate the checkpoint - // Threshold of 1% means once 1% of TVL has been breached, the query is issued - if shouldUpdateCheckpoint { - validator.SlashQueryCheckpoint = k.GetUpdatedSlashQueryCheckpoint(ctx, hostZone.TotalDelegations) - } - - hostZone.Validators[valIndex] = &validator - k.SetHostZone(ctx, hostZone) - - return nil -} - -// Increments the number of validator delegation changes in progress by 1 -// Note: This modifies the original host zone struct. The calling function must Set this host zone -// for changes to persist -func (k Keeper) IncrementValidatorDelegationChangesInProgress(hostZone *types.HostZone, validatorAddress string) error { - validator, valIndex, found := GetValidatorFromAddress(hostZone.Validators, validatorAddress) - if !found { - return errorsmod.Wrapf(types.ErrValidatorNotFound, "validator %s not found", validatorAddress) - } - validator.DelegationChangesInProgress += 1 - hostZone.Validators[valIndex] = &validator - return nil -} - -// Decrements the number of validator delegation changes in progress by 1 -// Note: This modifies the original host zone struct. The calling function must Set this host zone -// for changes to persist -func (k Keeper) DecrementValidatorDelegationChangesInProgress(hostZone *types.HostZone, validatorAddress string) error { - validator, valIndex, found := GetValidatorFromAddress(hostZone.Validators, validatorAddress) - if !found { - return errorsmod.Wrapf(types.ErrValidatorNotFound, "validator %s not found", validatorAddress) - } - if validator.DelegationChangesInProgress == 0 { - return errorsmod.Wrapf(types.ErrInvalidValidatorDelegationUpdates, - "cannot decrement the number of delegation updates if the validator has 0 updates in progress") - } - validator.DelegationChangesInProgress -= 1 - hostZone.Validators[valIndex] = &validator - return nil -} - -// Checks if any validator's portion of the weight is greater than the cap -func (k Keeper) CheckValidatorWeightsBelowCap(ctx sdk.Context, chainId string) error { - hostZone, found := k.GetHostZone(ctx, chainId) - if !found { - return types.ErrHostZoneNotFound.Wrapf("host zone %s not found", chainId) - } - validators := hostZone.Validators - - // If there's only a few validators, don't enforce this yet - if len(validators) < MinValidatorsBeforeWeightCapCheck { - return nil - } - - // The weight cap in params is an int representing a percentage (e.g. 10 is 10%) - params := k.GetParams(ctx) - validatorWeightCap := float64(params.ValidatorWeightCap) - - // Store a map of each validator weight, as well as the total - totalWeight := float64(0) - weightsByValidator := map[string]float64{} - for _, validator := range validators { - weightsByValidator[validator.Address] = float64(validator.Weight) - totalWeight += float64(validator.Weight) - } - - // If the total validator weights are 0, exit prematurely - if totalWeight == 0 { - return nil - } - - // Check if any validator exceeds the cap - for _, address := range utils.StringMapKeys[float64](weightsByValidator) { - weightPercentage := weightsByValidator[address] / totalWeight * 100 - if weightPercentage > validatorWeightCap { - return errorsmod.Wrapf(types.ErrValidatorExceedsWeightCap, - "validator %s exceeds weight cap, has %v%% of the total weight when the cap is %v%%", - address, weightPercentage, validatorWeightCap) - } - } - - return nil -} diff --git a/x/stakeibc/module.go b/x/stakeibc/module.go deleted file mode 100644 index 5f6cb2993..000000000 --- a/x/stakeibc/module.go +++ /dev/null @@ -1,186 +0,0 @@ -package stakeibc - -import ( - "context" - "encoding/json" - "fmt" - - // this line is used by starport scaffolding # 1 - - "cosmossdk.io/core/appmodule" - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/spf13/cobra" - - abci "github.com/cometbft/cometbft/abci/types" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - - "github.com/milkyway-labs/milkyway/x/stakeibc/client/cli" - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -var ( - _ appmodule.AppModule = AppModule{} - _ module.AppModuleBasic = AppModuleBasic{} - // _ porttypes.IBCModule = AppModule{} -) - -// ---------------------------------------------------------------------------- -// AppModuleBasic -// ---------------------------------------------------------------------------- - -// AppModuleBasic implements the AppModuleBasic interface for the capability module. -type AppModuleBasic struct { - cdc codec.BinaryCodec -} - -func NewAppModuleBasic(cdc codec.BinaryCodec) AppModuleBasic { - return AppModuleBasic{cdc: cdc} -} - -// Name returns the capability module's name. -func (AppModuleBasic) Name() string { - return types.ModuleName -} - -func (AppModuleBasic) RegisterCodec(cdc *codec.LegacyAmino) { - types.RegisterCodec(cdc) -} - -func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { - types.RegisterCodec(cdc) -} - -// RegisterInterfaces registers the module's interface types -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { - types.RegisterInterfaces(reg) -} - -// DefaultGenesis returns the capability module's default genesis state. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesis()) -} - -// ValidateGenesis performs genesis state validation for the capability module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncodingConfig, bz json.RawMessage) error { - var genState types.GenesisState - if err := cdc.UnmarshalJSON(bz, &genState); err != nil { - return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) - } - return genState.Validate() -} - -// RegisterRESTRoutes registers the capability module's REST service handlers. -func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { -} - -// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { - if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil { - panic(err) - } - // this line is used by starport scaffolding # 2 -} - -// GetTxCmd returns the capability module's root tx command. -func (a AppModuleBasic) GetTxCmd() *cobra.Command { - return cli.GetTxCmd() -} - -// GetQueryCmd returns the capability module's root query command. -func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return cli.GetQueryCmd(types.StoreKey) -} - -// ---------------------------------------------------------------------------- -// AppModule -// ---------------------------------------------------------------------------- - -// AppModule implements the AppModule interface for the capability module. -type AppModule struct { - AppModuleBasic - - keeper keeper.Keeper - accountKeeper types.AccountKeeper - bankKeeper types.BankKeeper -} - -func NewAppModule( - cdc codec.Codec, - keeper keeper.Keeper, - accountKeeper types.AccountKeeper, - bankKeeper types.BankKeeper, -) AppModule { - return AppModule{ - AppModuleBasic: NewAppModuleBasic(cdc), - keeper: keeper, - accountKeeper: accountKeeper, - bankKeeper: bankKeeper, - } -} - -// Name returns the capability module's name. -func (am AppModule) Name() string { - return am.AppModuleBasic.Name() -} - -// QuerierRoute returns the capability module's query routing key. -func (AppModule) QuerierRoute() string { return types.QuerierRoute } - -// RegisterServices registers a GRPC query service to respond to the -// module-specific GRPC queries. -func (am AppModule) RegisterServices(cfg module.Configurator) { - types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) - types.RegisterQueryServer(cfg.QueryServer(), am.keeper) -} - -// RegisterInvariants registers the capability module's invariants. -func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { - keeper.RegisterInvariants(ir, am.keeper) -} - -// InitGenesis performs the capability module's genesis initialization It returns -// no validator updates. -func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.RawMessage) []abci.ValidatorUpdate { - var genState types.GenesisState - // Initialize global index to index in genesis state - cdc.MustUnmarshalJSON(gs, &genState) - - InitGenesis(ctx, am.keeper, genState) - - return []abci.ValidatorUpdate{} -} - -// ExportGenesis returns the capability module's exported genesis state as raw JSON bytes. -func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { - genState := ExportGenesis(ctx, am.keeper) - return cdc.MustMarshalJSON(genState) -} - -// ConsensusVersion implements ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 3 } - -// BeginBlock executes all ABCI BeginBlock logic respective to the capability module. -func (am AppModule) BeginBlock(ctx context.Context) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - am.keeper.BeginBlocker(sdkCtx) - return nil -} - -// EndBlock executes all ABCI EndBlock logic respective to the capability module. It -// returns no validator updates. -func (am AppModule) EndBlock(ctx context.Context) error { - sdkCtx := sdk.UnwrapSDKContext(ctx) - am.keeper.EndBlocker(sdkCtx) - return nil -} - -func (am AppModule) IsOnePerModuleType() {} - -func (am AppModule) IsAppModule() {} diff --git a/x/stakeibc/move/bcs.go b/x/stakeibc/move/bcs.go deleted file mode 100644 index 116e9bf3b..000000000 --- a/x/stakeibc/move/bcs.go +++ /dev/null @@ -1,165 +0,0 @@ -package move - -// -// *DO NOT MODIFY THIS FILE!* -// This is auto-generated by generate-bcs-go. -// - -import ( - "fmt" - - "github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang/bcs" - "github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang/serde" -) - -type AccountAddress [32]uint8 - -func (obj *AccountAddress) Serialize(serializer serde.Serializer) error { - if err := serializer.IncreaseContainerDepth(); err != nil { - return err - } - if err := serialize_array32_u8_array((([32]uint8)(*obj)), serializer); err != nil { - return err - } - serializer.DecreaseContainerDepth() - return nil -} - -func (obj *AccountAddress) BcsSerialize() ([]byte, error) { - if obj == nil { - return nil, fmt.Errorf("Cannot serialize null object") - } - serializer := bcs.NewSerializer() - if err := obj.Serialize(serializer); err != nil { - return nil, err - } - return serializer.GetBytes(), nil -} - -func DeserializeAccountAddress(deserializer serde.Deserializer) (AccountAddress, error) { - var obj [32]uint8 - if err := deserializer.IncreaseContainerDepth(); err != nil { - return (AccountAddress)(obj), err - } - if val, err := deserialize_array32_u8_array(deserializer); err == nil { - obj = val - } else { - return ((AccountAddress)(obj)), err - } - deserializer.DecreaseContainerDepth() - return (AccountAddress)(obj), nil -} - -func BcsDeserializeAccountAddress(input []byte) (AccountAddress, error) { - if input == nil { - var obj AccountAddress - return obj, fmt.Errorf("Cannot deserialize null array") - } - deserializer := bcs.NewDeserializer(input) - obj, err := DeserializeAccountAddress(deserializer) - if err == nil && deserializer.GetBufferOffset() < uint64(len(input)) { - return obj, fmt.Errorf("Some input bytes were not read") - } - return obj, err -} - -type Identifier string - -func (obj *Identifier) Serialize(serializer serde.Serializer) error { - if err := serializer.IncreaseContainerDepth(); err != nil { - return err - } - if err := serializer.SerializeStr(((string)(*obj))); err != nil { - return err - } - serializer.DecreaseContainerDepth() - return nil -} - -func (obj *Identifier) BcsSerialize() ([]byte, error) { - if obj == nil { - return nil, fmt.Errorf("Cannot serialize null object") - } - serializer := bcs.NewSerializer() - if err := obj.Serialize(serializer); err != nil { - return nil, err - } - return serializer.GetBytes(), nil -} - -type StructTag struct { - Address AccountAddress - Module Identifier - Name Identifier - TypeArgs []TypeTag -} - -func (obj *StructTag) Serialize(serializer serde.Serializer) error { - if err := serializer.IncreaseContainerDepth(); err != nil { - return err - } - if err := obj.Address.Serialize(serializer); err != nil { - return err - } - if err := obj.Module.Serialize(serializer); err != nil { - return err - } - if err := obj.Name.Serialize(serializer); err != nil { - return err - } - if err := serialize_vector_TypeTag(obj.TypeArgs, serializer); err != nil { - return err - } - serializer.DecreaseContainerDepth() - return nil -} - -func (obj *StructTag) BcsSerialize() ([]byte, error) { - if obj == nil { - return nil, fmt.Errorf("Cannot serialize null object") - } - serializer := bcs.NewSerializer() - if err := obj.Serialize(serializer); err != nil { - return nil, err - } - return serializer.GetBytes(), nil -} - -type TypeTag interface { - isTypeTag() - Serialize(serializer serde.Serializer) error - BcsSerialize() ([]byte, error) -} - -func serialize_vector_TypeTag(value []TypeTag, serializer serde.Serializer) error { - if err := serializer.SerializeLen(uint64(len(value))); err != nil { - return err - } - for _, item := range value { - if err := item.Serialize(serializer); err != nil { - return err - } - } - return nil -} - -func serialize_array32_u8_array(value [32]uint8, serializer serde.Serializer) error { - for _, item := range value { - if err := serializer.SerializeU8(item); err != nil { - return err - } - } - return nil -} - -func deserialize_array32_u8_array(deserializer serde.Deserializer) ([32]uint8, error) { - var obj [32]uint8 - for i := range obj { - if val, err := deserializer.DeserializeU8(); err == nil { - obj[i] = val - } else { - return obj, err - } - } - return obj, nil -} diff --git a/x/stakeibc/move/connector.go b/x/stakeibc/move/connector.go deleted file mode 100644 index 193e25aea..000000000 --- a/x/stakeibc/move/connector.go +++ /dev/null @@ -1,7 +0,0 @@ -package move - -const ( - MoveModuleNameFungibleAsset = "fungible_asset" - - ResourceNameFungibleStore = "FungibleStore" -) diff --git a/x/stakeibc/move/denom.go b/x/stakeibc/move/denom.go deleted file mode 100644 index 833deba13..000000000 --- a/x/stakeibc/move/denom.go +++ /dev/null @@ -1,56 +0,0 @@ -package move - -import ( - "encoding/hex" - "strings" - - "golang.org/x/crypto/sha3" -) - -const ( - DenomTraceDenomPrefixMove = "move/" -) - -// Generate named object address from the seed (address + name + 0xFE) -func NamedObjectAddress(source AccountAddress, name string) AccountAddress { - // 0xFE is the suffix of named object address, which is - // defined in object.move as `OBJECT_FROM_SEED_ADDRESS_SCHEME`. - hasher := sha3.New256() - hasher.Write(append(append(source[:], []byte(name)...), 0xFE)) - bz := hasher.Sum(nil) - - addr, err := NewAccountAddressFromBytes(bz[:]) - if err != nil { - panic(err) - } - - return addr -} - -func UserDerivedObjectAddress(source AccountAddress, deriveFrom AccountAddress) AccountAddress { - hasher := sha3.New256() - hasher.Write(append(append(source[:], deriveFrom[:]...), 0xFC)) - bz := hasher.Sum(nil) - - addr, err := NewAccountAddressFromBytes(bz[:]) - if err != nil { - panic(err) - } - - return addr -} - -// Extract metadata address from a denom -func MetadataAddressFromDenom(denom string) (AccountAddress, error) { - if strings.HasPrefix(denom, DenomTraceDenomPrefixMove) { - addrBz, err := hex.DecodeString(strings.TrimPrefix(denom, DenomTraceDenomPrefixMove)) - if err != nil { - return AccountAddress{}, err - } - - return NewAccountAddressFromBytes(addrBz) - } - - // non move coins are generated from 0x1. - return NamedObjectAddress(StdAddress, denom), nil -} diff --git a/x/stakeibc/move/keys.go b/x/stakeibc/move/keys.go deleted file mode 100644 index 272aac04a..000000000 --- a/x/stakeibc/move/keys.go +++ /dev/null @@ -1,17 +0,0 @@ -package move - -var ( - VMStorePrefix = []byte{0x21} // prefix for vm - - ResourceSeparator = byte(1) -) - -// GetResourceKey returns the store key of the Move resource -func GetResourceKey(addr AccountAddress, structTag StructTag) ([]byte, error) { - bz, err := structTag.BcsSerialize() - if err != nil { - return nil, err - } - - return append(append(addr.Bytes(), ResourceSeparator), bz...), nil -} diff --git a/x/stakeibc/move/serialize.go b/x/stakeibc/move/serialize.go deleted file mode 100644 index 371a69b96..000000000 --- a/x/stakeibc/move/serialize.go +++ /dev/null @@ -1,13 +0,0 @@ -package move - -import ( - "github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang/bcs" -) - -var NewDeserializer = bcs.NewDeserializer - -// DeserializeUint64 deserialize BCS bytes -func DeserializeUint64(bz []byte) (uint64, error) { - d := NewDeserializer(bz) - return d.DeserializeU64() -} diff --git a/x/stakeibc/move/types.go b/x/stakeibc/move/types.go deleted file mode 100644 index 3f8e6b1a4..000000000 --- a/x/stakeibc/move/types.go +++ /dev/null @@ -1,53 +0,0 @@ -package move - -import ( - "bytes" - "encoding/hex" - "errors" - "strings" -) - -var StdAddress AccountAddress - -// initialize StdAddress -func init() { - var err error - StdAddress, err = NewAccountAddress("0x1") - if err != nil { - panic(err) - } -} - -// NewAccountAddressFromBytes return AccountAddress from the bytes -func NewAccountAddressFromBytes(bz []byte) (AccountAddress, error) { - lengthDiff := len(AccountAddress{}) - len(bz) - if lengthDiff > 0 { - bz = append(bytes.Repeat([]byte{0}, lengthDiff), bz...) - } else if lengthDiff < 0 { - return AccountAddress{}, errors.New("invalid length of address") - } - - return BcsDeserializeAccountAddress(bz) -} - -// NewAccountAddress return AccountAddress from the hex string -func NewAccountAddress(hexAddr string) (AccountAddress, error) { - hexStr := strings.TrimPrefix(hexAddr, "0x") - if len(hexStr)%2 == 1 { - hexStr = "0" + hexStr - } - - bz, err := hex.DecodeString(hexStr) - if err != nil { - return AccountAddress{}, errors.New("invalid hex address") - } - - accountAddress, err := NewAccountAddressFromBytes(bz) - return accountAddress, err -} - -func (addr AccountAddress) Bytes() []byte { - outBz := make([]byte, len(addr)) - copy(outBz, addr[:]) - return outBz -} diff --git a/x/stakeibc/simulation/add_validator.go b/x/stakeibc/simulation/add_validator.go deleted file mode 100644 index d4138b547..000000000 --- a/x/stakeibc/simulation/add_validator.go +++ /dev/null @@ -1,30 +0,0 @@ -package simulation - -import ( - "math/rand" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func SimulateMsgAddValidator( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - msg := &types.MsgAddValidators{ - Creator: simAccount.Address.String(), - } - - // TODO: Handling the AddValidator simulation - - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "AddValidator simulation not implemented"), nil, nil - } -} diff --git a/x/stakeibc/simulation/change_validator_weight.go b/x/stakeibc/simulation/change_validator_weight.go deleted file mode 100644 index 56ef1443a..000000000 --- a/x/stakeibc/simulation/change_validator_weight.go +++ /dev/null @@ -1,30 +0,0 @@ -package simulation - -import ( - "math/rand" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func SimulateMsgChangeValidatorWeight( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - msg := &types.MsgChangeValidatorWeights{ - Creator: simAccount.Address.String(), - } - - // TODO: Handling the ChangeValidatorWeight simulation - - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "ChangeValidatorWeight simulation not implemented"), nil, nil - } -} diff --git a/x/stakeibc/simulation/claim_undelegated_tokens.go b/x/stakeibc/simulation/claim_undelegated_tokens.go deleted file mode 100644 index f1a16b675..000000000 --- a/x/stakeibc/simulation/claim_undelegated_tokens.go +++ /dev/null @@ -1,30 +0,0 @@ -package simulation - -import ( - "math/rand" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func SimulateMsgClaimUndelegatedTokens( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - msg := &types.MsgClaimUndelegatedTokens{ - Creator: simAccount.Address.String(), - } - - // TODO: Handling the ClaimUndelegatedTokens simulation - - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "ClaimUndelegatedTokens simulation not implemented"), nil, nil - } -} diff --git a/x/stakeibc/simulation/delete_validator.go b/x/stakeibc/simulation/delete_validator.go deleted file mode 100644 index 1c46e374d..000000000 --- a/x/stakeibc/simulation/delete_validator.go +++ /dev/null @@ -1,30 +0,0 @@ -package simulation - -import ( - "math/rand" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func SimulateMsgDeleteValidator( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - msg := &types.MsgDeleteValidator{ - Creator: simAccount.Address.String(), - } - - // TODO: Handling the DeleteValidator simulation - - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "DeleteValidator simulation not implemented"), nil, nil - } -} diff --git a/x/stakeibc/simulation/liquid_stake.go b/x/stakeibc/simulation/liquid_stake.go deleted file mode 100644 index cca614338..000000000 --- a/x/stakeibc/simulation/liquid_stake.go +++ /dev/null @@ -1,30 +0,0 @@ -package simulation - -import ( - "math/rand" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func SimulateMsgLiquidStake( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - msg := &types.MsgLiquidStake{ - Creator: simAccount.Address.String(), - } - - // TODO: Handling the LiquidStake simulation - - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "LiquidStake simulation not implemented"), nil, nil - } -} diff --git a/x/stakeibc/simulation/rebalance_validators.go b/x/stakeibc/simulation/rebalance_validators.go deleted file mode 100644 index fc38ace59..000000000 --- a/x/stakeibc/simulation/rebalance_validators.go +++ /dev/null @@ -1,30 +0,0 @@ -package simulation - -import ( - "math/rand" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func SimulateMsgRebalanceValidators( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - msg := &types.MsgRebalanceValidators{ - Creator: simAccount.Address.String(), - } - - // TODO: Handling the RebalanceValidators simulation - - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "RebalanceValidators simulation not implemented"), nil, nil - } -} diff --git a/x/stakeibc/simulation/restore_interchain_account.go b/x/stakeibc/simulation/restore_interchain_account.go deleted file mode 100644 index fb28908d1..000000000 --- a/x/stakeibc/simulation/restore_interchain_account.go +++ /dev/null @@ -1,30 +0,0 @@ -package simulation - -import ( - "math/rand" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func SimulateMsgRestoreInterchainAccount( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - msg := &types.MsgRestoreInterchainAccount{ - Creator: simAccount.Address.String(), - } - - // TODO: Handling the RestoreInterchainAccount simulation - - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "RestoreInterchainAccount simulation not implemented"), nil, nil - } -} diff --git a/x/stakeibc/simulation/simap.go b/x/stakeibc/simulation/simap.go deleted file mode 100644 index 92c437c0d..000000000 --- a/x/stakeibc/simulation/simap.go +++ /dev/null @@ -1,15 +0,0 @@ -package simulation - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" -) - -// FindAccount find a specific address from an account list -func FindAccount(accs []simtypes.Account, address string) (simtypes.Account, bool) { - creator, err := sdk.AccAddressFromBech32(address) - if err != nil { - panic(err) - } - return simtypes.FindAccount(accs, creator) -} diff --git a/x/stakeibc/simulation/update_delegation.go b/x/stakeibc/simulation/update_delegation.go deleted file mode 100644 index c9ae1c914..000000000 --- a/x/stakeibc/simulation/update_delegation.go +++ /dev/null @@ -1,30 +0,0 @@ -package simulation - -import ( - "math/rand" - - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - - "github.com/milkyway-labs/milkyway/x/stakeibc/keeper" - "github.com/milkyway-labs/milkyway/x/stakeibc/types" -) - -func SimulateMsgUpdateValidatorSharesExchRate( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - msg := &types.MsgUpdateValidatorSharesExchRate{ - Creator: simAccount.Address.String(), - } - - // TODO: Handling the UpdateValidatorSharesExchRate simulation - - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "UpdateValidatorSharesExchRate simulation not implemented"), nil, nil - } -} diff --git a/x/stakeibc/testutil/hooks_mocks.go b/x/stakeibc/testutil/hooks_mocks.go deleted file mode 100644 index 4712afe79..000000000 --- a/x/stakeibc/testutil/hooks_mocks.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by MockGen. DO NOT EDIT. -// Source: ./x/stakeibc/types/hooks.go -// -// Generated by this command: -// -// mockgen -source ./x/stakeibc/types/hooks.go -package testutil -destination ./x/stakeibc/testutil/hooks_mocks.go -// - -// Package testutil is a generated GoMock package. -package testutil diff --git a/x/stakeibc/types/address_unbonding.pb.go b/x/stakeibc/types/address_unbonding.pb.go deleted file mode 100644 index 9fc499ed1..000000000 --- a/x/stakeibc/types/address_unbonding.pb.go +++ /dev/null @@ -1,606 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/address_unbonding.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type AddressUnbonding struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` - UnbondingEstimatedTime string `protobuf:"bytes,3,opt,name=unbonding_estimated_time,json=unbondingEstimatedTime,proto3" json:"unbonding_estimated_time,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` - Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"` - ClaimIsPending bool `protobuf:"varint,8,opt,name=claim_is_pending,json=claimIsPending,proto3" json:"claim_is_pending,omitempty"` - EpochNumber uint64 `protobuf:"varint,9,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` -} - -func (m *AddressUnbonding) Reset() { *m = AddressUnbonding{} } -func (m *AddressUnbonding) String() string { return proto.CompactTextString(m) } -func (*AddressUnbonding) ProtoMessage() {} -func (*AddressUnbonding) Descriptor() ([]byte, []int) { - return fileDescriptor_6491082275bcb473, []int{0} -} -func (m *AddressUnbonding) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AddressUnbonding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AddressUnbonding.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AddressUnbonding) XXX_Merge(src proto.Message) { - xxx_messageInfo_AddressUnbonding.Merge(m, src) -} -func (m *AddressUnbonding) XXX_Size() int { - return m.Size() -} -func (m *AddressUnbonding) XXX_DiscardUnknown() { - xxx_messageInfo_AddressUnbonding.DiscardUnknown(m) -} - -var xxx_messageInfo_AddressUnbonding proto.InternalMessageInfo - -func (m *AddressUnbonding) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *AddressUnbonding) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -func (m *AddressUnbonding) GetUnbondingEstimatedTime() string { - if m != nil { - return m.UnbondingEstimatedTime - } - return "" -} - -func (m *AddressUnbonding) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *AddressUnbonding) GetClaimIsPending() bool { - if m != nil { - return m.ClaimIsPending - } - return false -} - -func (m *AddressUnbonding) GetEpochNumber() uint64 { - if m != nil { - return m.EpochNumber - } - return 0 -} - -func init() { - proto.RegisterType((*AddressUnbonding)(nil), "stride.stakeibc.AddressUnbonding") -} - -func init() { - proto.RegisterFile("stride/stakeibc/address_unbonding.proto", fileDescriptor_6491082275bcb473) -} - -var fileDescriptor_6491082275bcb473 = []byte{ - // 345 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x91, 0xc1, 0x4a, 0xeb, 0x40, - 0x14, 0x86, 0x93, 0xde, 0xb6, 0xb7, 0x9d, 0x7b, 0xb9, 0xb7, 0x0c, 0x55, 0x86, 0x82, 0x69, 0x75, - 0x63, 0x36, 0x26, 0xa0, 0x08, 0x6e, 0x2d, 0xb8, 0x28, 0x88, 0x48, 0xd0, 0x8d, 0x9b, 0x30, 0x49, - 0x0e, 0xe9, 0xd0, 0xce, 0x4c, 0xc8, 0x4c, 0xd4, 0xbe, 0x85, 0x0f, 0xe0, 0x03, 0x75, 0xd9, 0xa5, - 0xb8, 0x28, 0xd2, 0xbe, 0x88, 0x74, 0xd2, 0xc4, 0xdd, 0xfc, 0xff, 0xff, 0xf1, 0xcf, 0xe1, 0x1c, - 0x74, 0xaa, 0x74, 0xce, 0x12, 0xf0, 0x95, 0xa6, 0x33, 0x60, 0x51, 0xec, 0xd3, 0x24, 0xc9, 0x41, - 0xa9, 0xb0, 0x10, 0x91, 0x14, 0x09, 0x13, 0xa9, 0x97, 0xe5, 0x52, 0x4b, 0xfc, 0xbf, 0x04, 0xbd, - 0x0a, 0x1c, 0xf4, 0x53, 0x99, 0x4a, 0x93, 0xf9, 0xbb, 0x57, 0x89, 0x9d, 0xbc, 0x37, 0x50, 0xef, - 0xba, 0xac, 0x78, 0xac, 0x1a, 0x30, 0x41, 0xbf, 0xf7, 0xb5, 0xc4, 0x1e, 0xd9, 0x6e, 0x37, 0xa8, - 0x24, 0x1e, 0xa0, 0x4e, 0x0e, 0x31, 0xb0, 0x67, 0xc8, 0x49, 0xc3, 0x44, 0xb5, 0xc6, 0x57, 0x88, - 0xd4, 0x43, 0x84, 0xa0, 0x34, 0xe3, 0x54, 0x43, 0x12, 0x6a, 0xc6, 0x81, 0xfc, 0x32, 0xec, 0x61, - 0x9d, 0xdf, 0x54, 0xf1, 0x03, 0xe3, 0x80, 0x2f, 0x51, 0x9b, 0x72, 0x59, 0x08, 0x4d, 0x9a, 0x3b, - 0x6e, 0x7c, 0xb4, 0x5c, 0x0f, 0xad, 0xcf, 0xf5, 0xf0, 0x20, 0x96, 0x8a, 0x4b, 0xa5, 0x92, 0x99, - 0xc7, 0xa4, 0xcf, 0xa9, 0x9e, 0x7a, 0x13, 0xa1, 0x83, 0x3d, 0x8c, 0xfb, 0xa8, 0x95, 0x80, 0x90, - 0x9c, 0xb4, 0x4c, 0x7b, 0x29, 0xb0, 0x8b, 0x7a, 0xf1, 0x9c, 0x32, 0x1e, 0x32, 0x15, 0x66, 0x60, - 0x7e, 0x23, 0x9d, 0x91, 0xed, 0x76, 0x82, 0x7f, 0xc6, 0x9f, 0xa8, 0xfb, 0xd2, 0xc5, 0xc7, 0xe8, - 0x2f, 0x64, 0x32, 0x9e, 0x86, 0xa2, 0xe0, 0x11, 0xe4, 0xa4, 0x3b, 0xb2, 0xdd, 0x66, 0xf0, 0xc7, - 0x78, 0x77, 0xc6, 0x1a, 0xdf, 0x2e, 0x37, 0x8e, 0xbd, 0xda, 0x38, 0xf6, 0xd7, 0xc6, 0xb1, 0xdf, - 0xb6, 0x8e, 0xb5, 0xda, 0x3a, 0xd6, 0xc7, 0xd6, 0xb1, 0x9e, 0xce, 0x53, 0xa6, 0xa7, 0x45, 0xe4, - 0xc5, 0x92, 0xfb, 0x9c, 0xcd, 0x67, 0x8b, 0x17, 0xba, 0x38, 0x9b, 0xd3, 0x48, 0xd5, 0xca, 0x7f, - 0xfd, 0xb9, 0x92, 0x5e, 0x64, 0xa0, 0xa2, 0xb6, 0xd9, 0xf9, 0xc5, 0x77, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x00, 0x7e, 0xf3, 0x14, 0xc5, 0x01, 0x00, 0x00, -} - -func (m *AddressUnbonding) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AddressUnbonding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AddressUnbonding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EpochNumber != 0 { - i = encodeVarintAddressUnbonding(dAtA, i, uint64(m.EpochNumber)) - i-- - dAtA[i] = 0x48 - } - if m.ClaimIsPending { - i-- - if m.ClaimIsPending { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintAddressUnbonding(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x2a - } - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAddressUnbonding(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.UnbondingEstimatedTime) > 0 { - i -= len(m.UnbondingEstimatedTime) - copy(dAtA[i:], m.UnbondingEstimatedTime) - i = encodeVarintAddressUnbonding(dAtA, i, uint64(len(m.UnbondingEstimatedTime))) - i-- - dAtA[i] = 0x1a - } - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintAddressUnbonding(dAtA, i, uint64(len(m.Receiver))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintAddressUnbonding(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAddressUnbonding(dAtA []byte, offset int, v uint64) int { - offset -= sovAddressUnbonding(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AddressUnbonding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovAddressUnbonding(uint64(l)) - } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovAddressUnbonding(uint64(l)) - } - l = len(m.UnbondingEstimatedTime) - if l > 0 { - n += 1 + l + sovAddressUnbonding(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovAddressUnbonding(uint64(l)) - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovAddressUnbonding(uint64(l)) - } - if m.ClaimIsPending { - n += 2 - } - if m.EpochNumber != 0 { - n += 1 + sovAddressUnbonding(uint64(m.EpochNumber)) - } - return n -} - -func sovAddressUnbonding(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAddressUnbonding(x uint64) (n int) { - return sovAddressUnbonding(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AddressUnbonding) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AddressUnbonding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AddressUnbonding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddressUnbonding - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddressUnbonding - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddressUnbonding - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddressUnbonding - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingEstimatedTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddressUnbonding - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddressUnbonding - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UnbondingEstimatedTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddressUnbonding - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddressUnbonding - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAddressUnbonding - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAddressUnbonding - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClaimIsPending", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ClaimIsPending = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - m.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipAddressUnbonding(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAddressUnbonding - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAddressUnbonding(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAddressUnbonding - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAddressUnbonding - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAddressUnbonding - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAddressUnbonding - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAddressUnbonding = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAddressUnbonding = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAddressUnbonding = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/callbacks.pb.go b/x/stakeibc/types/callbacks.pb.go deleted file mode 100644 index ebf8fcb2d..000000000 --- a/x/stakeibc/types/callbacks.pb.go +++ /dev/null @@ -1,3529 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/callbacks.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - types1 "github.com/milkyway-labs/milkyway/x/records/types" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type SplitDelegation struct { - Validator string `protobuf:"bytes,1,opt,name=validator,proto3" json:"validator,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` -} - -func (m *SplitDelegation) Reset() { *m = SplitDelegation{} } -func (m *SplitDelegation) String() string { return proto.CompactTextString(m) } -func (*SplitDelegation) ProtoMessage() {} -func (*SplitDelegation) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{0} -} -func (m *SplitDelegation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SplitDelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SplitDelegation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SplitDelegation) XXX_Merge(src proto.Message) { - xxx_messageInfo_SplitDelegation.Merge(m, src) -} -func (m *SplitDelegation) XXX_Size() int { - return m.Size() -} -func (m *SplitDelegation) XXX_DiscardUnknown() { - xxx_messageInfo_SplitDelegation.DiscardUnknown(m) -} - -var xxx_messageInfo_SplitDelegation proto.InternalMessageInfo - -func (m *SplitDelegation) GetValidator() string { - if m != nil { - return m.Validator - } - return "" -} - -type DelegateCallback struct { - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - DepositRecordId uint64 `protobuf:"varint,2,opt,name=deposit_record_id,json=depositRecordId,proto3" json:"deposit_record_id,omitempty"` - SplitDelegations []*SplitDelegation `protobuf:"bytes,3,rep,name=split_delegations,json=splitDelegations,proto3" json:"split_delegations,omitempty"` -} - -func (m *DelegateCallback) Reset() { *m = DelegateCallback{} } -func (m *DelegateCallback) String() string { return proto.CompactTextString(m) } -func (*DelegateCallback) ProtoMessage() {} -func (*DelegateCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{1} -} -func (m *DelegateCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegateCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegateCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DelegateCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegateCallback.Merge(m, src) -} -func (m *DelegateCallback) XXX_Size() int { - return m.Size() -} -func (m *DelegateCallback) XXX_DiscardUnknown() { - xxx_messageInfo_DelegateCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegateCallback proto.InternalMessageInfo - -func (m *DelegateCallback) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -func (m *DelegateCallback) GetDepositRecordId() uint64 { - if m != nil { - return m.DepositRecordId - } - return 0 -} - -func (m *DelegateCallback) GetSplitDelegations() []*SplitDelegation { - if m != nil { - return m.SplitDelegations - } - return nil -} - -type ClaimCallback struct { - UserRedemptionRecordId string `protobuf:"bytes,1,opt,name=user_redemption_record_id,json=userRedemptionRecordId,proto3" json:"user_redemption_record_id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - EpochNumber uint64 `protobuf:"varint,3,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` -} - -func (m *ClaimCallback) Reset() { *m = ClaimCallback{} } -func (m *ClaimCallback) String() string { return proto.CompactTextString(m) } -func (*ClaimCallback) ProtoMessage() {} -func (*ClaimCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{2} -} -func (m *ClaimCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ClaimCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ClaimCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ClaimCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClaimCallback.Merge(m, src) -} -func (m *ClaimCallback) XXX_Size() int { - return m.Size() -} -func (m *ClaimCallback) XXX_DiscardUnknown() { - xxx_messageInfo_ClaimCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_ClaimCallback proto.InternalMessageInfo - -func (m *ClaimCallback) GetUserRedemptionRecordId() string { - if m != nil { - return m.UserRedemptionRecordId - } - return "" -} - -func (m *ClaimCallback) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *ClaimCallback) GetEpochNumber() uint64 { - if m != nil { - return m.EpochNumber - } - return 0 -} - -type ReinvestCallback struct { - ReinvestAmount types.Coin `protobuf:"bytes,1,opt,name=reinvest_amount,json=reinvestAmount,proto3,castrepeated=cosmossdk.io/math.Coin" json:"reinvest_amount"` - HostZoneId string `protobuf:"bytes,3,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` -} - -func (m *ReinvestCallback) Reset() { *m = ReinvestCallback{} } -func (m *ReinvestCallback) String() string { return proto.CompactTextString(m) } -func (*ReinvestCallback) ProtoMessage() {} -func (*ReinvestCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{3} -} -func (m *ReinvestCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReinvestCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ReinvestCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ReinvestCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReinvestCallback.Merge(m, src) -} -func (m *ReinvestCallback) XXX_Size() int { - return m.Size() -} -func (m *ReinvestCallback) XXX_DiscardUnknown() { - xxx_messageInfo_ReinvestCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_ReinvestCallback proto.InternalMessageInfo - -func (m *ReinvestCallback) GetReinvestAmount() types.Coin { - if m != nil { - return m.ReinvestAmount - } - return types.Coin{} -} - -func (m *ReinvestCallback) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -type UndelegateCallback struct { - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - SplitDelegations []*SplitDelegation `protobuf:"bytes,2,rep,name=split_delegations,json=splitDelegations,proto3" json:"split_delegations,omitempty"` - EpochUnbondingRecordIds []uint64 `protobuf:"varint,3,rep,packed,name=epoch_unbonding_record_ids,json=epochUnbondingRecordIds,proto3" json:"epoch_unbonding_record_ids,omitempty"` -} - -func (m *UndelegateCallback) Reset() { *m = UndelegateCallback{} } -func (m *UndelegateCallback) String() string { return proto.CompactTextString(m) } -func (*UndelegateCallback) ProtoMessage() {} -func (*UndelegateCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{4} -} -func (m *UndelegateCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *UndelegateCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UndelegateCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UndelegateCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_UndelegateCallback.Merge(m, src) -} -func (m *UndelegateCallback) XXX_Size() int { - return m.Size() -} -func (m *UndelegateCallback) XXX_DiscardUnknown() { - xxx_messageInfo_UndelegateCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_UndelegateCallback proto.InternalMessageInfo - -func (m *UndelegateCallback) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -func (m *UndelegateCallback) GetSplitDelegations() []*SplitDelegation { - if m != nil { - return m.SplitDelegations - } - return nil -} - -func (m *UndelegateCallback) GetEpochUnbondingRecordIds() []uint64 { - if m != nil { - return m.EpochUnbondingRecordIds - } - return nil -} - -type RedemptionCallback struct { - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - EpochUnbondingRecordIds []uint64 `protobuf:"varint,2,rep,packed,name=epoch_unbonding_record_ids,json=epochUnbondingRecordIds,proto3" json:"epoch_unbonding_record_ids,omitempty"` -} - -func (m *RedemptionCallback) Reset() { *m = RedemptionCallback{} } -func (m *RedemptionCallback) String() string { return proto.CompactTextString(m) } -func (*RedemptionCallback) ProtoMessage() {} -func (*RedemptionCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{5} -} -func (m *RedemptionCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RedemptionCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RedemptionCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RedemptionCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_RedemptionCallback.Merge(m, src) -} -func (m *RedemptionCallback) XXX_Size() int { - return m.Size() -} -func (m *RedemptionCallback) XXX_DiscardUnknown() { - xxx_messageInfo_RedemptionCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_RedemptionCallback proto.InternalMessageInfo - -func (m *RedemptionCallback) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -func (m *RedemptionCallback) GetEpochUnbondingRecordIds() []uint64 { - if m != nil { - return m.EpochUnbondingRecordIds - } - return nil -} - -type Rebalancing struct { - SrcValidator string `protobuf:"bytes,1,opt,name=src_validator,json=srcValidator,proto3" json:"src_validator,omitempty"` - DstValidator string `protobuf:"bytes,2,opt,name=dst_validator,json=dstValidator,proto3" json:"dst_validator,omitempty"` - Amt cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amt,proto3,customtype=cosmossdk.io/math.Int" json:"amt"` -} - -func (m *Rebalancing) Reset() { *m = Rebalancing{} } -func (m *Rebalancing) String() string { return proto.CompactTextString(m) } -func (*Rebalancing) ProtoMessage() {} -func (*Rebalancing) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{6} -} -func (m *Rebalancing) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Rebalancing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Rebalancing.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Rebalancing) XXX_Merge(src proto.Message) { - xxx_messageInfo_Rebalancing.Merge(m, src) -} -func (m *Rebalancing) XXX_Size() int { - return m.Size() -} -func (m *Rebalancing) XXX_DiscardUnknown() { - xxx_messageInfo_Rebalancing.DiscardUnknown(m) -} - -var xxx_messageInfo_Rebalancing proto.InternalMessageInfo - -func (m *Rebalancing) GetSrcValidator() string { - if m != nil { - return m.SrcValidator - } - return "" -} - -func (m *Rebalancing) GetDstValidator() string { - if m != nil { - return m.DstValidator - } - return "" -} - -type RebalanceCallback struct { - HostZoneId string `protobuf:"bytes,1,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - Rebalancings []*Rebalancing `protobuf:"bytes,2,rep,name=rebalancings,proto3" json:"rebalancings,omitempty"` -} - -func (m *RebalanceCallback) Reset() { *m = RebalanceCallback{} } -func (m *RebalanceCallback) String() string { return proto.CompactTextString(m) } -func (*RebalanceCallback) ProtoMessage() {} -func (*RebalanceCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{7} -} -func (m *RebalanceCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RebalanceCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RebalanceCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *RebalanceCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_RebalanceCallback.Merge(m, src) -} -func (m *RebalanceCallback) XXX_Size() int { - return m.Size() -} -func (m *RebalanceCallback) XXX_DiscardUnknown() { - xxx_messageInfo_RebalanceCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_RebalanceCallback proto.InternalMessageInfo - -func (m *RebalanceCallback) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -func (m *RebalanceCallback) GetRebalancings() []*Rebalancing { - if m != nil { - return m.Rebalancings - } - return nil -} - -type DetokenizeSharesCallback struct { - Deposit *types1.LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` -} - -func (m *DetokenizeSharesCallback) Reset() { *m = DetokenizeSharesCallback{} } -func (m *DetokenizeSharesCallback) String() string { return proto.CompactTextString(m) } -func (*DetokenizeSharesCallback) ProtoMessage() {} -func (*DetokenizeSharesCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{8} -} -func (m *DetokenizeSharesCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DetokenizeSharesCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DetokenizeSharesCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DetokenizeSharesCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_DetokenizeSharesCallback.Merge(m, src) -} -func (m *DetokenizeSharesCallback) XXX_Size() int { - return m.Size() -} -func (m *DetokenizeSharesCallback) XXX_DiscardUnknown() { - xxx_messageInfo_DetokenizeSharesCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_DetokenizeSharesCallback proto.InternalMessageInfo - -func (m *DetokenizeSharesCallback) GetDeposit() *types1.LSMTokenDeposit { - if m != nil { - return m.Deposit - } - return nil -} - -type LSMLiquidStake struct { - Deposit *types1.LSMTokenDeposit `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` - HostZone *HostZone `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - Validator *Validator `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` -} - -func (m *LSMLiquidStake) Reset() { *m = LSMLiquidStake{} } -func (m *LSMLiquidStake) String() string { return proto.CompactTextString(m) } -func (*LSMLiquidStake) ProtoMessage() {} -func (*LSMLiquidStake) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{9} -} -func (m *LSMLiquidStake) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LSMLiquidStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LSMLiquidStake.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LSMLiquidStake) XXX_Merge(src proto.Message) { - xxx_messageInfo_LSMLiquidStake.Merge(m, src) -} -func (m *LSMLiquidStake) XXX_Size() int { - return m.Size() -} -func (m *LSMLiquidStake) XXX_DiscardUnknown() { - xxx_messageInfo_LSMLiquidStake.DiscardUnknown(m) -} - -var xxx_messageInfo_LSMLiquidStake proto.InternalMessageInfo - -func (m *LSMLiquidStake) GetDeposit() *types1.LSMTokenDeposit { - if m != nil { - return m.Deposit - } - return nil -} - -func (m *LSMLiquidStake) GetHostZone() *HostZone { - if m != nil { - return m.HostZone - } - return nil -} - -func (m *LSMLiquidStake) GetValidator() *Validator { - if m != nil { - return m.Validator - } - return nil -} - -type ValidatorSharesToTokensQueryCallback struct { - LsmLiquidStake *LSMLiquidStake `protobuf:"bytes,1,opt,name=lsm_liquid_stake,json=lsmLiquidStake,proto3" json:"lsm_liquid_stake,omitempty"` -} - -func (m *ValidatorSharesToTokensQueryCallback) Reset() { *m = ValidatorSharesToTokensQueryCallback{} } -func (m *ValidatorSharesToTokensQueryCallback) String() string { return proto.CompactTextString(m) } -func (*ValidatorSharesToTokensQueryCallback) ProtoMessage() {} -func (*ValidatorSharesToTokensQueryCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{10} -} -func (m *ValidatorSharesToTokensQueryCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorSharesToTokensQueryCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorSharesToTokensQueryCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorSharesToTokensQueryCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorSharesToTokensQueryCallback.Merge(m, src) -} -func (m *ValidatorSharesToTokensQueryCallback) XXX_Size() int { - return m.Size() -} -func (m *ValidatorSharesToTokensQueryCallback) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorSharesToTokensQueryCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorSharesToTokensQueryCallback proto.InternalMessageInfo - -func (m *ValidatorSharesToTokensQueryCallback) GetLsmLiquidStake() *LSMLiquidStake { - if m != nil { - return m.LsmLiquidStake - } - return nil -} - -type DelegatorSharesQueryCallback struct { - // Validator delegation at the time the query is submitted - InitialValidatorDelegation cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=initial_validator_delegation,json=initialValidatorDelegation,proto3,customtype=cosmossdk.io/math.Int" json:"initial_validator_delegation"` -} - -func (m *DelegatorSharesQueryCallback) Reset() { *m = DelegatorSharesQueryCallback{} } -func (m *DelegatorSharesQueryCallback) String() string { return proto.CompactTextString(m) } -func (*DelegatorSharesQueryCallback) ProtoMessage() {} -func (*DelegatorSharesQueryCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{11} -} -func (m *DelegatorSharesQueryCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DelegatorSharesQueryCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DelegatorSharesQueryCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DelegatorSharesQueryCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_DelegatorSharesQueryCallback.Merge(m, src) -} -func (m *DelegatorSharesQueryCallback) XXX_Size() int { - return m.Size() -} -func (m *DelegatorSharesQueryCallback) XXX_DiscardUnknown() { - xxx_messageInfo_DelegatorSharesQueryCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_DelegatorSharesQueryCallback proto.InternalMessageInfo - -type CommunityPoolBalanceQueryCallback struct { - IcaType ICAAccountType `protobuf:"varint,1,opt,name=ica_type,json=icaType,proto3,enum=stride.stakeibc.ICAAccountType" json:"ica_type,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (m *CommunityPoolBalanceQueryCallback) Reset() { *m = CommunityPoolBalanceQueryCallback{} } -func (m *CommunityPoolBalanceQueryCallback) String() string { return proto.CompactTextString(m) } -func (*CommunityPoolBalanceQueryCallback) ProtoMessage() {} -func (*CommunityPoolBalanceQueryCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{12} -} -func (m *CommunityPoolBalanceQueryCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommunityPoolBalanceQueryCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommunityPoolBalanceQueryCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CommunityPoolBalanceQueryCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommunityPoolBalanceQueryCallback.Merge(m, src) -} -func (m *CommunityPoolBalanceQueryCallback) XXX_Size() int { - return m.Size() -} -func (m *CommunityPoolBalanceQueryCallback) XXX_DiscardUnknown() { - xxx_messageInfo_CommunityPoolBalanceQueryCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_CommunityPoolBalanceQueryCallback proto.InternalMessageInfo - -func (m *CommunityPoolBalanceQueryCallback) GetIcaType() ICAAccountType { - if m != nil { - return m.IcaType - } - return ICAAccountType_DELEGATION -} - -func (m *CommunityPoolBalanceQueryCallback) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -type TradeRouteCallback struct { - RewardDenom string `protobuf:"bytes,1,opt,name=reward_denom,json=rewardDenom,proto3" json:"reward_denom,omitempty"` - HostDenom string `protobuf:"bytes,2,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` -} - -func (m *TradeRouteCallback) Reset() { *m = TradeRouteCallback{} } -func (m *TradeRouteCallback) String() string { return proto.CompactTextString(m) } -func (*TradeRouteCallback) ProtoMessage() {} -func (*TradeRouteCallback) Descriptor() ([]byte, []int) { - return fileDescriptor_f41c99b09b96a5ac, []int{13} -} -func (m *TradeRouteCallback) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TradeRouteCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TradeRouteCallback.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TradeRouteCallback) XXX_Merge(src proto.Message) { - xxx_messageInfo_TradeRouteCallback.Merge(m, src) -} -func (m *TradeRouteCallback) XXX_Size() int { - return m.Size() -} -func (m *TradeRouteCallback) XXX_DiscardUnknown() { - xxx_messageInfo_TradeRouteCallback.DiscardUnknown(m) -} - -var xxx_messageInfo_TradeRouteCallback proto.InternalMessageInfo - -func (m *TradeRouteCallback) GetRewardDenom() string { - if m != nil { - return m.RewardDenom - } - return "" -} - -func (m *TradeRouteCallback) GetHostDenom() string { - if m != nil { - return m.HostDenom - } - return "" -} - -func init() { - proto.RegisterType((*SplitDelegation)(nil), "stride.stakeibc.SplitDelegation") - proto.RegisterType((*DelegateCallback)(nil), "stride.stakeibc.DelegateCallback") - proto.RegisterType((*ClaimCallback)(nil), "stride.stakeibc.ClaimCallback") - proto.RegisterType((*ReinvestCallback)(nil), "stride.stakeibc.ReinvestCallback") - proto.RegisterType((*UndelegateCallback)(nil), "stride.stakeibc.UndelegateCallback") - proto.RegisterType((*RedemptionCallback)(nil), "stride.stakeibc.RedemptionCallback") - proto.RegisterType((*Rebalancing)(nil), "stride.stakeibc.Rebalancing") - proto.RegisterType((*RebalanceCallback)(nil), "stride.stakeibc.RebalanceCallback") - proto.RegisterType((*DetokenizeSharesCallback)(nil), "stride.stakeibc.DetokenizeSharesCallback") - proto.RegisterType((*LSMLiquidStake)(nil), "stride.stakeibc.LSMLiquidStake") - proto.RegisterType((*ValidatorSharesToTokensQueryCallback)(nil), "stride.stakeibc.ValidatorSharesToTokensQueryCallback") - proto.RegisterType((*DelegatorSharesQueryCallback)(nil), "stride.stakeibc.DelegatorSharesQueryCallback") - proto.RegisterType((*CommunityPoolBalanceQueryCallback)(nil), "stride.stakeibc.CommunityPoolBalanceQueryCallback") - proto.RegisterType((*TradeRouteCallback)(nil), "stride.stakeibc.TradeRouteCallback") -} - -func init() { proto.RegisterFile("stride/stakeibc/callbacks.proto", fileDescriptor_f41c99b09b96a5ac) } - -var fileDescriptor_f41c99b09b96a5ac = []byte{ - // 927 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4d, 0x6f, 0xdb, 0x46, - 0x13, 0x36, 0xad, 0xbc, 0xb1, 0x3d, 0x92, 0xbf, 0x88, 0xbc, 0xa9, 0x2c, 0x28, 0x92, 0xcd, 0xf4, - 0x10, 0x14, 0x28, 0x89, 0xb8, 0x68, 0xd1, 0x8f, 0x4b, 0x6d, 0xf9, 0x50, 0x01, 0x76, 0xd1, 0x52, - 0x76, 0x0e, 0xb9, 0x10, 0x4b, 0xee, 0x56, 0x5a, 0x88, 0xdc, 0x55, 0xb8, 0x4b, 0xbb, 0xca, 0xa5, - 0xd7, 0x1c, 0x7b, 0xec, 0x6f, 0xe8, 0xa5, 0xbf, 0xa0, 0x97, 0x9e, 0x72, 0xcc, 0xb1, 0xe8, 0x21, - 0x2d, 0xec, 0x3f, 0x52, 0x2c, 0x77, 0x49, 0x51, 0x52, 0x9a, 0xc0, 0xed, 0x49, 0xe2, 0xcc, 0xb3, - 0x33, 0xf3, 0xcc, 0x33, 0xb3, 0x0b, 0x5d, 0x21, 0x53, 0x8a, 0x89, 0x27, 0x24, 0x1a, 0x13, 0x1a, - 0x46, 0x5e, 0x84, 0xe2, 0x38, 0x44, 0xd1, 0x58, 0xb8, 0x93, 0x94, 0x4b, 0x6e, 0x6f, 0x6b, 0x80, - 0x5b, 0x00, 0x5a, 0xf7, 0x86, 0x7c, 0xc8, 0x73, 0x9f, 0xa7, 0xfe, 0x69, 0x58, 0xab, 0x13, 0x71, - 0x91, 0x70, 0xe1, 0x85, 0x48, 0x10, 0xef, 0xf2, 0x71, 0x48, 0x24, 0x7a, 0xec, 0x45, 0x9c, 0x32, - 0xe3, 0x6f, 0x9b, 0x3c, 0x29, 0x89, 0x78, 0x8a, 0x45, 0xf1, 0x6b, 0xbc, 0x4b, 0x55, 0x8c, 0xb8, - 0x90, 0xc1, 0x73, 0xce, 0xc8, 0x3f, 0x01, 0x2e, 0x51, 0x4c, 0x31, 0x92, 0x3c, 0x35, 0x80, 0x83, - 0x45, 0x00, 0x8d, 0x50, 0x80, 0xa2, 0x88, 0x67, 0x4c, 0x6a, 0x88, 0xf3, 0x1d, 0x6c, 0x0f, 0x26, - 0x31, 0x95, 0x27, 0x24, 0x26, 0x43, 0x24, 0x29, 0x67, 0x76, 0x1b, 0x36, 0xca, 0x40, 0x4d, 0x6b, - 0xdf, 0x7a, 0xb4, 0xe1, 0xcf, 0x0c, 0xf6, 0xc7, 0x70, 0x17, 0x25, 0x2a, 0x40, 0x73, 0x55, 0xb9, - 0x8e, 0x1f, 0xbc, 0x7c, 0xdd, 0x5d, 0xf9, 0xe3, 0x75, 0xf7, 0xff, 0x9a, 0xab, 0xc0, 0x63, 0x97, - 0x72, 0x2f, 0x41, 0x72, 0xe4, 0xf6, 0x99, 0xf4, 0x0d, 0xd8, 0xf9, 0xc5, 0x82, 0x1d, 0x93, 0x83, - 0xf4, 0x4c, 0x37, 0xed, 0x7d, 0x68, 0x94, 0x9c, 0x02, 0x8a, 0x4d, 0x32, 0x50, 0xb6, 0xa7, 0x9c, - 0x91, 0x3e, 0xb6, 0x3f, 0x80, 0x5d, 0x4c, 0x26, 0x5c, 0x50, 0x19, 0xe8, 0xe6, 0x28, 0x98, 0x4a, - 0x7c, 0xc7, 0xdf, 0x36, 0x0e, 0x3f, 0xb7, 0xf7, 0xb1, 0x7d, 0x06, 0xbb, 0x42, 0x51, 0x09, 0x70, - 0xc9, 0x45, 0x34, 0x6b, 0xfb, 0xb5, 0x47, 0xf5, 0xc3, 0x7d, 0x77, 0x41, 0x30, 0x77, 0x81, 0xb4, - 0xbf, 0x23, 0xe6, 0x0d, 0xc2, 0x79, 0x61, 0xc1, 0x66, 0x2f, 0x46, 0x34, 0x29, 0xcb, 0xfd, 0x0c, - 0xf6, 0x32, 0x41, 0xd2, 0x20, 0x25, 0x98, 0x24, 0x13, 0x85, 0xaa, 0x14, 0xa5, 0x6b, 0xbf, 0xaf, - 0x00, 0x7e, 0xe9, 0x2f, 0x6b, 0xdb, 0x83, 0xf5, 0x68, 0x84, 0x28, 0x2b, 0xca, 0xdf, 0xf0, 0xd7, - 0xf2, 0xef, 0x3e, 0xb6, 0x0f, 0xa0, 0x41, 0x26, 0x3c, 0x1a, 0x05, 0x2c, 0x4b, 0x42, 0x92, 0x36, - 0x6b, 0x39, 0xbb, 0x7a, 0x6e, 0xfb, 0x3a, 0x37, 0x39, 0x3f, 0x59, 0xb0, 0xe3, 0x13, 0xca, 0x2e, - 0x89, 0x90, 0x65, 0x35, 0x21, 0x6c, 0xa7, 0xc6, 0x16, 0x18, 0x45, 0x54, 0x0d, 0xf5, 0xc3, 0x3d, - 0x57, 0x4b, 0xe1, 0xaa, 0xb1, 0x73, 0xcd, 0xd8, 0xb9, 0x3d, 0x4e, 0xd9, 0x71, 0x47, 0x89, 0xf5, - 0xf3, 0x9f, 0xdd, 0xfb, 0xcb, 0x62, 0x29, 0xbf, 0xbf, 0x55, 0x44, 0x3c, 0xca, 0x03, 0x2e, 0x09, - 0x54, 0x5b, 0x14, 0xc8, 0xf9, 0xcd, 0x02, 0xfb, 0x82, 0xe1, 0xdb, 0x2b, 0xfb, 0x46, 0xb5, 0x56, - 0xff, 0xad, 0x5a, 0xf6, 0x17, 0xd0, 0xd2, 0x5d, 0xcc, 0x58, 0xc8, 0x19, 0xa6, 0x6c, 0x38, 0xd3, - 0x46, 0x4f, 0xc1, 0x1d, 0xff, 0xbd, 0x1c, 0x71, 0x51, 0x00, 0x0a, 0x71, 0x84, 0x23, 0xc0, 0x9e, - 0x69, 0x76, 0x0b, 0x0e, 0x6f, 0x4f, 0xba, 0xfa, 0xf6, 0xa4, 0x2f, 0x2c, 0xa8, 0xfb, 0x24, 0x44, - 0x31, 0x62, 0x11, 0x65, 0x43, 0xfb, 0x21, 0x6c, 0x8a, 0x34, 0x0a, 0x16, 0x57, 0xaf, 0x21, 0xd2, - 0xe8, 0x49, 0xb9, 0x7d, 0x0f, 0x61, 0x13, 0x0b, 0x59, 0x01, 0xe9, 0x61, 0x6a, 0x60, 0x21, 0x67, - 0x20, 0x0f, 0x6a, 0x28, 0x91, 0x5a, 0xac, 0x77, 0xed, 0xa7, 0x42, 0x3a, 0x57, 0xb0, 0x5b, 0x54, - 0x72, 0x1b, 0x09, 0xbf, 0x84, 0x46, 0x3a, 0x23, 0x50, 0xa8, 0xd7, 0x5e, 0x52, 0xaf, 0xc2, 0xd2, - 0x9f, 0x3b, 0xe1, 0x5c, 0x40, 0xf3, 0x84, 0x48, 0x3e, 0x26, 0x8c, 0x3e, 0x27, 0x83, 0x11, 0x4a, - 0x89, 0xa8, 0x6c, 0xdb, 0x9a, 0xd9, 0x70, 0x33, 0xd7, 0xdd, 0x22, 0x70, 0x71, 0x4d, 0x9e, 0x0e, - 0xce, 0xce, 0xd5, 0xd9, 0x13, 0x73, 0x11, 0x14, 0x78, 0xe7, 0x57, 0x0b, 0xb6, 0x4e, 0x07, 0x67, - 0xa7, 0xf4, 0x59, 0x46, 0xf1, 0x40, 0x95, 0xf1, 0x1f, 0xa2, 0xd9, 0x9f, 0xc0, 0x46, 0xd9, 0x88, - 0xbc, 0xdf, 0x6a, 0xc5, 0x16, 0x39, 0x7e, 0x65, 0xda, 0xe2, 0xaf, 0x17, 0x0d, 0xb2, 0x3f, 0xad, - 0xde, 0xa3, 0xb5, 0xfc, 0x5c, 0x6b, 0xe9, 0x5c, 0xa9, 0x5a, 0xe5, 0x8e, 0x75, 0x9e, 0xc1, 0xfb, - 0xa5, 0x5d, 0x77, 0xe5, 0x9c, 0xe7, 0xb5, 0x89, 0x6f, 0x33, 0x92, 0x4e, 0xcb, 0x16, 0xf5, 0x61, - 0x27, 0x16, 0x49, 0x10, 0xe7, 0x3c, 0x83, 0x3c, 0xe6, 0x22, 0xbb, 0x32, 0xd1, 0x7c, 0x3f, 0xfc, - 0xad, 0x58, 0x24, 0x95, 0x6f, 0xe7, 0x07, 0x68, 0x9b, 0x75, 0x2a, 0x52, 0xce, 0xa7, 0x0a, 0xa0, - 0x4d, 0x19, 0x95, 0x14, 0xc5, 0xb3, 0xe1, 0xab, 0xac, 0xae, 0x9e, 0x8e, 0x77, 0x0d, 0x5b, 0xcb, - 0x84, 0x28, 0xc9, 0xcd, 0x36, 0xd8, 0xc9, 0xe0, 0xa0, 0xc7, 0x93, 0x24, 0x63, 0x54, 0x4e, 0xbf, - 0xe1, 0x3c, 0x3e, 0xd6, 0xe3, 0x38, 0x5f, 0xc5, 0xe7, 0xb0, 0xae, 0x9e, 0x30, 0x39, 0x9d, 0x68, - 0xa2, 0x5b, 0x6f, 0x20, 0xda, 0xef, 0x1d, 0x1d, 0xe9, 0x27, 0xee, 0x7c, 0x3a, 0x21, 0xfe, 0x1a, - 0x8d, 0x90, 0xfa, 0x63, 0xdf, 0x83, 0xff, 0x61, 0xc2, 0x78, 0x62, 0x56, 0x46, 0x7f, 0x38, 0x4f, - 0xc0, 0x3e, 0x4f, 0x11, 0x26, 0x3e, 0xcf, 0x2a, 0xd7, 0xd7, 0x81, 0x9a, 0xec, 0x2b, 0x94, 0xe2, - 0x40, 0x1f, 0xd1, 0xb3, 0x5f, 0xd7, 0xb6, 0x13, 0x65, 0xb2, 0x1f, 0x40, 0xbe, 0x0a, 0x41, 0x35, - 0x66, 0x3e, 0x27, 0xb9, 0xfb, 0xf8, 0xf4, 0xe5, 0x75, 0xc7, 0x7a, 0x75, 0xdd, 0xb1, 0xfe, 0xba, - 0xee, 0x58, 0x3f, 0xde, 0x74, 0x56, 0x5e, 0xdd, 0x74, 0x56, 0x7e, 0xbf, 0xe9, 0xac, 0x3c, 0x3d, - 0x1c, 0x52, 0x39, 0xca, 0x42, 0x37, 0xe2, 0x89, 0x97, 0xd0, 0x78, 0x3c, 0xbd, 0x42, 0xd3, 0x0f, - 0x63, 0x14, 0x8a, 0xf2, 0xcb, 0xfb, 0x7e, 0xf6, 0x62, 0x2b, 0xaa, 0x22, 0xbc, 0x9b, 0x3f, 0xd6, - 0x1f, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x67, 0x09, 0xf9, 0x99, 0x08, 0x00, 0x00, -} - -func (m *SplitDelegation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SplitDelegation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SplitDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Validator) > 0 { - i -= len(m.Validator) - copy(dAtA[i:], m.Validator) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.Validator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegateCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DelegateCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegateCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SplitDelegations) > 0 { - for iNdEx := len(m.SplitDelegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SplitDelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.DepositRecordId != 0 { - i = encodeVarintCallbacks(dAtA, i, uint64(m.DepositRecordId)) - i-- - dAtA[i] = 0x10 - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClaimCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClaimCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClaimCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.EpochNumber != 0 { - i = encodeVarintCallbacks(dAtA, i, uint64(m.EpochNumber)) - i-- - dAtA[i] = 0x18 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.UserRedemptionRecordId) > 0 { - i -= len(m.UserRedemptionRecordId) - copy(dAtA[i:], m.UserRedemptionRecordId) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.UserRedemptionRecordId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ReinvestCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ReinvestCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ReinvestCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0x1a - } - { - size, err := m.ReinvestAmount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *UndelegateCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UndelegateCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UndelegateCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EpochUnbondingRecordIds) > 0 { - dAtA3 := make([]byte, len(m.EpochUnbondingRecordIds)*10) - var j2 int - for _, num := range m.EpochUnbondingRecordIds { - for num >= 1<<7 { - dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j2++ - } - dAtA3[j2] = uint8(num) - j2++ - } - i -= j2 - copy(dAtA[i:], dAtA3[:j2]) - i = encodeVarintCallbacks(dAtA, i, uint64(j2)) - i-- - dAtA[i] = 0x1a - } - if len(m.SplitDelegations) > 0 { - for iNdEx := len(m.SplitDelegations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SplitDelegations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RedemptionCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedemptionCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedemptionCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EpochUnbondingRecordIds) > 0 { - dAtA5 := make([]byte, len(m.EpochUnbondingRecordIds)*10) - var j4 int - for _, num := range m.EpochUnbondingRecordIds { - for num >= 1<<7 { - dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j4++ - } - dAtA5[j4] = uint8(num) - j4++ - } - i -= j4 - copy(dAtA[i:], dAtA5[:j4]) - i = encodeVarintCallbacks(dAtA, i, uint64(j4)) - i-- - dAtA[i] = 0x12 - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Rebalancing) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Rebalancing) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Rebalancing) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.Amt.Size() - i -= size - if _, err := m.Amt.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.DstValidator) > 0 { - i -= len(m.DstValidator) - copy(dAtA[i:], m.DstValidator) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.DstValidator))) - i-- - dAtA[i] = 0x12 - } - if len(m.SrcValidator) > 0 { - i -= len(m.SrcValidator) - copy(dAtA[i:], m.SrcValidator) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.SrcValidator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RebalanceCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RebalanceCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RebalanceCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Rebalancings) > 0 { - for iNdEx := len(m.Rebalancings) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rebalancings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DetokenizeSharesCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DetokenizeSharesCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DetokenizeSharesCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Deposit != nil { - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *LSMLiquidStake) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LSMLiquidStake) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LSMLiquidStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Validator != nil { - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.HostZone != nil { - { - size, err := m.HostZone.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Deposit != nil { - { - size, err := m.Deposit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ValidatorSharesToTokensQueryCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorSharesToTokensQueryCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorSharesToTokensQueryCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LsmLiquidStake != nil { - { - size, err := m.LsmLiquidStake.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DelegatorSharesQueryCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DelegatorSharesQueryCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DelegatorSharesQueryCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.InitialValidatorDelegation.Size() - i -= size - if _, err := m.InitialValidatorDelegation.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintCallbacks(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CommunityPoolBalanceQueryCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CommunityPoolBalanceQueryCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommunityPoolBalanceQueryCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if m.IcaType != 0 { - i = encodeVarintCallbacks(dAtA, i, uint64(m.IcaType)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TradeRouteCallback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TradeRouteCallback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TradeRouteCallback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.HostDenom) > 0 { - i -= len(m.HostDenom) - copy(dAtA[i:], m.HostDenom) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.HostDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.RewardDenom) > 0 { - i -= len(m.RewardDenom) - copy(dAtA[i:], m.RewardDenom) - i = encodeVarintCallbacks(dAtA, i, uint64(len(m.RewardDenom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCallbacks(dAtA []byte, offset int, v uint64) int { - offset -= sovCallbacks(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SplitDelegation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Validator) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovCallbacks(uint64(l)) - return n -} - -func (m *DelegateCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - if m.DepositRecordId != 0 { - n += 1 + sovCallbacks(uint64(m.DepositRecordId)) - } - if len(m.SplitDelegations) > 0 { - for _, e := range m.SplitDelegations { - l = e.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - } - return n -} - -func (m *ClaimCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UserRedemptionRecordId) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - if m.EpochNumber != 0 { - n += 1 + sovCallbacks(uint64(m.EpochNumber)) - } - return n -} - -func (m *ReinvestCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ReinvestAmount.Size() - n += 1 + l + sovCallbacks(uint64(l)) - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - return n -} - -func (m *UndelegateCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - if len(m.SplitDelegations) > 0 { - for _, e := range m.SplitDelegations { - l = e.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - } - if len(m.EpochUnbondingRecordIds) > 0 { - l = 0 - for _, e := range m.EpochUnbondingRecordIds { - l += sovCallbacks(uint64(e)) - } - n += 1 + sovCallbacks(uint64(l)) + l - } - return n -} - -func (m *RedemptionCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - if len(m.EpochUnbondingRecordIds) > 0 { - l = 0 - for _, e := range m.EpochUnbondingRecordIds { - l += sovCallbacks(uint64(e)) - } - n += 1 + sovCallbacks(uint64(l)) + l - } - return n -} - -func (m *Rebalancing) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SrcValidator) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - l = len(m.DstValidator) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - l = m.Amt.Size() - n += 1 + l + sovCallbacks(uint64(l)) - return n -} - -func (m *RebalanceCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - if len(m.Rebalancings) > 0 { - for _, e := range m.Rebalancings { - l = e.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - } - return n -} - -func (m *DetokenizeSharesCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Deposit != nil { - l = m.Deposit.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - return n -} - -func (m *LSMLiquidStake) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Deposit != nil { - l = m.Deposit.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - if m.HostZone != nil { - l = m.HostZone.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - if m.Validator != nil { - l = m.Validator.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - return n -} - -func (m *ValidatorSharesToTokensQueryCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LsmLiquidStake != nil { - l = m.LsmLiquidStake.Size() - n += 1 + l + sovCallbacks(uint64(l)) - } - return n -} - -func (m *DelegatorSharesQueryCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.InitialValidatorDelegation.Size() - n += 1 + l + sovCallbacks(uint64(l)) - return n -} - -func (m *CommunityPoolBalanceQueryCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IcaType != 0 { - n += 1 + sovCallbacks(uint64(m.IcaType)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - return n -} - -func (m *TradeRouteCallback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RewardDenom) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - l = len(m.HostDenom) - if l > 0 { - n += 1 + l + sovCallbacks(uint64(l)) - } - return n -} - -func sovCallbacks(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCallbacks(x uint64) (n int) { - return sovCallbacks(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SplitDelegation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SplitDelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SplitDelegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegateCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DelegateCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegateCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositRecordId", wireType) - } - m.DepositRecordId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DepositRecordId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SplitDelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SplitDelegations = append(m.SplitDelegations, &SplitDelegation{}) - if err := m.SplitDelegations[len(m.SplitDelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClaimCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClaimCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClaimCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserRedemptionRecordId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserRedemptionRecordId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - m.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ReinvestCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReinvestCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReinvestCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReinvestAmount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ReinvestAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UndelegateCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UndelegateCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UndelegateCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SplitDelegations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SplitDelegations = append(m.SplitDelegations, &SplitDelegation{}) - if err := m.SplitDelegations[len(m.SplitDelegations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EpochUnbondingRecordIds = append(m.EpochUnbondingRecordIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.EpochUnbondingRecordIds) == 0 { - m.EpochUnbondingRecordIds = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EpochUnbondingRecordIds = append(m.EpochUnbondingRecordIds, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecordIds", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedemptionCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RedemptionCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedemptionCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EpochUnbondingRecordIds = append(m.EpochUnbondingRecordIds, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.EpochUnbondingRecordIds) == 0 { - m.EpochUnbondingRecordIds = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EpochUnbondingRecordIds = append(m.EpochUnbondingRecordIds, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field EpochUnbondingRecordIds", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Rebalancing) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Rebalancing: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Rebalancing: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SrcValidator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SrcValidator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DstValidator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DstValidator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amt", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RebalanceCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RebalanceCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RebalanceCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rebalancings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rebalancings = append(m.Rebalancings, &Rebalancing{}) - if err := m.Rebalancings[len(m.Rebalancings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DetokenizeSharesCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DetokenizeSharesCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DetokenizeSharesCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Deposit == nil { - m.Deposit = &types1.LSMTokenDeposit{} - } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LSMLiquidStake) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LSMLiquidStake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LSMLiquidStake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deposit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Deposit == nil { - m.Deposit = &types1.LSMTokenDeposit{} - } - if err := m.Deposit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HostZone == nil { - m.HostZone = &HostZone{} - } - if err := m.HostZone.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validator == nil { - m.Validator = &Validator{} - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorSharesToTokensQueryCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorSharesToTokensQueryCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorSharesToTokensQueryCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LsmLiquidStake", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LsmLiquidStake == nil { - m.LsmLiquidStake = &LSMLiquidStake{} - } - if err := m.LsmLiquidStake.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DelegatorSharesQueryCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DelegatorSharesQueryCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DelegatorSharesQueryCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialValidatorDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.InitialValidatorDelegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommunityPoolBalanceQueryCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommunityPoolBalanceQueryCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolBalanceQueryCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IcaType", wireType) - } - m.IcaType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IcaType |= ICAAccountType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TradeRouteCallback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TradeRouteCallback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TradeRouteCallback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCallbacks - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCallbacks - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCallbacks - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCallbacks(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCallbacks - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCallbacks(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCallbacks - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCallbacks - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCallbacks - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCallbacks - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCallbacks - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCallbacks - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCallbacks = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCallbacks = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCallbacks = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/codec.go b/x/stakeibc/types/codec.go deleted file mode 100644 index e25260546..000000000 --- a/x/stakeibc/types/codec.go +++ /dev/null @@ -1,66 +0,0 @@ -package types - -import ( - "github.com/cosmos/cosmos-sdk/codec" - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/msgservice" -) - -func RegisterCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgLiquidStake{}, "stakeibc/LiquidStake", nil) - cdc.RegisterConcrete(&MsgLSMLiquidStake{}, "stakeibc/LSMLiquidStake", nil) - cdc.RegisterConcrete(&MsgRegisterHostZone{}, "stakeibc/RegisterHostZone", nil) - cdc.RegisterConcrete(&MsgRedeemStake{}, "stakeibc/RedeemStake", nil) - cdc.RegisterConcrete(&MsgClaimUndelegatedTokens{}, "stakeibc/ClaimUndelegatedTokens", nil) - cdc.RegisterConcrete(&MsgRebalanceValidators{}, "stakeibc/RebalanceValidators", nil) - cdc.RegisterConcrete(&MsgAddValidators{}, "stakeibc/AddValidators", nil) - cdc.RegisterConcrete(&MsgChangeValidatorWeights{}, "stakeibc/ChangeValidatorWeights", nil) - cdc.RegisterConcrete(&MsgDeleteValidator{}, "stakeibc/DeleteValidator", nil) - cdc.RegisterConcrete(&MsgRestoreInterchainAccount{}, "stakeibc/RestoreInterchainAccount", nil) - cdc.RegisterConcrete(&MsgUpdateValidatorSharesExchRate{}, "stakeibc/UpdateValidatorSharesExchRate", nil) - cdc.RegisterConcrete(&MsgCalibrateDelegation{}, "stakeibc/CalibrateDelegation", nil) - cdc.RegisterConcrete(&MsgUpdateInnerRedemptionRateBounds{}, "stakeibc/UpdateInnerRedemptionRateBounds", nil) - cdc.RegisterConcrete(&MsgResumeHostZone{}, "stakeibc/ResumeHostZone", nil) - cdc.RegisterConcrete(&MsgSetCommunityPoolRebate{}, "stakeibc/SetCommunityPoolRebate", nil) - cdc.RegisterConcrete(&MsgToggleTradeController{}, "stakeibc/ToggleTradeController", nil) - cdc.RegisterConcrete(&MsgUpdateHostZoneParams{}, "stakeibc/MsgUpdateHostZoneParams", nil) - cdc.RegisterConcrete(&MsgUpdateParams{}, "stakeibc/MsgUpdateParams", nil) -} - -func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgLiquidStake{}, - &MsgClearBalance{}, - &MsgRegisterHostZone{}, - &MsgRedeemStake{}, - &MsgClaimUndelegatedTokens{}, - &MsgRebalanceValidators{}, - &MsgAddValidators{}, - &MsgChangeValidatorWeights{}, - &MsgDeleteValidator{}, - &MsgRestoreInterchainAccount{}, - &MsgUpdateValidatorSharesExchRate{}, - &MsgCalibrateDelegation{}, - &MsgUpdateInnerRedemptionRateBounds{}, - &MsgResumeHostZone{}, - &MsgSetCommunityPoolRebate{}, - &MsgToggleTradeController{}, - &MsgUpdateHostZoneParams{}, - &MsgUpdateParams{}, - ) - - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) -} - -var ( - Amino = codec.NewLegacyAmino() - ModuleCdc = codec.NewAminoCodec(Amino) -) - -func init() { - RegisterCodec(Amino) - cryptocodec.RegisterCrypto(Amino) - sdk.RegisterLegacyAminoCodec(Amino) -} diff --git a/x/stakeibc/types/epoch_tracker.pb.go b/x/stakeibc/types/epoch_tracker.pb.go deleted file mode 100644 index 96af84f31..000000000 --- a/x/stakeibc/types/epoch_tracker.pb.go +++ /dev/null @@ -1,428 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/epoch_tracker.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type EpochTracker struct { - EpochIdentifier string `protobuf:"bytes,1,opt,name=epoch_identifier,json=epochIdentifier,proto3" json:"epoch_identifier,omitempty"` - EpochNumber uint64 `protobuf:"varint,2,opt,name=epoch_number,json=epochNumber,proto3" json:"epoch_number,omitempty"` - NextEpochStartTime uint64 `protobuf:"varint,3,opt,name=next_epoch_start_time,json=nextEpochStartTime,proto3" json:"next_epoch_start_time,omitempty"` - Duration uint64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` -} - -func (m *EpochTracker) Reset() { *m = EpochTracker{} } -func (m *EpochTracker) String() string { return proto.CompactTextString(m) } -func (*EpochTracker) ProtoMessage() {} -func (*EpochTracker) Descriptor() ([]byte, []int) { - return fileDescriptor_e7c48143f24adf66, []int{0} -} -func (m *EpochTracker) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EpochTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EpochTracker.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EpochTracker) XXX_Merge(src proto.Message) { - xxx_messageInfo_EpochTracker.Merge(m, src) -} -func (m *EpochTracker) XXX_Size() int { - return m.Size() -} -func (m *EpochTracker) XXX_DiscardUnknown() { - xxx_messageInfo_EpochTracker.DiscardUnknown(m) -} - -var xxx_messageInfo_EpochTracker proto.InternalMessageInfo - -func (m *EpochTracker) GetEpochIdentifier() string { - if m != nil { - return m.EpochIdentifier - } - return "" -} - -func (m *EpochTracker) GetEpochNumber() uint64 { - if m != nil { - return m.EpochNumber - } - return 0 -} - -func (m *EpochTracker) GetNextEpochStartTime() uint64 { - if m != nil { - return m.NextEpochStartTime - } - return 0 -} - -func (m *EpochTracker) GetDuration() uint64 { - if m != nil { - return m.Duration - } - return 0 -} - -func init() { - proto.RegisterType((*EpochTracker)(nil), "stride.stakeibc.EpochTracker") -} - -func init() { - proto.RegisterFile("stride/stakeibc/epoch_tracker.proto", fileDescriptor_e7c48143f24adf66) -} - -var fileDescriptor_e7c48143f24adf66 = []byte{ - // 257 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2e, 0x2e, 0x29, 0xca, - 0x4c, 0x49, 0xd5, 0x2f, 0x2e, 0x49, 0xcc, 0x4e, 0xcd, 0x4c, 0x4a, 0xd6, 0x4f, 0x2d, 0xc8, 0x4f, - 0xce, 0x88, 0x2f, 0x29, 0x4a, 0x4c, 0xce, 0x4e, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, - 0xe2, 0x87, 0x28, 0xd2, 0x83, 0x29, 0x52, 0x5a, 0xcd, 0xc8, 0xc5, 0xe3, 0x0a, 0x52, 0x18, 0x02, - 0x51, 0x27, 0xa4, 0xc9, 0x25, 0x00, 0xd1, 0x98, 0x99, 0x92, 0x9a, 0x57, 0x92, 0x99, 0x96, 0x99, - 0x5a, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0xc4, 0x0f, 0x16, 0xf7, 0x84, 0x0b, 0x0b, 0x29, - 0x72, 0xf1, 0x40, 0x94, 0xe6, 0x95, 0xe6, 0x26, 0xa5, 0x16, 0x49, 0x30, 0x29, 0x30, 0x6a, 0xb0, - 0x04, 0x71, 0x83, 0xc5, 0xfc, 0xc0, 0x42, 0x42, 0x86, 0x5c, 0xa2, 0x79, 0xa9, 0x15, 0x25, 0xf1, - 0x10, 0x75, 0xc5, 0x25, 0x89, 0x45, 0x25, 0xf1, 0x25, 0x99, 0xb9, 0xa9, 0x12, 0xcc, 0x60, 0xb5, - 0x42, 0x20, 0x49, 0xb0, 0xf5, 0xc1, 0x20, 0xa9, 0x90, 0xcc, 0xdc, 0x54, 0x21, 0x29, 0x2e, 0x8e, - 0x94, 0xd2, 0xa2, 0xc4, 0x92, 0xcc, 0xfc, 0x3c, 0x09, 0x16, 0xb0, 0x2a, 0x38, 0xdf, 0xc9, 0xe7, - 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, - 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x8c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, - 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x73, 0x33, 0x73, 0xb2, 0x2b, 0xcb, 0x13, 0x2b, 0x75, 0x73, - 0x12, 0x93, 0x8a, 0xe1, 0x3c, 0xfd, 0x0a, 0x44, 0xd0, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, - 0x81, 0xc3, 0xc4, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x84, 0x75, 0x01, 0x13, 0x3a, 0x01, 0x00, - 0x00, -} - -func (m *EpochTracker) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EpochTracker) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EpochTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Duration != 0 { - i = encodeVarintEpochTracker(dAtA, i, uint64(m.Duration)) - i-- - dAtA[i] = 0x20 - } - if m.NextEpochStartTime != 0 { - i = encodeVarintEpochTracker(dAtA, i, uint64(m.NextEpochStartTime)) - i-- - dAtA[i] = 0x18 - } - if m.EpochNumber != 0 { - i = encodeVarintEpochTracker(dAtA, i, uint64(m.EpochNumber)) - i-- - dAtA[i] = 0x10 - } - if len(m.EpochIdentifier) > 0 { - i -= len(m.EpochIdentifier) - copy(dAtA[i:], m.EpochIdentifier) - i = encodeVarintEpochTracker(dAtA, i, uint64(len(m.EpochIdentifier))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEpochTracker(dAtA []byte, offset int, v uint64) int { - offset -= sovEpochTracker(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EpochTracker) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.EpochIdentifier) - if l > 0 { - n += 1 + l + sovEpochTracker(uint64(l)) - } - if m.EpochNumber != 0 { - n += 1 + sovEpochTracker(uint64(m.EpochNumber)) - } - if m.NextEpochStartTime != 0 { - n += 1 + sovEpochTracker(uint64(m.NextEpochStartTime)) - } - if m.Duration != 0 { - n += 1 + sovEpochTracker(uint64(m.Duration)) - } - return n -} - -func sovEpochTracker(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEpochTracker(x uint64) (n int) { - return sovEpochTracker(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EpochTracker) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEpochTracker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EpochTracker: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EpochTracker: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIdentifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEpochTracker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEpochTracker - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEpochTracker - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EpochIdentifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochNumber", wireType) - } - m.EpochNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEpochTracker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EpochNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NextEpochStartTime", wireType) - } - m.NextEpochStartTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEpochTracker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NextEpochStartTime |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - m.Duration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEpochTracker - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Duration |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEpochTracker(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEpochTracker - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEpochTracker(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEpochTracker - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEpochTracker - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEpochTracker - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEpochTracker - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEpochTracker - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEpochTracker - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEpochTracker = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEpochTracker = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEpochTracker = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/errors.go b/x/stakeibc/types/errors.go deleted file mode 100644 index 9bbbf2df3..000000000 --- a/x/stakeibc/types/errors.go +++ /dev/null @@ -1,70 +0,0 @@ -package types - -// DONTCOVER - -import errorsmod "cosmossdk.io/errors" - -// x/stakeibc module sentinel errors -var ( - ErrInvalidVersion = errorsmod.Register(ModuleName, 1501, "invalid version") - ErrInvalidToken = errorsmod.Register(ModuleName, 1502, "invalid token denom") - ErrInvalidHostZone = errorsmod.Register(ModuleName, 1503, "host zone not registered") - ErrICAStake = errorsmod.Register(ModuleName, 1504, "ICA stake failed") - ErrEpochNotFound = errorsmod.Register(ModuleName, 1505, "epoch not found") - ErrRecordNotFound = errorsmod.Register(ModuleName, 1506, "record not found") - ErrInvalidAmount = errorsmod.Register(ModuleName, 1507, "invalid amount") - ErrValidatorAlreadyExists = errorsmod.Register(ModuleName, 1508, "validator already exists") - ErrNoValidatorWeights = errorsmod.Register(ModuleName, 1509, "no non-zero validator weights") - ErrValidatorNotFound = errorsmod.Register(ModuleName, 1510, "validator not found") - ErrWeightsNotDifferent = errorsmod.Register(ModuleName, 1511, "validator weights haven't changed") - ErrValidatorDelegationChg = errorsmod.Register(ModuleName, 1512, "can't change delegation on validator") - ErrAcctNotScopedForFunc = errorsmod.Register(ModuleName, 1513, "this account can't call this function") - ErrInsufficientFunds = errorsmod.Register(ModuleName, 1514, "balance is insufficient") - ErrInvalidUserRedemptionRecord = errorsmod.Register(ModuleName, 1515, "user redemption record error") - ErrRequiredFieldEmpty = errorsmod.Register(ModuleName, 1516, "required field is missing") - ErrInvalidNumValidator = errorsmod.Register(ModuleName, 1517, "invalid number of validators") - ErrValidatorNotRemoved = errorsmod.Register(ModuleName, 1518, "validator not removed") - ErrHostZoneNotFound = errorsmod.Register(ModuleName, 1519, "host zone not found") - ErrOutsideIcqWindow = errorsmod.Register(ModuleName, 1520, "outside time window that accepts icqs") - ErrParamNotFound = errorsmod.Register(ModuleName, 1521, "param not found") - ErrUnmarshalFailure = errorsmod.Register(ModuleName, 1522, "unable to unmarshal data structure") - ErrMarshalFailure = errorsmod.Register(ModuleName, 1523, "unable to marshal data structure") - ErrInvalidPacketCompletionTime = errorsmod.Register(ModuleName, 1524, "invalid packet completion time") - ErrIntCast = errorsmod.Register(ModuleName, 1525, "unable to cast to safe cast int") - ErrFeeAccountNotRegistered = errorsmod.Register(ModuleName, 1526, "fee account is not registered") - ErrRedemptionRateOutsideSafetyBounds = errorsmod.Register(ModuleName, 1527, "redemption rate outside safety bounds") - ErrTxMsgDataInvalid = errorsmod.Register(ModuleName, 1528, "TxMsgData invalid") - ErrFailedToRegisterHostZone = errorsmod.Register(ModuleName, 1529, "failed to register host zone") - ErrInvalidInterchainAccountAddress = errorsmod.Register(ModuleName, 1530, "invalid interchain account address") - ErrICAAccountNotFound = errorsmod.Register(ModuleName, 1531, "ICA acccount not found on host zone") - ErrICATxFailed = errorsmod.Register(ModuleName, 1532, "failed to submit ICA transaction") - ErrICQFailed = errorsmod.Register(ModuleName, 1533, "failed to submit ICQ") - ErrDivisionByZero = errorsmod.Register(ModuleName, 1534, "division by zero") - ErrSlashExceedsSafetyThreshold = errorsmod.Register(ModuleName, 1535, "slash is greater than safety threshold") - ErrInvalidEpoch = errorsmod.Register(ModuleName, 1536, "invalid epoch tracker") - ErrNoValidatorAmts = errorsmod.Register(ModuleName, 1538, "could not fetch validator amts") - ErrMaxNumValidators = errorsmod.Register(ModuleName, 1539, "max number of validators reached") - ErrUndelegationAmount = errorsmod.Register(ModuleName, 1540, "Undelegation amount is greater than stakedBal") - ErrRewardCollectorAccountNotFound = errorsmod.Register(ModuleName, 1541, "Reward Collector account not found") - ErrHaltedHostZone = errorsmod.Register(ModuleName, 1542, "Halted host zone found") - ErrInsufficientLiquidStake = errorsmod.Register(ModuleName, 1543, "Liquid staked amount is too small") - ErrStTokenNotFound = errorsmod.Register(ModuleName, 1544, "denom not found in stToken list") - ErrInvalidLSMToken = errorsmod.Register(ModuleName, 1545, "Invalid LSM token") - ErrValidatorWasSlashed = errorsmod.Register(ModuleName, 1546, "Validator was slashed") - ErrValidatorSharesToTokensRateNotKnown = errorsmod.Register(ModuleName, 1547, "Validator sharesToTokens rate not known") - ErrInvalidValidatorDelegationUpdates = errorsmod.Register(ModuleName, 1548, "Invalid validator delegation updates") - ErrLSMLiquidStakeDisabledForHostZone = errorsmod.Register(ModuleName, 1549, "LSM liquid stake is disabled for host zone") - ErrUnableToRemoveValidator = errorsmod.Register(ModuleName, 1550, "Unable to remove validator") - ErrInvalidBounds = errorsmod.Register(ModuleName, 1551, "Invalid safety bounds - inner bounds must be within outer bounds") - ErrCalibrationThresholdExceeded = errorsmod.Register(ModuleName, 1552, "Calibration threshold exceeded") - ErrHostZoneNotHalted = errorsmod.Register(ModuleName, 1553, "host zone is not halted") - ErrFailedToLiquidStake = errorsmod.Register(ModuleName, 1554, "Failed to liquid stake") - ErrUnableToRedeemStake = errorsmod.Register(ModuleName, 1555, "Failed to redeem stake") - ErrInvalidDenom = errorsmod.Register(ModuleName, 1556, "Invalid denom") - ErrTradeRouteAlreadyExists = errorsmod.Register(ModuleName, 1557, "Trade route already exists") - ErrClientStateNotTendermint = errorsmod.Register(ModuleName, 1558, "Client state not tendermint") - ErrTradeRouteNotFound = errorsmod.Register(ModuleName, 1559, "trade route not found") - ErrValidatorExceedsWeightCap = errorsmod.Register(ModuleName, 1560, "validator exceeds weight cap") - ErrFeeSplitInvariantFailed = errorsmod.Register(ModuleName, 1561, "failed to calculate fee split") - ErrFailedToRegisterRebate = errorsmod.Register(ModuleName, 1562, "failed to register rebate") -) diff --git a/x/stakeibc/types/events.go b/x/stakeibc/types/events.go deleted file mode 100644 index 19613b6cd..000000000 --- a/x/stakeibc/types/events.go +++ /dev/null @@ -1,59 +0,0 @@ -// #nosec G101 -package types - -// Events -const ( - EventTypeTimeout = "timeout" - - AttributeKeyAckSuccess = "success" - AttributeKeyAck = "acknowledgement" - AttributeKeyAckError = "error" -) - -const ( - EventTypeRegisterZone = "register_zone" - EventTypeRedemptionRequest = "request_redemption" - EventTypeLiquidStakeRequest = "liquid_stake" - EventTypeRedeemStakeRequest = "redeem_stake" - EventTypeLSMLiquidStakeRequest = "lsm_liquid_stake" - EventTypeHostZoneHalt = "halt_zone" - EventTypeValidatorSharesToTokensRateChange = "validator_shares_to_tokens_rate_change" - EventTypeValidatorSlash = "validator_slash" - EventTypeUndelegation = "undelegation" - - AttributeKeyHostZone = "host_zone" - AttributeKeyConnectionId = "connection_id" - AttributeKeyRecipientChain = "chain_id" - AttributeKeyRecipientAddress = "recipient" - AttributeKeyBurnAmount = "burn_amount" - AttributeKeyRedeemAmount = "redeem_amount" - AttributeKeySourceAddress = "source" - - AttributeKeyRedemptionRate = "redemption_rate" - - AttributeKeyLiquidStaker = "liquid_staker" - AttributeKeyRedeemer = "redeemer" - AttributeKeyReceiver = "receiver" - AttributeKeyNativeBaseDenom = "native_base_denom" - AttributeKeyNativeIBCDenom = "native_ibc_denom" - AttributeKeyTotalUnbondAmount = "total_unbond_amount" - AttributeKeyLSMTokenBaseDenom = "lsm_token_base_denom" // #nosec G101 - AttributeKeyNativeAmount = "native_amount" - AttributeKeyStTokenAmount = "sttoken_amount" - AttributeKeyValidator = "validator" - AttributeKeyTransactionStatus = "transaction_status" - AttributeKeyLSMLiquidStakeTxId = "lsm_liquid_stake_tx_id" - - AttributeKeyPreviousSharesToTokensRate = "previous_shares_to_tokens_rate" - AttributeKeyCurrentSharesToTokensRate = "current_shares_to_tokens_rate" - AttributeKeySlashPercent = "slash_percent" - AttributeKeySlashAmount = "slash_amount" - AttributeKeyCurrentDelegation = "current_delegation" - - AttributeKeyError = "error" - - AttributeValueCategory = ModuleName - AttributeValueTransactionSucceeded = "success" - AttributeValueTransactionPending = "pending" - AttributeValueTransactionFailed = "failed" -) diff --git a/x/stakeibc/types/expected_keepers.go b/x/stakeibc/types/expected_keepers.go deleted file mode 100644 index 92b0db19f..000000000 --- a/x/stakeibc/types/expected_keepers.go +++ /dev/null @@ -1,48 +0,0 @@ -package types - -import ( - "context" - - sdk "github.com/cosmos/cosmos-sdk/types" - ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types" -) - -// AccountKeeper defines the expected account keeper used for simulations (noalias) -// Methods imported from account should be defined here -type AccountKeeper interface { - NewAccount(context.Context, sdk.AccountI) sdk.AccountI - SetAccount(ctx context.Context, acc sdk.AccountI) - GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI - GetAllAccounts(ctx context.Context) []sdk.AccountI - GetModuleAccount(ctx context.Context, moduleName string) sdk.ModuleAccountI - RemoveAccount(ctx context.Context, acc sdk.AccountI) -} - -// BankKeeper defines the expected interface needed to retrieve account balances. -// BankKeeper interface: https://github.com/cosmos/cosmos-sdk/blob/main/x/bank/keeper/keeper.go -// Methods imported from bank should be defined here -type BankKeeper interface { - SpendableCoins(ctx context.Context, addr sdk.AccAddress) sdk.Coins - GetBalance(ctx context.Context, addr sdk.AccAddress, denom string) sdk.Coin - SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error - SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error - MintCoins(ctx context.Context, moduleName string, amt sdk.Coins) error - GetAllBalances(ctx context.Context, addr sdk.AccAddress) sdk.Coins - SendCoinsFromModuleToModule(ctx context.Context, senderModule string, recipientModule string, amt sdk.Coins) error -} - -// Event Hooks -// These can be utilized to communicate between a stakeibc keeper and another -// keeper which must take particular actions when liquid staking happens - -// StakeIBCHooks event hooks for stakeibc -type StakeIBCHooks interface { - AfterLiquidStake(ctx sdk.Context, addr sdk.AccAddress) // Must be called after liquid stake is completed -} - -type RatelimitKeeper interface { - AddDenomToBlacklist(ctx sdk.Context, denom string) - RemoveDenomFromBlacklist(ctx sdk.Context, denom string) - SetWhitelistedAddressPair(ctx sdk.Context, whitelist ratelimittypes.WhitelistedAddressPair) - RemoveWhitelistedAddressPair(ctx sdk.Context, sender, receiver string) -} diff --git a/x/stakeibc/types/genesis.go b/x/stakeibc/types/genesis.go deleted file mode 100644 index 4a02eb955..000000000 --- a/x/stakeibc/types/genesis.go +++ /dev/null @@ -1,50 +0,0 @@ -package types - -import ( - "fmt" - - host "github.com/cosmos/ibc-go/v8/modules/core/24-host" -) - -// DefaultIndex is the default capability global index -const DefaultIndex uint64 = 1 - -// DefaultGenesis returns the default Capability genesis state -func DefaultGenesis() *GenesisState { - return &GenesisState{ - HostZoneList: []HostZone{}, - EpochTrackerList: []EpochTracker{}, - Params: DefaultParams(), - PortId: PortID, - } -} - -// Validate performs basic genesis state validation returning an error upon any -// failure. -func (gs GenesisState) Validate() error { - if err := host.PortIdentifierValidator(gs.PortId); err != nil { - return err - } - - // Check for duplicated index in hostZoneList - hostZoneList := make(map[string]HostZone) - for _, hostZone := range gs.HostZoneList { - if _, ok := hostZoneList[hostZone.ChainId]; ok { - return fmt.Errorf("duplicated index in hostZoneList: %s", hostZone.ChainId) - } - hostZoneList[hostZone.ChainId] = hostZone - } - - // Check for duplicated index in epochTracker - epochTrackerIndexMap := make(map[string]struct{}) - - for _, elem := range gs.EpochTrackerList { - index := string(EpochTrackerKey(elem.EpochIdentifier)) - if _, ok := epochTrackerIndexMap[index]; ok { - return fmt.Errorf("duplicated index for epochTracker") - } - epochTrackerIndexMap[index] = struct{}{} - } - - return gs.Params.Validate() -} diff --git a/x/stakeibc/types/genesis.pb.go b/x/stakeibc/types/genesis.pb.go deleted file mode 100644 index 390b23d36..000000000 --- a/x/stakeibc/types/genesis.pb.go +++ /dev/null @@ -1,506 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/genesis.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the stakeibc module's genesis state. -type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - // list of zones that are registered by the protocol - HostZoneList []HostZone `protobuf:"bytes,5,rep,name=host_zone_list,json=hostZoneList,proto3" json:"host_zone_list"` - EpochTrackerList []EpochTracker `protobuf:"bytes,10,rep,name=epoch_tracker_list,json=epochTrackerList,proto3" json:"epoch_tracker_list"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_dea81129ed6fb77a, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func (m *GenesisState) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -func (m *GenesisState) GetHostZoneList() []HostZone { - if m != nil { - return m.HostZoneList - } - return nil -} - -func (m *GenesisState) GetEpochTrackerList() []EpochTracker { - if m != nil { - return m.EpochTrackerList - } - return nil -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "stride.stakeibc.GenesisState") -} - -func init() { proto.RegisterFile("stride/stakeibc/genesis.proto", fileDescriptor_dea81129ed6fb77a) } - -var fileDescriptor_dea81129ed6fb77a = []byte{ - // 349 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xcf, 0x4e, 0xea, 0x40, - 0x18, 0xc5, 0x5b, 0x18, 0x4a, 0x19, 0xc8, 0xbd, 0x4d, 0x73, 0x13, 0xb8, 0xe4, 0x52, 0xc8, 0x75, - 0xc3, 0xc6, 0x36, 0xc1, 0xf8, 0x02, 0x24, 0x44, 0x6d, 0x58, 0x28, 0xba, 0x62, 0xd3, 0x4c, 0xcb, - 0xa4, 0x9d, 0xf0, 0x67, 0x9a, 0xce, 0x67, 0x14, 0x9f, 0xc2, 0x95, 0xcf, 0xc4, 0x92, 0xa5, 0x2b, - 0x63, 0xe0, 0x45, 0x4c, 0x3b, 0x15, 0xb5, 0xec, 0x7a, 0x7a, 0x7e, 0xf9, 0xcd, 0xc9, 0x87, 0x3b, - 0x02, 0x12, 0x36, 0xa3, 0x8e, 0x00, 0x32, 0xa7, 0xcc, 0x0f, 0x9c, 0x90, 0xae, 0xa8, 0x60, 0xc2, - 0x8e, 0x13, 0x0e, 0xdc, 0xfc, 0x2d, 0x6b, 0xfb, 0xb3, 0x6e, 0xff, 0x09, 0x79, 0xc8, 0xb3, 0xce, - 0x49, 0xbf, 0x24, 0xd6, 0xfe, 0x57, 0xb4, 0xc4, 0x24, 0x21, 0xcb, 0x5c, 0xd2, 0xee, 0x16, 0xdb, - 0x88, 0x0b, 0xf0, 0x9e, 0xf8, 0x8a, 0xe6, 0xc0, 0x49, 0x11, 0xa0, 0x31, 0x0f, 0x22, 0x0f, 0x12, - 0x12, 0xcc, 0x69, 0x22, 0xa1, 0xff, 0x2f, 0x25, 0xdc, 0xb8, 0x90, 0xe3, 0x6e, 0x81, 0x00, 0x35, - 0xcf, 0xb1, 0x26, 0x9f, 0x69, 0xa9, 0x3d, 0xb5, 0x5f, 0x1f, 0x34, 0xed, 0xc2, 0x58, 0xfb, 0x3a, - 0xab, 0x87, 0x68, 0xf3, 0xd6, 0x55, 0x26, 0x39, 0x6c, 0x36, 0x71, 0x35, 0xe6, 0x09, 0x78, 0x6c, - 0xd6, 0x2a, 0xf5, 0xd4, 0x7e, 0x6d, 0xa2, 0xa5, 0xf1, 0x6a, 0x66, 0x8e, 0xf0, 0xaf, 0xc3, 0x30, - 0x6f, 0xc1, 0x04, 0xb4, 0x2a, 0xbd, 0x72, 0xbf, 0x3e, 0xf8, 0x7b, 0xe4, 0xbd, 0xe4, 0x02, 0xa6, - 0x7c, 0x45, 0x73, 0x73, 0x23, 0xca, 0xf3, 0x98, 0x09, 0x30, 0x6f, 0xb0, 0xf9, 0x63, 0xbe, 0x54, - 0xe1, 0x4c, 0xd5, 0x39, 0x52, 0x8d, 0x52, 0xf4, 0x4e, 0x92, 0xb9, 0xce, 0xa0, 0xdf, 0xfe, 0xa5, - 0x4a, 0x17, 0xe9, 0x65, 0x03, 0xb9, 0x48, 0x47, 0x46, 0xc5, 0x45, 0xba, 0x66, 0x54, 0x5d, 0xa4, - 0xd7, 0x0c, 0xec, 0x22, 0xbd, 0x6e, 0x34, 0x86, 0xe3, 0xcd, 0xce, 0x52, 0xb7, 0x3b, 0x4b, 0x7d, - 0xdf, 0x59, 0xea, 0xf3, 0xde, 0x52, 0xb6, 0x7b, 0x4b, 0x79, 0xdd, 0x5b, 0xca, 0x74, 0x10, 0x32, - 0x88, 0xee, 0x7d, 0x3b, 0xe0, 0x4b, 0x67, 0xc9, 0x16, 0xf3, 0xf5, 0x03, 0x59, 0x9f, 0x2e, 0x88, - 0x2f, 0x0e, 0xc9, 0x79, 0xfc, 0x3a, 0x3a, 0xac, 0x63, 0x2a, 0x7c, 0x2d, 0xbb, 0xf6, 0xd9, 0x47, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xc0, 0xac, 0x4b, 0x34, 0x19, 0x02, 0x00, 0x00, -} - -func (m *GenesisState) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EpochTrackerList) > 0 { - for iNdEx := len(m.EpochTrackerList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EpochTrackerList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - } - if len(m.HostZoneList) > 0 { - for iNdEx := len(m.HostZoneList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.HostZoneList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.HostZoneList) > 0 { - for _, e := range m.HostZoneList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.EpochTrackerList) > 0 { - for _, e := range m.EpochTrackerList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneList = append(m.HostZoneList, HostZone{}) - if err := m.HostZoneList[len(m.HostZoneList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochTrackerList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EpochTrackerList = append(m.EpochTrackerList, EpochTracker{}) - if err := m.EpochTrackerList[len(m.EpochTrackerList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenesis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/hooks.go b/x/stakeibc/types/hooks.go deleted file mode 100644 index 6ea6e7c63..000000000 --- a/x/stakeibc/types/hooks.go +++ /dev/null @@ -1,18 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// combine multiple staking hooks, all hook functions are run in array sequence -type MultiStakeIBCHooks []StakeIBCHooks - -func NewMultiStakeIBCHooks(hooks ...StakeIBCHooks) MultiStakeIBCHooks { - return hooks -} - -func (h MultiStakeIBCHooks) AfterLiquidStake(ctx sdk.Context, addr sdk.AccAddress) { - for i := range h { - h[i].AfterLiquidStake(ctx, addr) - } -} diff --git a/x/stakeibc/types/host_zone.go b/x/stakeibc/types/host_zone.go deleted file mode 100644 index b21d743d5..000000000 --- a/x/stakeibc/types/host_zone.go +++ /dev/null @@ -1,66 +0,0 @@ -package types - -import ( - "strings" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/address" -) - -const ( - MaxUnbondingEntries = 7 -) - -// Per an SDK constraint, we can issue no more than 7 undelegation messages -// in a given unbonding period -// -// The unbonding period dictates the cadence (in number of days) with which we submit -// undelegation messages, such that the 7 messages are spaced out throughout the period -// -// We calculate this by dividing the period by 7 and then adding 1 as a buffer -// Ex: If our unbonding period is 21 days, we issue an undelegation every 4th day -func (h HostZone) GetUnbondingFrequency() uint64 { - return (h.UnbondingPeriod / MaxUnbondingEntries) + 1 -} - -// Gets the rebate struct if it exists on the host zone -func (h HostZone) SafelyGetCommunityPoolRebate() (rebate CommunityPoolRebate, exists bool) { - if h.CommunityPoolRebate == nil { - return CommunityPoolRebate{}, false - } - if h.CommunityPoolRebate.LiquidStakedStTokenAmount.IsNil() || h.CommunityPoolRebate.RebateRate.IsNil() { - return CommunityPoolRebate{}, false - } - return *h.CommunityPoolRebate, true -} - -// Generates a new stride-side address on the host zone to escrow deposits -func NewHostZoneDepositAddress(chainId string) sdk.AccAddress { - key := append([]byte("zone"), []byte(chainId)...) - return address.Module(ModuleName, key) -} - -// Generates a new stride-side module account for a host zone, given an alias -func NewHostZoneModuleAddress(chainId string, accountAlias string) sdk.AccAddress { - key := append([]byte(chainId), []byte(accountAlias)...) - return address.Module(ModuleName, key) -} - -// TODO [cleanup]: Remove this function and use the one from utils -// isIBCToken checks if the token came from the IBC module -// Each IBC token starts with an ibc/ denom, the check is rather simple -func IsIBCToken(denom string) bool { - return strings.HasPrefix(denom, "ibc/") -} - -// TODO [cleanup]: Remove this function and use the one from utils -// Returns the stDenom from a native denom by appending a st prefix -func StAssetDenomFromHostZoneDenom(hostZoneDenom string) string { - return "milk" + hostZoneDenom -} - -// TODO [cleanup]: Remove this function and use the one from utils -// Returns the native denom from an stDenom by removing the st prefix -func HostZoneDenomFromStAssetDenom(stAssetDenom string) string { - return stAssetDenom[2:] -} diff --git a/x/stakeibc/types/host_zone.pb.go b/x/stakeibc/types/host_zone.pb.go deleted file mode 100644 index baf3903e0..000000000 --- a/x/stakeibc/types/host_zone.pb.go +++ /dev/null @@ -1,2039 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/host_zone.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// CommunityPoolRebate stores the size of the community pool liquid stake -// (denominated in stTokens) and the rebate rate as a decimal -type CommunityPoolRebate struct { - // Rebate percentage as a decimal (e.g. 0.2 for 20%) - RebateRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,1,opt,name=rebate_rate,json=rebateRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"rebate_rate"` - // Number of stTokens received from the community pool liquid stake - LiquidStakedStTokenAmount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=liquid_staked_st_token_amount,json=liquidStakedStTokenAmount,proto3,customtype=cosmossdk.io/math.Int" json:"liquid_staked_st_token_amount"` -} - -func (m *CommunityPoolRebate) Reset() { *m = CommunityPoolRebate{} } -func (m *CommunityPoolRebate) String() string { return proto.CompactTextString(m) } -func (*CommunityPoolRebate) ProtoMessage() {} -func (*CommunityPoolRebate) Descriptor() ([]byte, []int) { - return fileDescriptor_f81bf5b42c61245a, []int{0} -} -func (m *CommunityPoolRebate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommunityPoolRebate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommunityPoolRebate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CommunityPoolRebate) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommunityPoolRebate.Merge(m, src) -} -func (m *CommunityPoolRebate) XXX_Size() int { - return m.Size() -} -func (m *CommunityPoolRebate) XXX_DiscardUnknown() { - xxx_messageInfo_CommunityPoolRebate.DiscardUnknown(m) -} - -var xxx_messageInfo_CommunityPoolRebate proto.InternalMessageInfo - -// Core data structure to track liquid staking zones -type HostZone struct { - // Chain ID of the host zone - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Bech32 prefix of host zone's address - Bech32Prefix string `protobuf:"bytes,17,opt,name=bech32prefix,proto3" json:"bech32prefix,omitempty"` - // ConnectionID from Stride to the host zone (ID is on the stride side) - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - // Transfer Channel ID from Stride to the host zone (ID is on the stride side) - TransferChannelId string `protobuf:"bytes,12,opt,name=transfer_channel_id,json=transferChannelId,proto3" json:"transfer_channel_id,omitempty"` - // ibc denom of the host zone's native token on stride - IbcDenom string `protobuf:"bytes,8,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty"` - // native denom on host zone - HostDenom string `protobuf:"bytes,9,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` - // The unbonding period in days (e.g. 21) - UnbondingPeriod uint64 `protobuf:"varint,26,opt,name=unbonding_period,json=unbondingPeriod,proto3" json:"unbonding_period,omitempty"` - // List of validators that are delegated to - Validators []*Validator `protobuf:"bytes,3,rep,name=validators,proto3" json:"validators,omitempty"` - // Address that custodies native tokens during a liquid stake - DepositAddress string `protobuf:"bytes,18,opt,name=deposit_address,json=depositAddress,proto3" json:"deposit_address,omitempty"` - // ICA Address on the host zone responsible for collecting rewards - WithdrawalIcaAddress string `protobuf:"bytes,22,opt,name=withdrawal_ica_address,json=withdrawalIcaAddress,proto3" json:"withdrawal_ica_address,omitempty"` - // ICA Address on the host zone responsible for commission - FeeIcaAddress string `protobuf:"bytes,23,opt,name=fee_ica_address,json=feeIcaAddress,proto3" json:"fee_ica_address,omitempty"` - // ICA Address on the host zone responsible for staking and unstaking - DelegationIcaAddress string `protobuf:"bytes,24,opt,name=delegation_ica_address,json=delegationIcaAddress,proto3" json:"delegation_ica_address,omitempty"` - // ICA Address that receives unstaked tokens after they've finished unbonding - RedemptionIcaAddress string `protobuf:"bytes,25,opt,name=redemption_ica_address,json=redemptionIcaAddress,proto3" json:"redemption_ica_address,omitempty"` - // ICA Address that receives tokens from a community pool to liquid stake or - // redeem In the case of a liquid stake, the community pool deposits native - // tokens In the case of a redemption, the community pool deposits stTokens - CommunityPoolDepositIcaAddress string `protobuf:"bytes,30,opt,name=community_pool_deposit_ica_address,json=communityPoolDepositIcaAddress,proto3" json:"community_pool_deposit_ica_address,omitempty"` - // ICA Address that distributes tokens back to the community pool during a - // community pool liquid stake or redeem In the case of a liquid stake, the - // return address sends back stTokens In the case of a redemption, the return - // address sends back native tokens - CommunityPoolReturnIcaAddress string `protobuf:"bytes,31,opt,name=community_pool_return_ica_address,json=communityPoolReturnIcaAddress,proto3" json:"community_pool_return_ica_address,omitempty"` - // Module account on Stride that receives native tokens from the deposit ICA - // and liquid stakes them - CommunityPoolStakeHoldingAddress string `protobuf:"bytes,32,opt,name=community_pool_stake_holding_address,json=communityPoolStakeHoldingAddress,proto3" json:"community_pool_stake_holding_address,omitempty"` - // Module account on Stride that receives stTokens from the deposit ICA and - // redeems them - CommunityPoolRedeemHoldingAddress string `protobuf:"bytes,33,opt,name=community_pool_redeem_holding_address,json=communityPoolRedeemHoldingAddress,proto3" json:"community_pool_redeem_holding_address,omitempty"` - // Optional community pool address to send tokens to after a community pool - // liquid stake or redemption If this address is empty, the tokens are sent to - // the main community pool - CommunityPoolTreasuryAddress string `protobuf:"bytes,35,opt,name=community_pool_treasury_address,json=communityPoolTreasuryAddress,proto3" json:"community_pool_treasury_address,omitempty"` - // The total delegated balance on the host zone - TotalDelegations cosmossdk_io_math.Int `protobuf:"bytes,13,opt,name=total_delegations,json=totalDelegations,proto3,customtype=cosmossdk.io/math.Int" json:"total_delegations"` - // The redemption rate from the previous epoch - LastRedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=last_redemption_rate,json=lastRedemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"last_redemption_rate"` - // The current redemption rate - RedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,11,opt,name=redemption_rate,json=redemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"redemption_rate"` - // The min outer redemption rate bound - controlled only be governance - // The min inner bound cannot exceed this bound - MinRedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,20,opt,name=min_redemption_rate,json=minRedemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_redemption_rate"` - // The max outer redemption rate bound - controlled only be governance - // The max inner bound cannot exceed this bound - MaxRedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,21,opt,name=max_redemption_rate,json=maxRedemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_redemption_rate"` - // The min minner redemption rate bound - controlled by the admin - // If the redemption rate exceeds this bound, the host zone is halted - MinInnerRedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,28,opt,name=min_inner_redemption_rate,json=minInnerRedemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_inner_redemption_rate"` - // The max minner redemption rate bound - controlled by the admin - // If the redemption rate exceeds this bound, the host zone is halted - MaxInnerRedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,29,opt,name=max_inner_redemption_rate,json=maxInnerRedemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_inner_redemption_rate"` - // The max number of messages that can be sent in a delegation - // or undelegation ICA tx - MaxMessagesPerIcaTx uint64 `protobuf:"varint,36,opt,name=max_messages_per_ica_tx,json=maxMessagesPerIcaTx,proto3" json:"max_messages_per_ica_tx,omitempty"` - // An optional fee rebate - // If there is no rebate for the host zone, this will be nil - CommunityPoolRebate *CommunityPoolRebate `protobuf:"bytes,34,opt,name=community_pool_rebate,json=communityPoolRebate,proto3" json:"community_pool_rebate,omitempty"` - // A boolean indicating whether the chain has LSM enabled - LsmLiquidStakeEnabled bool `protobuf:"varint,27,opt,name=lsm_liquid_stake_enabled,json=lsmLiquidStakeEnabled,proto3" json:"lsm_liquid_stake_enabled,omitempty"` - // A boolean indicating whether the chain is currently halted - Halted bool `protobuf:"varint,19,opt,name=halted,proto3" json:"halted,omitempty"` -} - -func (m *HostZone) Reset() { *m = HostZone{} } -func (m *HostZone) String() string { return proto.CompactTextString(m) } -func (*HostZone) ProtoMessage() {} -func (*HostZone) Descriptor() ([]byte, []int) { - return fileDescriptor_f81bf5b42c61245a, []int{1} -} -func (m *HostZone) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HostZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HostZone.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HostZone) XXX_Merge(src proto.Message) { - xxx_messageInfo_HostZone.Merge(m, src) -} -func (m *HostZone) XXX_Size() int { - return m.Size() -} -func (m *HostZone) XXX_DiscardUnknown() { - xxx_messageInfo_HostZone.DiscardUnknown(m) -} - -var xxx_messageInfo_HostZone proto.InternalMessageInfo - -func (m *HostZone) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *HostZone) GetBech32Prefix() string { - if m != nil { - return m.Bech32Prefix - } - return "" -} - -func (m *HostZone) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -func (m *HostZone) GetTransferChannelId() string { - if m != nil { - return m.TransferChannelId - } - return "" -} - -func (m *HostZone) GetIbcDenom() string { - if m != nil { - return m.IbcDenom - } - return "" -} - -func (m *HostZone) GetHostDenom() string { - if m != nil { - return m.HostDenom - } - return "" -} - -func (m *HostZone) GetUnbondingPeriod() uint64 { - if m != nil { - return m.UnbondingPeriod - } - return 0 -} - -func (m *HostZone) GetValidators() []*Validator { - if m != nil { - return m.Validators - } - return nil -} - -func (m *HostZone) GetDepositAddress() string { - if m != nil { - return m.DepositAddress - } - return "" -} - -func (m *HostZone) GetWithdrawalIcaAddress() string { - if m != nil { - return m.WithdrawalIcaAddress - } - return "" -} - -func (m *HostZone) GetFeeIcaAddress() string { - if m != nil { - return m.FeeIcaAddress - } - return "" -} - -func (m *HostZone) GetDelegationIcaAddress() string { - if m != nil { - return m.DelegationIcaAddress - } - return "" -} - -func (m *HostZone) GetRedemptionIcaAddress() string { - if m != nil { - return m.RedemptionIcaAddress - } - return "" -} - -func (m *HostZone) GetCommunityPoolDepositIcaAddress() string { - if m != nil { - return m.CommunityPoolDepositIcaAddress - } - return "" -} - -func (m *HostZone) GetCommunityPoolReturnIcaAddress() string { - if m != nil { - return m.CommunityPoolReturnIcaAddress - } - return "" -} - -func (m *HostZone) GetCommunityPoolStakeHoldingAddress() string { - if m != nil { - return m.CommunityPoolStakeHoldingAddress - } - return "" -} - -func (m *HostZone) GetCommunityPoolRedeemHoldingAddress() string { - if m != nil { - return m.CommunityPoolRedeemHoldingAddress - } - return "" -} - -func (m *HostZone) GetCommunityPoolTreasuryAddress() string { - if m != nil { - return m.CommunityPoolTreasuryAddress - } - return "" -} - -func (m *HostZone) GetMaxMessagesPerIcaTx() uint64 { - if m != nil { - return m.MaxMessagesPerIcaTx - } - return 0 -} - -func (m *HostZone) GetCommunityPoolRebate() *CommunityPoolRebate { - if m != nil { - return m.CommunityPoolRebate - } - return nil -} - -func (m *HostZone) GetLsmLiquidStakeEnabled() bool { - if m != nil { - return m.LsmLiquidStakeEnabled - } - return false -} - -func (m *HostZone) GetHalted() bool { - if m != nil { - return m.Halted - } - return false -} - -func init() { - proto.RegisterType((*CommunityPoolRebate)(nil), "stride.stakeibc.CommunityPoolRebate") - proto.RegisterType((*HostZone)(nil), "stride.stakeibc.HostZone") -} - -func init() { proto.RegisterFile("stride/stakeibc/host_zone.proto", fileDescriptor_f81bf5b42c61245a) } - -var fileDescriptor_f81bf5b42c61245a = []byte{ - // 989 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xdd, 0x6e, 0xdb, 0x36, - 0x1b, 0x80, 0xe3, 0xd6, 0x4d, 0x14, 0xa6, 0x89, 0x15, 0xe5, 0xa7, 0x4a, 0xd2, 0x38, 0x8e, 0x93, - 0x0f, 0xf0, 0x77, 0x10, 0x1b, 0x4b, 0x07, 0x0c, 0xd8, 0xd1, 0xd2, 0x7a, 0x40, 0x6d, 0x64, 0x45, - 0xa0, 0x04, 0xc3, 0x90, 0x13, 0x82, 0x22, 0x19, 0x8b, 0x8b, 0x44, 0x7a, 0x24, 0xbd, 0xd8, 0xbb, - 0x8a, 0x5d, 0x4c, 0x0f, 0x77, 0x01, 0x3d, 0x2c, 0x7a, 0x34, 0xec, 0xa0, 0x18, 0x92, 0x2b, 0xd8, - 0x1d, 0x0c, 0xa2, 0x2c, 0x5b, 0xb6, 0x32, 0xb8, 0xf0, 0x91, 0x45, 0xbe, 0xef, 0xfb, 0x3c, 0xa2, - 0xf9, 0x23, 0x82, 0x03, 0xa5, 0x25, 0x23, 0xb4, 0xa1, 0x34, 0xba, 0xa5, 0xcc, 0xc7, 0x8d, 0x40, - 0x28, 0x0d, 0x7f, 0x13, 0x9c, 0xd6, 0xbb, 0x52, 0x68, 0xe1, 0x94, 0x92, 0x84, 0x7a, 0x9a, 0xb0, - 0x9b, 0xab, 0xf8, 0x15, 0x85, 0x8c, 0x20, 0x2d, 0x64, 0x52, 0xb1, 0xbb, 0xd9, 0x11, 0x1d, 0x61, - 0x1e, 0x1b, 0xf1, 0xd3, 0xb0, 0x77, 0x07, 0x0b, 0x15, 0x09, 0x05, 0x93, 0x40, 0xd2, 0x48, 0x42, - 0xd5, 0x3f, 0x0a, 0x60, 0xe3, 0x8d, 0x88, 0xa2, 0x1e, 0x67, 0x7a, 0x70, 0x21, 0x44, 0xe8, 0x51, - 0x1f, 0x69, 0xea, 0x34, 0xc1, 0x8a, 0x34, 0x4f, 0x50, 0x22, 0x4d, 0xdd, 0x42, 0xa5, 0x50, 0x5b, - 0x7e, 0x7d, 0xf4, 0xe1, 0xf3, 0xc1, 0xc2, 0x5f, 0x9f, 0x0f, 0xf6, 0x12, 0x84, 0x22, 0xb7, 0x75, - 0x26, 0x1a, 0x11, 0xd2, 0x41, 0xfd, 0x9c, 0x76, 0x10, 0x1e, 0x34, 0x29, 0xf6, 0x40, 0x52, 0xe7, - 0xc5, 0x14, 0x08, 0xf6, 0x43, 0xf6, 0x4b, 0x8f, 0x11, 0x68, 0xde, 0x38, 0xfe, 0x81, 0x5a, 0xdc, - 0x52, 0x0e, 0x51, 0x24, 0x7a, 0x5c, 0xbb, 0x4f, 0x0c, 0x77, 0x7f, 0xc8, 0xdd, 0xca, 0x73, 0x5b, - 0x5c, 0x7b, 0x3b, 0x09, 0xe3, 0xd2, 0x20, 0x2e, 0xf5, 0x55, 0x0c, 0x38, 0x33, 0xf5, 0xd5, 0x7f, - 0x6c, 0x60, 0xbd, 0x15, 0x4a, 0x5f, 0x0b, 0x4e, 0x9d, 0x1d, 0x60, 0xe1, 0x00, 0x31, 0x0e, 0x19, - 0x49, 0x5e, 0xd8, 0x5b, 0x32, 0xed, 0x16, 0x71, 0xaa, 0xe0, 0xb9, 0x4f, 0x71, 0xf0, 0xea, 0xb4, - 0x2b, 0xe9, 0x0d, 0xeb, 0xbb, 0xeb, 0x26, 0x3c, 0xd1, 0xe7, 0x1c, 0x81, 0x55, 0x2c, 0x38, 0xa7, - 0x58, 0x33, 0x61, 0x18, 0x4f, 0x92, 0xa4, 0x71, 0x67, 0x8b, 0x38, 0x75, 0xb0, 0xa1, 0x25, 0xe2, - 0xea, 0x86, 0x4a, 0x88, 0x03, 0xc4, 0x39, 0x0d, 0xe3, 0xd4, 0xe7, 0x26, 0x75, 0x3d, 0x0d, 0xbd, - 0x49, 0x22, 0x2d, 0xe2, 0xec, 0x81, 0x65, 0xe6, 0x63, 0x48, 0x28, 0x17, 0x91, 0x6b, 0x99, 0x2c, - 0x8b, 0xf9, 0xb8, 0x19, 0xb7, 0x9d, 0x7d, 0x00, 0xcc, 0x94, 0x27, 0xd1, 0x65, 0x13, 0x5d, 0x8e, - 0x7b, 0x92, 0xf0, 0xff, 0x81, 0xdd, 0xe3, 0xbe, 0xe0, 0x84, 0xf1, 0x0e, 0xec, 0x52, 0xc9, 0x04, - 0x71, 0x77, 0x2b, 0x85, 0x5a, 0xd1, 0x2b, 0x8d, 0xfa, 0x2f, 0x4c, 0xb7, 0xf3, 0x2d, 0x00, 0xa3, - 0xa5, 0xa0, 0xdc, 0xa7, 0x95, 0xa7, 0xb5, 0x95, 0xd3, 0xdd, 0xfa, 0xd4, 0xf2, 0xa9, 0xff, 0x98, - 0xa6, 0x78, 0x99, 0x6c, 0xe7, 0x0c, 0x94, 0x08, 0xed, 0x0a, 0xc5, 0x34, 0x44, 0x84, 0x48, 0xaa, - 0x94, 0xeb, 0x98, 0x69, 0x71, 0x3f, 0xbd, 0x3f, 0xd9, 0x1c, 0xae, 0x96, 0xb3, 0x24, 0x72, 0xa9, - 0x25, 0xe3, 0x1d, 0x6f, 0x6d, 0x58, 0x30, 0xec, 0x75, 0xde, 0x81, 0xed, 0x3b, 0xa6, 0x03, 0x22, - 0xd1, 0x1d, 0x0a, 0x21, 0xc3, 0x68, 0x44, 0xda, 0x9e, 0x41, 0xda, 0x1c, 0xd7, 0xb5, 0x30, 0x4a, - 0x79, 0xdf, 0x81, 0xd2, 0x0d, 0xa5, 0x13, 0xa0, 0x17, 0x33, 0x40, 0xab, 0x37, 0x94, 0x66, 0x08, - 0xef, 0xc0, 0x36, 0xa1, 0x21, 0xed, 0xa0, 0x64, 0x32, 0x33, 0x20, 0x77, 0xd6, 0x1b, 0x8d, 0xeb, - 0x26, 0x79, 0x92, 0x12, 0x1a, 0x75, 0x73, 0xbc, 0x9d, 0x59, 0xbc, 0x71, 0x5d, 0x86, 0x47, 0x40, - 0x15, 0xa7, 0xdb, 0x0e, 0x76, 0x85, 0x08, 0x61, 0x3a, 0x07, 0x59, 0x76, 0x79, 0x06, 0xbb, 0x8c, - 0xb3, 0x5b, 0xb7, 0x99, 0x10, 0x32, 0x16, 0x1f, 0x1c, 0x4e, 0x59, 0x24, 0xd5, 0x3d, 0x39, 0x39, - 0x80, 0x83, 0x19, 0x92, 0x7d, 0x3c, 0x79, 0x3e, 0xc4, 0x80, 0x8c, 0x23, 0x00, 0xc7, 0x53, 0x0e, - 0xb3, 0xde, 0x60, 0x20, 0x42, 0xb3, 0x70, 0x53, 0x4d, 0x65, 0x86, 0xa6, 0x32, 0xa1, 0x31, 0x9b, - 0xfd, 0x6d, 0x82, 0x48, 0x4d, 0x3f, 0x83, 0xff, 0xe5, 0x46, 0x43, 0x28, 0x8d, 0x72, 0xaa, 0xc3, - 0x19, 0xaa, 0xc3, 0xa9, 0x11, 0xc5, 0x90, 0x29, 0x17, 0x04, 0x07, 0x53, 0x2e, 0x2d, 0x29, 0x52, - 0x3d, 0x39, 0x18, 0x59, 0x8e, 0x66, 0x58, 0x5e, 0x4e, 0x58, 0xae, 0x86, 0xe5, 0xa9, 0xa0, 0x0d, - 0xd6, 0xb5, 0xd0, 0x28, 0x9e, 0xf7, 0x74, 0xb9, 0x29, 0x77, 0xf5, 0x4b, 0x8e, 0x43, 0xdb, 0xd4, - 0x35, 0xc7, 0x65, 0x0e, 0x06, 0x9b, 0x21, 0x52, 0x1a, 0x66, 0x56, 0xa8, 0x39, 0xb5, 0x81, 0xc1, - 0x7d, 0xf5, 0x05, 0xa7, 0xf6, 0xa7, 0xf7, 0x27, 0x60, 0x38, 0x88, 0xf8, 0x0c, 0x77, 0x62, 0x9c, - 0x37, 0xa2, 0x99, 0xb3, 0xfc, 0x1a, 0x94, 0xa6, 0xf9, 0x2b, 0xf3, 0xf2, 0xd7, 0xe4, 0x24, 0x1b, - 0x81, 0x8d, 0x88, 0xf1, 0xdc, 0xfb, 0x6f, 0xce, 0xcb, 0x5f, 0x8f, 0x18, 0xf7, 0xf2, 0x0a, 0xd4, - 0xcf, 0x29, 0xb6, 0xe6, 0x57, 0xa0, 0xfe, 0x94, 0x22, 0x04, 0x3b, 0xf1, 0x28, 0x18, 0xe7, 0x54, - 0xe6, 0x44, 0x2f, 0xe7, 0x15, 0x6d, 0x47, 0x8c, 0xb7, 0x62, 0xe4, 0x23, 0x36, 0xd4, 0xff, 0x0f, - 0xdb, 0xfe, 0xfc, 0x36, 0xd4, 0x7f, 0xcc, 0xf6, 0x35, 0x78, 0x11, 0xdb, 0x22, 0xaa, 0x14, 0xea, - 0x50, 0x15, 0x7f, 0x8e, 0xcc, 0x21, 0xa2, 0xfb, 0xee, 0xb1, 0xf9, 0x24, 0xc5, 0xff, 0xee, 0x0f, - 0xc3, 0xe8, 0x05, 0x95, 0x2d, 0x8c, 0xae, 0xfa, 0xce, 0x4f, 0x60, 0x2b, 0xb7, 0x63, 0xe3, 0xcb, - 0x81, 0x5b, 0xad, 0x14, 0x6a, 0x2b, 0xa7, 0xc7, 0xb9, 0x2f, 0xd4, 0x23, 0x57, 0x11, 0x6f, 0x03, - 0x3f, 0x72, 0x3f, 0xf9, 0x06, 0xb8, 0xa1, 0x8a, 0x60, 0xf6, 0x76, 0x01, 0x29, 0x47, 0x7e, 0x48, - 0x89, 0xbb, 0x57, 0x29, 0xd4, 0x2c, 0x6f, 0x2b, 0x54, 0xd1, 0xf9, 0xf8, 0xe2, 0xf0, 0x7d, 0x12, - 0x74, 0xb6, 0xc1, 0x62, 0x80, 0x42, 0x4d, 0x89, 0xbb, 0x61, 0xd2, 0x86, 0xad, 0x76, 0xd1, 0x2a, - 0xda, 0xcf, 0xda, 0x45, 0xeb, 0x99, 0xbd, 0xd8, 0x2e, 0x5a, 0x8b, 0xf6, 0x52, 0xbb, 0x68, 0x2d, - 0xd9, 0x56, 0xbb, 0x68, 0xad, 0xd9, 0xa5, 0x76, 0xd1, 0x2a, 0xd9, 0x76, 0xbb, 0x68, 0xd9, 0xf6, - 0xfa, 0xeb, 0xf3, 0x0f, 0xf7, 0xe5, 0xc2, 0xc7, 0xfb, 0x72, 0xe1, 0xef, 0xfb, 0x72, 0xe1, 0xf7, - 0x87, 0xf2, 0xc2, 0xc7, 0x87, 0xf2, 0xc2, 0x9f, 0x0f, 0xe5, 0x85, 0xeb, 0xd3, 0x0e, 0xd3, 0x41, - 0xcf, 0xaf, 0x63, 0x11, 0x35, 0x22, 0x16, 0xde, 0x0e, 0xee, 0xd0, 0xe0, 0x24, 0x44, 0xbe, 0x1a, - 0xb5, 0x1a, 0xfd, 0xf1, 0xdd, 0x4d, 0x0f, 0xba, 0x54, 0xf9, 0x8b, 0xe6, 0x1e, 0xf6, 0xea, 0xdf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xda, 0x6f, 0xc6, 0xbf, 0x0d, 0x0a, 0x00, 0x00, -} - -func (m *CommunityPoolRebate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CommunityPoolRebate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommunityPoolRebate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.LiquidStakedStTokenAmount.Size() - i -= size - if _, err := m.LiquidStakedStTokenAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.RebateRate.Size() - i -= size - if _, err := m.RebateRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *HostZone) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HostZone) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostZone) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MaxMessagesPerIcaTx != 0 { - i = encodeVarintHostZone(dAtA, i, uint64(m.MaxMessagesPerIcaTx)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xa0 - } - if len(m.CommunityPoolTreasuryAddress) > 0 { - i -= len(m.CommunityPoolTreasuryAddress) - copy(dAtA[i:], m.CommunityPoolTreasuryAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.CommunityPoolTreasuryAddress))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x9a - } - if m.CommunityPoolRebate != nil { - { - size, err := m.CommunityPoolRebate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - if len(m.CommunityPoolRedeemHoldingAddress) > 0 { - i -= len(m.CommunityPoolRedeemHoldingAddress) - copy(dAtA[i:], m.CommunityPoolRedeemHoldingAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.CommunityPoolRedeemHoldingAddress))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x8a - } - if len(m.CommunityPoolStakeHoldingAddress) > 0 { - i -= len(m.CommunityPoolStakeHoldingAddress) - copy(dAtA[i:], m.CommunityPoolStakeHoldingAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.CommunityPoolStakeHoldingAddress))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - if len(m.CommunityPoolReturnIcaAddress) > 0 { - i -= len(m.CommunityPoolReturnIcaAddress) - copy(dAtA[i:], m.CommunityPoolReturnIcaAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.CommunityPoolReturnIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - if len(m.CommunityPoolDepositIcaAddress) > 0 { - i -= len(m.CommunityPoolDepositIcaAddress) - copy(dAtA[i:], m.CommunityPoolDepositIcaAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.CommunityPoolDepositIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - { - size := m.MaxInnerRedemptionRate.Size() - i -= size - if _, err := m.MaxInnerRedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea - { - size := m.MinInnerRedemptionRate.Size() - i -= size - if _, err := m.MinInnerRedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - if m.LsmLiquidStakeEnabled { - i-- - if m.LsmLiquidStakeEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 - } - if m.UnbondingPeriod != 0 { - i = encodeVarintHostZone(dAtA, i, uint64(m.UnbondingPeriod)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd0 - } - if len(m.RedemptionIcaAddress) > 0 { - i -= len(m.RedemptionIcaAddress) - copy(dAtA[i:], m.RedemptionIcaAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.RedemptionIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca - } - if len(m.DelegationIcaAddress) > 0 { - i -= len(m.DelegationIcaAddress) - copy(dAtA[i:], m.DelegationIcaAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.DelegationIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - if len(m.FeeIcaAddress) > 0 { - i -= len(m.FeeIcaAddress) - copy(dAtA[i:], m.FeeIcaAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.FeeIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - if len(m.WithdrawalIcaAddress) > 0 { - i -= len(m.WithdrawalIcaAddress) - copy(dAtA[i:], m.WithdrawalIcaAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.WithdrawalIcaAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - { - size := m.MaxRedemptionRate.Size() - i -= size - if _, err := m.MaxRedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - { - size := m.MinRedemptionRate.Size() - i -= size - if _, err := m.MinRedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - if m.Halted { - i-- - if m.Halted { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if len(m.DepositAddress) > 0 { - i -= len(m.DepositAddress) - copy(dAtA[i:], m.DepositAddress) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.DepositAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if len(m.Bech32Prefix) > 0 { - i -= len(m.Bech32Prefix) - copy(dAtA[i:], m.Bech32Prefix) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.Bech32Prefix))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - { - size := m.TotalDelegations.Size() - i -= size - if _, err := m.TotalDelegations.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - if len(m.TransferChannelId) > 0 { - i -= len(m.TransferChannelId) - copy(dAtA[i:], m.TransferChannelId) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.TransferChannelId))) - i-- - dAtA[i] = 0x62 - } - { - size := m.RedemptionRate.Size() - i -= size - if _, err := m.RedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - { - size := m.LastRedemptionRate.Size() - i -= size - if _, err := m.LastRedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - if len(m.HostDenom) > 0 { - i -= len(m.HostDenom) - copy(dAtA[i:], m.HostDenom) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.HostDenom))) - i-- - dAtA[i] = 0x4a - } - if len(m.IbcDenom) > 0 { - i -= len(m.IbcDenom) - copy(dAtA[i:], m.IbcDenom) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.IbcDenom))) - i-- - dAtA[i] = 0x42 - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintHostZone(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.ConnectionId) > 0 { - i -= len(m.ConnectionId) - copy(dAtA[i:], m.ConnectionId) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.ConnectionId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintHostZone(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintHostZone(dAtA []byte, offset int, v uint64) int { - offset -= sovHostZone(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CommunityPoolRebate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.RebateRate.Size() - n += 1 + l + sovHostZone(uint64(l)) - l = m.LiquidStakedStTokenAmount.Size() - n += 1 + l + sovHostZone(uint64(l)) - return n -} - -func (m *HostZone) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovHostZone(uint64(l)) - } - l = len(m.ConnectionId) - if l > 0 { - n += 1 + l + sovHostZone(uint64(l)) - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovHostZone(uint64(l)) - } - } - l = len(m.IbcDenom) - if l > 0 { - n += 1 + l + sovHostZone(uint64(l)) - } - l = len(m.HostDenom) - if l > 0 { - n += 1 + l + sovHostZone(uint64(l)) - } - l = m.LastRedemptionRate.Size() - n += 1 + l + sovHostZone(uint64(l)) - l = m.RedemptionRate.Size() - n += 1 + l + sovHostZone(uint64(l)) - l = len(m.TransferChannelId) - if l > 0 { - n += 1 + l + sovHostZone(uint64(l)) - } - l = m.TotalDelegations.Size() - n += 1 + l + sovHostZone(uint64(l)) - l = len(m.Bech32Prefix) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - l = len(m.DepositAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - if m.Halted { - n += 3 - } - l = m.MinRedemptionRate.Size() - n += 2 + l + sovHostZone(uint64(l)) - l = m.MaxRedemptionRate.Size() - n += 2 + l + sovHostZone(uint64(l)) - l = len(m.WithdrawalIcaAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - l = len(m.FeeIcaAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - l = len(m.DelegationIcaAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - l = len(m.RedemptionIcaAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - if m.UnbondingPeriod != 0 { - n += 2 + sovHostZone(uint64(m.UnbondingPeriod)) - } - if m.LsmLiquidStakeEnabled { - n += 3 - } - l = m.MinInnerRedemptionRate.Size() - n += 2 + l + sovHostZone(uint64(l)) - l = m.MaxInnerRedemptionRate.Size() - n += 2 + l + sovHostZone(uint64(l)) - l = len(m.CommunityPoolDepositIcaAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - l = len(m.CommunityPoolReturnIcaAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - l = len(m.CommunityPoolStakeHoldingAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - l = len(m.CommunityPoolRedeemHoldingAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - if m.CommunityPoolRebate != nil { - l = m.CommunityPoolRebate.Size() - n += 2 + l + sovHostZone(uint64(l)) - } - l = len(m.CommunityPoolTreasuryAddress) - if l > 0 { - n += 2 + l + sovHostZone(uint64(l)) - } - if m.MaxMessagesPerIcaTx != 0 { - n += 2 + sovHostZone(uint64(m.MaxMessagesPerIcaTx)) - } - return n -} - -func sovHostZone(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozHostZone(x uint64) (n int) { - return sovHostZone(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CommunityPoolRebate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommunityPoolRebate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommunityPoolRebate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RebateRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RebateRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LiquidStakedStTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LiquidStakedStTokenAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipHostZone(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHostZone - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostZone) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostZone: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostZone: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, &Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastRedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalDelegations", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TotalDelegations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DepositAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Halted", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Halted = bool(v != 0) - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinRedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxRedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 22: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WithdrawalIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WithdrawalIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeeIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegationIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegationIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 25: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedemptionIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RedemptionIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 26: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingPeriod", wireType) - } - m.UnbondingPeriod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingPeriod |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 27: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LsmLiquidStakeEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LsmLiquidStakeEnabled = bool(v != 0) - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinInnerRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinInnerRedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 29: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxInnerRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxInnerRedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolDepositIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommunityPoolDepositIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolReturnIcaAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommunityPoolReturnIcaAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 32: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolStakeHoldingAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommunityPoolStakeHoldingAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 33: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolRedeemHoldingAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommunityPoolRedeemHoldingAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolRebate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CommunityPoolRebate == nil { - m.CommunityPoolRebate = &CommunityPoolRebate{} - } - if err := m.CommunityPoolRebate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolTreasuryAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthHostZone - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthHostZone - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommunityPoolTreasuryAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 36: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxMessagesPerIcaTx", wireType) - } - m.MaxMessagesPerIcaTx = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowHostZone - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxMessagesPerIcaTx |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipHostZone(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthHostZone - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipHostZone(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHostZone - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHostZone - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowHostZone - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthHostZone - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupHostZone - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthHostZone - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthHostZone = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHostZone = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupHostZone = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/ica_account.go b/x/stakeibc/types/ica_account.go deleted file mode 100644 index f3d7e5753..000000000 --- a/x/stakeibc/types/ica_account.go +++ /dev/null @@ -1,21 +0,0 @@ -package types - -import fmt "fmt" - -// Helper function to build the host zone ICA owner in the form "{chainId}.{ICA_TYPE}" -func FormatHostZoneICAOwner(chainId string, accountType ICAAccountType) (result string) { - return chainId + "." + accountType.String() -} - -// Helper function to build the ICA owner for a trade route ICA -// in the form "{chainId}.{rewardDenom}-{hostDenom}.{ICA_TYPE}" -func FormatTradeRouteICAOwner(chainId, rewardDenom, hostDenom string, icaAccountType ICAAccountType) string { - tradeRouteId := GetTradeRouteId(rewardDenom, hostDenom) - return FormatTradeRouteICAOwnerFromRouteId(chainId, tradeRouteId, icaAccountType) -} - -// Helper function to build the ICA owner for a trade route ICA -// in the form "{chainId}.{tradeRouteId}.{ICA_TYPE}" -func FormatTradeRouteICAOwnerFromRouteId(chainId, tradeRouteId string, icaAccountType ICAAccountType) string { - return fmt.Sprintf("%s.%s.%s", chainId, tradeRouteId, icaAccountType.String()) -} diff --git a/x/stakeibc/types/ica_account.pb.go b/x/stakeibc/types/ica_account.pb.go deleted file mode 100644 index 10d755251..000000000 --- a/x/stakeibc/types/ica_account.pb.go +++ /dev/null @@ -1,508 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/ica_account.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ICAAccountType int32 - -const ( - ICAAccountType_DELEGATION ICAAccountType = 0 - ICAAccountType_FEE ICAAccountType = 1 - ICAAccountType_WITHDRAWAL ICAAccountType = 2 - ICAAccountType_REDEMPTION ICAAccountType = 3 - ICAAccountType_COMMUNITY_POOL_DEPOSIT ICAAccountType = 4 - ICAAccountType_COMMUNITY_POOL_RETURN ICAAccountType = 5 - ICAAccountType_CONVERTER_UNWIND ICAAccountType = 6 - ICAAccountType_CONVERTER_TRADE ICAAccountType = 7 -) - -var ICAAccountType_name = map[int32]string{ - 0: "DELEGATION", - 1: "FEE", - 2: "WITHDRAWAL", - 3: "REDEMPTION", - 4: "COMMUNITY_POOL_DEPOSIT", - 5: "COMMUNITY_POOL_RETURN", - 6: "CONVERTER_UNWIND", - 7: "CONVERTER_TRADE", -} - -var ICAAccountType_value = map[string]int32{ - "DELEGATION": 0, - "FEE": 1, - "WITHDRAWAL": 2, - "REDEMPTION": 3, - "COMMUNITY_POOL_DEPOSIT": 4, - "COMMUNITY_POOL_RETURN": 5, - "CONVERTER_UNWIND": 6, - "CONVERTER_TRADE": 7, -} - -func (x ICAAccountType) String() string { - return proto.EnumName(ICAAccountType_name, int32(x)) -} - -func (ICAAccountType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2976ae6e7f6ce824, []int{0} -} - -type ICAAccount struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Type ICAAccountType `protobuf:"varint,2,opt,name=type,proto3,enum=stride.stakeibc.ICAAccountType" json:"type,omitempty"` - ConnectionId string `protobuf:"bytes,3,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *ICAAccount) Reset() { *m = ICAAccount{} } -func (m *ICAAccount) String() string { return proto.CompactTextString(m) } -func (*ICAAccount) ProtoMessage() {} -func (*ICAAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_2976ae6e7f6ce824, []int{0} -} -func (m *ICAAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ICAAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ICAAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ICAAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_ICAAccount.Merge(m, src) -} -func (m *ICAAccount) XXX_Size() int { - return m.Size() -} -func (m *ICAAccount) XXX_DiscardUnknown() { - xxx_messageInfo_ICAAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_ICAAccount proto.InternalMessageInfo - -func (m *ICAAccount) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *ICAAccount) GetType() ICAAccountType { - if m != nil { - return m.Type - } - return ICAAccountType_DELEGATION -} - -func (m *ICAAccount) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -func (m *ICAAccount) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func init() { - proto.RegisterEnum("stride.stakeibc.ICAAccountType", ICAAccountType_name, ICAAccountType_value) - proto.RegisterType((*ICAAccount)(nil), "stride.stakeibc.ICAAccount") -} - -func init() { proto.RegisterFile("stride/stakeibc/ica_account.proto", fileDescriptor_2976ae6e7f6ce824) } - -var fileDescriptor_2976ae6e7f6ce824 = []byte{ - // 366 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xcf, 0x6e, 0xda, 0x30, - 0x18, 0xc0, 0x63, 0x60, 0x64, 0xb3, 0x36, 0xb0, 0xbc, 0x3f, 0x0a, 0x3b, 0x64, 0x6c, 0xbb, 0xa0, - 0x49, 0x4b, 0x24, 0x78, 0x82, 0x8c, 0x78, 0x9b, 0xa5, 0x90, 0x20, 0xcf, 0x0c, 0x6d, 0x97, 0x28, - 0x71, 0xa2, 0x62, 0x01, 0x09, 0x22, 0x41, 0x6d, 0xde, 0xa2, 0xf7, 0x3e, 0x42, 0x5f, 0xa4, 0x47, - 0x8e, 0x3d, 0x56, 0xf0, 0x22, 0x15, 0xa1, 0x6d, 0x54, 0x8e, 0xbf, 0xef, 0xfb, 0xe9, 0x67, 0xc9, - 0x1f, 0xfc, 0x9c, 0xe5, 0x6b, 0x19, 0xc5, 0x66, 0x96, 0x07, 0xf3, 0x58, 0x86, 0xc2, 0x94, 0x22, - 0xf0, 0x03, 0x21, 0xd2, 0x4d, 0x92, 0x1b, 0xab, 0x75, 0x9a, 0xa7, 0xb8, 0x7d, 0x54, 0x8c, 0x47, - 0xe5, 0xcb, 0x15, 0x80, 0x90, 0x0e, 0x2d, 0xeb, 0x68, 0xe1, 0x0e, 0x7c, 0x29, 0x66, 0x81, 0x4c, - 0x7c, 0x19, 0x69, 0xa0, 0x0b, 0x7a, 0xaf, 0x98, 0x5a, 0x32, 0x8d, 0xf0, 0x00, 0x36, 0xf2, 0x62, - 0x15, 0x6b, 0xb5, 0x2e, 0xe8, 0xb5, 0xfa, 0x9f, 0x8c, 0x93, 0x92, 0x51, 0x55, 0x78, 0xb1, 0x8a, - 0x59, 0x29, 0xe3, 0xaf, 0xf0, 0x8d, 0x48, 0x93, 0x24, 0x16, 0xb9, 0x4c, 0xcb, 0x68, 0xbd, 0x8c, - 0xbe, 0xae, 0x86, 0x34, 0xc2, 0x1a, 0x54, 0x83, 0x28, 0x5a, 0xc7, 0x59, 0xa6, 0x35, 0x8e, 0x6f, - 0x3e, 0xe0, 0xb7, 0x6b, 0x00, 0x5b, 0xcf, 0xbb, 0xb8, 0x05, 0xa1, 0x4d, 0x1c, 0xf2, 0xcb, 0xe2, - 0xd4, 0x73, 0x91, 0x82, 0x55, 0x58, 0xff, 0x49, 0x08, 0x02, 0x87, 0xc5, 0x94, 0xf2, 0xdf, 0x36, - 0xb3, 0xa6, 0x96, 0x83, 0x6a, 0x07, 0x66, 0xc4, 0x26, 0xa3, 0x71, 0x29, 0xd6, 0xf1, 0x47, 0xf8, - 0x61, 0xe8, 0x8d, 0x46, 0x13, 0x97, 0xf2, 0x7f, 0xfe, 0xd8, 0xf3, 0x1c, 0xdf, 0x26, 0x63, 0xef, - 0x0f, 0xe5, 0xa8, 0x81, 0x3b, 0xf0, 0xfd, 0xc9, 0x8e, 0x11, 0x3e, 0x61, 0x2e, 0x7a, 0x81, 0xdf, - 0x41, 0x34, 0xf4, 0xdc, 0xbf, 0x84, 0x71, 0xc2, 0xfc, 0x89, 0x3b, 0xa5, 0xae, 0x8d, 0x9a, 0xf8, - 0x2d, 0x6c, 0x57, 0x53, 0xce, 0x2c, 0x9b, 0x20, 0xf5, 0x87, 0x73, 0xb3, 0xd3, 0xc1, 0x76, 0xa7, - 0x83, 0xbb, 0x9d, 0x0e, 0x2e, 0xf7, 0xba, 0xb2, 0xdd, 0xeb, 0xca, 0xed, 0x5e, 0x57, 0xfe, 0xf7, - 0xcf, 0x64, 0x3e, 0xdb, 0x84, 0x86, 0x48, 0x97, 0xe6, 0x52, 0x2e, 0xe6, 0xc5, 0x79, 0x50, 0x7c, - 0x5f, 0x04, 0x61, 0xf6, 0x44, 0xe6, 0x45, 0x75, 0xb6, 0xc3, 0xcf, 0x65, 0x61, 0xb3, 0xbc, 0xd8, - 0xe0, 0x3e, 0x00, 0x00, 0xff, 0xff, 0x53, 0xbb, 0xc0, 0x8f, 0xd6, 0x01, 0x00, 0x00, -} - -func (m *ICAAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ICAAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ICAAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintIcaAccount(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x22 - } - if len(m.ConnectionId) > 0 { - i -= len(m.ConnectionId) - copy(dAtA[i:], m.ConnectionId) - i = encodeVarintIcaAccount(dAtA, i, uint64(len(m.ConnectionId))) - i-- - dAtA[i] = 0x1a - } - if m.Type != 0 { - i = encodeVarintIcaAccount(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x10 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintIcaAccount(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintIcaAccount(dAtA []byte, offset int, v uint64) int { - offset -= sovIcaAccount(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ICAAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovIcaAccount(uint64(l)) - } - if m.Type != 0 { - n += 1 + sovIcaAccount(uint64(m.Type)) - } - l = len(m.ConnectionId) - if l > 0 { - n += 1 + l + sovIcaAccount(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovIcaAccount(uint64(l)) - } - return n -} - -func sovIcaAccount(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozIcaAccount(x uint64) (n int) { - return sovIcaAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ICAAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIcaAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ICAAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ICAAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIcaAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIcaAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIcaAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIcaAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= ICAAccountType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIcaAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIcaAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIcaAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIcaAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthIcaAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIcaAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIcaAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIcaAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIcaAccount(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIcaAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIcaAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIcaAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthIcaAccount - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupIcaAccount - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthIcaAccount - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthIcaAccount = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIcaAccount = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupIcaAccount = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/interchainqueries.go b/x/stakeibc/types/interchainqueries.go deleted file mode 100644 index 70766710f..000000000 --- a/x/stakeibc/types/interchainqueries.go +++ /dev/null @@ -1,46 +0,0 @@ -package types - -// Copied from github.com/initia-labs/initia/x/move/types/connector.go - -import ( - "bytes" - - "cosmossdk.io/math" - - "github.com/milkyway-labs/milkyway/x/stakeibc/move" -) - -func MoveBankBalanceKey(addr []byte, denom string) ([]byte, error) { - userAddr, err := move.NewAccountAddressFromBytes(addr[:]) - if err != nil { - return nil, err - } - metadata, err := move.MetadataAddressFromDenom(denom) - if err != nil { - return nil, err - } - storeAddr := move.UserDerivedObjectAddress(userAddr, metadata) - keyBz, err := move.GetResourceKey(storeAddr, move.StructTag{ - Address: move.StdAddress, - Module: move.MoveModuleNameFungibleAsset, - Name: move.ResourceNameFungibleStore, - TypeArgs: []move.TypeTag{}, - }) - if err != nil { - return nil, err - } - return bytes.Join([][]byte{move.VMStorePrefix, keyBz}, nil), nil -} - -func UnmarshalAmountFromMoveBankBalanceQuery(bz []byte) (math.Int, error) { - // skipping reading metadata object - cursor := len(move.AccountAddress{}) - - // read balance - amount, err := move.DeserializeUint64(bz[cursor : cursor+8]) - if err != nil { - return math.ZeroInt(), err - } - - return math.NewIntFromUint64(amount), nil -} diff --git a/x/stakeibc/types/keys.go b/x/stakeibc/types/keys.go deleted file mode 100644 index 645cb3d8a..000000000 --- a/x/stakeibc/types/keys.go +++ /dev/null @@ -1,70 +0,0 @@ -package types - -import ( - "cosmossdk.io/collections" -) - -const ( - // ModuleName defines the module name - ModuleName = "stakeibc" - - // StoreKey defines the primary module store key - StoreKey = ModuleName - - // RouterKey is the message route for slashing - RouterKey = ModuleName - - // QuerierRoute defines the module's query routing key - QuerierRoute = ModuleName - - // MemStoreKey defines the in-memory store key - MemStoreKey = "mem_stakeibc" - - // Version defines the current version the IBC module supports - Version = "stakeibc-1" - - // PortID is the default port id that module binds to - PortID = "stakeibc" - - // fee account - F1 - FeeAccount = "stride1czvrk3jkvtj8m27kqsqu2yrkhw3h3ykwj3rxh6" - - RewardCollectorName = "reward_collector" -) - -// PortKey defines the key to store the port ID in store -var PortKey = KeyPrefix("stakeibc-port-") - -var ParamsKey = collections.NewPrefix(1) - -// Generates a key byte prefix from a string -func KeyPrefix(p string) []byte { - return []byte(p) -} - -// EpochTrackerKey returns the store key to retrieve a EpochTracker from the index fields -func EpochTrackerKey(epochIdentifier string) []byte { - var key []byte - - epochIdentifierBytes := []byte(epochIdentifier) - key = append(key, epochIdentifierBytes...) - key = append(key, []byte("/")...) - - return key -} - -// Definition for the store key format based on tradeRoute start and end denoms -func TradeRouteKeyFromDenoms(rewardDenom, hostDenom string) (key []byte) { - return []byte(rewardDenom + "-" + hostDenom) -} - -const ( - // Host zone keys prefix the HostZone structs - HostZoneKey = "HostZone-value-" - - // EpochTrackerKeyPrefix is the prefix to retrieve all EpochTracker - EpochTrackerKeyPrefix = "EpochTracker/value/" - - // TradeRoute keys prefix to retrieve all TradeZones - TradeRouteKeyPrefix = "TradeRoute-value-" -) diff --git a/x/stakeibc/types/lsm_msgs.go b/x/stakeibc/types/lsm_msgs.go deleted file mode 100644 index 92757e918..000000000 --- a/x/stakeibc/types/lsm_msgs.go +++ /dev/null @@ -1,64 +0,0 @@ -// #nosec G101 -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -// staking message types -const ( - TypeMsgRedeemTokensForShares = "redeem_tokens_for_shares" // #nosec G101 -) - -var ( - _ sdk.Msg = &MsgRedeemTokensForShares{} -) - -// NewMsgRedeemTokensForShares creates a new MsgRedeemTokensForShares instance. -// -//nolint:interfacer -func NewMsgRedeemTokensForShares(delAddr sdk.AccAddress, amount sdk.Coin) *MsgRedeemTokensForShares { - return &MsgRedeemTokensForShares{ - DelegatorAddress: delAddr.String(), - Amount: amount, - } -} - -// Route implements the sdk.Msg interface. -func (msg MsgRedeemTokensForShares) Route() string { return RouterKey } - -// Type implements the sdk.Msg interface. -func (msg MsgRedeemTokensForShares) Type() string { return TypeMsgRedeemTokensForShares } - -// GetSigners implements the sdk.Msg interface. -func (msg MsgRedeemTokensForShares) GetSigners() []sdk.AccAddress { - delegator, err := sdk.AccAddressFromBech32(msg.DelegatorAddress) - if err != nil { - panic(err) - } - return []sdk.AccAddress{delegator} -} - -// GetSignBytes implements the sdk.Msg interface. -func (msg MsgRedeemTokensForShares) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(&msg) - return sdk.MustSortJSON(bz) -} - -// ValidateBasic implements the sdk.Msg interface. -func (msg MsgRedeemTokensForShares) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.DelegatorAddress); err != nil { - return sdkerrors.ErrInvalidAddress.Wrapf("invalid delegator address: %s", err) - } - - if !msg.Amount.IsValid() || !msg.Amount.Amount.IsPositive() { - return errorsmod.Wrap( - sdkerrors.ErrInvalidRequest, - "invalid shares amount", - ) - } - - return nil -} diff --git a/x/stakeibc/types/lsm_tx.pb.go b/x/stakeibc/types/lsm_tx.pb.go deleted file mode 100644 index 418819bb6..000000000 --- a/x/stakeibc/types/lsm_tx.pb.go +++ /dev/null @@ -1,709 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/staking/v1beta1/lsm_tx.proto - -package types - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgRedeemTokensForShares redeems a tokenized share back into a native -// delegation -type MsgRedeemTokensForShares struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` - Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` -} - -func (m *MsgRedeemTokensForShares) Reset() { *m = MsgRedeemTokensForShares{} } -func (m *MsgRedeemTokensForShares) String() string { return proto.CompactTextString(m) } -func (*MsgRedeemTokensForShares) ProtoMessage() {} -func (*MsgRedeemTokensForShares) Descriptor() ([]byte, []int) { - return fileDescriptor_34c3b474a863e424, []int{0} -} -func (m *MsgRedeemTokensForShares) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRedeemTokensForShares) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRedeemTokensForShares.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRedeemTokensForShares) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRedeemTokensForShares.Merge(m, src) -} -func (m *MsgRedeemTokensForShares) XXX_Size() int { - return m.Size() -} -func (m *MsgRedeemTokensForShares) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRedeemTokensForShares.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRedeemTokensForShares proto.InternalMessageInfo - -// MsgRedeemTokensForSharesResponse defines the Msg/MsgRedeemTokensForShares -// response type. -type MsgRedeemTokensForSharesResponse struct { - Amount types.Coin `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount"` -} - -func (m *MsgRedeemTokensForSharesResponse) Reset() { *m = MsgRedeemTokensForSharesResponse{} } -func (m *MsgRedeemTokensForSharesResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRedeemTokensForSharesResponse) ProtoMessage() {} -func (*MsgRedeemTokensForSharesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_34c3b474a863e424, []int{1} -} -func (m *MsgRedeemTokensForSharesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRedeemTokensForSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRedeemTokensForSharesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRedeemTokensForSharesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRedeemTokensForSharesResponse.Merge(m, src) -} -func (m *MsgRedeemTokensForSharesResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRedeemTokensForSharesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRedeemTokensForSharesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRedeemTokensForSharesResponse proto.InternalMessageInfo - -func (m *MsgRedeemTokensForSharesResponse) GetAmount() types.Coin { - if m != nil { - return m.Amount - } - return types.Coin{} -} - -// MsgDisableTokenizeShares prevents LSM tokenization of shares for address -type MsgDisableTokenizeShares struct { - DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty" yaml:"delegator_address"` -} - -func (m *MsgDisableTokenizeShares) Reset() { *m = MsgDisableTokenizeShares{} } -func (m *MsgDisableTokenizeShares) String() string { return proto.CompactTextString(m) } -func (*MsgDisableTokenizeShares) ProtoMessage() {} -func (*MsgDisableTokenizeShares) Descriptor() ([]byte, []int) { - return fileDescriptor_34c3b474a863e424, []int{2} -} -func (m *MsgDisableTokenizeShares) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDisableTokenizeShares) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDisableTokenizeShares.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgDisableTokenizeShares) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDisableTokenizeShares.Merge(m, src) -} -func (m *MsgDisableTokenizeShares) XXX_Size() int { - return m.Size() -} -func (m *MsgDisableTokenizeShares) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDisableTokenizeShares.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDisableTokenizeShares proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgRedeemTokensForShares)(nil), "cosmos.staking.v1beta1.MsgRedeemTokensForShares") - proto.RegisterType((*MsgRedeemTokensForSharesResponse)(nil), "cosmos.staking.v1beta1.MsgRedeemTokensForSharesResponse") - proto.RegisterType((*MsgDisableTokenizeShares)(nil), "cosmos.staking.v1beta1.MsgDisableTokenizeShares") -} - -func init() { - proto.RegisterFile("cosmos/staking/v1beta1/lsm_tx.proto", fileDescriptor_34c3b474a863e424) -} - -var fileDescriptor_34c3b474a863e424 = []byte{ - // 349 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xce, 0x2f, 0xce, - 0xcd, 0x2f, 0xd6, 0x2f, 0x2e, 0x49, 0xcc, 0xce, 0xcc, 0x4b, 0xd7, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, - 0x49, 0x34, 0xd4, 0xcf, 0x29, 0xce, 0x8d, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, - 0x12, 0x83, 0x28, 0xd2, 0x83, 0x2a, 0xd2, 0x83, 0x2a, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, - 0x2b, 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0xa5, 0xe4, 0xa0, 0x46, 0x26, 0x25, 0x16, 0xa7, 0xc2, 0xcd, - 0x4b, 0xce, 0xcf, 0xcc, 0x83, 0xc8, 0x2b, 0xad, 0x60, 0xe4, 0x92, 0xf0, 0x2d, 0x4e, 0x0f, 0x4a, - 0x4d, 0x49, 0x4d, 0xcd, 0x0d, 0xc9, 0xcf, 0x4e, 0xcd, 0x2b, 0x76, 0xcb, 0x2f, 0x0a, 0xce, 0x48, - 0x2c, 0x4a, 0x2d, 0x16, 0xf2, 0xe4, 0x12, 0x4c, 0x49, 0xcd, 0x49, 0x4d, 0x4f, 0x2c, 0xc9, 0x2f, - 0x8a, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x92, - 0xf9, 0x74, 0x4f, 0x5e, 0xa2, 0x32, 0x31, 0x37, 0xc7, 0x4a, 0x09, 0x43, 0x89, 0x52, 0x90, 0x00, - 0x5c, 0xcc, 0x11, 0x22, 0x24, 0x64, 0xce, 0xc5, 0x96, 0x98, 0x9b, 0x5f, 0x9a, 0x57, 0x22, 0xc1, - 0xa4, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa9, 0x07, 0xf5, 0x06, 0xc8, 0x61, 0x30, 0x3f, 0xe8, 0x39, - 0xe7, 0x67, 0xe6, 0x39, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0x55, 0x6e, 0xc5, 0xd1, 0xb1, - 0x40, 0x9e, 0xe1, 0xc5, 0x02, 0x79, 0x06, 0xa5, 0x68, 0x2e, 0x05, 0x5c, 0x2e, 0x0d, 0x4a, 0x2d, - 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x45, 0xb2, 0x86, 0x91, 0x24, 0x6b, 0x94, 0xf2, 0xc1, 0xc1, 0xe0, - 0x92, 0x59, 0x9c, 0x98, 0x94, 0x93, 0x0a, 0x36, 0x3d, 0xb3, 0x2a, 0x95, 0xea, 0xc1, 0x80, 0xf0, - 0x8d, 0x93, 0xcf, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, - 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa5, 0x67, - 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x07, 0x97, 0x14, 0x65, 0xa6, 0xa4, 0xea, - 0xfa, 0x24, 0x26, 0x81, 0x52, 0x05, 0x88, 0xad, 0x5f, 0x66, 0x64, 0xa4, 0x5f, 0x01, 0x4e, 0x22, - 0xa9, 0x99, 0x49, 0xc9, 0xfa, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, 0xd8, 0x34, 0x06, - 0x04, 0x00, 0x00, 0xff, 0xff, 0x97, 0xdd, 0xa5, 0x0e, 0x42, 0x02, 0x00, 0x00, -} - -func (m *MsgRedeemTokensForShares) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRedeemTokensForShares) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRedeemTokensForShares) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLsmTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintLsmTx(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRedeemTokensForSharesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRedeemTokensForSharesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRedeemTokensForSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Amount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLsmTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *MsgDisableTokenizeShares) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgDisableTokenizeShares) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDisableTokenizeShares) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DelegatorAddress) > 0 { - i -= len(m.DelegatorAddress) - copy(dAtA[i:], m.DelegatorAddress) - i = encodeVarintLsmTx(dAtA, i, uint64(len(m.DelegatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintLsmTx(dAtA []byte, offset int, v uint64) int { - offset -= sovLsmTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgRedeemTokensForShares) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovLsmTx(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovLsmTx(uint64(l)) - return n -} - -func (m *MsgRedeemTokensForSharesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Amount.Size() - n += 1 + l + sovLsmTx(uint64(l)) - return n -} - -func (m *MsgDisableTokenizeShares) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DelegatorAddress) - if l > 0 { - n += 1 + l + sovLsmTx(uint64(l)) - } - return n -} - -func sovLsmTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozLsmTx(x uint64) (n int) { - return sovLsmTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgRedeemTokensForShares) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLsmTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRedeemTokensForShares: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRedeemTokensForShares: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLsmTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLsmTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLsmTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLsmTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLsmTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLsmTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLsmTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLsmTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRedeemTokensForSharesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLsmTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRedeemTokensForSharesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRedeemTokensForSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLsmTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLsmTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLsmTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLsmTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLsmTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDisableTokenizeShares) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLsmTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgDisableTokenizeShares: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDisableTokenizeShares: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLsmTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLsmTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLsmTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DelegatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLsmTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLsmTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipLsmTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLsmTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLsmTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLsmTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthLsmTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupLsmTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthLsmTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthLsmTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLsmTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupLsmTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/message_add_validators.go b/x/stakeibc/types/message_add_validators.go deleted file mode 100644 index ca7691ab5..000000000 --- a/x/stakeibc/types/message_add_validators.go +++ /dev/null @@ -1,64 +0,0 @@ -package types - -import ( - "strings" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgAddValidators = "add_validators" - -var _ sdk.Msg = &MsgAddValidators{} - -func NewMsgAddValidators(creator string, hostZone string, validators []*Validator) *MsgAddValidators { - return &MsgAddValidators{ - Creator: creator, - HostZone: hostZone, - Validators: validators, - } -} - -func (msg *MsgAddValidators) Route() string { - return RouterKey -} - -func (msg *MsgAddValidators) Type() string { - return TypeMsgAddValidators -} - -func (msg *MsgAddValidators) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgAddValidators) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgAddValidators) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - - if len(msg.Validators) == 0 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "at least one validator must be provided") - } - - for i, validator := range msg.Validators { - if len(strings.TrimSpace(validator.Name)) == 0 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "validator name is required (index %d)", i) - } - if len(strings.TrimSpace(validator.Address)) == 0 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "validator address is required (index %d)", i) - } - } - - return nil -} diff --git a/x/stakeibc/types/message_calibrate_delegation.go b/x/stakeibc/types/message_calibrate_delegation.go deleted file mode 100644 index 5f1ca4d65..000000000 --- a/x/stakeibc/types/message_calibrate_delegation.go +++ /dev/null @@ -1,61 +0,0 @@ -package types - -import ( - "strings" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgCalibrateDelegation = "calibrate_delegation" - -var _ sdk.Msg = &MsgCalibrateDelegation{} - -func NewMsgCalibrateDelegation(creator string, chainid string, valoper string) *MsgCalibrateDelegation { - return &MsgCalibrateDelegation{ - Creator: creator, - ChainId: chainid, - Valoper: valoper, - } -} - -func (msg *MsgCalibrateDelegation) Route() string { - return RouterKey -} - -func (msg *MsgCalibrateDelegation) Type() string { - return TypeMsgCalibrateDelegation -} - -func (msg *MsgCalibrateDelegation) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgCalibrateDelegation) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgCalibrateDelegation) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - - if len(msg.ChainId) == 0 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "chainid is required") - } - if len(msg.Valoper) == 0 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "valoper is required") - } - if !strings.Contains(msg.Valoper, "valoper") { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "validator operator address must contrain 'valoper'") - } - - return nil -} diff --git a/x/stakeibc/types/message_change_validator_weight.go b/x/stakeibc/types/message_change_validator_weight.go deleted file mode 100644 index 0e20bd261..000000000 --- a/x/stakeibc/types/message_change_validator_weight.go +++ /dev/null @@ -1,59 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgChangeValidatorWeights = "change_validator_weight" - -var _ sdk.Msg = &MsgChangeValidatorWeights{} - -func NewMsgChangeValidatorWeights(creator, hostZone string, weights []*ValidatorWeight) *MsgChangeValidatorWeights { - return &MsgChangeValidatorWeights{ - Creator: creator, - HostZone: hostZone, - ValidatorWeights: weights, - } -} - -func (msg *MsgChangeValidatorWeights) Route() string { - return RouterKey -} - -func (msg *MsgChangeValidatorWeights) Type() string { - return TypeMsgChangeValidatorWeights -} - -func (msg *MsgChangeValidatorWeights) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgChangeValidatorWeights) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgChangeValidatorWeights) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - if msg.HostZone == "" { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "host zone must be specified") - } - if len(msg.ValidatorWeights) < 1 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "at least one validator must be specified") - } - for _, weightUpdate := range msg.ValidatorWeights { - if weightUpdate.Address == "" { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "validator address must be specified") - } - } - return nil -} diff --git a/x/stakeibc/types/message_claim_undelegated_tokens.go b/x/stakeibc/types/message_claim_undelegated_tokens.go deleted file mode 100644 index 3195a2757..000000000 --- a/x/stakeibc/types/message_claim_undelegated_tokens.go +++ /dev/null @@ -1,56 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgClaimUndelegatedTokens = "claim_undelegated_tokens" - -var _ sdk.Msg = &MsgClaimUndelegatedTokens{} - -func NewMsgClaimUndelegatedTokens(creator string, hostZone string, epoch uint64, receiver string) *MsgClaimUndelegatedTokens { - return &MsgClaimUndelegatedTokens{ - Creator: creator, - HostZoneId: hostZone, - Epoch: epoch, - Receiver: receiver, - } -} - -func (msg *MsgClaimUndelegatedTokens) Route() string { - return RouterKey -} - -func (msg *MsgClaimUndelegatedTokens) Type() string { - return TypeMsgClaimUndelegatedTokens -} - -func (msg *MsgClaimUndelegatedTokens) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgClaimUndelegatedTokens) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgClaimUndelegatedTokens) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - // validate host denom is not empty - if msg.HostZoneId == "" { - return errorsmod.Wrapf(ErrRequiredFieldEmpty, "host zone id cannot be empty") - } - if !(msg.Epoch < (1<<63 - 1)) { - return errorsmod.Wrapf(ErrInvalidAmount, "epoch must be less than math.MaxInt64 %d", 1<<63-1) - } - return nil -} diff --git a/x/stakeibc/types/message_clear_balance.go b/x/stakeibc/types/message_clear_balance.go deleted file mode 100644 index dc4e97777..000000000 --- a/x/stakeibc/types/message_clear_balance.go +++ /dev/null @@ -1,63 +0,0 @@ -package types - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" -) - -const TypeMsgClearBalance = "clear_balance" - -var _ sdk.Msg = &MsgClearBalance{} - -func NewMsgClearBalance(creator string, chainId string, amount sdkmath.Int, channelId string) *MsgClearBalance { - return &MsgClearBalance{ - Creator: creator, - ChainId: chainId, - Amount: amount, - Channel: channelId, - } -} - -func (msg *MsgClearBalance) Route() string { - return RouterKey -} - -func (msg *MsgClearBalance) Type() string { - return TypeMsgClearBalance -} - -func (msg *MsgClearBalance) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgClearBalance) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgClearBalance) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - // basic checks on host denom - if len(msg.ChainId) == 0 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "chainid is required") - } - - if msg.Amount.LTE(sdkmath.ZeroInt()) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "amount must be greater than 0") - } - if isValid := channeltypes.IsValidChannelID(msg.Channel); !isValid { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "channel is invalid") - } - return nil -} diff --git a/x/stakeibc/types/message_create_trade_route.go b/x/stakeibc/types/message_create_trade_route.go deleted file mode 100644 index 5949f19d7..000000000 --- a/x/stakeibc/types/message_create_trade_route.go +++ /dev/null @@ -1,139 +0,0 @@ -package types - -import ( - "regexp" - "strings" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" -) - -const TypeMsgCreateTradeRoute = "create_trade_route" - -const ( - ConnectionIdRegex = `^connection-\d+$` - ChannelIdRegex = `^channel-\d+$` - IBCPrefix = "ibc/" -) - -var ( - _ sdk.Msg = &MsgCreateTradeRoute{} - _ legacytx.LegacyMsg = &MsgCreateTradeRoute{} -) - -func (msg *MsgCreateTradeRoute) Type() string { - return TypeMsgCreateTradeRoute -} - -func (msg *MsgCreateTradeRoute) Route() string { - return RouterKey -} - -func (msg *MsgCreateTradeRoute) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgCreateTradeRoute) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} - -func (msg *MsgCreateTradeRoute) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { - return errorsmod.Wrap(err, "invalid authority address") - } - - if msg.HostChainId == "" { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "host chain ID cannot be empty") - } - - if err := ValidateConnectionId(msg.StrideToRewardConnectionId); err != nil { - return errorsmod.Wrap(err, "invalid stride to reward connection ID") - } - if err := ValidateConnectionId(msg.StrideToTradeConnectionId); err != nil { - return errorsmod.Wrap(err, "invalid stride to trade connection ID") - } - - if err := ValidateChannelId(msg.HostToRewardTransferChannelId); err != nil { - return errorsmod.Wrap(err, "invalid host to reward channel ID") - } - if err := ValidateChannelId(msg.RewardToTradeTransferChannelId); err != nil { - return errorsmod.Wrap(err, "invalid reward to trade channel ID") - } - if err := ValidateChannelId(msg.TradeToHostTransferChannelId); err != nil { - return errorsmod.Wrap(err, "invalid trade to host channel ID") - } - - if err := ValidateDenom(msg.RewardDenomOnHost, true); err != nil { - return errorsmod.Wrap(err, "invalid reward denom on host") - } - if err := ValidateDenom(msg.RewardDenomOnReward, false); err != nil { - return errorsmod.Wrap(err, "invalid reward denom on reward") - } - if err := ValidateDenom(msg.RewardDenomOnTrade, true); err != nil { - return errorsmod.Wrap(err, "invalid reward denom on trade") - } - if err := ValidateDenom(msg.HostDenomOnTrade, true); err != nil { - return errorsmod.Wrap(err, "invalid host denom on trade") - } - if err := ValidateDenom(msg.HostDenomOnHost, false); err != nil { - return errorsmod.Wrap(err, "invalid host denom on host") - } - - if msg.PoolId < 1 { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid pool id") - } - if msg.MaxSwapAmount.GT(sdkmath.ZeroInt()) && msg.MinSwapAmount.GT(msg.MaxSwapAmount) { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "min swap amount cannot be greater than max swap amount") - } - - maxAllowedSwapLossRate, err := sdkmath.LegacyNewDecFromStr(msg.MaxAllowedSwapLossRate) - if err != nil { - return errorsmod.Wrapf(err, "unable to cast max allowed swap loss rate to a decimal") - } - if maxAllowedSwapLossRate.LT(sdkmath.LegacyZeroDec()) || maxAllowedSwapLossRate.GT(sdkmath.LegacyOneDec()) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "max allowed swap loss rate must be between 0 and 1") - } - - return nil -} - -// Helper function to validate a connection Id -func ValidateConnectionId(connectionId string) error { - matched, err := regexp.MatchString(ConnectionIdRegex, connectionId) - if err != nil { - return errorsmod.Wrapf(err, "unable to verify connnection-id (%s)", connectionId) - } - if !matched { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid connection-id (%s), must be of the format 'connection-{N}'", connectionId) - } - return nil -} - -// Helper function to validate a channel Id -func ValidateChannelId(channelId string) error { - matched, err := regexp.MatchString(ChannelIdRegex, channelId) - if err != nil { - return errorsmod.Wrapf(err, "unable to verify channel-id (%s)", channelId) - } - if !matched { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid channel-id (%s), must be of the format 'channel-{N}'", channelId) - } - return nil -} - -// Helper function to validate a denom -func ValidateDenom(denom string, ibc bool) error { - if denom == "" { - return errorsmod.Wrap(ErrInvalidDenom, "denom is empty") - } - if ibc && !strings.HasPrefix(denom, IBCPrefix) { - return errorsmod.Wrapf(ErrInvalidDenom, "denom (%s) should have ibc prefix", denom) - } - return nil -} diff --git a/x/stakeibc/types/message_delete_trade_route.go b/x/stakeibc/types/message_delete_trade_route.go deleted file mode 100644 index 1dda70b89..000000000 --- a/x/stakeibc/types/message_delete_trade_route.go +++ /dev/null @@ -1,49 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - - errorsmod "cosmossdk.io/errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgDeleteTradeRoute = "delete_trade_route" - -var ( - _ sdk.Msg = &MsgDeleteTradeRoute{} - _ legacytx.LegacyMsg = &MsgDeleteTradeRoute{} -) - -func (msg *MsgDeleteTradeRoute) Type() string { - return TypeMsgDeleteTradeRoute -} - -func (msg *MsgDeleteTradeRoute) Route() string { - return RouterKey -} - -func (msg *MsgDeleteTradeRoute) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgDeleteTradeRoute) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} - -func (msg *MsgDeleteTradeRoute) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { - return errorsmod.Wrap(err, "invalid authority address") - } - - if msg.HostDenom == "" { - return errorsmod.Wrapf(sdkerrors.ErrNotFound, "missing host denom") - } - if msg.RewardDenom == "" { - return errorsmod.Wrapf(sdkerrors.ErrNotFound, "missing reward denom") - } - - return nil -} diff --git a/x/stakeibc/types/message_delete_validator.go b/x/stakeibc/types/message_delete_validator.go deleted file mode 100644 index ec2d9c000..000000000 --- a/x/stakeibc/types/message_delete_validator.go +++ /dev/null @@ -1,48 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgDeleteValidator = "delete_validator" - -var _ sdk.Msg = &MsgDeleteValidator{} - -func NewMsgDeleteValidator(creator string, hostZone string, valAddr string) *MsgDeleteValidator { - return &MsgDeleteValidator{ - Creator: creator, - HostZone: hostZone, - ValAddr: valAddr, - } -} - -func (msg *MsgDeleteValidator) Route() string { - return RouterKey -} - -func (msg *MsgDeleteValidator) Type() string { - return TypeMsgDeleteValidator -} - -func (msg *MsgDeleteValidator) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgDeleteValidator) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgDeleteValidator) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - return nil -} diff --git a/x/stakeibc/types/message_liquid_stake.go b/x/stakeibc/types/message_liquid_stake.go deleted file mode 100644 index 09448ccc3..000000000 --- a/x/stakeibc/types/message_liquid_stake.go +++ /dev/null @@ -1,62 +0,0 @@ -package types - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgLiquidStake = "liquid_stake" - -var _ sdk.Msg = &MsgLiquidStake{} - -func NewMsgLiquidStake(creator string, amount sdkmath.Int, hostDenom string) *MsgLiquidStake { - return &MsgLiquidStake{ - Creator: creator, - Amount: amount, - HostDenom: hostDenom, - } -} - -func (msg *MsgLiquidStake) Route() string { - return RouterKey -} - -func (msg *MsgLiquidStake) Type() string { - return TypeMsgLiquidStake -} - -func (msg *MsgLiquidStake) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgLiquidStake) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgLiquidStake) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - // validate amount is positive nonzero - if msg.Amount.LTE(sdkmath.ZeroInt()) { - return errorsmod.Wrapf(ErrInvalidAmount, "amount liquid staked must be positive and nonzero") - } - // validate host denom is not empty - if msg.HostDenom == "" { - return errorsmod.Wrapf(ErrRequiredFieldEmpty, "host denom cannot be empty") - } - // host denom must be a valid asset denom - if err := sdk.ValidateDenom(msg.HostDenom); err != nil { - return err - } - return nil -} diff --git a/x/stakeibc/types/message_lsm_liquid_stake.go b/x/stakeibc/types/message_lsm_liquid_stake.go deleted file mode 100644 index 7a28aaa23..000000000 --- a/x/stakeibc/types/message_lsm_liquid_stake.go +++ /dev/null @@ -1,63 +0,0 @@ -package types - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgLSMLiquidStake = "lsm_liquid_stake" - -var _ sdk.Msg = &MsgLSMLiquidStake{} - -func NewMsgLSMLiquidStake(creator string, amount sdkmath.Int, lsmTokenIbcDenom string) *MsgLSMLiquidStake { - return &MsgLSMLiquidStake{ - Creator: creator, - Amount: amount, - LsmTokenIbcDenom: lsmTokenIbcDenom, - } -} - -func (msg *MsgLSMLiquidStake) Route() string { - return RouterKey -} - -func (msg *MsgLSMLiquidStake) Type() string { - return TypeMsgLSMLiquidStake -} - -func (msg *MsgLSMLiquidStake) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgLSMLiquidStake) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgLSMLiquidStake) ValidateBasic() error { - // check valid creator address - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - // ensure amount is a nonzero positive integer - if msg.Amount.LTE(sdkmath.ZeroInt()) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid amount (%v)", msg.Amount) - } - // validate host denom is not empty - if msg.LsmTokenIbcDenom == "" { - return errorsmod.Wrapf(ErrRequiredFieldEmpty, "LSM token denom cannot be empty") - } - // lsm token denom must be a valid asset denom matching regex - if err := sdk.ValidateDenom(msg.LsmTokenIbcDenom); err != nil { - return errorsmod.Wrapf(err, "invalid LSM token denom") - } - return nil -} diff --git a/x/stakeibc/types/message_rebalance_validators.go b/x/stakeibc/types/message_rebalance_validators.go deleted file mode 100644 index 03bc3ac6a..000000000 --- a/x/stakeibc/types/message_rebalance_validators.go +++ /dev/null @@ -1,58 +0,0 @@ -package types - -import ( - "fmt" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const ( - MinNumRebalanceValidators = 1 - MaxNumRebalanceValidators = 1 -) - -const TypeMsgRebalanceValidators = "rebalance_validators" - -var _ sdk.Msg = &MsgRebalanceValidators{} - -func NewMsgRebalanceValidators(creator string, hostZone string, numValidators uint64) *MsgRebalanceValidators { - return &MsgRebalanceValidators{ - Creator: creator, - HostZone: hostZone, - NumRebalance: numValidators, - } -} - -func (msg *MsgRebalanceValidators) Route() string { - return RouterKey -} - -func (msg *MsgRebalanceValidators) Type() string { - return TypeMsgRebalanceValidators -} - -func (msg *MsgRebalanceValidators) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgRebalanceValidators) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgRebalanceValidators) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - if (msg.NumRebalance < MinNumRebalanceValidators) || (msg.NumRebalance > MaxNumRebalanceValidators) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, fmt.Sprintf("invalid number of validators to rebalance (%d)", msg.NumRebalance)) - } - return nil -} diff --git a/x/stakeibc/types/message_redeem_stake.go b/x/stakeibc/types/message_redeem_stake.go deleted file mode 100644 index 89c714239..000000000 --- a/x/stakeibc/types/message_redeem_stake.go +++ /dev/null @@ -1,65 +0,0 @@ -package types - -import ( - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgRedeemStake = "redeem_stake" - -var _ sdk.Msg = &MsgRedeemStake{} - -func NewMsgRedeemStake(creator string, amount sdkmath.Int, hostZone string, receiver string) *MsgRedeemStake { - return &MsgRedeemStake{ - Creator: creator, - Amount: amount, - HostZone: hostZone, - Receiver: receiver, - } -} - -func (msg *MsgRedeemStake) Route() string { - return RouterKey -} - -func (msg *MsgRedeemStake) Type() string { - return TypeMsgRedeemStake -} - -func (msg *MsgRedeemStake) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgRedeemStake) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgRedeemStake) ValidateBasic() error { - // check valid creator address - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - // validate host zone is not empty - // we check validity in the RedeemState function - if msg.Receiver == "" { - return errorsmod.Wrapf(ErrRequiredFieldEmpty, "receiver cannot be empty") - } - // ensure amount is a nonzero positive integer - if msg.Amount.LTE(sdkmath.ZeroInt()) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "invalid amount (%v)", msg.Amount) - } - // validate host zone is not empty - if msg.HostZone == "" { - return errorsmod.Wrapf(ErrRequiredFieldEmpty, "host zone cannot be empty") - } - return nil -} diff --git a/x/stakeibc/types/message_register_host_zone.go b/x/stakeibc/types/message_register_host_zone.go deleted file mode 100644 index 45134e345..000000000 --- a/x/stakeibc/types/message_register_host_zone.go +++ /dev/null @@ -1,135 +0,0 @@ -package types - -import ( - "strings" - - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" -) - -const TypeMsgRegisterHostZone = "register_host_zone" - -var _ sdk.Msg = &MsgRegisterHostZone{} - -func NewMsgRegisterHostZone( - creator string, - connectionId string, - bech32prefix string, - hostDenom string, - ibcDenom string, - transferChannelId string, - unbondingPeriod uint64, - minRedemptionRate sdkmath.LegacyDec, - maxRedemptionRate sdkmath.LegacyDec, - lsmLiquidStakeEnabled bool, - communityPoolTreasuryAddress string, - maxMessagePerIcaTx uint64, -) *MsgRegisterHostZone { - return &MsgRegisterHostZone{ - Creator: creator, - ConnectionId: connectionId, - Bech32Prefix: bech32prefix, - HostDenom: hostDenom, - IbcDenom: ibcDenom, - TransferChannelId: transferChannelId, - UnbondingPeriod: unbondingPeriod, - MinRedemptionRate: minRedemptionRate, - MaxRedemptionRate: maxRedemptionRate, - LsmLiquidStakeEnabled: lsmLiquidStakeEnabled, - CommunityPoolTreasuryAddress: communityPoolTreasuryAddress, - MaxMessagesPerIcaTx: maxMessagePerIcaTx, - } -} - -func (msg *MsgRegisterHostZone) Route() string { - return RouterKey -} - -func (msg *MsgRegisterHostZone) Type() string { - return TypeMsgRegisterHostZone -} - -func (msg *MsgRegisterHostZone) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgRegisterHostZone) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgRegisterHostZone) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - // VALIDATE DENOMS - // host denom cannot be empty - if msg.HostDenom == "" { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "host denom cannot be empty") - } - // host denom must be a valid asset denom - if err := sdk.ValidateDenom(msg.HostDenom); err != nil { - return err - } - - // ibc denom cannot be empty and must begin with "ibc" - if msg.IbcDenom == "" { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "ibc denom cannot be empty") - } - if !strings.HasPrefix(msg.IbcDenom, "ibc") { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "ibc denom must begin with 'ibc'") - } - // ibc denom must be valid - err = ibctransfertypes.ValidateIBCDenom(msg.IbcDenom) - if err != nil { - return err - } - // bech32 prefix must be non-empty (we validate it fully in msg_server) - if strings.TrimSpace(msg.Bech32Prefix) == "" { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "bech32 prefix must be non-empty") - } - // connection id cannot be empty and must begin with "connection" - if msg.ConnectionId == "" { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "connection id cannot be empty") - } - if !strings.HasPrefix(msg.ConnectionId, "connection") { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "connection id must begin with 'connection'") - } - // transfer channel id cannot be empty - if msg.TransferChannelId == "" { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "transfer channel id cannot be empty") - } - // transfer channel id must begin with "channel" - if !strings.HasPrefix(msg.TransferChannelId, "channel") { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "transfer channel id must begin with 'channel'") - } - // unbonding frequency must be positive nonzero - if msg.UnbondingPeriod < 1 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "unbonding frequency must be greater than zero") - } - // min/max redemption rate check - if !msg.MinRedemptionRate.IsNil() && msg.MinRedemptionRate.IsNegative() { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "min redemption rate should not be negative") - } - if !msg.MaxRedemptionRate.IsNil() && msg.MaxRedemptionRate.IsNegative() { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "max redemption rate should not be negative") - } - if !msg.MinRedemptionRate.IsNil() && - !msg.MaxRedemptionRate.IsNil() && - !msg.MinRedemptionRate.IsZero() && - !msg.MaxRedemptionRate.IsZero() && - msg.MinRedemptionRate.GTE(msg.MaxRedemptionRate) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "min redemption rate should be lower than max redemption rate") - } - - return nil -} diff --git a/x/stakeibc/types/message_restore_interchain_account.go b/x/stakeibc/types/message_restore_interchain_account.go deleted file mode 100644 index b2ae7d123..000000000 --- a/x/stakeibc/types/message_restore_interchain_account.go +++ /dev/null @@ -1,63 +0,0 @@ -package types - -import ( - "strings" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgRestoreInterchainAccount = "restore_interchain_account" - -var _ sdk.Msg = &MsgRestoreInterchainAccount{} - -func NewMsgRestoreInterchainAccount(creator, chainId, connectionId, owner string) *MsgRestoreInterchainAccount { - return &MsgRestoreInterchainAccount{ - Creator: creator, - ChainId: chainId, - ConnectionId: connectionId, - AccountOwner: owner, - } -} - -func (msg *MsgRestoreInterchainAccount) Route() string { - return RouterKey -} - -func (msg *MsgRestoreInterchainAccount) Type() string { - return TypeMsgRestoreInterchainAccount -} - -func (msg *MsgRestoreInterchainAccount) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgRestoreInterchainAccount) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgRestoreInterchainAccount) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - if msg.ChainId == "" { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "chain ID must be specified") - } - if !strings.HasPrefix(msg.ConnectionId, "connection-") { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "connection ID must be specified") - } - if msg.AccountOwner == "" { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "ICA account owner must be specified") - } - if !strings.HasPrefix(msg.AccountOwner, msg.ChainId) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "ICA account owner does not match chain ID") - } - return nil -} diff --git a/x/stakeibc/types/message_resume_host_zone.go b/x/stakeibc/types/message_resume_host_zone.go deleted file mode 100644 index 565106ceb..000000000 --- a/x/stakeibc/types/message_resume_host_zone.go +++ /dev/null @@ -1,47 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgResumeHostZone = "resume_host_zone" - -var _ sdk.Msg = &MsgResumeHostZone{} - -func NewMsgResumeHostZone(creator string, chainId string) *MsgResumeHostZone { - return &MsgResumeHostZone{ - Creator: creator, - ChainId: chainId, - } -} - -func (msg *MsgResumeHostZone) Route() string { - return RouterKey -} - -func (msg *MsgResumeHostZone) Type() string { - return TypeMsgResumeHostZone -} - -func (msg *MsgResumeHostZone) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgResumeHostZone) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgResumeHostZone) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - return nil -} diff --git a/x/stakeibc/types/message_set_community_pool_rebate.go b/x/stakeibc/types/message_set_community_pool_rebate.go deleted file mode 100644 index 4d5ebfce4..000000000 --- a/x/stakeibc/types/message_set_community_pool_rebate.go +++ /dev/null @@ -1,68 +0,0 @@ -package types - -import ( - "errors" - - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgSetCommunityPoolRebate = "set_community_pool_rebate" - -var _ sdk.Msg = &MsgSetCommunityPoolRebate{} - -func NewMsgSetCommunityPoolRebate( - creator string, - chainId string, - rebateRate sdkmath.LegacyDec, - liquidStakedStTokenAmount sdkmath.Int, -) *MsgSetCommunityPoolRebate { - return &MsgSetCommunityPoolRebate{ - Creator: creator, - ChainId: chainId, - RebateRate: rebateRate, - LiquidStakedStTokenAmount: liquidStakedStTokenAmount, - } -} - -func (msg *MsgSetCommunityPoolRebate) Route() string { - return RouterKey -} - -func (msg *MsgSetCommunityPoolRebate) Type() string { - return TypeMsgSetCommunityPoolRebate -} - -func (msg *MsgSetCommunityPoolRebate) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgSetCommunityPoolRebate) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgSetCommunityPoolRebate) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - if msg.ChainId == "" { - return errors.New("chain ID must be specified") - } - if msg.RebateRate.IsNil() || msg.RebateRate.LT(sdkmath.LegacyZeroDec()) || msg.RebateRate.GT(sdkmath.LegacyOneDec()) { - return errors.New("invalid rebate rate, must be a decimal between 0 and 1 (inclusive)") - } - if msg.LiquidStakedStTokenAmount.IsNil() || msg.LiquidStakedStTokenAmount.LT(sdkmath.ZeroInt()) { - return errors.New("invalid liquid stake amount, must be greater than or equal to zero") - } - - return nil -} diff --git a/x/stakeibc/types/message_toggle_trade_controller.go b/x/stakeibc/types/message_toggle_trade_controller.go deleted file mode 100644 index 1047caa42..000000000 --- a/x/stakeibc/types/message_toggle_trade_controller.go +++ /dev/null @@ -1,62 +0,0 @@ -package types - -import ( - "errors" - - sdk "github.com/cosmos/cosmos-sdk/types" - - errorsmod "cosmossdk.io/errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgToggleTradeController = "toggle_trade_controller" - -var _ sdk.Msg = &MsgToggleTradeController{} - -func NewMsgToggleTradeController(creator, chainId string, permissionChange AuthzPermissionChange, address string) *MsgToggleTradeController { - return &MsgToggleTradeController{ - Creator: creator, - ChainId: chainId, - PermissionChange: permissionChange, - Address: address, - } -} - -func (msg *MsgToggleTradeController) Route() string { - return RouterKey -} - -func (msg *MsgToggleTradeController) Type() string { - return TypeMsgToggleTradeController -} - -func (msg *MsgToggleTradeController) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgToggleTradeController) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgToggleTradeController) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - if msg.ChainId == "" { - return errors.New("chain ID must be specified") - } - if msg.Address == "" { - return errors.New("trade controller address must be specified") - } - if _, ok := AuthzPermissionChange_name[int32(msg.PermissionChange)]; !ok { - return errors.New("invalid permission change enum value") - } - - return nil -} diff --git a/x/stakeibc/types/message_update_delegation.go b/x/stakeibc/types/message_update_delegation.go deleted file mode 100644 index 2060d0256..000000000 --- a/x/stakeibc/types/message_update_delegation.go +++ /dev/null @@ -1,63 +0,0 @@ -package types - -import ( - "strings" - - errorsmod "cosmossdk.io/errors" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgUpdateValidatorSharesExchRate = "update_validator_shares_exch_rate" - -var _ sdk.Msg = &MsgUpdateValidatorSharesExchRate{} - -func NewMsgUpdateValidatorSharesExchRate(creator string, chainid string, valoper string) *MsgUpdateValidatorSharesExchRate { - return &MsgUpdateValidatorSharesExchRate{ - Creator: creator, - ChainId: chainid, - Valoper: valoper, - } -} - -func (msg *MsgUpdateValidatorSharesExchRate) Route() string { - return RouterKey -} - -func (msg *MsgUpdateValidatorSharesExchRate) Type() string { - return TypeMsgUpdateValidatorSharesExchRate -} - -func (msg *MsgUpdateValidatorSharesExchRate) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgUpdateValidatorSharesExchRate) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgUpdateValidatorSharesExchRate) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - - // basic checks on host denom - if len(msg.ChainId) == 0 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "chainid is required") - } - // basic checks on host zone - if len(msg.Valoper) == 0 { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "valoper is required") - } - if !strings.Contains(msg.Valoper, "valoper") { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "validator operator address must contrain 'valoper'") - } - - return nil -} diff --git a/x/stakeibc/types/message_update_host_zone_params.go b/x/stakeibc/types/message_update_host_zone_params.go deleted file mode 100644 index fc47251e5..000000000 --- a/x/stakeibc/types/message_update_host_zone_params.go +++ /dev/null @@ -1,44 +0,0 @@ -package types - -import ( - "errors" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - - errorsmod "cosmossdk.io/errors" -) - -const TypeMsgUpdateHostZoneParams = "update_host_zone_params" - -var ( - _ sdk.Msg = &MsgUpdateHostZoneParams{} - _ legacytx.LegacyMsg = &MsgUpdateHostZoneParams{} -) - -func (msg *MsgUpdateHostZoneParams) Type() string { - return TypeMsgUpdateHostZoneParams -} - -func (msg *MsgUpdateHostZoneParams) Route() string { - return RouterKey -} - -func (msg *MsgUpdateHostZoneParams) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgUpdateHostZoneParams) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} -func (msg *MsgUpdateHostZoneParams) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { - return errorsmod.Wrap(err, "invalid authority address") - } - if msg.ChainId == "" { - return errors.New("chain ID must be specified") - } - return nil -} diff --git a/x/stakeibc/types/message_update_inner_redemption_rate_bounds.go b/x/stakeibc/types/message_update_inner_redemption_rate_bounds.go deleted file mode 100644 index 3ac121fe2..000000000 --- a/x/stakeibc/types/message_update_inner_redemption_rate_bounds.go +++ /dev/null @@ -1,54 +0,0 @@ -package types - -import ( - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgUpdateInnerRedemptionRateBounds = "update_inner_redemption_rate_bounds" - -var _ sdk.Msg = &MsgUpdateInnerRedemptionRateBounds{} - -func NewMsgUpdateInnerRedemptionRateBounds(creator string, chainId string, minInnerRedemptionRate sdkmath.LegacyDec, maxInnerRedemptionRate sdkmath.LegacyDec) *MsgUpdateInnerRedemptionRateBounds { - return &MsgUpdateInnerRedemptionRateBounds{ - Creator: creator, - ChainId: chainId, - MinInnerRedemptionRate: minInnerRedemptionRate, - MaxInnerRedemptionRate: maxInnerRedemptionRate, - } -} - -func (msg *MsgUpdateInnerRedemptionRateBounds) Route() string { - return RouterKey -} - -func (msg *MsgUpdateInnerRedemptionRateBounds) Type() string { - return TypeMsgUpdateInnerRedemptionRateBounds -} - -func (msg *MsgUpdateInnerRedemptionRateBounds) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgUpdateInnerRedemptionRateBounds) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgUpdateInnerRedemptionRateBounds) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - // Confirm the max is greater than the min - if msg.MaxInnerRedemptionRate.LTE(msg.MinInnerRedemptionRate) { - return errorsmod.Wrapf(ErrInvalidBounds, "Inner max safety threshold (%s) is less than inner min safety threshold (%s)", msg.MaxInnerRedemptionRate, msg.MinInnerRedemptionRate) - } - return nil -} diff --git a/x/stakeibc/types/message_update_trade_route.go b/x/stakeibc/types/message_update_trade_route.go deleted file mode 100644 index a44ace210..000000000 --- a/x/stakeibc/types/message_update_trade_route.go +++ /dev/null @@ -1,63 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - - errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const TypeMsgUpdateTradeRoute = "update_trade_route" - -var ( - _ sdk.Msg = &MsgUpdateTradeRoute{} - _ legacytx.LegacyMsg = &MsgUpdateTradeRoute{} -) - -func (msg *MsgUpdateTradeRoute) Type() string { - return TypeMsgUpdateTradeRoute -} - -func (msg *MsgUpdateTradeRoute) Route() string { - return RouterKey -} - -func (msg *MsgUpdateTradeRoute) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgUpdateTradeRoute) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) - return []sdk.AccAddress{addr} -} -func (msg *MsgUpdateTradeRoute) ValidateBasic() error { - if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { - return errorsmod.Wrap(err, "invalid authority address") - } - - if msg.HostDenom == "" { - return errorsmod.Wrapf(sdkerrors.ErrNotFound, "missing host denom") - } - if msg.RewardDenom == "" { - return errorsmod.Wrapf(sdkerrors.ErrNotFound, "missing reward denom") - } - - if msg.PoolId < 1 { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid pool id") - } - if msg.MaxSwapAmount.GT(sdkmath.ZeroInt()) && msg.MinSwapAmount.GT(msg.MaxSwapAmount) { - return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "min swap amount cannot be greater than max swap amount") - } - maxAllowedSwapLossRate, err := sdkmath.LegacyNewDecFromStr(msg.MaxAllowedSwapLossRate) - if err != nil { - return errorsmod.Wrapf(err, "unable to cast max allowed swap loss rate to a decimal") - } - if maxAllowedSwapLossRate.LT(sdkmath.LegacyZeroDec()) || maxAllowedSwapLossRate.GT(sdkmath.LegacyOneDec()) { - return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "max allowed swap loss rate must be between 0 and 1") - } - - return nil -} diff --git a/x/stakeibc/types/osmosis.pb.go b/x/stakeibc/types/osmosis.pb.go deleted file mode 100644 index 9d17614d4..000000000 --- a/x/stakeibc/types/osmosis.pb.go +++ /dev/null @@ -1,1370 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: osmosis/gamm/v1beta1/osmosis.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - _ "github.com/cosmos/gogoproto/types" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgSwapExactAmountIn stores the tx Msg type to swap tokens in the trade ICA -type MsgSwapExactAmountIn struct { - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` - Routes []SwapAmountInRoute `protobuf:"bytes,2,rep,name=routes,proto3" json:"routes"` - TokenIn types.Coin `protobuf:"bytes,3,opt,name=token_in,json=tokenIn,proto3" json:"token_in" yaml:"token_in"` - TokenOutMinAmount cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=token_out_min_amount,json=tokenOutMinAmount,proto3,customtype=cosmossdk.io/math.Int" json:"token_out_min_amount" yaml:"token_out_min_amount"` -} - -func (m *MsgSwapExactAmountIn) Reset() { *m = MsgSwapExactAmountIn{} } -func (m *MsgSwapExactAmountIn) String() string { return proto.CompactTextString(m) } -func (*MsgSwapExactAmountIn) ProtoMessage() {} -func (*MsgSwapExactAmountIn) Descriptor() ([]byte, []int) { - return fileDescriptor_39668b2e9488de8c, []int{0} -} -func (m *MsgSwapExactAmountIn) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSwapExactAmountIn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSwapExactAmountIn.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSwapExactAmountIn) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSwapExactAmountIn.Merge(m, src) -} -func (m *MsgSwapExactAmountIn) XXX_Size() int { - return m.Size() -} -func (m *MsgSwapExactAmountIn) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSwapExactAmountIn.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSwapExactAmountIn proto.InternalMessageInfo - -func (m *MsgSwapExactAmountIn) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *MsgSwapExactAmountIn) GetRoutes() []SwapAmountInRoute { - if m != nil { - return m.Routes - } - return nil -} - -func (m *MsgSwapExactAmountIn) GetTokenIn() types.Coin { - if m != nil { - return m.TokenIn - } - return types.Coin{} -} - -type SwapAmountInRoute struct { - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` - TokenOutDenom string `protobuf:"bytes,2,opt,name=token_out_denom,json=tokenOutDenom,proto3" json:"token_out_denom,omitempty" yaml:"token_out_denom"` -} - -func (m *SwapAmountInRoute) Reset() { *m = SwapAmountInRoute{} } -func (m *SwapAmountInRoute) String() string { return proto.CompactTextString(m) } -func (*SwapAmountInRoute) ProtoMessage() {} -func (*SwapAmountInRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_39668b2e9488de8c, []int{1} -} -func (m *SwapAmountInRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SwapAmountInRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SwapAmountInRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SwapAmountInRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_SwapAmountInRoute.Merge(m, src) -} -func (m *SwapAmountInRoute) XXX_Size() int { - return m.Size() -} -func (m *SwapAmountInRoute) XXX_DiscardUnknown() { - xxx_messageInfo_SwapAmountInRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_SwapAmountInRoute proto.InternalMessageInfo - -func (m *SwapAmountInRoute) GetPoolId() uint64 { - if m != nil { - return m.PoolId - } - return 0 -} - -func (m *SwapAmountInRoute) GetTokenOutDenom() string { - if m != nil { - return m.TokenOutDenom - } - return "" -} - -// A TwapRecord stores the most recent price of a pair of denom's -type OsmosisTwapRecord struct { - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // Lexicographically smaller denom of the pair - Asset0Denom string `protobuf:"bytes,2,opt,name=asset0_denom,json=asset0Denom,proto3" json:"asset0_denom,omitempty"` - // Lexicographically larger denom of the pair - Asset1Denom string `protobuf:"bytes,3,opt,name=asset1_denom,json=asset1Denom,proto3" json:"asset1_denom,omitempty"` - // height this record corresponds to, for debugging purposes - Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"record_height" yaml:"record_height"` - // This field should only exist until we have a global registry in the state - // machine, mapping prior block heights within {TIME RANGE} to times. - Time time.Time `protobuf:"bytes,5,opt,name=time,proto3,stdtime" json:"time" yaml:"record_time"` - // We store the last spot prices in the struct, so that we can interpolate - // accumulator values for times between when accumulator records are stored. - P0LastSpotPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=p0_last_spot_price,json=p0LastSpotPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"p0_last_spot_price"` - P1LastSpotPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,7,opt,name=p1_last_spot_price,json=p1LastSpotPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"p1_last_spot_price"` - P0ArithmeticTwapAccumulator cosmossdk_io_math.LegacyDec `protobuf:"bytes,8,opt,name=p0_arithmetic_twap_accumulator,json=p0ArithmeticTwapAccumulator,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"p0_arithmetic_twap_accumulator"` - P1ArithmeticTwapAccumulator cosmossdk_io_math.LegacyDec `protobuf:"bytes,9,opt,name=p1_arithmetic_twap_accumulator,json=p1ArithmeticTwapAccumulator,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"p1_arithmetic_twap_accumulator"` - GeometricTwapAccumulator cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=geometric_twap_accumulator,json=geometricTwapAccumulator,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"geometric_twap_accumulator"` - // This field contains the time in which the last spot price error occured. - // It is used to alert the caller if they are getting a potentially erroneous - // TWAP, due to an unforeseen underlying error. - LastErrorTime time.Time `protobuf:"bytes,11,opt,name=last_error_time,json=lastErrorTime,proto3,stdtime" json:"last_error_time" yaml:"last_error_time"` -} - -func (m *OsmosisTwapRecord) Reset() { *m = OsmosisTwapRecord{} } -func (m *OsmosisTwapRecord) String() string { return proto.CompactTextString(m) } -func (*OsmosisTwapRecord) ProtoMessage() {} -func (*OsmosisTwapRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_39668b2e9488de8c, []int{2} -} -func (m *OsmosisTwapRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *OsmosisTwapRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_OsmosisTwapRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *OsmosisTwapRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_OsmosisTwapRecord.Merge(m, src) -} -func (m *OsmosisTwapRecord) XXX_Size() int { - return m.Size() -} -func (m *OsmosisTwapRecord) XXX_DiscardUnknown() { - xxx_messageInfo_OsmosisTwapRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_OsmosisTwapRecord proto.InternalMessageInfo - -func (m *OsmosisTwapRecord) GetPoolId() uint64 { - if m != nil { - return m.PoolId - } - return 0 -} - -func (m *OsmosisTwapRecord) GetAsset0Denom() string { - if m != nil { - return m.Asset0Denom - } - return "" -} - -func (m *OsmosisTwapRecord) GetAsset1Denom() string { - if m != nil { - return m.Asset1Denom - } - return "" -} - -func (m *OsmosisTwapRecord) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *OsmosisTwapRecord) GetTime() time.Time { - if m != nil { - return m.Time - } - return time.Time{} -} - -func (m *OsmosisTwapRecord) GetLastErrorTime() time.Time { - if m != nil { - return m.LastErrorTime - } - return time.Time{} -} - -func init() { - proto.RegisterType((*MsgSwapExactAmountIn)(nil), "osmosis.gamm.v1beta1.MsgSwapExactAmountIn") - proto.RegisterType((*SwapAmountInRoute)(nil), "osmosis.gamm.v1beta1.SwapAmountInRoute") - proto.RegisterType((*OsmosisTwapRecord)(nil), "osmosis.gamm.v1beta1.OsmosisTwapRecord") -} - -func init() { - proto.RegisterFile("osmosis/gamm/v1beta1/osmosis.proto", fileDescriptor_39668b2e9488de8c) -} - -var fileDescriptor_39668b2e9488de8c = []byte{ - // 773 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0x8f, 0x9b, 0x90, 0xee, 0x4e, 0x08, 0x51, 0xac, 0xc0, 0x9a, 0x54, 0xb2, 0xbb, 0x46, 0x82, - 0x2e, 0x28, 0x76, 0x1c, 0x6e, 0x2b, 0x2e, 0x31, 0xdb, 0x43, 0xa4, 0x94, 0x5d, 0xb9, 0x7b, 0xe2, - 0x62, 0x4d, 0x9c, 0x59, 0x67, 0xd4, 0x8c, 0xc7, 0xf2, 0x8c, 0x9b, 0xf6, 0xce, 0x89, 0x53, 0x3f, - 0x0a, 0x1f, 0xa3, 0xc7, 0x1e, 0x11, 0x07, 0x83, 0xda, 0x03, 0x12, 0x07, 0x0e, 0xf9, 0x04, 0x68, - 0x66, 0x9c, 0xb4, 0x49, 0x0b, 0xb4, 0x97, 0x68, 0xfc, 0xe6, 0xf7, 0xe7, 0xbd, 0x79, 0xbf, 0x00, - 0x9b, 0x32, 0x42, 0x19, 0x66, 0x6e, 0x0c, 0x09, 0x71, 0x4f, 0xbd, 0x09, 0xe2, 0xd0, 0x73, 0xcb, - 0xa2, 0x93, 0x66, 0x94, 0x53, 0xbd, 0xb3, 0xfa, 0x14, 0x18, 0xa7, 0xc4, 0x74, 0x3b, 0x31, 0x8d, - 0xa9, 0x04, 0xb8, 0xe2, 0xa4, 0xb0, 0xdd, 0x36, 0x24, 0x38, 0xa1, 0xae, 0xfc, 0x2d, 0x4b, 0x66, - 0x24, 0xf9, 0xee, 0x04, 0x32, 0xb4, 0x76, 0x88, 0x28, 0x4e, 0xca, 0x7b, 0x2b, 0xa6, 0x34, 0x9e, - 0x23, 0x57, 0x7e, 0x4d, 0xf2, 0x0f, 0x2e, 0xc7, 0x04, 0x31, 0x0e, 0x49, 0xaa, 0x00, 0xf6, 0xdf, - 0x3b, 0xa0, 0x73, 0xc4, 0xe2, 0xe3, 0x05, 0x4c, 0x0f, 0xcf, 0x60, 0xc4, 0x87, 0x84, 0xe6, 0x09, - 0x1f, 0x25, 0xfa, 0x2b, 0x50, 0x67, 0x28, 0x99, 0xa2, 0xcc, 0xd0, 0xf6, 0xb5, 0x83, 0xe7, 0x7e, - 0x7b, 0x59, 0x58, 0xcd, 0x73, 0x48, 0xe6, 0xaf, 0x6d, 0x55, 0xb7, 0x83, 0x12, 0xa0, 0x1f, 0x82, - 0x7a, 0x46, 0x73, 0x8e, 0x98, 0xb1, 0xb3, 0x5f, 0x3d, 0x68, 0x0c, 0xbe, 0x72, 0x1e, 0x1a, 0xca, - 0x11, 0x1e, 0x2b, 0xf9, 0x40, 0xe0, 0xfd, 0xda, 0x65, 0x61, 0x55, 0x82, 0x92, 0xac, 0x1f, 0x81, - 0x67, 0x9c, 0x9e, 0xa0, 0x24, 0xc4, 0x89, 0x51, 0xdd, 0xd7, 0x0e, 0x1a, 0x83, 0xcf, 0x1d, 0x35, - 0x9e, 0x23, 0xc6, 0x5b, 0xeb, 0x7c, 0x4f, 0x71, 0xe2, 0xbf, 0x10, 0xd4, 0x65, 0x61, 0xb5, 0x54, - 0x4b, 0x2b, 0xa2, 0x1d, 0xec, 0xca, 0xe3, 0x28, 0xd1, 0x09, 0xe8, 0xa8, 0x2a, 0xcd, 0x79, 0x48, - 0x70, 0x12, 0x42, 0xe9, 0x6d, 0xd4, 0xe4, 0x38, 0xdf, 0x09, 0xfe, 0x6f, 0x85, 0xf5, 0xa9, 0x72, - 0x60, 0xd3, 0x13, 0x07, 0x53, 0x97, 0x40, 0x3e, 0x73, 0x46, 0x09, 0x5f, 0x16, 0xd6, 0xde, 0x5d, - 0xe1, 0x4d, 0x09, 0x3b, 0x68, 0xcb, 0xf2, 0xdb, 0x9c, 0x1f, 0xe1, 0x44, 0x8d, 0xf4, 0xfa, 0xcb, - 0x9f, 0xff, 0xfc, 0xe5, 0xeb, 0x97, 0x1b, 0x1b, 0x67, 0x0b, 0x98, 0xf6, 0x90, 0x78, 0xd5, 0x9e, - 0x22, 0xf6, 0x70, 0x62, 0xff, 0xa4, 0x81, 0xf6, 0xbd, 0x97, 0xd0, 0xbf, 0x01, 0xbb, 0x29, 0xa5, - 0xf3, 0x10, 0x4f, 0xe5, 0x73, 0xd7, 0x7c, 0x7d, 0x59, 0x58, 0x9f, 0xa8, 0x16, 0xca, 0x0b, 0x3b, - 0xa8, 0x8b, 0xd3, 0x68, 0xaa, 0xfb, 0xa0, 0x75, 0xdb, 0xd6, 0x14, 0x25, 0x94, 0x18, 0x3b, 0x72, - 0xa8, 0xee, 0xb2, 0xb0, 0x3e, 0xdb, 0xee, 0x5b, 0x02, 0xec, 0xa0, 0xb9, 0x6a, 0xf9, 0x8d, 0xfc, - 0xbe, 0xac, 0x83, 0xf6, 0x5b, 0xd5, 0xec, 0xfb, 0x05, 0x4c, 0x03, 0x14, 0xd1, 0x6c, 0xaa, 0xbf, - 0xd8, 0x6a, 0x63, 0x6d, 0xf9, 0x12, 0x7c, 0x0c, 0x19, 0x43, 0xbc, 0x7f, 0xd7, 0x2f, 0x68, 0xa8, - 0x9a, 0x54, 0x5c, 0x43, 0xbc, 0x12, 0x52, 0xbd, 0x03, 0xf1, 0x14, 0x64, 0x08, 0xea, 0x33, 0x84, - 0xe3, 0x99, 0x5a, 0x42, 0xd5, 0x7f, 0xf5, 0x57, 0x61, 0x35, 0x33, 0x69, 0x1d, 0xaa, 0x8b, 0x65, - 0x61, 0x75, 0xd4, 0x00, 0x1b, 0x65, 0x3b, 0x28, 0x89, 0xfa, 0x0f, 0xa0, 0x26, 0x22, 0x6c, 0x7c, - 0x24, 0x03, 0xd2, 0x75, 0x54, 0xbe, 0x9d, 0x55, 0xbe, 0x9d, 0xf7, 0xab, 0x7c, 0xfb, 0x66, 0x99, - 0x10, 0x7d, 0x43, 0x4f, 0x90, 0xed, 0x8b, 0xdf, 0x2d, 0x2d, 0x90, 0x3a, 0xfa, 0x3b, 0xa0, 0xa7, - 0xfd, 0x70, 0x0e, 0x19, 0x0f, 0x59, 0x4a, 0x79, 0x98, 0x66, 0x38, 0x42, 0x46, 0x5d, 0x3e, 0xe7, - 0x17, 0x65, 0x46, 0xf6, 0xee, 0x67, 0x64, 0x8c, 0x62, 0x18, 0x9d, 0xbf, 0x41, 0x51, 0xd0, 0x4a, - 0xfb, 0x63, 0xc8, 0xf8, 0x71, 0x4a, 0xf9, 0x3b, 0xc1, 0x95, 0x8a, 0xde, 0x3d, 0xc5, 0xdd, 0xa7, - 0x28, 0x7a, 0x9b, 0x8a, 0x33, 0x60, 0xa6, 0xfd, 0x10, 0x66, 0x98, 0xcf, 0x08, 0xe2, 0x38, 0x0a, - 0xf9, 0x02, 0xa6, 0x21, 0x8c, 0xa2, 0x9c, 0xe4, 0x73, 0xc8, 0x69, 0x66, 0x3c, 0x7b, 0xbc, 0xfa, - 0x5e, 0xda, 0x1f, 0xae, 0x95, 0xc4, 0xea, 0x87, 0xb7, 0x3a, 0xd2, 0xc9, 0xfb, 0x4f, 0xa7, 0xe7, - 0x4f, 0x71, 0xf2, 0xfe, 0xdd, 0x09, 0x82, 0x6e, 0x8c, 0x28, 0x41, 0x3c, 0x7b, 0xc8, 0x05, 0x3c, - 0xde, 0xc5, 0x58, 0xcb, 0x6c, 0x5b, 0x7c, 0x00, 0x2d, 0xb9, 0x05, 0x94, 0x65, 0x34, 0x93, 0x8b, - 0x37, 0x1a, 0xff, 0x9b, 0x1a, 0xbb, 0x4c, 0x4d, 0xf9, 0x37, 0xda, 0x12, 0x50, 0xc9, 0x69, 0x8a, - 0xea, 0xa1, 0x28, 0x0a, 0x9e, 0x3f, 0xbe, 0xbc, 0x36, 0xb5, 0xab, 0x6b, 0x53, 0xfb, 0xe3, 0xda, - 0xd4, 0x2e, 0x6e, 0xcc, 0xca, 0xd5, 0x8d, 0x59, 0xf9, 0xf5, 0xc6, 0xac, 0xfc, 0x38, 0x88, 0x31, - 0x9f, 0xe5, 0x13, 0x27, 0xa2, 0xc4, 0x3d, 0xe6, 0x19, 0x9e, 0xa2, 0xde, 0x18, 0x4e, 0x98, 0xcb, - 0xe4, 0xd9, 0x3d, 0x1d, 0x0c, 0xdc, 0x33, 0x97, 0x71, 0x78, 0x82, 0xf0, 0x24, 0x72, 0xf9, 0x79, - 0x8a, 0xd8, 0xa4, 0x2e, 0x9b, 0xfa, 0xf6, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0x47, 0x9f, - 0xbb, 0x3d, 0x06, 0x00, 0x00, -} - -func (m *MsgSwapExactAmountIn) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSwapExactAmountIn) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSwapExactAmountIn) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.TokenOutMinAmount.Size() - i -= size - if _, err := m.TokenOutMinAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintOsmosis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.TokenIn.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOsmosis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.Routes) > 0 { - for iNdEx := len(m.Routes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Routes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOsmosis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintOsmosis(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SwapAmountInRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SwapAmountInRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SwapAmountInRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TokenOutDenom) > 0 { - i -= len(m.TokenOutDenom) - copy(dAtA[i:], m.TokenOutDenom) - i = encodeVarintOsmosis(dAtA, i, uint64(len(m.TokenOutDenom))) - i-- - dAtA[i] = 0x12 - } - if m.PoolId != 0 { - i = encodeVarintOsmosis(dAtA, i, uint64(m.PoolId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *OsmosisTwapRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OsmosisTwapRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OsmosisTwapRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n2, err2 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.LastErrorTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastErrorTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintOsmosis(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x5a - { - size := m.GeometricTwapAccumulator.Size() - i -= size - if _, err := m.GeometricTwapAccumulator.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintOsmosis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - { - size := m.P1ArithmeticTwapAccumulator.Size() - i -= size - if _, err := m.P1ArithmeticTwapAccumulator.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintOsmosis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size := m.P0ArithmeticTwapAccumulator.Size() - i -= size - if _, err := m.P0ArithmeticTwapAccumulator.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintOsmosis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - { - size := m.P1LastSpotPrice.Size() - i -= size - if _, err := m.P1LastSpotPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintOsmosis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - { - size := m.P0LastSpotPrice.Size() - i -= size - if _, err := m.P0LastSpotPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintOsmosis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - n3, err3 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintOsmosis(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x2a - if m.Height != 0 { - i = encodeVarintOsmosis(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x20 - } - if len(m.Asset1Denom) > 0 { - i -= len(m.Asset1Denom) - copy(dAtA[i:], m.Asset1Denom) - i = encodeVarintOsmosis(dAtA, i, uint64(len(m.Asset1Denom))) - i-- - dAtA[i] = 0x1a - } - if len(m.Asset0Denom) > 0 { - i -= len(m.Asset0Denom) - copy(dAtA[i:], m.Asset0Denom) - i = encodeVarintOsmosis(dAtA, i, uint64(len(m.Asset0Denom))) - i-- - dAtA[i] = 0x12 - } - if m.PoolId != 0 { - i = encodeVarintOsmosis(dAtA, i, uint64(m.PoolId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintOsmosis(dAtA []byte, offset int, v uint64) int { - offset -= sovOsmosis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgSwapExactAmountIn) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovOsmosis(uint64(l)) - } - if len(m.Routes) > 0 { - for _, e := range m.Routes { - l = e.Size() - n += 1 + l + sovOsmosis(uint64(l)) - } - } - l = m.TokenIn.Size() - n += 1 + l + sovOsmosis(uint64(l)) - l = m.TokenOutMinAmount.Size() - n += 1 + l + sovOsmosis(uint64(l)) - return n -} - -func (m *SwapAmountInRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PoolId != 0 { - n += 1 + sovOsmosis(uint64(m.PoolId)) - } - l = len(m.TokenOutDenom) - if l > 0 { - n += 1 + l + sovOsmosis(uint64(l)) - } - return n -} - -func (m *OsmosisTwapRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PoolId != 0 { - n += 1 + sovOsmosis(uint64(m.PoolId)) - } - l = len(m.Asset0Denom) - if l > 0 { - n += 1 + l + sovOsmosis(uint64(l)) - } - l = len(m.Asset1Denom) - if l > 0 { - n += 1 + l + sovOsmosis(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovOsmosis(uint64(m.Height)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Time) - n += 1 + l + sovOsmosis(uint64(l)) - l = m.P0LastSpotPrice.Size() - n += 1 + l + sovOsmosis(uint64(l)) - l = m.P1LastSpotPrice.Size() - n += 1 + l + sovOsmosis(uint64(l)) - l = m.P0ArithmeticTwapAccumulator.Size() - n += 1 + l + sovOsmosis(uint64(l)) - l = m.P1ArithmeticTwapAccumulator.Size() - n += 1 + l + sovOsmosis(uint64(l)) - l = m.GeometricTwapAccumulator.Size() - n += 1 + l + sovOsmosis(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.LastErrorTime) - n += 1 + l + sovOsmosis(uint64(l)) - return n -} - -func sovOsmosis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozOsmosis(x uint64) (n int) { - return sovOsmosis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgSwapExactAmountIn) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSwapExactAmountIn: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSwapExactAmountIn: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Routes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Routes = append(m.Routes, SwapAmountInRoute{}) - if err := m.Routes[len(m.Routes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenIn", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TokenIn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenOutMinAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TokenOutMinAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOsmosis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOsmosis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SwapAmountInRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SwapAmountInRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SwapAmountInRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - m.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenOutDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenOutDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOsmosis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOsmosis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OsmosisTwapRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OsmosisTwapRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OsmosisTwapRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - m.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Asset0Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Asset0Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Asset1Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Asset1Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field P0LastSpotPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.P0LastSpotPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field P1LastSpotPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.P1LastSpotPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field P0ArithmeticTwapAccumulator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.P0ArithmeticTwapAccumulator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field P1ArithmeticTwapAccumulator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.P1ArithmeticTwapAccumulator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GeometricTwapAccumulator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.GeometricTwapAccumulator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastErrorTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOsmosis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOsmosis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOsmosis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.LastErrorTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOsmosis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOsmosis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOsmosis(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOsmosis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOsmosis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOsmosis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthOsmosis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupOsmosis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthOsmosis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthOsmosis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOsmosis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupOsmosis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/packet.pb.go b/x/stakeibc/types/packet.pb.go deleted file mode 100644 index 2e2156c62..000000000 --- a/x/stakeibc/types/packet.pb.go +++ /dev/null @@ -1,501 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/packet.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type StakeibcPacketData struct { - // Types that are valid to be assigned to Packet: - // - // *StakeibcPacketData_NoData - Packet isStakeibcPacketData_Packet `protobuf_oneof:"packet"` -} - -func (m *StakeibcPacketData) Reset() { *m = StakeibcPacketData{} } -func (m *StakeibcPacketData) String() string { return proto.CompactTextString(m) } -func (*StakeibcPacketData) ProtoMessage() {} -func (*StakeibcPacketData) Descriptor() ([]byte, []int) { - return fileDescriptor_a86fa6a12773333f, []int{0} -} -func (m *StakeibcPacketData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StakeibcPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StakeibcPacketData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StakeibcPacketData) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakeibcPacketData.Merge(m, src) -} -func (m *StakeibcPacketData) XXX_Size() int { - return m.Size() -} -func (m *StakeibcPacketData) XXX_DiscardUnknown() { - xxx_messageInfo_StakeibcPacketData.DiscardUnknown(m) -} - -var xxx_messageInfo_StakeibcPacketData proto.InternalMessageInfo - -type isStakeibcPacketData_Packet interface { - isStakeibcPacketData_Packet() - MarshalTo([]byte) (int, error) - Size() int -} - -type StakeibcPacketData_NoData struct { - NoData *NoData `protobuf:"bytes,1,opt,name=no_data,json=noData,proto3,oneof" json:"no_data,omitempty"` -} - -func (*StakeibcPacketData_NoData) isStakeibcPacketData_Packet() {} - -func (m *StakeibcPacketData) GetPacket() isStakeibcPacketData_Packet { - if m != nil { - return m.Packet - } - return nil -} - -func (m *StakeibcPacketData) GetNoData() *NoData { - if x, ok := m.GetPacket().(*StakeibcPacketData_NoData); ok { - return x.NoData - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*StakeibcPacketData) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*StakeibcPacketData_NoData)(nil), - } -} - -type NoData struct { -} - -func (m *NoData) Reset() { *m = NoData{} } -func (m *NoData) String() string { return proto.CompactTextString(m) } -func (*NoData) ProtoMessage() {} -func (*NoData) Descriptor() ([]byte, []int) { - return fileDescriptor_a86fa6a12773333f, []int{1} -} -func (m *NoData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NoData) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoData.Merge(m, src) -} -func (m *NoData) XXX_Size() int { - return m.Size() -} -func (m *NoData) XXX_DiscardUnknown() { - xxx_messageInfo_NoData.DiscardUnknown(m) -} - -var xxx_messageInfo_NoData proto.InternalMessageInfo - -func init() { - proto.RegisterType((*StakeibcPacketData)(nil), "stride.stakeibc.StakeibcPacketData") - proto.RegisterType((*NoData)(nil), "stride.stakeibc.NoData") -} - -func init() { proto.RegisterFile("stride/stakeibc/packet.proto", fileDescriptor_a86fa6a12773333f) } - -var fileDescriptor_a86fa6a12773333f = []byte{ - // 190 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x2e, 0x29, 0xca, - 0x4c, 0x49, 0xd5, 0x2f, 0x2e, 0x49, 0xcc, 0x4e, 0xcd, 0x4c, 0x4a, 0xd6, 0x2f, 0x48, 0x4c, 0xce, - 0x4e, 0x2d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0xc8, 0xea, 0xc1, 0x64, 0x95, - 0x82, 0xb8, 0x84, 0x82, 0xa1, 0xec, 0x00, 0xb0, 0x42, 0x97, 0xc4, 0x92, 0x44, 0x21, 0x23, 0x2e, - 0xf6, 0xbc, 0xfc, 0xf8, 0x94, 0xc4, 0x92, 0x44, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x71, - 0x3d, 0x34, 0x8d, 0x7a, 0x7e, 0xf9, 0x20, 0x95, 0x1e, 0x0c, 0x41, 0x6c, 0x79, 0x60, 0x96, 0x13, - 0x07, 0x17, 0x1b, 0xc4, 0x2a, 0x25, 0x0e, 0x2e, 0x36, 0x88, 0xac, 0x93, 0xcf, 0x89, 0x47, 0x72, - 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, - 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x19, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, - 0xe7, 0xe7, 0xea, 0xe7, 0x66, 0xe6, 0x64, 0x57, 0x96, 0x27, 0x56, 0xea, 0xe6, 0x24, 0x26, 0x15, - 0xc3, 0x79, 0xfa, 0x15, 0x08, 0x3f, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xfd, 0x60, - 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xe8, 0x40, 0x6c, 0xce, 0xe3, 0x00, 0x00, 0x00, -} - -func (m *StakeibcPacketData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StakeibcPacketData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StakeibcPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Packet != nil { - { - size := m.Packet.Size() - i -= size - if _, err := m.Packet.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *StakeibcPacketData_NoData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StakeibcPacketData_NoData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.NoData != nil { - { - size, err := m.NoData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPacket(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *NoData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NoData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NoData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintPacket(dAtA []byte, offset int, v uint64) int { - offset -= sovPacket(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *StakeibcPacketData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Packet != nil { - n += m.Packet.Size() - } - return n -} - -func (m *StakeibcPacketData_NoData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoData != nil { - l = m.NoData.Size() - n += 1 + l + sovPacket(uint64(l)) - } - return n -} -func (m *NoData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovPacket(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPacket(x uint64) (n int) { - return sovPacket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *StakeibcPacketData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StakeibcPacketData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StakeibcPacketData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPacket - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPacket - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &NoData{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Packet = &StakeibcPacketData_NoData{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPacket(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPacket - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipPacket(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPacket - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPacket(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacket - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacket - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacket - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthPacket - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPacket - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPacket - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthPacket = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPacket = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPacket = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/params.go b/x/stakeibc/types/params.go deleted file mode 100644 index a68dcf8d8..000000000 --- a/x/stakeibc/types/params.go +++ /dev/null @@ -1,241 +0,0 @@ -package types - -import ( - "fmt" - - "gopkg.in/yaml.v2" -) - -// Default init params -var ( - // these are default intervals _in epochs_ NOT in blocks - DefaultDepositInterval uint64 = 1 - DefaultDelegateInterval uint64 = 1 - DefaultReinvestInterval uint64 = 1 - DefaultRewardsInterval uint64 = 1 - DefaultRedemptionRateInterval uint64 = 1 - // you apparently cannot safely encode floats, so we make commission / 100 - DefaultStrideCommission uint64 = 10 - DefaultICATimeoutNanos uint64 = 600000000000 - DefaultBufferSize uint64 = 5 // 1/5=20% of the epoch - DefaultIbcTimeoutBlocks uint64 = 300 // 300 blocks ~= 30 minutes - DefaultFeeTransferTimeoutNanos uint64 = 1800000000000 // 30 minutes - DefaultMinRedemptionRateThreshold uint64 = 90 // divide by 100, so 90 = 0.9 - DefaultMaxRedemptionRateThreshold uint64 = 150 // divide by 100, so 150 = 1.5 - DefaultMaxStakeICACallsPerEpoch uint64 = 100 - DefaultIBCTransferTimeoutNanos uint64 = 1800000000000 // 30 minutes - DefaultValidatorSlashQueryThreshold uint64 = 1 // denominated in percentage of TVL (1 => 1%) - DefaultValidatorWeightCap uint64 = 10 // percentage (10 => 10%) -) - -// NewParams creates a new Params instance -func NewParams( - depositInterval uint64, - delegateInterval uint64, - rewardsInterval uint64, - redemptionRateInterval uint64, - strideCommission uint64, - reinvestInterval uint64, - icaTimeoutNanos uint64, - bufferSize uint64, - ibcTimeoutBlocks uint64, - feeTransferTimeoutNanos uint64, - maxStakeIcaCallsPerEpoch uint64, - defaultMinRedemptionRateThreshold uint64, - defaultMaxRedemptionRateThreshold uint64, - ibcTransferTimeoutNanos uint64, - validatorSlashQueryInterval uint64, - validatorWeightCap uint64, -) Params { - return Params{ - DepositInterval: depositInterval, - DelegateInterval: delegateInterval, - RewardsInterval: rewardsInterval, - RedemptionRateInterval: redemptionRateInterval, - StrideCommission: strideCommission, - ReinvestInterval: reinvestInterval, - IcaTimeoutNanos: icaTimeoutNanos, - BufferSize: bufferSize, - IbcTimeoutBlocks: ibcTimeoutBlocks, - FeeTransferTimeoutNanos: feeTransferTimeoutNanos, - MaxStakeIcaCallsPerEpoch: maxStakeIcaCallsPerEpoch, - DefaultMinRedemptionRateThreshold: defaultMinRedemptionRateThreshold, - DefaultMaxRedemptionRateThreshold: defaultMaxRedemptionRateThreshold, - IbcTransferTimeoutNanos: ibcTransferTimeoutNanos, - ValidatorSlashQueryThreshold: validatorSlashQueryInterval, - ValidatorWeightCap: validatorWeightCap, - } -} - -// DefaultParams returns a default set of parameters -func DefaultParams() Params { - return NewParams( - DefaultDepositInterval, - DefaultDelegateInterval, - DefaultRewardsInterval, - DefaultRedemptionRateInterval, - DefaultStrideCommission, - DefaultReinvestInterval, - DefaultICATimeoutNanos, - DefaultBufferSize, - DefaultIbcTimeoutBlocks, - DefaultFeeTransferTimeoutNanos, - DefaultMaxStakeICACallsPerEpoch, - DefaultMinRedemptionRateThreshold, - DefaultMaxRedemptionRateThreshold, - DefaultIBCTransferTimeoutNanos, - DefaultValidatorSlashQueryThreshold, - DefaultValidatorWeightCap, - ) -} - -func validTimeoutNanos(i interface{}) error { - ival, ok := i.(uint64) - if !ok { - return fmt.Errorf("parameter not accepted: %T", i) - } - - tenMin := uint64(600000000000) - oneHour := uint64(600000000000 * 6) - - if ival < tenMin { - return fmt.Errorf("parameter must be g.t. 600000000000ns: %d", ival) - } - if ival > oneHour { - return fmt.Errorf("parameter must be less than %dns: %d", oneHour, ival) - } - return nil -} - -func validMaxRedemptionRateThreshold(i interface{}) error { - ival, ok := i.(uint64) - if !ok { - return fmt.Errorf("parameter not accepted: %T", i) - } - - maxVal := uint64(1000) // divide by 100, so 1000 => 10 - - if ival > maxVal { - return fmt.Errorf("parameter must be l.t. 1000: %d", ival) - } - - return nil -} - -func validMinRedemptionRateThreshold(i interface{}) error { - ival, ok := i.(uint64) - if !ok { - return fmt.Errorf("parameter not accepted: %T", i) - } - - minVal := uint64(75) // divide by 100, so 75 => 0.75 - - if ival < minVal { - return fmt.Errorf("parameter must be g.t. 75: %d", ival) - } - - return nil -} - -func validValidatorWeightCap(i interface{}) error { - if err := isPositive(i); err != nil { - return err - } - if err := isPercentage(i); err != nil { - return err - } - return nil -} - -func isPositive(i interface{}) error { - ival, ok := i.(uint64) - if !ok { - return fmt.Errorf("parameter not accepted: %T", i) - } - - if ival <= 0 { - return fmt.Errorf("parameter must be positive: %d", ival) - } - return nil -} - -func isPercentage(i interface{}) error { - ival, ok := i.(uint64) - if !ok { - return fmt.Errorf("parameter not accepted: %T", i) - } - - if ival > 100 { - return fmt.Errorf("parameter must be between 0 and 100: %d", ival) - } - return nil -} - -func isCommission(i interface{}) error { - ival, ok := i.(uint64) - if !ok { - return fmt.Errorf("commission not accepted: %T", i) - } - - if ival > 100 { - return fmt.Errorf("commission must be less than 100: %d", ival) - } - return nil -} - -// Validate validates the set of params -func (p Params) Validate() error { - if err := isPositive(p.DepositInterval); err != nil { - return err - } - if err := isPositive(p.DelegateInterval); err != nil { - return err - } - if err := isPositive(p.RewardsInterval); err != nil { - return err - } - if err := isPositive(p.RedemptionRateInterval); err != nil { - return err - } - if err := isCommission(p.StrideCommission); err != nil { - return err - } - if err := isPositive(p.ReinvestInterval); err != nil { - return err - } - if err := isPositive(p.IcaTimeoutNanos); err != nil { - return err - } - if err := isPositive(p.BufferSize); err != nil { - return err - } - if err := isPositive(p.IbcTimeoutBlocks); err != nil { - return err - } - if err := validTimeoutNanos(p.FeeTransferTimeoutNanos); err != nil { - return err - } - if err := isPositive(p.MaxStakeIcaCallsPerEpoch); err != nil { - return err - } - if err := validMinRedemptionRateThreshold(p.DefaultMinRedemptionRateThreshold); err != nil { - return err - } - if err := validMaxRedemptionRateThreshold(p.DefaultMaxRedemptionRateThreshold); err != nil { - return err - } - if err := validTimeoutNanos(p.IbcTransferTimeoutNanos); err != nil { - return err - } - if err := validValidatorWeightCap(p.ValidatorWeightCap); err != nil { - return err - } - - return nil -} - -// String implements the Stringer interface. -func (p Params) String() string { - out, _ := yaml.Marshal(p) - return string(out) -} diff --git a/x/stakeibc/types/params.pb.go b/x/stakeibc/types/params.pb.go deleted file mode 100644 index dd020d34b..000000000 --- a/x/stakeibc/types/params.pb.go +++ /dev/null @@ -1,858 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/params.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Params defines the parameters for the module. -// next id: 20 -type Params struct { - // define epoch lengths, in stride_epochs - RewardsInterval uint64 `protobuf:"varint,1,opt,name=rewards_interval,json=rewardsInterval,proto3" json:"rewards_interval,omitempty"` - DelegateInterval uint64 `protobuf:"varint,6,opt,name=delegate_interval,json=delegateInterval,proto3" json:"delegate_interval,omitempty"` - DepositInterval uint64 `protobuf:"varint,2,opt,name=deposit_interval,json=depositInterval,proto3" json:"deposit_interval,omitempty"` - RedemptionRateInterval uint64 `protobuf:"varint,3,opt,name=redemption_rate_interval,json=redemptionRateInterval,proto3" json:"redemption_rate_interval,omitempty"` - StrideCommission uint64 `protobuf:"varint,4,opt,name=stride_commission,json=strideCommission,proto3" json:"stride_commission,omitempty"` - ReinvestInterval uint64 `protobuf:"varint,7,opt,name=reinvest_interval,json=reinvestInterval,proto3" json:"reinvest_interval,omitempty"` - IcaTimeoutNanos uint64 `protobuf:"varint,9,opt,name=ica_timeout_nanos,json=icaTimeoutNanos,proto3" json:"ica_timeout_nanos,omitempty"` - BufferSize uint64 `protobuf:"varint,10,opt,name=buffer_size,json=bufferSize,proto3" json:"buffer_size,omitempty"` - IbcTimeoutBlocks uint64 `protobuf:"varint,11,opt,name=ibc_timeout_blocks,json=ibcTimeoutBlocks,proto3" json:"ibc_timeout_blocks,omitempty"` - FeeTransferTimeoutNanos uint64 `protobuf:"varint,12,opt,name=fee_transfer_timeout_nanos,json=feeTransferTimeoutNanos,proto3" json:"fee_transfer_timeout_nanos,omitempty"` - MaxStakeIcaCallsPerEpoch uint64 `protobuf:"varint,13,opt,name=max_stake_ica_calls_per_epoch,json=maxStakeIcaCallsPerEpoch,proto3" json:"max_stake_ica_calls_per_epoch,omitempty"` - DefaultMinRedemptionRateThreshold uint64 `protobuf:"varint,14,opt,name=default_min_redemption_rate_threshold,json=defaultMinRedemptionRateThreshold,proto3" json:"default_min_redemption_rate_threshold,omitempty"` - DefaultMaxRedemptionRateThreshold uint64 `protobuf:"varint,15,opt,name=default_max_redemption_rate_threshold,json=defaultMaxRedemptionRateThreshold,proto3" json:"default_max_redemption_rate_threshold,omitempty"` - IbcTransferTimeoutNanos uint64 `protobuf:"varint,16,opt,name=ibc_transfer_timeout_nanos,json=ibcTransferTimeoutNanos,proto3" json:"ibc_transfer_timeout_nanos,omitempty"` - ValidatorSlashQueryThreshold uint64 `protobuf:"varint,19,opt,name=validator_slash_query_threshold,json=validatorSlashQueryThreshold,proto3" json:"validator_slash_query_threshold,omitempty"` - ValidatorWeightCap uint64 `protobuf:"varint,20,opt,name=validator_weight_cap,json=validatorWeightCap,proto3" json:"validator_weight_cap,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_5aeaab6a38c2b438, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetRewardsInterval() uint64 { - if m != nil { - return m.RewardsInterval - } - return 0 -} - -func (m *Params) GetDelegateInterval() uint64 { - if m != nil { - return m.DelegateInterval - } - return 0 -} - -func (m *Params) GetDepositInterval() uint64 { - if m != nil { - return m.DepositInterval - } - return 0 -} - -func (m *Params) GetRedemptionRateInterval() uint64 { - if m != nil { - return m.RedemptionRateInterval - } - return 0 -} - -func (m *Params) GetStrideCommission() uint64 { - if m != nil { - return m.StrideCommission - } - return 0 -} - -func (m *Params) GetReinvestInterval() uint64 { - if m != nil { - return m.ReinvestInterval - } - return 0 -} - -func (m *Params) GetIcaTimeoutNanos() uint64 { - if m != nil { - return m.IcaTimeoutNanos - } - return 0 -} - -func (m *Params) GetBufferSize() uint64 { - if m != nil { - return m.BufferSize - } - return 0 -} - -func (m *Params) GetIbcTimeoutBlocks() uint64 { - if m != nil { - return m.IbcTimeoutBlocks - } - return 0 -} - -func (m *Params) GetFeeTransferTimeoutNanos() uint64 { - if m != nil { - return m.FeeTransferTimeoutNanos - } - return 0 -} - -func (m *Params) GetMaxStakeIcaCallsPerEpoch() uint64 { - if m != nil { - return m.MaxStakeIcaCallsPerEpoch - } - return 0 -} - -func (m *Params) GetDefaultMinRedemptionRateThreshold() uint64 { - if m != nil { - return m.DefaultMinRedemptionRateThreshold - } - return 0 -} - -func (m *Params) GetDefaultMaxRedemptionRateThreshold() uint64 { - if m != nil { - return m.DefaultMaxRedemptionRateThreshold - } - return 0 -} - -func (m *Params) GetIbcTransferTimeoutNanos() uint64 { - if m != nil { - return m.IbcTransferTimeoutNanos - } - return 0 -} - -func (m *Params) GetValidatorSlashQueryThreshold() uint64 { - if m != nil { - return m.ValidatorSlashQueryThreshold - } - return 0 -} - -func (m *Params) GetValidatorWeightCap() uint64 { - if m != nil { - return m.ValidatorWeightCap - } - return 0 -} - -func init() { - proto.RegisterType((*Params)(nil), "stride.stakeibc.Params") -} - -func init() { proto.RegisterFile("stride/stakeibc/params.proto", fileDescriptor_5aeaab6a38c2b438) } - -var fileDescriptor_5aeaab6a38c2b438 = []byte{ - // 576 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xc1, 0x4f, 0x13, 0x41, - 0x14, 0xc6, 0x5b, 0xdd, 0x40, 0x19, 0x54, 0xb6, 0x0b, 0xd1, 0x0d, 0xc1, 0x45, 0x4d, 0x4c, 0x44, - 0x94, 0x1a, 0xbd, 0x18, 0x39, 0x98, 0x40, 0x38, 0x40, 0xd4, 0x20, 0x90, 0x98, 0x78, 0x99, 0xbc, - 0x9d, 0x7d, 0xed, 0x4e, 0xd8, 0xdd, 0x59, 0x67, 0xa6, 0xd0, 0xf2, 0x27, 0x78, 0xf2, 0xe8, 0xd1, - 0x3f, 0xc7, 0x23, 0x47, 0x8f, 0x86, 0xfe, 0x23, 0x66, 0x67, 0xb6, 0xbb, 0x5d, 0x83, 0xde, 0xda, - 0xef, 0xfb, 0xbd, 0x6f, 0xbe, 0x79, 0x93, 0x96, 0xac, 0x29, 0x2d, 0x79, 0x84, 0x3d, 0xa5, 0xe1, - 0x14, 0x79, 0xc8, 0x7a, 0x39, 0x48, 0x48, 0xd5, 0x56, 0x2e, 0x85, 0x16, 0xde, 0x92, 0x75, 0xb7, - 0xa6, 0xee, 0xea, 0xca, 0x40, 0x0c, 0x84, 0xf1, 0x7a, 0xc5, 0x27, 0x8b, 0x3d, 0xfa, 0x3a, 0x4f, - 0xe6, 0x0e, 0xcd, 0x9c, 0xb7, 0x41, 0x5c, 0x89, 0xe7, 0x20, 0x23, 0x45, 0x79, 0xa6, 0x51, 0x9e, - 0x41, 0xe2, 0xb7, 0x1f, 0xb4, 0x9f, 0x38, 0x47, 0x4b, 0xa5, 0xbe, 0x5f, 0xca, 0xde, 0x26, 0xe9, - 0x46, 0x98, 0xe0, 0x00, 0x34, 0xd6, 0xec, 0x9c, 0x61, 0xdd, 0xa9, 0x51, 0xc1, 0x1b, 0xc4, 0x8d, - 0x30, 0x17, 0x8a, 0xeb, 0x9a, 0xbd, 0x61, 0x73, 0x4b, 0xbd, 0x42, 0x5f, 0x13, 0x5f, 0x62, 0x84, - 0x69, 0xae, 0xb9, 0xc8, 0xa8, 0x6c, 0xc4, 0xdf, 0x34, 0x23, 0x77, 0x6b, 0xff, 0x68, 0xf6, 0x90, - 0x4d, 0xd2, 0xb5, 0x17, 0xa6, 0x4c, 0xa4, 0x29, 0x57, 0x8a, 0x8b, 0xcc, 0x77, 0x6c, 0x23, 0x6b, - 0xec, 0x56, 0x7a, 0x01, 0x4b, 0xe4, 0xd9, 0x19, 0xaa, 0x99, 0x4a, 0xf3, 0x16, 0x9e, 0x1a, 0x55, - 0xf2, 0x53, 0xd2, 0xe5, 0x0c, 0xa8, 0xe6, 0x29, 0x8a, 0xa1, 0xa6, 0x19, 0x64, 0x42, 0xf9, 0x0b, - 0xb6, 0x3f, 0x67, 0x70, 0x62, 0xf5, 0x0f, 0x85, 0xec, 0xad, 0x93, 0xc5, 0x70, 0xd8, 0xef, 0xa3, - 0xa4, 0x8a, 0x5f, 0xa0, 0x4f, 0x0c, 0x45, 0xac, 0x74, 0xcc, 0x2f, 0xd0, 0x7b, 0x46, 0x3c, 0x1e, - 0xb2, 0x2a, 0x2c, 0x4c, 0x04, 0x3b, 0x55, 0xfe, 0xa2, 0x3d, 0x9a, 0x87, 0xac, 0x4c, 0xdb, 0x31, - 0xba, 0xb7, 0x4d, 0x56, 0xfb, 0x88, 0x54, 0x4b, 0xc8, 0x54, 0x11, 0xda, 0xec, 0x70, 0xcb, 0x4c, - 0xdd, 0xeb, 0x23, 0x9e, 0x94, 0x40, 0xa3, 0xcb, 0x5b, 0x72, 0x3f, 0x85, 0x11, 0x35, 0xef, 0x4f, - 0x8b, 0x1b, 0x30, 0x48, 0x12, 0x45, 0x73, 0x94, 0x14, 0x73, 0xc1, 0x62, 0xff, 0xb6, 0x99, 0xf7, - 0x53, 0x18, 0x1d, 0x17, 0xcc, 0x3e, 0x83, 0xdd, 0x82, 0x38, 0x44, 0xb9, 0x57, 0xf8, 0xde, 0x21, - 0x79, 0x1c, 0x61, 0x1f, 0x86, 0x89, 0xa6, 0x29, 0xcf, 0xe8, 0xdf, 0x0f, 0xa3, 0x63, 0x89, 0x2a, - 0x16, 0x49, 0xe4, 0xdf, 0x31, 0x41, 0x0f, 0x4b, 0xf8, 0x3d, 0xcf, 0x8e, 0x1a, 0x6f, 0x74, 0x32, - 0x05, 0x1b, 0x89, 0x30, 0xfa, 0x4f, 0xe2, 0x52, 0x33, 0x11, 0x46, 0xff, 0x4a, 0xdc, 0x26, 0xab, - 0x66, 0x9f, 0xd7, 0x6f, 0xc8, 0xb5, 0x1b, 0x2a, 0xf6, 0x7a, 0xdd, 0x86, 0xf6, 0xc8, 0xfa, 0x19, - 0x24, 0x3c, 0x02, 0x2d, 0x24, 0x55, 0x09, 0xa8, 0x98, 0x7e, 0x19, 0xa2, 0x1c, 0xcf, 0x14, 0x59, - 0x36, 0x09, 0x6b, 0x15, 0x76, 0x5c, 0x50, 0x1f, 0x0b, 0xa8, 0xee, 0xf0, 0x82, 0xac, 0xd4, 0x31, - 0xe7, 0xc8, 0x07, 0xb1, 0xa6, 0x0c, 0x72, 0x7f, 0xc5, 0xcc, 0x7a, 0x95, 0xf7, 0xc9, 0x58, 0xbb, - 0x90, 0xbf, 0x71, 0xbe, 0xff, 0x58, 0x6f, 0x1d, 0x38, 0x9d, 0x8e, 0xbb, 0x70, 0xe0, 0x74, 0xba, - 0xae, 0x77, 0xe0, 0x74, 0x3c, 0x77, 0x79, 0xe7, 0xdd, 0xcf, 0xab, 0xa0, 0x7d, 0x79, 0x15, 0xb4, - 0x7f, 0x5f, 0x05, 0xed, 0x6f, 0x93, 0xa0, 0x75, 0x39, 0x09, 0x5a, 0xbf, 0x26, 0x41, 0xeb, 0xf3, - 0xcb, 0x01, 0xd7, 0xf1, 0x30, 0xdc, 0x62, 0x22, 0xed, 0xa5, 0x3c, 0x39, 0x1d, 0x9f, 0xc3, 0xf8, - 0x79, 0x02, 0xa1, 0xaa, 0xbe, 0xf5, 0x46, 0xf5, 0x1f, 0x81, 0x1e, 0xe7, 0xa8, 0xc2, 0x39, 0xf3, - 0x0b, 0x7f, 0xf5, 0x27, 0x00, 0x00, 0xff, 0xff, 0x63, 0x77, 0xb1, 0x47, 0x28, 0x04, 0x00, 0x00, -} - -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ValidatorWeightCap != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.ValidatorWeightCap)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa0 - } - if m.ValidatorSlashQueryThreshold != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.ValidatorSlashQueryThreshold)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - if m.IbcTransferTimeoutNanos != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.IbcTransferTimeoutNanos)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if m.DefaultMaxRedemptionRateThreshold != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.DefaultMaxRedemptionRateThreshold)) - i-- - dAtA[i] = 0x78 - } - if m.DefaultMinRedemptionRateThreshold != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.DefaultMinRedemptionRateThreshold)) - i-- - dAtA[i] = 0x70 - } - if m.MaxStakeIcaCallsPerEpoch != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxStakeIcaCallsPerEpoch)) - i-- - dAtA[i] = 0x68 - } - if m.FeeTransferTimeoutNanos != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.FeeTransferTimeoutNanos)) - i-- - dAtA[i] = 0x60 - } - if m.IbcTimeoutBlocks != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.IbcTimeoutBlocks)) - i-- - dAtA[i] = 0x58 - } - if m.BufferSize != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.BufferSize)) - i-- - dAtA[i] = 0x50 - } - if m.IcaTimeoutNanos != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.IcaTimeoutNanos)) - i-- - dAtA[i] = 0x48 - } - if m.ReinvestInterval != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.ReinvestInterval)) - i-- - dAtA[i] = 0x38 - } - if m.DelegateInterval != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.DelegateInterval)) - i-- - dAtA[i] = 0x30 - } - if m.StrideCommission != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.StrideCommission)) - i-- - dAtA[i] = 0x20 - } - if m.RedemptionRateInterval != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.RedemptionRateInterval)) - i-- - dAtA[i] = 0x18 - } - if m.DepositInterval != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.DepositInterval)) - i-- - dAtA[i] = 0x10 - } - if m.RewardsInterval != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.RewardsInterval)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RewardsInterval != 0 { - n += 1 + sovParams(uint64(m.RewardsInterval)) - } - if m.DepositInterval != 0 { - n += 1 + sovParams(uint64(m.DepositInterval)) - } - if m.RedemptionRateInterval != 0 { - n += 1 + sovParams(uint64(m.RedemptionRateInterval)) - } - if m.StrideCommission != 0 { - n += 1 + sovParams(uint64(m.StrideCommission)) - } - if m.DelegateInterval != 0 { - n += 1 + sovParams(uint64(m.DelegateInterval)) - } - if m.ReinvestInterval != 0 { - n += 1 + sovParams(uint64(m.ReinvestInterval)) - } - if m.IcaTimeoutNanos != 0 { - n += 1 + sovParams(uint64(m.IcaTimeoutNanos)) - } - if m.BufferSize != 0 { - n += 1 + sovParams(uint64(m.BufferSize)) - } - if m.IbcTimeoutBlocks != 0 { - n += 1 + sovParams(uint64(m.IbcTimeoutBlocks)) - } - if m.FeeTransferTimeoutNanos != 0 { - n += 1 + sovParams(uint64(m.FeeTransferTimeoutNanos)) - } - if m.MaxStakeIcaCallsPerEpoch != 0 { - n += 1 + sovParams(uint64(m.MaxStakeIcaCallsPerEpoch)) - } - if m.DefaultMinRedemptionRateThreshold != 0 { - n += 1 + sovParams(uint64(m.DefaultMinRedemptionRateThreshold)) - } - if m.DefaultMaxRedemptionRateThreshold != 0 { - n += 1 + sovParams(uint64(m.DefaultMaxRedemptionRateThreshold)) - } - if m.IbcTransferTimeoutNanos != 0 { - n += 2 + sovParams(uint64(m.IbcTransferTimeoutNanos)) - } - if m.ValidatorSlashQueryThreshold != 0 { - n += 2 + sovParams(uint64(m.ValidatorSlashQueryThreshold)) - } - if m.ValidatorWeightCap != 0 { - n += 2 + sovParams(uint64(m.ValidatorWeightCap)) - } - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardsInterval", wireType) - } - m.RewardsInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RewardsInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DepositInterval", wireType) - } - m.DepositInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DepositInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RedemptionRateInterval", wireType) - } - m.RedemptionRateInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RedemptionRateInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StrideCommission", wireType) - } - m.StrideCommission = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StrideCommission |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegateInterval", wireType) - } - m.DelegateInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DelegateInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReinvestInterval", wireType) - } - m.ReinvestInterval = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReinvestInterval |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IcaTimeoutNanos", wireType) - } - m.IcaTimeoutNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IcaTimeoutNanos |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BufferSize", wireType) - } - m.BufferSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BufferSize |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcTimeoutBlocks", wireType) - } - m.IbcTimeoutBlocks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IbcTimeoutBlocks |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeTransferTimeoutNanos", wireType) - } - m.FeeTransferTimeoutNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeTransferTimeoutNanos |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxStakeIcaCallsPerEpoch", wireType) - } - m.MaxStakeIcaCallsPerEpoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxStakeIcaCallsPerEpoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultMinRedemptionRateThreshold", wireType) - } - m.DefaultMinRedemptionRateThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DefaultMinRedemptionRateThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultMaxRedemptionRateThreshold", wireType) - } - m.DefaultMaxRedemptionRateThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DefaultMaxRedemptionRateThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcTransferTimeoutNanos", wireType) - } - m.IbcTransferTimeoutNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IbcTransferTimeoutNanos |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorSlashQueryThreshold", wireType) - } - m.ValidatorSlashQueryThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorSlashQueryThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorWeightCap", wireType) - } - m.ValidatorWeightCap = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ValidatorWeightCap |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/query.pb.go b/x/stakeibc/types/query.pb.go deleted file mode 100644 index df01ab500..000000000 --- a/x/stakeibc/types/query.pb.go +++ /dev/null @@ -1,4500 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/query.proto - -package types - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryInterchainAccountFromAddressRequest is the request type for the -// Query/InterchainAccountAddress RPC -type QueryInterchainAccountFromAddressRequest struct { - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` -} - -func (m *QueryInterchainAccountFromAddressRequest) Reset() { - *m = QueryInterchainAccountFromAddressRequest{} -} -func (m *QueryInterchainAccountFromAddressRequest) String() string { return proto.CompactTextString(m) } -func (*QueryInterchainAccountFromAddressRequest) ProtoMessage() {} -func (*QueryInterchainAccountFromAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{0} -} -func (m *QueryInterchainAccountFromAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryInterchainAccountFromAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryInterchainAccountFromAddressRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryInterchainAccountFromAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryInterchainAccountFromAddressRequest.Merge(m, src) -} -func (m *QueryInterchainAccountFromAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryInterchainAccountFromAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryInterchainAccountFromAddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryInterchainAccountFromAddressRequest proto.InternalMessageInfo - -func (m *QueryInterchainAccountFromAddressRequest) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *QueryInterchainAccountFromAddressRequest) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -// QueryInterchainAccountFromAddressResponse the response type for the -// Query/InterchainAccountAddress RPC -type QueryInterchainAccountFromAddressResponse struct { - InterchainAccountAddress string `protobuf:"bytes,1,opt,name=interchain_account_address,json=interchainAccountAddress,proto3" json:"interchain_account_address,omitempty" yaml:"interchain_account_address"` -} - -func (m *QueryInterchainAccountFromAddressResponse) Reset() { - *m = QueryInterchainAccountFromAddressResponse{} -} -func (m *QueryInterchainAccountFromAddressResponse) String() string { - return proto.CompactTextString(m) -} -func (*QueryInterchainAccountFromAddressResponse) ProtoMessage() {} -func (*QueryInterchainAccountFromAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{1} -} -func (m *QueryInterchainAccountFromAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryInterchainAccountFromAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryInterchainAccountFromAddressResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryInterchainAccountFromAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryInterchainAccountFromAddressResponse.Merge(m, src) -} -func (m *QueryInterchainAccountFromAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryInterchainAccountFromAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryInterchainAccountFromAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryInterchainAccountFromAddressResponse proto.InternalMessageInfo - -func (m *QueryInterchainAccountFromAddressResponse) GetInterchainAccountAddress() string { - if m != nil { - return m.InterchainAccountAddress - } - return "" -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{2} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params holds all the parameters of this module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{3} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -type QueryGetValidatorsRequest struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (m *QueryGetValidatorsRequest) Reset() { *m = QueryGetValidatorsRequest{} } -func (m *QueryGetValidatorsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetValidatorsRequest) ProtoMessage() {} -func (*QueryGetValidatorsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{4} -} -func (m *QueryGetValidatorsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetValidatorsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetValidatorsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetValidatorsRequest.Merge(m, src) -} -func (m *QueryGetValidatorsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetValidatorsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetValidatorsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetValidatorsRequest proto.InternalMessageInfo - -func (m *QueryGetValidatorsRequest) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -type QueryGetValidatorsResponse struct { - Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"` -} - -func (m *QueryGetValidatorsResponse) Reset() { *m = QueryGetValidatorsResponse{} } -func (m *QueryGetValidatorsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetValidatorsResponse) ProtoMessage() {} -func (*QueryGetValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{5} -} -func (m *QueryGetValidatorsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetValidatorsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetValidatorsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetValidatorsResponse.Merge(m, src) -} -func (m *QueryGetValidatorsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetValidatorsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetValidatorsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetValidatorsResponse proto.InternalMessageInfo - -func (m *QueryGetValidatorsResponse) GetValidators() []*Validator { - if m != nil { - return m.Validators - } - return nil -} - -type QueryGetHostZoneRequest struct { - ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (m *QueryGetHostZoneRequest) Reset() { *m = QueryGetHostZoneRequest{} } -func (m *QueryGetHostZoneRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetHostZoneRequest) ProtoMessage() {} -func (*QueryGetHostZoneRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{6} -} -func (m *QueryGetHostZoneRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetHostZoneRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetHostZoneRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetHostZoneRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetHostZoneRequest.Merge(m, src) -} -func (m *QueryGetHostZoneRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetHostZoneRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetHostZoneRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetHostZoneRequest proto.InternalMessageInfo - -func (m *QueryGetHostZoneRequest) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -type QueryGetHostZoneResponse struct { - HostZone HostZone `protobuf:"bytes,1,opt,name=host_zone,json=hostZone,proto3" json:"host_zone"` -} - -func (m *QueryGetHostZoneResponse) Reset() { *m = QueryGetHostZoneResponse{} } -func (m *QueryGetHostZoneResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetHostZoneResponse) ProtoMessage() {} -func (*QueryGetHostZoneResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{7} -} -func (m *QueryGetHostZoneResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetHostZoneResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetHostZoneResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetHostZoneResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetHostZoneResponse.Merge(m, src) -} -func (m *QueryGetHostZoneResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetHostZoneResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetHostZoneResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetHostZoneResponse proto.InternalMessageInfo - -func (m *QueryGetHostZoneResponse) GetHostZone() HostZone { - if m != nil { - return m.HostZone - } - return HostZone{} -} - -type QueryAllHostZoneRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllHostZoneRequest) Reset() { *m = QueryAllHostZoneRequest{} } -func (m *QueryAllHostZoneRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllHostZoneRequest) ProtoMessage() {} -func (*QueryAllHostZoneRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{8} -} -func (m *QueryAllHostZoneRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllHostZoneRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllHostZoneRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllHostZoneRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllHostZoneRequest.Merge(m, src) -} -func (m *QueryAllHostZoneRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllHostZoneRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllHostZoneRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllHostZoneRequest proto.InternalMessageInfo - -func (m *QueryAllHostZoneRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryAllHostZoneResponse struct { - HostZone []HostZone `protobuf:"bytes,1,rep,name=host_zone,json=hostZone,proto3" json:"host_zone"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllHostZoneResponse) Reset() { *m = QueryAllHostZoneResponse{} } -func (m *QueryAllHostZoneResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllHostZoneResponse) ProtoMessage() {} -func (*QueryAllHostZoneResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{9} -} -func (m *QueryAllHostZoneResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllHostZoneResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllHostZoneResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllHostZoneResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllHostZoneResponse.Merge(m, src) -} -func (m *QueryAllHostZoneResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllHostZoneResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllHostZoneResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllHostZoneResponse proto.InternalMessageInfo - -func (m *QueryAllHostZoneResponse) GetHostZone() []HostZone { - if m != nil { - return m.HostZone - } - return nil -} - -func (m *QueryAllHostZoneResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryModuleAddressRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (m *QueryModuleAddressRequest) Reset() { *m = QueryModuleAddressRequest{} } -func (m *QueryModuleAddressRequest) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAddressRequest) ProtoMessage() {} -func (*QueryModuleAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{10} -} -func (m *QueryModuleAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryModuleAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryModuleAddressRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryModuleAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAddressRequest.Merge(m, src) -} -func (m *QueryModuleAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryModuleAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryModuleAddressRequest proto.InternalMessageInfo - -func (m *QueryModuleAddressRequest) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -type QueryModuleAddressResponse struct { - Addr string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"` -} - -func (m *QueryModuleAddressResponse) Reset() { *m = QueryModuleAddressResponse{} } -func (m *QueryModuleAddressResponse) String() string { return proto.CompactTextString(m) } -func (*QueryModuleAddressResponse) ProtoMessage() {} -func (*QueryModuleAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{11} -} -func (m *QueryModuleAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryModuleAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryModuleAddressResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryModuleAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryModuleAddressResponse.Merge(m, src) -} -func (m *QueryModuleAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryModuleAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryModuleAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryModuleAddressResponse proto.InternalMessageInfo - -func (m *QueryModuleAddressResponse) GetAddr() string { - if m != nil { - return m.Addr - } - return "" -} - -type QueryGetEpochTrackerRequest struct { - EpochIdentifier string `protobuf:"bytes,1,opt,name=epoch_identifier,json=epochIdentifier,proto3" json:"epoch_identifier,omitempty"` -} - -func (m *QueryGetEpochTrackerRequest) Reset() { *m = QueryGetEpochTrackerRequest{} } -func (m *QueryGetEpochTrackerRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetEpochTrackerRequest) ProtoMessage() {} -func (*QueryGetEpochTrackerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{12} -} -func (m *QueryGetEpochTrackerRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetEpochTrackerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetEpochTrackerRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetEpochTrackerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetEpochTrackerRequest.Merge(m, src) -} -func (m *QueryGetEpochTrackerRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetEpochTrackerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetEpochTrackerRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetEpochTrackerRequest proto.InternalMessageInfo - -func (m *QueryGetEpochTrackerRequest) GetEpochIdentifier() string { - if m != nil { - return m.EpochIdentifier - } - return "" -} - -type QueryGetEpochTrackerResponse struct { - EpochTracker EpochTracker `protobuf:"bytes,1,opt,name=epoch_tracker,json=epochTracker,proto3" json:"epoch_tracker"` -} - -func (m *QueryGetEpochTrackerResponse) Reset() { *m = QueryGetEpochTrackerResponse{} } -func (m *QueryGetEpochTrackerResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetEpochTrackerResponse) ProtoMessage() {} -func (*QueryGetEpochTrackerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{13} -} -func (m *QueryGetEpochTrackerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetEpochTrackerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetEpochTrackerResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetEpochTrackerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetEpochTrackerResponse.Merge(m, src) -} -func (m *QueryGetEpochTrackerResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetEpochTrackerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetEpochTrackerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetEpochTrackerResponse proto.InternalMessageInfo - -func (m *QueryGetEpochTrackerResponse) GetEpochTracker() EpochTracker { - if m != nil { - return m.EpochTracker - } - return EpochTracker{} -} - -type QueryAllEpochTrackerRequest struct { -} - -func (m *QueryAllEpochTrackerRequest) Reset() { *m = QueryAllEpochTrackerRequest{} } -func (m *QueryAllEpochTrackerRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllEpochTrackerRequest) ProtoMessage() {} -func (*QueryAllEpochTrackerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{14} -} -func (m *QueryAllEpochTrackerRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllEpochTrackerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllEpochTrackerRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllEpochTrackerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllEpochTrackerRequest.Merge(m, src) -} -func (m *QueryAllEpochTrackerRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllEpochTrackerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllEpochTrackerRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllEpochTrackerRequest proto.InternalMessageInfo - -type QueryAllEpochTrackerResponse struct { - EpochTracker []EpochTracker `protobuf:"bytes,1,rep,name=epoch_tracker,json=epochTracker,proto3" json:"epoch_tracker"` -} - -func (m *QueryAllEpochTrackerResponse) Reset() { *m = QueryAllEpochTrackerResponse{} } -func (m *QueryAllEpochTrackerResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllEpochTrackerResponse) ProtoMessage() {} -func (*QueryAllEpochTrackerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{15} -} -func (m *QueryAllEpochTrackerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllEpochTrackerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllEpochTrackerResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllEpochTrackerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllEpochTrackerResponse.Merge(m, src) -} -func (m *QueryAllEpochTrackerResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllEpochTrackerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllEpochTrackerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllEpochTrackerResponse proto.InternalMessageInfo - -func (m *QueryAllEpochTrackerResponse) GetEpochTracker() []EpochTracker { - if m != nil { - return m.EpochTracker - } - return nil -} - -type QueryGetNextPacketSequenceRequest struct { - ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` -} - -func (m *QueryGetNextPacketSequenceRequest) Reset() { *m = QueryGetNextPacketSequenceRequest{} } -func (m *QueryGetNextPacketSequenceRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetNextPacketSequenceRequest) ProtoMessage() {} -func (*QueryGetNextPacketSequenceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{16} -} -func (m *QueryGetNextPacketSequenceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetNextPacketSequenceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetNextPacketSequenceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetNextPacketSequenceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetNextPacketSequenceRequest.Merge(m, src) -} -func (m *QueryGetNextPacketSequenceRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetNextPacketSequenceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetNextPacketSequenceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetNextPacketSequenceRequest proto.InternalMessageInfo - -func (m *QueryGetNextPacketSequenceRequest) GetChannelId() string { - if m != nil { - return m.ChannelId - } - return "" -} - -func (m *QueryGetNextPacketSequenceRequest) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - -type QueryGetNextPacketSequenceResponse struct { - Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` -} - -func (m *QueryGetNextPacketSequenceResponse) Reset() { *m = QueryGetNextPacketSequenceResponse{} } -func (m *QueryGetNextPacketSequenceResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetNextPacketSequenceResponse) ProtoMessage() {} -func (*QueryGetNextPacketSequenceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{17} -} -func (m *QueryGetNextPacketSequenceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetNextPacketSequenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetNextPacketSequenceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetNextPacketSequenceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetNextPacketSequenceResponse.Merge(m, src) -} -func (m *QueryGetNextPacketSequenceResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetNextPacketSequenceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetNextPacketSequenceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetNextPacketSequenceResponse proto.InternalMessageInfo - -func (m *QueryGetNextPacketSequenceResponse) GetSequence() uint64 { - if m != nil { - return m.Sequence - } - return 0 -} - -type QueryAddressUnbondings struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryAddressUnbondings) Reset() { *m = QueryAddressUnbondings{} } -func (m *QueryAddressUnbondings) String() string { return proto.CompactTextString(m) } -func (*QueryAddressUnbondings) ProtoMessage() {} -func (*QueryAddressUnbondings) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{18} -} -func (m *QueryAddressUnbondings) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAddressUnbondings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAddressUnbondings.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAddressUnbondings) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAddressUnbondings.Merge(m, src) -} -func (m *QueryAddressUnbondings) XXX_Size() int { - return m.Size() -} -func (m *QueryAddressUnbondings) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAddressUnbondings.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAddressUnbondings proto.InternalMessageInfo - -func (m *QueryAddressUnbondings) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -type QueryAddressUnbondingsResponse struct { - AddressUnbondings []AddressUnbonding `protobuf:"bytes,1,rep,name=address_unbondings,json=addressUnbondings,proto3" json:"address_unbondings"` -} - -func (m *QueryAddressUnbondingsResponse) Reset() { *m = QueryAddressUnbondingsResponse{} } -func (m *QueryAddressUnbondingsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAddressUnbondingsResponse) ProtoMessage() {} -func (*QueryAddressUnbondingsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{19} -} -func (m *QueryAddressUnbondingsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAddressUnbondingsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAddressUnbondingsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAddressUnbondingsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAddressUnbondingsResponse.Merge(m, src) -} -func (m *QueryAddressUnbondingsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAddressUnbondingsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAddressUnbondingsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAddressUnbondingsResponse proto.InternalMessageInfo - -func (m *QueryAddressUnbondingsResponse) GetAddressUnbondings() []AddressUnbonding { - if m != nil { - return m.AddressUnbondings - } - return nil -} - -type QueryAllTradeRoutes struct { -} - -func (m *QueryAllTradeRoutes) Reset() { *m = QueryAllTradeRoutes{} } -func (m *QueryAllTradeRoutes) String() string { return proto.CompactTextString(m) } -func (*QueryAllTradeRoutes) ProtoMessage() {} -func (*QueryAllTradeRoutes) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{20} -} -func (m *QueryAllTradeRoutes) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllTradeRoutes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllTradeRoutes.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllTradeRoutes) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllTradeRoutes.Merge(m, src) -} -func (m *QueryAllTradeRoutes) XXX_Size() int { - return m.Size() -} -func (m *QueryAllTradeRoutes) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllTradeRoutes.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllTradeRoutes proto.InternalMessageInfo - -type QueryAllTradeRoutesResponse struct { - TradeRoutes []TradeRoute `protobuf:"bytes,1,rep,name=trade_routes,json=tradeRoutes,proto3" json:"trade_routes"` -} - -func (m *QueryAllTradeRoutesResponse) Reset() { *m = QueryAllTradeRoutesResponse{} } -func (m *QueryAllTradeRoutesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllTradeRoutesResponse) ProtoMessage() {} -func (*QueryAllTradeRoutesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_494b786fe66f2b80, []int{21} -} -func (m *QueryAllTradeRoutesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllTradeRoutesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllTradeRoutesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllTradeRoutesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllTradeRoutesResponse.Merge(m, src) -} -func (m *QueryAllTradeRoutesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllTradeRoutesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllTradeRoutesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllTradeRoutesResponse proto.InternalMessageInfo - -func (m *QueryAllTradeRoutesResponse) GetTradeRoutes() []TradeRoute { - if m != nil { - return m.TradeRoutes - } - return nil -} - -func init() { - proto.RegisterType((*QueryInterchainAccountFromAddressRequest)(nil), "stride.stakeibc.QueryInterchainAccountFromAddressRequest") - proto.RegisterType((*QueryInterchainAccountFromAddressResponse)(nil), "stride.stakeibc.QueryInterchainAccountFromAddressResponse") - proto.RegisterType((*QueryParamsRequest)(nil), "stride.stakeibc.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "stride.stakeibc.QueryParamsResponse") - proto.RegisterType((*QueryGetValidatorsRequest)(nil), "stride.stakeibc.QueryGetValidatorsRequest") - proto.RegisterType((*QueryGetValidatorsResponse)(nil), "stride.stakeibc.QueryGetValidatorsResponse") - proto.RegisterType((*QueryGetHostZoneRequest)(nil), "stride.stakeibc.QueryGetHostZoneRequest") - proto.RegisterType((*QueryGetHostZoneResponse)(nil), "stride.stakeibc.QueryGetHostZoneResponse") - proto.RegisterType((*QueryAllHostZoneRequest)(nil), "stride.stakeibc.QueryAllHostZoneRequest") - proto.RegisterType((*QueryAllHostZoneResponse)(nil), "stride.stakeibc.QueryAllHostZoneResponse") - proto.RegisterType((*QueryModuleAddressRequest)(nil), "stride.stakeibc.QueryModuleAddressRequest") - proto.RegisterType((*QueryModuleAddressResponse)(nil), "stride.stakeibc.QueryModuleAddressResponse") - proto.RegisterType((*QueryGetEpochTrackerRequest)(nil), "stride.stakeibc.QueryGetEpochTrackerRequest") - proto.RegisterType((*QueryGetEpochTrackerResponse)(nil), "stride.stakeibc.QueryGetEpochTrackerResponse") - proto.RegisterType((*QueryAllEpochTrackerRequest)(nil), "stride.stakeibc.QueryAllEpochTrackerRequest") - proto.RegisterType((*QueryAllEpochTrackerResponse)(nil), "stride.stakeibc.QueryAllEpochTrackerResponse") - proto.RegisterType((*QueryGetNextPacketSequenceRequest)(nil), "stride.stakeibc.QueryGetNextPacketSequenceRequest") - proto.RegisterType((*QueryGetNextPacketSequenceResponse)(nil), "stride.stakeibc.QueryGetNextPacketSequenceResponse") - proto.RegisterType((*QueryAddressUnbondings)(nil), "stride.stakeibc.QueryAddressUnbondings") - proto.RegisterType((*QueryAddressUnbondingsResponse)(nil), "stride.stakeibc.QueryAddressUnbondingsResponse") - proto.RegisterType((*QueryAllTradeRoutes)(nil), "stride.stakeibc.QueryAllTradeRoutes") - proto.RegisterType((*QueryAllTradeRoutesResponse)(nil), "stride.stakeibc.QueryAllTradeRoutesResponse") -} - -func init() { proto.RegisterFile("stride/stakeibc/query.proto", fileDescriptor_494b786fe66f2b80) } - -var fileDescriptor_494b786fe66f2b80 = []byte{ - // 1246 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x97, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xc7, 0xb3, 0x6d, 0x9a, 0xa6, 0x4f, 0xd2, 0x96, 0x0e, 0x81, 0x38, 0x9b, 0xc4, 0x21, 0xd3, - 0xd0, 0xbc, 0x34, 0xf1, 0x12, 0xa7, 0x20, 0x35, 0xa2, 0x02, 0x47, 0xb4, 0x8d, 0x51, 0x40, 0xc1, - 0x2d, 0x15, 0x2a, 0x07, 0x6b, 0xbc, 0x3b, 0xd8, 0xab, 0xac, 0x77, 0xdc, 0xdd, 0x71, 0x9b, 0x10, - 0x59, 0x95, 0xf8, 0x00, 0xa8, 0x02, 0x21, 0x24, 0x6e, 0x45, 0x1c, 0x38, 0xf3, 0x29, 0x7a, 0xa3, - 0x12, 0x17, 0x4e, 0x11, 0x4a, 0xf8, 0x04, 0xfd, 0x04, 0x68, 0x67, 0x67, 0xd7, 0xeb, 0x7d, 0x31, - 0x4e, 0x6f, 0x9e, 0x99, 0xe7, 0xe5, 0x37, 0xcf, 0xcc, 0x3c, 0xff, 0x35, 0x4c, 0xbb, 0xdc, 0x31, - 0x0d, 0xaa, 0xb9, 0x9c, 0xec, 0x51, 0xb3, 0xa6, 0x6b, 0x8f, 0xda, 0xd4, 0x39, 0x28, 0xb4, 0x1c, - 0xc6, 0x19, 0xba, 0xec, 0x2f, 0x16, 0x82, 0x45, 0x75, 0xa2, 0xce, 0xea, 0x4c, 0xac, 0x69, 0xde, - 0x2f, 0xdf, 0x4c, 0x9d, 0xa9, 0x33, 0x56, 0xb7, 0xa8, 0x46, 0x5a, 0xa6, 0x46, 0x6c, 0x9b, 0x71, - 0xc2, 0x4d, 0x66, 0xbb, 0x72, 0x75, 0x45, 0x67, 0x6e, 0x93, 0xb9, 0x5a, 0x8d, 0xb8, 0xd4, 0x8f, - 0xae, 0x3d, 0x5e, 0xaf, 0x51, 0x4e, 0xd6, 0xb5, 0x16, 0xa9, 0x9b, 0xb6, 0x30, 0x0e, 0x22, 0xc5, - 0x69, 0x5a, 0xc4, 0x21, 0xcd, 0x20, 0xd2, 0x5c, 0x7c, 0xf5, 0x31, 0xb1, 0x4c, 0x83, 0x70, 0xe6, - 0x64, 0x19, 0x34, 0x98, 0xcb, 0xab, 0xdf, 0x32, 0x9b, 0x4a, 0x83, 0xab, 0x71, 0x03, 0xda, 0x62, - 0x7a, 0xa3, 0xca, 0x1d, 0xa2, 0xef, 0xd1, 0x20, 0xca, 0x62, 0xdc, 0x88, 0x18, 0x86, 0x43, 0x5d, - 0xb7, 0xda, 0xb6, 0x6b, 0xcc, 0x36, 0x4c, 0xbb, 0x2e, 0x0d, 0xe7, 0xe3, 0x86, 0xdc, 0x21, 0x06, - 0xad, 0x3a, 0xac, 0xcd, 0x65, 0x42, 0xfc, 0x14, 0x96, 0xbe, 0xf0, 0xb6, 0x5c, 0xb6, 0x39, 0x75, - 0xf4, 0x06, 0x31, 0xed, 0x92, 0xae, 0xb3, 0xb6, 0xcd, 0xef, 0x38, 0xac, 0x59, 0xf2, 0xe3, 0x56, - 0xe8, 0xa3, 0x36, 0x75, 0x39, 0x9a, 0x80, 0x73, 0xec, 0x89, 0x4d, 0x9d, 0x9c, 0xf2, 0x8e, 0xb2, - 0x74, 0xa1, 0xe2, 0x0f, 0xd0, 0x2d, 0xb8, 0xa8, 0x33, 0xdb, 0xa6, 0xba, 0x57, 0xa6, 0xaa, 0x69, - 0xe4, 0xce, 0x78, 0xab, 0x5b, 0xb9, 0x57, 0x47, 0x73, 0x13, 0x07, 0xa4, 0x69, 0x6d, 0xe2, 0x9e, - 0x65, 0x5c, 0x19, 0xef, 0x8e, 0xcb, 0x06, 0x7e, 0xa6, 0xc0, 0xf2, 0x00, 0x04, 0x6e, 0x8b, 0xd9, - 0x2e, 0x45, 0x3a, 0xa8, 0x66, 0x68, 0x57, 0x25, 0xbe, 0x61, 0x55, 0xee, 0xdf, 0xe7, 0xda, 0x7a, - 0xf7, 0xd5, 0xd1, 0xdc, 0xbc, 0x9f, 0x39, 0xdb, 0x16, 0x57, 0x72, 0x66, 0x3c, 0xa1, 0x4c, 0x86, - 0x27, 0x00, 0x09, 0xa2, 0x5d, 0x71, 0xb6, 0x72, 0xf7, 0x78, 0x07, 0xde, 0xec, 0x99, 0x95, 0x44, - 0xef, 0xc3, 0x88, 0x7f, 0x07, 0x44, 0xf6, 0xb1, 0xe2, 0x64, 0x21, 0x76, 0x27, 0x0b, 0xbe, 0xc3, - 0xd6, 0xf0, 0x8b, 0xa3, 0xb9, 0xa1, 0x8a, 0x34, 0xc6, 0x1f, 0xc0, 0x94, 0x88, 0x76, 0x97, 0xf2, - 0x07, 0xc1, 0x25, 0x09, 0x0b, 0x3d, 0x05, 0xa3, 0x3e, 0xb4, 0x69, 0xc8, 0x5a, 0x9f, 0x17, 0xe3, - 0xb2, 0x81, 0xbf, 0x02, 0x35, 0xcd, 0x4f, 0xc2, 0x6c, 0x02, 0x84, 0x57, 0xce, 0x03, 0x3a, 0xbb, - 0x34, 0x56, 0x54, 0x13, 0x40, 0xa1, 0x63, 0x25, 0x62, 0x8d, 0x6f, 0xc0, 0x64, 0x10, 0x79, 0x9b, - 0xb9, 0xfc, 0x21, 0xb3, 0xe9, 0x40, 0x3c, 0xb9, 0xa4, 0x97, 0xa4, 0xf9, 0x10, 0x2e, 0x84, 0xf7, - 0x5b, 0x56, 0x67, 0x2a, 0x01, 0x13, 0x78, 0xc9, 0xfa, 0x8c, 0x36, 0xe4, 0x18, 0x13, 0xc9, 0x53, - 0xb2, 0xac, 0x38, 0xcf, 0x1d, 0x80, 0xee, 0xcb, 0x94, 0x91, 0xaf, 0x15, 0xfc, 0x67, 0x5c, 0xf0, - 0x9e, 0x71, 0xc1, 0x6f, 0x12, 0xf2, 0x19, 0x17, 0x76, 0x49, 0x3d, 0xf0, 0xad, 0x44, 0x3c, 0xf1, - 0x73, 0x45, 0xd2, 0xf7, 0xe4, 0x48, 0xa7, 0x3f, 0x7b, 0x2a, 0x7a, 0x74, 0xb7, 0x07, 0xf1, 0x8c, - 0x40, 0x5c, 0xfc, 0x5f, 0x44, 0x3f, 0x75, 0x0f, 0xa3, 0x26, 0x2f, 0xca, 0x67, 0xcc, 0x68, 0x5b, - 0x34, 0xf6, 0x22, 0x11, 0x0c, 0xdb, 0xa4, 0x49, 0xe5, 0xa1, 0x88, 0xdf, 0xf8, 0x3d, 0x79, 0x43, - 0x62, 0x0e, 0x72, 0x57, 0x08, 0x86, 0xbd, 0x17, 0x10, 0x78, 0x78, 0xbf, 0xf1, 0x36, 0x4c, 0x07, - 0x67, 0x78, 0xdb, 0x6b, 0x37, 0xf7, 0xfd, 0x6e, 0x13, 0x24, 0x59, 0x86, 0x37, 0xfc, 0x2e, 0x64, - 0x1a, 0xd4, 0xe6, 0xe6, 0x37, 0x66, 0xd8, 0x01, 0x2e, 0x8b, 0xf9, 0x72, 0x38, 0x8d, 0x1b, 0x30, - 0x93, 0x1e, 0x49, 0x66, 0xdf, 0x86, 0x8b, 0x3d, 0x0d, 0x4d, 0x9e, 0xdd, 0x6c, 0xa2, 0xae, 0x51, - 0x6f, 0x59, 0xdb, 0x71, 0x1a, 0x99, 0xc3, 0xb3, 0x92, 0xb9, 0x64, 0x59, 0x29, 0xcc, 0x21, 0x48, - 0x62, 0x39, 0x1b, 0xe4, 0xec, 0xeb, 0x81, 0x7c, 0x0d, 0xf3, 0xc1, 0x96, 0x3f, 0xa7, 0xfb, 0x7c, - 0xd7, 0x9b, 0xe5, 0xf7, 0x3c, 0x0c, 0x5b, 0x0f, 0x2f, 0xec, 0x2c, 0x80, 0xde, 0x20, 0xb6, 0x4d, - 0xad, 0xee, 0x13, 0xba, 0x20, 0x67, 0xca, 0x06, 0x9a, 0x84, 0xf3, 0x2d, 0xe6, 0xf0, 0xb0, 0x79, - 0x56, 0x46, 0xbc, 0x61, 0xd9, 0xc0, 0x1f, 0x03, 0xee, 0x17, 0x5c, 0x6e, 0x46, 0x85, 0x51, 0x57, - 0xce, 0x89, 0xd8, 0xc3, 0x95, 0x70, 0x8c, 0x8b, 0xf0, 0xb6, 0x5f, 0x08, 0xff, 0x1e, 0x7c, 0x19, - 0x28, 0x84, 0x8b, 0x72, 0x70, 0xbe, 0xa7, 0x6f, 0x56, 0x82, 0x21, 0xde, 0x87, 0x7c, 0xba, 0x4f, - 0x98, 0xf1, 0x01, 0xa0, 0x84, 0xe6, 0x04, 0xfd, 0x66, 0x3e, 0x51, 0xc3, 0x78, 0x1c, 0x59, 0xc7, - 0x2b, 0x24, 0x1e, 0x1f, 0xbf, 0x25, 0x7b, 0x6c, 0xc9, 0xb2, 0xee, 0x7b, 0x52, 0x55, 0xf1, 0x94, - 0xca, 0xc5, 0x7a, 0xf7, 0xb0, 0x23, 0xd3, 0x21, 0xcd, 0x27, 0x30, 0x1e, 0x11, 0xb6, 0x80, 0x63, - 0x3a, 0xc1, 0xd1, 0xf5, 0x95, 0x04, 0x63, 0xbc, 0x1b, 0xad, 0xf8, 0xfd, 0x25, 0x38, 0x27, 0xb2, - 0xa0, 0xa7, 0x30, 0xe2, 0xf7, 0x6c, 0x74, 0x35, 0x11, 0x23, 0x29, 0x0c, 0xea, 0x42, 0x7f, 0x23, - 0x1f, 0x12, 0xaf, 0x7c, 0xf7, 0xd7, 0xbf, 0x3f, 0x9e, 0x59, 0x40, 0x58, 0xbb, 0x27, 0xac, 0x2d, - 0x52, 0x73, 0xb5, 0xf4, 0xaf, 0x09, 0xf4, 0x5c, 0x01, 0xe8, 0x76, 0x77, 0xb4, 0x92, 0x9e, 0x20, - 0x4d, 0x3a, 0xd4, 0xeb, 0x03, 0xd9, 0x4a, 0xa6, 0x4d, 0xc1, 0x74, 0x03, 0x15, 0x25, 0xd3, 0xda, - 0x4e, 0x1a, 0x54, 0x57, 0x23, 0xb4, 0xc3, 0x40, 0x06, 0x3a, 0xe8, 0x17, 0x05, 0x46, 0x83, 0xee, - 0x87, 0x96, 0x32, 0xb3, 0xc6, 0x5a, 0xb7, 0xba, 0x3c, 0x80, 0xa5, 0xa4, 0xbb, 0x29, 0xe8, 0x36, - 0xd0, 0x7a, 0x5f, 0xba, 0xb0, 0x47, 0x47, 0xe1, 0x7e, 0x50, 0x60, 0x2c, 0x88, 0x57, 0xb2, 0xac, - 0x2c, 0xbe, 0xa4, 0xb4, 0x64, 0xf1, 0xa5, 0x08, 0x04, 0x2e, 0x08, 0xbe, 0x25, 0x74, 0x6d, 0x30, - 0x3e, 0xf4, 0x9b, 0x02, 0x17, 0x7b, 0x9a, 0x72, 0xd6, 0xc1, 0xa6, 0xb5, 0xfa, 0xac, 0x83, 0x4d, - 0xed, 0xf2, 0x03, 0x1e, 0x6c, 0x53, 0xf8, 0x06, 0x5f, 0x44, 0xda, 0xa1, 0x27, 0x1f, 0x1d, 0xf4, - 0x93, 0x02, 0x33, 0xfd, 0xbe, 0xc5, 0xd0, 0xcd, 0x74, 0x92, 0x01, 0xbe, 0x20, 0xd5, 0xcd, 0xd7, - 0x71, 0x95, 0xaf, 0xfc, 0x0f, 0x05, 0xc6, 0xa3, 0xdd, 0x18, 0xad, 0x66, 0x5e, 0xa5, 0x14, 0x45, - 0x50, 0xd7, 0x06, 0xb4, 0x96, 0x15, 0xbc, 0x2d, 0x2a, 0xf8, 0x11, 0xba, 0xd5, 0xb7, 0x82, 0x3d, - 0x1a, 0xa2, 0x1d, 0xc6, 0x65, 0xb2, 0x83, 0x7e, 0x55, 0xe0, 0x72, 0x34, 0xbe, 0x77, 0x19, 0x57, - 0x33, 0xaf, 0xd8, 0x29, 0xb8, 0x33, 0x84, 0x0d, 0x17, 0x05, 0xf7, 0x2a, 0x5a, 0x19, 0x9c, 0x1b, - 0xfd, 0xa9, 0x00, 0x4a, 0xca, 0x0b, 0x2a, 0x66, 0x56, 0x2c, 0x53, 0xe8, 0xd4, 0x8d, 0x53, 0xf9, - 0x48, 0xe6, 0x5d, 0xc1, 0xfc, 0x29, 0xda, 0xee, 0xcb, 0x6c, 0xd3, 0x7d, 0x5e, 0x6d, 0x89, 0x08, - 0xd5, 0x40, 0xde, 0xc4, 0x9b, 0x97, 0xb2, 0xda, 0xd1, 0x0e, 0xa5, 0x88, 0x76, 0xd0, 0xef, 0x0a, - 0x5c, 0x49, 0x2a, 0xde, 0x62, 0x46, 0x29, 0xe3, 0x86, 0xaa, 0x36, 0xa0, 0xe1, 0x29, 0x5b, 0x55, - 0x57, 0x2a, 0xb5, 0x43, 0xf9, 0xe8, 0x3a, 0xe8, 0x67, 0x05, 0x2e, 0xf5, 0xea, 0x1a, 0x5a, 0xc8, - 0x3c, 0xf2, 0x88, 0x95, 0xba, 0x3a, 0x88, 0x55, 0x48, 0xb8, 0x2e, 0x08, 0xaf, 0xa3, 0xe5, 0xbe, - 0x84, 0x51, 0x19, 0xdd, 0xda, 0x79, 0x71, 0x9c, 0x57, 0x5e, 0x1e, 0xe7, 0x95, 0x7f, 0x8e, 0xf3, - 0xca, 0xb3, 0x93, 0xfc, 0xd0, 0xcb, 0x93, 0xfc, 0xd0, 0xdf, 0x27, 0xf9, 0xa1, 0x87, 0xc5, 0xba, - 0xc9, 0x1b, 0xed, 0x5a, 0x41, 0x67, 0x4d, 0xad, 0x69, 0x5a, 0x7b, 0x07, 0x4f, 0xc8, 0xc1, 0x9a, - 0x10, 0xb4, 0x60, 0xa4, 0xed, 0x47, 0x82, 0x1e, 0xb4, 0xa8, 0x5b, 0x1b, 0x11, 0xff, 0x37, 0x37, - 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x81, 0x74, 0x1a, 0xd0, 0x0f, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Queries a Validator by host zone. - Validators(ctx context.Context, in *QueryGetValidatorsRequest, opts ...grpc.CallOption) (*QueryGetValidatorsResponse, error) - // Queries a HostZone by id. - HostZone(ctx context.Context, in *QueryGetHostZoneRequest, opts ...grpc.CallOption) (*QueryGetHostZoneResponse, error) - // Queries a list of HostZone items. - HostZoneAll(ctx context.Context, in *QueryAllHostZoneRequest, opts ...grpc.CallOption) (*QueryAllHostZoneResponse, error) - // Queries a list of ModuleAddress items. - ModuleAddress(ctx context.Context, in *QueryModuleAddressRequest, opts ...grpc.CallOption) (*QueryModuleAddressResponse, error) - // QueryInterchainAccountFromAddress returns the interchain account for given - // owner address on a given connection pair - InterchainAccountFromAddress(ctx context.Context, in *QueryInterchainAccountFromAddressRequest, opts ...grpc.CallOption) (*QueryInterchainAccountFromAddressResponse, error) - // Queries a EpochTracker by index. - EpochTracker(ctx context.Context, in *QueryGetEpochTrackerRequest, opts ...grpc.CallOption) (*QueryGetEpochTrackerResponse, error) - // Queries a list of EpochTracker items. - EpochTrackerAll(ctx context.Context, in *QueryAllEpochTrackerRequest, opts ...grpc.CallOption) (*QueryAllEpochTrackerResponse, error) - // Queries the next packet sequence for one for a given channel - NextPacketSequence(ctx context.Context, in *QueryGetNextPacketSequenceRequest, opts ...grpc.CallOption) (*QueryGetNextPacketSequenceResponse, error) - // Queries an address's unbondings - AddressUnbondings(ctx context.Context, in *QueryAddressUnbondings, opts ...grpc.CallOption) (*QueryAddressUnbondingsResponse, error) - // Queries all trade routes - AllTradeRoutes(ctx context.Context, in *QueryAllTradeRoutes, opts ...grpc.CallOption) (*QueryAllTradeRoutesResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Validators(ctx context.Context, in *QueryGetValidatorsRequest, opts ...grpc.CallOption) (*QueryGetValidatorsResponse, error) { - out := new(QueryGetValidatorsResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/Validators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) HostZone(ctx context.Context, in *QueryGetHostZoneRequest, opts ...grpc.CallOption) (*QueryGetHostZoneResponse, error) { - out := new(QueryGetHostZoneResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/HostZone", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) HostZoneAll(ctx context.Context, in *QueryAllHostZoneRequest, opts ...grpc.CallOption) (*QueryAllHostZoneResponse, error) { - out := new(QueryAllHostZoneResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/HostZoneAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ModuleAddress(ctx context.Context, in *QueryModuleAddressRequest, opts ...grpc.CallOption) (*QueryModuleAddressResponse, error) { - out := new(QueryModuleAddressResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/ModuleAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) InterchainAccountFromAddress(ctx context.Context, in *QueryInterchainAccountFromAddressRequest, opts ...grpc.CallOption) (*QueryInterchainAccountFromAddressResponse, error) { - out := new(QueryInterchainAccountFromAddressResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/InterchainAccountFromAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochTracker(ctx context.Context, in *QueryGetEpochTrackerRequest, opts ...grpc.CallOption) (*QueryGetEpochTrackerResponse, error) { - out := new(QueryGetEpochTrackerResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/EpochTracker", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EpochTrackerAll(ctx context.Context, in *QueryAllEpochTrackerRequest, opts ...grpc.CallOption) (*QueryAllEpochTrackerResponse, error) { - out := new(QueryAllEpochTrackerResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/EpochTrackerAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) NextPacketSequence(ctx context.Context, in *QueryGetNextPacketSequenceRequest, opts ...grpc.CallOption) (*QueryGetNextPacketSequenceResponse, error) { - out := new(QueryGetNextPacketSequenceResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/NextPacketSequence", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AddressUnbondings(ctx context.Context, in *QueryAddressUnbondings, opts ...grpc.CallOption) (*QueryAddressUnbondingsResponse, error) { - out := new(QueryAddressUnbondingsResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/AddressUnbondings", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) AllTradeRoutes(ctx context.Context, in *QueryAllTradeRoutes, opts ...grpc.CallOption) (*QueryAllTradeRoutesResponse, error) { - out := new(QueryAllTradeRoutesResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Query/AllTradeRoutes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Queries a Validator by host zone. - Validators(context.Context, *QueryGetValidatorsRequest) (*QueryGetValidatorsResponse, error) - // Queries a HostZone by id. - HostZone(context.Context, *QueryGetHostZoneRequest) (*QueryGetHostZoneResponse, error) - // Queries a list of HostZone items. - HostZoneAll(context.Context, *QueryAllHostZoneRequest) (*QueryAllHostZoneResponse, error) - // Queries a list of ModuleAddress items. - ModuleAddress(context.Context, *QueryModuleAddressRequest) (*QueryModuleAddressResponse, error) - // QueryInterchainAccountFromAddress returns the interchain account for given - // owner address on a given connection pair - InterchainAccountFromAddress(context.Context, *QueryInterchainAccountFromAddressRequest) (*QueryInterchainAccountFromAddressResponse, error) - // Queries a EpochTracker by index. - EpochTracker(context.Context, *QueryGetEpochTrackerRequest) (*QueryGetEpochTrackerResponse, error) - // Queries a list of EpochTracker items. - EpochTrackerAll(context.Context, *QueryAllEpochTrackerRequest) (*QueryAllEpochTrackerResponse, error) - // Queries the next packet sequence for one for a given channel - NextPacketSequence(context.Context, *QueryGetNextPacketSequenceRequest) (*QueryGetNextPacketSequenceResponse, error) - // Queries an address's unbondings - AddressUnbondings(context.Context, *QueryAddressUnbondings) (*QueryAddressUnbondingsResponse, error) - // Queries all trade routes - AllTradeRoutes(context.Context, *QueryAllTradeRoutes) (*QueryAllTradeRoutesResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (*UnimplementedQueryServer) Validators(ctx context.Context, req *QueryGetValidatorsRequest) (*QueryGetValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Validators not implemented") -} -func (*UnimplementedQueryServer) HostZone(ctx context.Context, req *QueryGetHostZoneRequest) (*QueryGetHostZoneResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HostZone not implemented") -} -func (*UnimplementedQueryServer) HostZoneAll(ctx context.Context, req *QueryAllHostZoneRequest) (*QueryAllHostZoneResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method HostZoneAll not implemented") -} -func (*UnimplementedQueryServer) ModuleAddress(ctx context.Context, req *QueryModuleAddressRequest) (*QueryModuleAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ModuleAddress not implemented") -} -func (*UnimplementedQueryServer) InterchainAccountFromAddress(ctx context.Context, req *QueryInterchainAccountFromAddressRequest) (*QueryInterchainAccountFromAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InterchainAccountFromAddress not implemented") -} -func (*UnimplementedQueryServer) EpochTracker(ctx context.Context, req *QueryGetEpochTrackerRequest) (*QueryGetEpochTrackerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochTracker not implemented") -} -func (*UnimplementedQueryServer) EpochTrackerAll(ctx context.Context, req *QueryAllEpochTrackerRequest) (*QueryAllEpochTrackerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EpochTrackerAll not implemented") -} -func (*UnimplementedQueryServer) NextPacketSequence(ctx context.Context, req *QueryGetNextPacketSequenceRequest) (*QueryGetNextPacketSequenceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NextPacketSequence not implemented") -} -func (*UnimplementedQueryServer) AddressUnbondings(ctx context.Context, req *QueryAddressUnbondings) (*QueryAddressUnbondingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddressUnbondings not implemented") -} -func (*UnimplementedQueryServer) AllTradeRoutes(ctx context.Context, req *QueryAllTradeRoutes) (*QueryAllTradeRoutesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AllTradeRoutes not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Validators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetValidatorsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Validators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/Validators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Validators(ctx, req.(*QueryGetValidatorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_HostZone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetHostZoneRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).HostZone(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/HostZone", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).HostZone(ctx, req.(*QueryGetHostZoneRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_HostZoneAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllHostZoneRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).HostZoneAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/HostZoneAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).HostZoneAll(ctx, req.(*QueryAllHostZoneRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ModuleAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryModuleAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ModuleAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/ModuleAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ModuleAddress(ctx, req.(*QueryModuleAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_InterchainAccountFromAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryInterchainAccountFromAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).InterchainAccountFromAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/InterchainAccountFromAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).InterchainAccountFromAddress(ctx, req.(*QueryInterchainAccountFromAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochTracker_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetEpochTrackerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochTracker(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/EpochTracker", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochTracker(ctx, req.(*QueryGetEpochTrackerRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EpochTrackerAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllEpochTrackerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EpochTrackerAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/EpochTrackerAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EpochTrackerAll(ctx, req.(*QueryAllEpochTrackerRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_NextPacketSequence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetNextPacketSequenceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).NextPacketSequence(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/NextPacketSequence", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).NextPacketSequence(ctx, req.(*QueryGetNextPacketSequenceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AddressUnbondings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAddressUnbondings) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AddressUnbondings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/AddressUnbondings", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AddressUnbondings(ctx, req.(*QueryAddressUnbondings)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_AllTradeRoutes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllTradeRoutes) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AllTradeRoutes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Query/AllTradeRoutes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AllTradeRoutes(ctx, req.(*QueryAllTradeRoutes)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "stride.stakeibc.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "Validators", - Handler: _Query_Validators_Handler, - }, - { - MethodName: "HostZone", - Handler: _Query_HostZone_Handler, - }, - { - MethodName: "HostZoneAll", - Handler: _Query_HostZoneAll_Handler, - }, - { - MethodName: "ModuleAddress", - Handler: _Query_ModuleAddress_Handler, - }, - { - MethodName: "InterchainAccountFromAddress", - Handler: _Query_InterchainAccountFromAddress_Handler, - }, - { - MethodName: "EpochTracker", - Handler: _Query_EpochTracker_Handler, - }, - { - MethodName: "EpochTrackerAll", - Handler: _Query_EpochTrackerAll_Handler, - }, - { - MethodName: "NextPacketSequence", - Handler: _Query_NextPacketSequence_Handler, - }, - { - MethodName: "AddressUnbondings", - Handler: _Query_AddressUnbondings_Handler, - }, - { - MethodName: "AllTradeRoutes", - Handler: _Query_AllTradeRoutes_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/stakeibc/query.proto", -} - -func (m *QueryInterchainAccountFromAddressRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryInterchainAccountFromAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryInterchainAccountFromAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ConnectionId) > 0 { - i -= len(m.ConnectionId) - copy(dAtA[i:], m.ConnectionId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ConnectionId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryInterchainAccountFromAddressResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryInterchainAccountFromAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryInterchainAccountFromAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.InterchainAccountAddress) > 0 { - i -= len(m.InterchainAccountAddress) - copy(dAtA[i:], m.InterchainAccountAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.InterchainAccountAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryGetValidatorsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetValidatorsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetValidatorsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryGetHostZoneRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetHostZoneRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetHostZoneRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetHostZoneResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetHostZoneResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetHostZoneResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.HostZone.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryAllHostZoneRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllHostZoneRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllHostZoneRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAllHostZoneResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllHostZoneResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllHostZoneResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.HostZone) > 0 { - for iNdEx := len(m.HostZone) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.HostZone[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryModuleAddressRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryModuleAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryModuleAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryModuleAddressResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryModuleAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryModuleAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addr) > 0 { - i -= len(m.Addr) - copy(dAtA[i:], m.Addr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Addr))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetEpochTrackerRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetEpochTrackerRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetEpochTrackerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EpochIdentifier) > 0 { - i -= len(m.EpochIdentifier) - copy(dAtA[i:], m.EpochIdentifier) - i = encodeVarintQuery(dAtA, i, uint64(len(m.EpochIdentifier))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetEpochTrackerResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetEpochTrackerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetEpochTrackerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.EpochTracker.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryAllEpochTrackerRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllEpochTrackerRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllEpochTrackerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryAllEpochTrackerResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllEpochTrackerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllEpochTrackerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EpochTracker) > 0 { - for iNdEx := len(m.EpochTracker) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EpochTracker[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryGetNextPacketSequenceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetNextPacketSequenceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetNextPacketSequenceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0x12 - } - if len(m.ChannelId) > 0 { - i -= len(m.ChannelId) - copy(dAtA[i:], m.ChannelId) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetNextPacketSequenceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGetNextPacketSequenceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetNextPacketSequenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Sequence != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryAddressUnbondings) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAddressUnbondings) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAddressUnbondings) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAddressUnbondingsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAddressUnbondingsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAddressUnbondingsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AddressUnbondings) > 0 { - for iNdEx := len(m.AddressUnbondings) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AddressUnbondings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryAllTradeRoutes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllTradeRoutes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllTradeRoutes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryAllTradeRoutesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllTradeRoutesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllTradeRoutesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TradeRoutes) > 0 { - for iNdEx := len(m.TradeRoutes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TradeRoutes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryInterchainAccountFromAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Owner) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.ConnectionId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryInterchainAccountFromAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.InterchainAccountAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryGetValidatorsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetValidatorsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryGetHostZoneRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetHostZoneResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.HostZone.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllHostZoneRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllHostZoneResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.HostZone) > 0 { - for _, e := range m.HostZone { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryModuleAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryModuleAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Addr) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetEpochTrackerRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.EpochIdentifier) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetEpochTrackerResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.EpochTracker.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllEpochTrackerRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryAllEpochTrackerResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.EpochTracker) > 0 { - for _, e := range m.EpochTracker { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryGetNextPacketSequenceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChannelId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetNextPacketSequenceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sequence != 0 { - n += 1 + sovQuery(uint64(m.Sequence)) - } - return n -} - -func (m *QueryAddressUnbondings) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAddressUnbondingsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AddressUnbondings) > 0 { - for _, e := range m.AddressUnbondings { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *QueryAllTradeRoutes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryAllTradeRoutesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TradeRoutes) > 0 { - for _, e := range m.TradeRoutes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryInterchainAccountFromAddressRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryInterchainAccountFromAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryInterchainAccountFromAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryInterchainAccountFromAddressResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryInterchainAccountFromAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryInterchainAccountFromAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InterchainAccountAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InterchainAccountAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetValidatorsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetValidatorsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetValidatorsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, &Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetHostZoneRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetHostZoneRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetHostZoneRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetHostZoneResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetHostZoneResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetHostZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.HostZone.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllHostZoneRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllHostZoneRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllHostZoneRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllHostZoneResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllHostZoneResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllHostZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZone = append(m.HostZone, HostZone{}) - if err := m.HostZone[len(m.HostZone)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryModuleAddressRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryModuleAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryModuleAddressResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryModuleAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryModuleAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetEpochTrackerRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetEpochTrackerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetEpochTrackerRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochIdentifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EpochIdentifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetEpochTrackerResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetEpochTrackerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetEpochTrackerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochTracker", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.EpochTracker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllEpochTrackerRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllEpochTrackerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllEpochTrackerRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllEpochTrackerResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllEpochTrackerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllEpochTrackerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EpochTracker", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EpochTracker = append(m.EpochTracker, EpochTracker{}) - if err := m.EpochTracker[len(m.EpochTracker)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetNextPacketSequenceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetNextPacketSequenceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetNextPacketSequenceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetNextPacketSequenceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetNextPacketSequenceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetNextPacketSequenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAddressUnbondings) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAddressUnbondings: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAddressUnbondings: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAddressUnbondingsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAddressUnbondingsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAddressUnbondingsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AddressUnbondings", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AddressUnbondings = append(m.AddressUnbondings, AddressUnbonding{}) - if err := m.AddressUnbondings[len(m.AddressUnbondings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllTradeRoutes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllTradeRoutes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllTradeRoutes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllTradeRoutesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllTradeRoutesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllTradeRoutesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradeRoutes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradeRoutes = append(m.TradeRoutes, TradeRoute{}) - if err := m.TradeRoutes[len(m.TradeRoutes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/query.pb.gw.go b/x/stakeibc/types/query.pb.gw.go deleted file mode 100644 index 09aeee14b..000000000 --- a/x/stakeibc/types/query.pb.gw.go +++ /dev/null @@ -1,994 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: stride/stakeibc/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_Validators_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetValidatorsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - msg, err := client.Validators(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Validators_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetValidatorsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - msg, err := server.Validators(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_HostZone_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetHostZoneRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - msg, err := client.HostZone(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_HostZone_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetHostZoneRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["chain_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "chain_id") - } - - protoReq.ChainId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "chain_id", err) - } - - msg, err := server.HostZone(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_HostZoneAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_HostZoneAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllHostZoneRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_HostZoneAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.HostZoneAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_HostZoneAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllHostZoneRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_HostZoneAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.HostZoneAll(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_ModuleAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryModuleAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := client.ModuleAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ModuleAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryModuleAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["name"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name") - } - - protoReq.Name, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err) - } - - msg, err := server.ModuleAddress(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_EpochTracker_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetEpochTrackerRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["epoch_identifier"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_identifier") - } - - protoReq.EpochIdentifier, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_identifier", err) - } - - msg, err := client.EpochTracker(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EpochTracker_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetEpochTrackerRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["epoch_identifier"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "epoch_identifier") - } - - protoReq.EpochIdentifier, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "epoch_identifier", err) - } - - msg, err := server.EpochTracker(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_EpochTrackerAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllEpochTrackerRequest - var metadata runtime.ServerMetadata - - msg, err := client.EpochTrackerAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EpochTrackerAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllEpochTrackerRequest - var metadata runtime.ServerMetadata - - msg, err := server.EpochTrackerAll(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_NextPacketSequence_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetNextPacketSequenceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") - } - - protoReq.ChannelId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) - } - - val, ok = pathParams["port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") - } - - protoReq.PortId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) - } - - msg, err := client.NextPacketSequence(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_NextPacketSequence_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetNextPacketSequenceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["channel_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id") - } - - protoReq.ChannelId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err) - } - - val, ok = pathParams["port_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id") - } - - protoReq.PortId, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err) - } - - msg, err := server.NextPacketSequence(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_AddressUnbondings_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAddressUnbondings - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := client.AddressUnbondings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AddressUnbondings_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAddressUnbondings - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := server.AddressUnbondings(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_AllTradeRoutes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllTradeRoutes - var metadata runtime.ServerMetadata - - msg, err := client.AllTradeRoutes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_AllTradeRoutes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllTradeRoutes - var metadata runtime.ServerMetadata - - msg, err := server.AllTradeRoutes(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Validators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Validators_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Validators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_HostZone_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_HostZone_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_HostZone_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_HostZoneAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_HostZoneAll_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_HostZoneAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ModuleAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_ModuleAddress_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ModuleAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochTracker_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EpochTracker_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochTracker_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochTrackerAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EpochTrackerAll_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochTrackerAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_NextPacketSequence_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_NextPacketSequence_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_NextPacketSequence_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AddressUnbondings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_AddressUnbondings_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AddressUnbondings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AllTradeRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_AllTradeRoutes_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AllTradeRoutes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_Validators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Validators_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Validators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_HostZone_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_HostZone_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_HostZone_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_HostZoneAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_HostZoneAll_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_HostZoneAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ModuleAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_ModuleAddress_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_ModuleAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochTracker_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EpochTracker_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochTracker_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EpochTrackerAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EpochTrackerAll_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EpochTrackerAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_NextPacketSequence_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_NextPacketSequence_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_NextPacketSequence_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AddressUnbondings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_AddressUnbondings_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AddressUnbondings_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_AllTradeRoutes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_AllTradeRoutes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_AllTradeRoutes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stridelabs", "stride", "stakeibc", "params"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_Validators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "stakeibc", "validators", "chain_id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_HostZone_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "stakeibc", "host_zone", "chain_id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_HostZoneAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "stakeibc", "host_zone"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ModuleAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "stakeibc", "module_address", "name"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_EpochTracker_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "stakeibc", "epoch_tracker", "epoch_identifier"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_EpochTrackerAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "stakeibc", "epoch_tracker"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_NextPacketSequence_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"Stride-Labs", "stride", "stakeibc", "next_packet_sequence", "channel_id", "port_id"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_AddressUnbondings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"Stride-Labs", "stride", "stakeibc", "unbondings", "address"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_AllTradeRoutes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"Stride-Labs", "stride", "stakeibc", "trade_routes"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - - forward_Query_Validators_0 = runtime.ForwardResponseMessage - - forward_Query_HostZone_0 = runtime.ForwardResponseMessage - - forward_Query_HostZoneAll_0 = runtime.ForwardResponseMessage - - forward_Query_ModuleAddress_0 = runtime.ForwardResponseMessage - - forward_Query_EpochTracker_0 = runtime.ForwardResponseMessage - - forward_Query_EpochTrackerAll_0 = runtime.ForwardResponseMessage - - forward_Query_NextPacketSequence_0 = runtime.ForwardResponseMessage - - forward_Query_AddressUnbondings_0 = runtime.ForwardResponseMessage - - forward_Query_AllTradeRoutes_0 = runtime.ForwardResponseMessage -) diff --git a/x/stakeibc/types/query_register_ica.go b/x/stakeibc/types/query_register_ica.go deleted file mode 100644 index 44e349c64..000000000 --- a/x/stakeibc/types/query_register_ica.go +++ /dev/null @@ -1,16 +0,0 @@ -package types - -// NewQueryInterchainAccountRequest creates and returns a new QueryInterchainAccountFromAddressRequest -func NewQueryInterchainAccountRequest(connectionID, owner string) *QueryInterchainAccountFromAddressRequest { - return &QueryInterchainAccountFromAddressRequest{ - ConnectionId: connectionID, - Owner: owner, - } -} - -// NewQueryInterchainAccountResponse creates and returns a new QueryInterchainAccountFromAddressResponse -func NewQueryInterchainAccountResponse(interchainAccAddr string) *QueryInterchainAccountFromAddressResponse { - return &QueryInterchainAccountFromAddressResponse{ - InterchainAccountAddress: interchainAccAddr, - } -} diff --git a/x/stakeibc/types/trade_route.go b/x/stakeibc/types/trade_route.go deleted file mode 100644 index c20908871..000000000 --- a/x/stakeibc/types/trade_route.go +++ /dev/null @@ -1,23 +0,0 @@ -package types - -import fmt "fmt" - -// Builds the store key (as a string) from the reward and host denom's -func GetTradeRouteId(rewardDenom, hostDenom string) string { - return rewardDenom + "-" + hostDenom -} - -// Builds the store key (as a string) from the reward and host denom's -func (t TradeRoute) GetRouteId() string { - return GetTradeRouteId(t.RewardDenomOnRewardZone, t.HostDenomOnHostZone) -} - -// Builds the store key from the reward and host denom's -func (t TradeRoute) GetKey() []byte { - return TradeRouteKeyFromDenoms(t.RewardDenomOnRewardZone, t.HostDenomOnHostZone) -} - -// Human readable description for logging -func (t TradeRoute) Description() string { - return fmt.Sprintf("TradeRoute from %s to %s", t.RewardDenomOnRewardZone, t.HostDenomOnHostZone) -} diff --git a/x/stakeibc/types/trade_route.pb.go b/x/stakeibc/types/trade_route.pb.go deleted file mode 100644 index 28fa209ad..000000000 --- a/x/stakeibc/types/trade_route.pb.go +++ /dev/null @@ -1,1333 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/trade_route.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Stores pool information needed to execute the swap along a trade route -type TradeConfig struct { - // Currently Osmosis is the only trade chain so this is an osmosis pool id - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // Spot price in the pool to convert the reward denom to the host denom - // output_tokens = swap_price * input tokens - // This value may be slightly stale as it is updated by an ICQ - SwapPrice cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=swap_price,json=swapPrice,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"swap_price"` - // unix time in seconds that the price was last updated - PriceUpdateTimestamp uint64 `protobuf:"varint,3,opt,name=price_update_timestamp,json=priceUpdateTimestamp,proto3" json:"price_update_timestamp,omitempty"` - // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price on stride - // 0.05 means the output from the trade can be no less than a 5% deviation - // from the current value - MaxAllowedSwapLossRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=max_allowed_swap_loss_rate,json=maxAllowedSwapLossRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_allowed_swap_loss_rate"` - // min and max set boundaries of reward denom on trade chain we will swap - // min also decides when reward token transfers are worth it (transfer fees) - MinSwapAmount cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=min_swap_amount,json=minSwapAmount,proto3,customtype=cosmossdk.io/math.Int" json:"min_swap_amount"` - MaxSwapAmount cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=max_swap_amount,json=maxSwapAmount,proto3,customtype=cosmossdk.io/math.Int" json:"max_swap_amount"` -} - -func (m *TradeConfig) Reset() { *m = TradeConfig{} } -func (m *TradeConfig) String() string { return proto.CompactTextString(m) } -func (*TradeConfig) ProtoMessage() {} -func (*TradeConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_c252b142ecf88017, []int{0} -} -func (m *TradeConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TradeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TradeConfig.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TradeConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_TradeConfig.Merge(m, src) -} -func (m *TradeConfig) XXX_Size() int { - return m.Size() -} -func (m *TradeConfig) XXX_DiscardUnknown() { - xxx_messageInfo_TradeConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_TradeConfig proto.InternalMessageInfo - -func (m *TradeConfig) GetPoolId() uint64 { - if m != nil { - return m.PoolId - } - return 0 -} - -func (m *TradeConfig) GetPriceUpdateTimestamp() uint64 { - if m != nil { - return m.PriceUpdateTimestamp - } - return 0 -} - -// TradeRoute represents a round trip including info on transfer and how to do -// the swap. It makes the assumption that the reward token is always foreign to -// the host so therefore the first two hops are to unwind the ibc denom enroute -// to the trade chain and the last hop is the return so funds start/end in the -// withdrawl ICA on hostZone -// The structure is key'd on reward denom and host denom in their native forms -// (i.e. reward_denom_on_reward_zone and host_denom_on_host_zone) -type TradeRoute struct { - // ibc denom for the reward on the host zone - RewardDenomOnHostZone string `protobuf:"bytes,1,opt,name=reward_denom_on_host_zone,json=rewardDenomOnHostZone,proto3" json:"reward_denom_on_host_zone,omitempty"` - // should be the native denom for the reward chain - RewardDenomOnRewardZone string `protobuf:"bytes,2,opt,name=reward_denom_on_reward_zone,json=rewardDenomOnRewardZone,proto3" json:"reward_denom_on_reward_zone,omitempty"` - // ibc denom of the reward on the trade chain, input to the swap - RewardDenomOnTradeZone string `protobuf:"bytes,3,opt,name=reward_denom_on_trade_zone,json=rewardDenomOnTradeZone,proto3" json:"reward_denom_on_trade_zone,omitempty"` - // ibc of the host denom on the trade chain, output from the swap - HostDenomOnTradeZone string `protobuf:"bytes,4,opt,name=host_denom_on_trade_zone,json=hostDenomOnTradeZone,proto3" json:"host_denom_on_trade_zone,omitempty"` - // should be the same as the native host denom on the host chain - HostDenomOnHostZone string `protobuf:"bytes,5,opt,name=host_denom_on_host_zone,json=hostDenomOnHostZone,proto3" json:"host_denom_on_host_zone,omitempty"` - // ICAAccount on the host zone with the reward tokens - // This is the same as the host zone withdrawal ICA account - HostAccount ICAAccount `protobuf:"bytes,6,opt,name=host_account,json=hostAccount,proto3" json:"host_account"` - // ICAAccount on the reward zone that is acts as the intermediate - // receiver of the transfer from host zone to trade zone - RewardAccount ICAAccount `protobuf:"bytes,7,opt,name=reward_account,json=rewardAccount,proto3" json:"reward_account"` - // ICAAccount responsible for executing the swap of reward - // tokens for host tokens - TradeAccount ICAAccount `protobuf:"bytes,8,opt,name=trade_account,json=tradeAccount,proto3" json:"trade_account"` - // Channel responsible for the transfer of reward tokens from the host - // zone to the reward zone. This is the channel ID on the host zone side - HostToRewardChannelId string `protobuf:"bytes,9,opt,name=host_to_reward_channel_id,json=hostToRewardChannelId,proto3" json:"host_to_reward_channel_id,omitempty"` - // Channel responsible for the transfer of reward tokens from the reward - // zone to the trade zone. This is the channel ID on the reward zone side - RewardToTradeChannelId string `protobuf:"bytes,10,opt,name=reward_to_trade_channel_id,json=rewardToTradeChannelId,proto3" json:"reward_to_trade_channel_id,omitempty"` - // Channel responsible for the transfer of host tokens from the trade - // zone, back to the host zone. This is the channel ID on the trade zone side - TradeToHostChannelId string `protobuf:"bytes,11,opt,name=trade_to_host_channel_id,json=tradeToHostChannelId,proto3" json:"trade_to_host_channel_id,omitempty"` - // specifies the configuration needed to execute the swap - // such as pool_id, slippage, min trade amount, etc. - TradeConfig TradeConfig `protobuf:"bytes,12,opt,name=trade_config,json=tradeConfig,proto3" json:"trade_config"` -} - -func (m *TradeRoute) Reset() { *m = TradeRoute{} } -func (m *TradeRoute) String() string { return proto.CompactTextString(m) } -func (*TradeRoute) ProtoMessage() {} -func (*TradeRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_c252b142ecf88017, []int{1} -} -func (m *TradeRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TradeRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TradeRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TradeRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_TradeRoute.Merge(m, src) -} -func (m *TradeRoute) XXX_Size() int { - return m.Size() -} -func (m *TradeRoute) XXX_DiscardUnknown() { - xxx_messageInfo_TradeRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_TradeRoute proto.InternalMessageInfo - -func (m *TradeRoute) GetRewardDenomOnHostZone() string { - if m != nil { - return m.RewardDenomOnHostZone - } - return "" -} - -func (m *TradeRoute) GetRewardDenomOnRewardZone() string { - if m != nil { - return m.RewardDenomOnRewardZone - } - return "" -} - -func (m *TradeRoute) GetRewardDenomOnTradeZone() string { - if m != nil { - return m.RewardDenomOnTradeZone - } - return "" -} - -func (m *TradeRoute) GetHostDenomOnTradeZone() string { - if m != nil { - return m.HostDenomOnTradeZone - } - return "" -} - -func (m *TradeRoute) GetHostDenomOnHostZone() string { - if m != nil { - return m.HostDenomOnHostZone - } - return "" -} - -func (m *TradeRoute) GetHostAccount() ICAAccount { - if m != nil { - return m.HostAccount - } - return ICAAccount{} -} - -func (m *TradeRoute) GetRewardAccount() ICAAccount { - if m != nil { - return m.RewardAccount - } - return ICAAccount{} -} - -func (m *TradeRoute) GetTradeAccount() ICAAccount { - if m != nil { - return m.TradeAccount - } - return ICAAccount{} -} - -func (m *TradeRoute) GetHostToRewardChannelId() string { - if m != nil { - return m.HostToRewardChannelId - } - return "" -} - -func (m *TradeRoute) GetRewardToTradeChannelId() string { - if m != nil { - return m.RewardToTradeChannelId - } - return "" -} - -func (m *TradeRoute) GetTradeToHostChannelId() string { - if m != nil { - return m.TradeToHostChannelId - } - return "" -} - -func (m *TradeRoute) GetTradeConfig() TradeConfig { - if m != nil { - return m.TradeConfig - } - return TradeConfig{} -} - -func init() { - proto.RegisterType((*TradeConfig)(nil), "stride.stakeibc.TradeConfig") - proto.RegisterType((*TradeRoute)(nil), "stride.stakeibc.TradeRoute") -} - -func init() { proto.RegisterFile("stride/stakeibc/trade_route.proto", fileDescriptor_c252b142ecf88017) } - -var fileDescriptor_c252b142ecf88017 = []byte{ - // 663 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcd, 0x4e, 0xdb, 0x40, - 0x10, 0xc7, 0x93, 0xf2, 0xd5, 0x6c, 0x42, 0x91, 0x5c, 0x3e, 0x4c, 0x68, 0x03, 0xe5, 0xc4, 0x05, - 0x47, 0xa5, 0x08, 0xa1, 0xaa, 0x97, 0x40, 0xa8, 0x88, 0x84, 0x54, 0xe4, 0xa6, 0x17, 0x2e, 0xab, - 0x8d, 0xbd, 0x4d, 0x2c, 0xbc, 0x1e, 0xcb, 0xbb, 0x51, 0x92, 0x3e, 0x45, 0xdf, 0xa3, 0xd7, 0x3e, - 0x04, 0x47, 0xd4, 0x53, 0xd5, 0x03, 0xaa, 0xe0, 0x31, 0x7a, 0xa9, 0x76, 0xd6, 0x06, 0x87, 0xf4, - 0x10, 0xf5, 0x96, 0xc9, 0xcc, 0xef, 0x3f, 0x3b, 0xfb, 0xf7, 0x0e, 0x79, 0x25, 0x55, 0x12, 0xf8, - 0xbc, 0x2e, 0x15, 0xbb, 0xe4, 0x41, 0xc7, 0xab, 0xab, 0x84, 0xf9, 0x9c, 0x26, 0xd0, 0x57, 0xdc, - 0x89, 0x13, 0x50, 0x60, 0x2d, 0x99, 0x12, 0x27, 0x2b, 0xa9, 0x2e, 0x77, 0xa1, 0x0b, 0x98, 0xab, - 0xeb, 0x5f, 0xa6, 0xac, 0x3a, 0xa1, 0x14, 0x78, 0x8c, 0x32, 0xcf, 0x83, 0x7e, 0xa4, 0xd2, 0x92, - 0x75, 0x0f, 0xa4, 0x00, 0x49, 0x0d, 0x6b, 0x02, 0x93, 0xda, 0xfe, 0x36, 0x43, 0xca, 0x6d, 0xdd, - 0xfa, 0x18, 0xa2, 0xcf, 0x41, 0xd7, 0x5a, 0x23, 0x0b, 0x31, 0x40, 0x48, 0x03, 0xdf, 0x2e, 0x6e, - 0x15, 0x77, 0x66, 0xdd, 0x79, 0x1d, 0xb6, 0x7c, 0xeb, 0x9c, 0x10, 0x39, 0x60, 0x31, 0x8d, 0x93, - 0xc0, 0xe3, 0xf6, 0x93, 0xad, 0xe2, 0x4e, 0xe9, 0xe8, 0xf5, 0xd5, 0xcd, 0x66, 0xe1, 0xd7, 0xcd, - 0xe6, 0x86, 0x91, 0x94, 0xfe, 0xa5, 0x13, 0x40, 0x5d, 0x30, 0xd5, 0x73, 0xce, 0x78, 0x97, 0x79, - 0xa3, 0x26, 0xf7, 0x7e, 0x7c, 0xdf, 0x25, 0x69, 0xc7, 0x26, 0xf7, 0xdc, 0x92, 0x16, 0x39, 0xd7, - 0x1a, 0xd6, 0x3e, 0x59, 0x45, 0x31, 0xda, 0x8f, 0x7d, 0xa6, 0x38, 0x55, 0x81, 0xe0, 0x52, 0x31, - 0x11, 0xdb, 0x33, 0xd8, 0x79, 0x19, 0xb3, 0x9f, 0x30, 0xd9, 0xce, 0x72, 0x96, 0x20, 0x55, 0xc1, - 0x86, 0x94, 0x85, 0x21, 0x0c, 0xb8, 0x4f, 0xf1, 0x4c, 0x21, 0x48, 0x49, 0x13, 0xa6, 0xb8, 0x3d, - 0xfb, 0xbf, 0xe7, 0x5a, 0x15, 0x6c, 0xd8, 0x30, 0x9a, 0x1f, 0x07, 0x2c, 0x3e, 0x03, 0x29, 0x5d, - 0xa6, 0xb8, 0x75, 0x42, 0x96, 0x44, 0x10, 0x99, 0x36, 0x4c, 0xe8, 0x3b, 0xb5, 0xe7, 0xb0, 0xc7, - 0xcb, 0xb4, 0xc7, 0xca, 0x64, 0x8f, 0x56, 0xa4, 0xdc, 0x45, 0x11, 0x44, 0x5a, 0xa8, 0x81, 0x0c, - 0xca, 0xb0, 0xe1, 0x98, 0xcc, 0xfc, 0x74, 0x32, 0x6c, 0xf8, 0x20, 0xb3, 0xfd, 0x67, 0x8e, 0x10, - 0x74, 0xcb, 0xd5, 0xdf, 0x89, 0x75, 0x48, 0xd6, 0x13, 0x3e, 0x60, 0x89, 0x4f, 0x7d, 0x1e, 0x81, - 0xa0, 0x10, 0xd1, 0x1e, 0x48, 0x45, 0xbf, 0x40, 0xc4, 0xd1, 0xbe, 0x92, 0xbb, 0x62, 0x0a, 0x9a, - 0x3a, 0xff, 0x21, 0x3a, 0x05, 0xa9, 0x2e, 0x20, 0xe2, 0xd6, 0x3b, 0xb2, 0xf1, 0x98, 0x4c, 0x63, - 0x64, 0xd1, 0x5e, 0x77, 0x6d, 0x8c, 0x75, 0x31, 0x40, 0xfa, 0x2d, 0xa9, 0x3e, 0xa6, 0xcd, 0xe7, - 0x8b, 0xf0, 0x0c, 0xc2, 0xab, 0x63, 0x30, 0x1e, 0x1a, 0xd9, 0x03, 0x62, 0xe3, 0x19, 0xff, 0x45, - 0xa2, 0x7b, 0xee, 0xb2, 0xce, 0x4f, 0x70, 0xfb, 0x64, 0x6d, 0x9c, 0x7b, 0x98, 0x14, 0x0d, 0x71, - 0x9f, 0xe7, 0xb0, 0xfb, 0x39, 0x9b, 0xa4, 0x82, 0x75, 0xe9, 0x7b, 0xc0, 0x4b, 0x2f, 0xef, 0x6d, - 0x38, 0x8f, 0x9e, 0x96, 0xd3, 0x3a, 0x6e, 0x34, 0x4c, 0xc9, 0xd1, 0xac, 0x76, 0xc4, 0x2d, 0x6b, - 0x2c, 0xfd, 0xcb, 0x3a, 0x25, 0xcf, 0xd2, 0x79, 0x33, 0x9d, 0x85, 0x69, 0x75, 0x16, 0x0d, 0x98, - 0x29, 0xbd, 0x27, 0x8b, 0x66, 0xde, 0x4c, 0xe8, 0xe9, 0xb4, 0x42, 0x15, 0xe4, 0x32, 0x9d, 0x43, - 0xb2, 0x8e, 0x73, 0x29, 0xc8, 0x7c, 0xf3, 0x7a, 0x2c, 0x8a, 0x38, 0x3e, 0xdc, 0x92, 0x71, 0x5e, - 0x17, 0xb4, 0xc1, 0xd8, 0x76, 0x6c, 0xb2, 0x2d, 0x3f, 0xe7, 0x9d, 0x82, 0xf4, 0xee, 0x73, 0x28, - 0xc9, 0x7b, 0xd7, 0x06, 0xb3, 0x19, 0xee, 0xd9, 0x03, 0x62, 0x1b, 0x42, 0x81, 0xb9, 0xfe, 0x1c, - 0x59, 0x36, 0xde, 0x61, 0xbe, 0x0d, 0xda, 0x80, 0x07, 0xee, 0x84, 0x54, 0xd2, 0x4e, 0xb8, 0x64, - 0xec, 0x0a, 0x0e, 0xfd, 0x62, 0x62, 0xe8, 0xdc, 0x22, 0xca, 0x6c, 0x50, 0xb9, 0xbf, 0xce, 0xae, - 0x6e, 0x6b, 0xc5, 0xeb, 0xdb, 0x5a, 0xf1, 0xf7, 0x6d, 0xad, 0xf8, 0xf5, 0xae, 0x56, 0xb8, 0xbe, - 0xab, 0x15, 0x7e, 0xde, 0xd5, 0x0a, 0x17, 0x7b, 0xdd, 0x40, 0xf5, 0xfa, 0x1d, 0xc7, 0x03, 0x51, - 0x17, 0x41, 0x78, 0x39, 0x1a, 0xb0, 0xd1, 0x6e, 0xc8, 0x3a, 0xf2, 0x3e, 0xaa, 0x0f, 0x73, 0xab, - 0x76, 0x14, 0x73, 0xd9, 0x99, 0xc7, 0x05, 0xf8, 0xe6, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x25, - 0x60, 0xac, 0xff, 0x8a, 0x05, 0x00, 0x00, -} - -func (m *TradeConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TradeConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TradeConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MaxSwapAmount.Size() - i -= size - if _, err := m.MaxSwapAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTradeRoute(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size := m.MinSwapAmount.Size() - i -= size - if _, err := m.MinSwapAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTradeRoute(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.MaxAllowedSwapLossRate.Size() - i -= size - if _, err := m.MaxAllowedSwapLossRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTradeRoute(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.PriceUpdateTimestamp != 0 { - i = encodeVarintTradeRoute(dAtA, i, uint64(m.PriceUpdateTimestamp)) - i-- - dAtA[i] = 0x18 - } - { - size := m.SwapPrice.Size() - i -= size - if _, err := m.SwapPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTradeRoute(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.PoolId != 0 { - i = encodeVarintTradeRoute(dAtA, i, uint64(m.PoolId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TradeRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TradeRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TradeRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.TradeConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTradeRoute(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - if len(m.TradeToHostChannelId) > 0 { - i -= len(m.TradeToHostChannelId) - copy(dAtA[i:], m.TradeToHostChannelId) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.TradeToHostChannelId))) - i-- - dAtA[i] = 0x5a - } - if len(m.RewardToTradeChannelId) > 0 { - i -= len(m.RewardToTradeChannelId) - copy(dAtA[i:], m.RewardToTradeChannelId) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.RewardToTradeChannelId))) - i-- - dAtA[i] = 0x52 - } - if len(m.HostToRewardChannelId) > 0 { - i -= len(m.HostToRewardChannelId) - copy(dAtA[i:], m.HostToRewardChannelId) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.HostToRewardChannelId))) - i-- - dAtA[i] = 0x4a - } - { - size, err := m.TradeAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTradeRoute(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - { - size, err := m.RewardAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTradeRoute(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - { - size, err := m.HostAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTradeRoute(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - if len(m.HostDenomOnHostZone) > 0 { - i -= len(m.HostDenomOnHostZone) - copy(dAtA[i:], m.HostDenomOnHostZone) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.HostDenomOnHostZone))) - i-- - dAtA[i] = 0x2a - } - if len(m.HostDenomOnTradeZone) > 0 { - i -= len(m.HostDenomOnTradeZone) - copy(dAtA[i:], m.HostDenomOnTradeZone) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.HostDenomOnTradeZone))) - i-- - dAtA[i] = 0x22 - } - if len(m.RewardDenomOnTradeZone) > 0 { - i -= len(m.RewardDenomOnTradeZone) - copy(dAtA[i:], m.RewardDenomOnTradeZone) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.RewardDenomOnTradeZone))) - i-- - dAtA[i] = 0x1a - } - if len(m.RewardDenomOnRewardZone) > 0 { - i -= len(m.RewardDenomOnRewardZone) - copy(dAtA[i:], m.RewardDenomOnRewardZone) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.RewardDenomOnRewardZone))) - i-- - dAtA[i] = 0x12 - } - if len(m.RewardDenomOnHostZone) > 0 { - i -= len(m.RewardDenomOnHostZone) - copy(dAtA[i:], m.RewardDenomOnHostZone) - i = encodeVarintTradeRoute(dAtA, i, uint64(len(m.RewardDenomOnHostZone))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTradeRoute(dAtA []byte, offset int, v uint64) int { - offset -= sovTradeRoute(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TradeConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PoolId != 0 { - n += 1 + sovTradeRoute(uint64(m.PoolId)) - } - l = m.SwapPrice.Size() - n += 1 + l + sovTradeRoute(uint64(l)) - if m.PriceUpdateTimestamp != 0 { - n += 1 + sovTradeRoute(uint64(m.PriceUpdateTimestamp)) - } - l = m.MaxAllowedSwapLossRate.Size() - n += 1 + l + sovTradeRoute(uint64(l)) - l = m.MinSwapAmount.Size() - n += 1 + l + sovTradeRoute(uint64(l)) - l = m.MaxSwapAmount.Size() - n += 1 + l + sovTradeRoute(uint64(l)) - return n -} - -func (m *TradeRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RewardDenomOnHostZone) - if l > 0 { - n += 1 + l + sovTradeRoute(uint64(l)) - } - l = len(m.RewardDenomOnRewardZone) - if l > 0 { - n += 1 + l + sovTradeRoute(uint64(l)) - } - l = len(m.RewardDenomOnTradeZone) - if l > 0 { - n += 1 + l + sovTradeRoute(uint64(l)) - } - l = len(m.HostDenomOnTradeZone) - if l > 0 { - n += 1 + l + sovTradeRoute(uint64(l)) - } - l = len(m.HostDenomOnHostZone) - if l > 0 { - n += 1 + l + sovTradeRoute(uint64(l)) - } - l = m.HostAccount.Size() - n += 1 + l + sovTradeRoute(uint64(l)) - l = m.RewardAccount.Size() - n += 1 + l + sovTradeRoute(uint64(l)) - l = m.TradeAccount.Size() - n += 1 + l + sovTradeRoute(uint64(l)) - l = len(m.HostToRewardChannelId) - if l > 0 { - n += 1 + l + sovTradeRoute(uint64(l)) - } - l = len(m.RewardToTradeChannelId) - if l > 0 { - n += 1 + l + sovTradeRoute(uint64(l)) - } - l = len(m.TradeToHostChannelId) - if l > 0 { - n += 1 + l + sovTradeRoute(uint64(l)) - } - l = m.TradeConfig.Size() - n += 1 + l + sovTradeRoute(uint64(l)) - return n -} - -func sovTradeRoute(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTradeRoute(x uint64) (n int) { - return sovTradeRoute(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TradeConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TradeConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TradeConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - m.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SwapPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SwapPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PriceUpdateTimestamp", wireType) - } - m.PriceUpdateTimestamp = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PriceUpdateTimestamp |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAllowedSwapLossRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxAllowedSwapLossRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinSwapAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxSwapAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTradeRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTradeRoute - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TradeRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TradeRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TradeRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnHostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenomOnHostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnRewardZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenomOnRewardZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnTradeZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenomOnTradeZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnTradeZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenomOnTradeZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnHostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenomOnHostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.HostAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RewardAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradeAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TradeAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostToRewardChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostToRewardChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardToTradeChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardToTradeChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradeToHostChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradeToHostChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradeConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTradeRoute - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTradeRoute - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TradeConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTradeRoute(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTradeRoute - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTradeRoute(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTradeRoute - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTradeRoute - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTradeRoute - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTradeRoute - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTradeRoute = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTradeRoute = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTradeRoute = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/tx.pb.go b/x/stakeibc/types/tx.pb.go deleted file mode 100644 index 57d3c4de3..000000000 --- a/x/stakeibc/types/tx.pb.go +++ /dev/null @@ -1,11494 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/tx.proto - -package types - -import ( - context "context" - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type AuthzPermissionChange int32 - -const ( - // Grant the address trade permissions - AuthzPermissionChange_GRANT AuthzPermissionChange = 0 - // Revoke trade permissions from the address - AuthzPermissionChange_REVOKE AuthzPermissionChange = 1 -) - -var AuthzPermissionChange_name = map[int32]string{ - 0: "GRANT", - 1: "REVOKE", -} - -var AuthzPermissionChange_value = map[string]int32{ - "GRANT": 0, - "REVOKE": 1, -} - -func (x AuthzPermissionChange) String() string { - return proto.EnumName(AuthzPermissionChange_name, int32(x)) -} - -func (AuthzPermissionChange) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{0} -} - -type MsgUpdateInnerRedemptionRateBounds struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - MinInnerRedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=min_inner_redemption_rate,json=minInnerRedemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_inner_redemption_rate"` - MaxInnerRedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=max_inner_redemption_rate,json=maxInnerRedemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_inner_redemption_rate"` -} - -func (m *MsgUpdateInnerRedemptionRateBounds) Reset() { *m = MsgUpdateInnerRedemptionRateBounds{} } -func (m *MsgUpdateInnerRedemptionRateBounds) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateInnerRedemptionRateBounds) ProtoMessage() {} -func (*MsgUpdateInnerRedemptionRateBounds) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{0} -} -func (m *MsgUpdateInnerRedemptionRateBounds) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateInnerRedemptionRateBounds) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateInnerRedemptionRateBounds.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateInnerRedemptionRateBounds) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateInnerRedemptionRateBounds.Merge(m, src) -} -func (m *MsgUpdateInnerRedemptionRateBounds) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateInnerRedemptionRateBounds) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateInnerRedemptionRateBounds.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateInnerRedemptionRateBounds proto.InternalMessageInfo - -func (m *MsgUpdateInnerRedemptionRateBounds) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgUpdateInnerRedemptionRateBounds) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -type MsgUpdateInnerRedemptionRateBoundsResponse struct { -} - -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) Reset() { - *m = MsgUpdateInnerRedemptionRateBoundsResponse{} -} -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) String() string { - return proto.CompactTextString(m) -} -func (*MsgUpdateInnerRedemptionRateBoundsResponse) ProtoMessage() {} -func (*MsgUpdateInnerRedemptionRateBoundsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{1} -} -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateInnerRedemptionRateBoundsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateInnerRedemptionRateBoundsResponse.Merge(m, src) -} -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateInnerRedemptionRateBoundsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateInnerRedemptionRateBoundsResponse proto.InternalMessageInfo - -type MsgLiquidStake struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` - HostDenom string `protobuf:"bytes,3,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` -} - -func (m *MsgLiquidStake) Reset() { *m = MsgLiquidStake{} } -func (m *MsgLiquidStake) String() string { return proto.CompactTextString(m) } -func (*MsgLiquidStake) ProtoMessage() {} -func (*MsgLiquidStake) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{2} -} -func (m *MsgLiquidStake) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgLiquidStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgLiquidStake.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgLiquidStake) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgLiquidStake.Merge(m, src) -} -func (m *MsgLiquidStake) XXX_Size() int { - return m.Size() -} -func (m *MsgLiquidStake) XXX_DiscardUnknown() { - xxx_messageInfo_MsgLiquidStake.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgLiquidStake proto.InternalMessageInfo - -func (m *MsgLiquidStake) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgLiquidStake) GetHostDenom() string { - if m != nil { - return m.HostDenom - } - return "" -} - -type MsgLiquidStakeResponse struct { - StToken types.Coin `protobuf:"bytes,1,opt,name=st_token,json=stToken,proto3,castrepeated=cosmossdk.io/math.Coins" json:"st_token"` -} - -func (m *MsgLiquidStakeResponse) Reset() { *m = MsgLiquidStakeResponse{} } -func (m *MsgLiquidStakeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgLiquidStakeResponse) ProtoMessage() {} -func (*MsgLiquidStakeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{3} -} -func (m *MsgLiquidStakeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgLiquidStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgLiquidStakeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgLiquidStakeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgLiquidStakeResponse.Merge(m, src) -} -func (m *MsgLiquidStakeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgLiquidStakeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgLiquidStakeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgLiquidStakeResponse proto.InternalMessageInfo - -func (m *MsgLiquidStakeResponse) GetStToken() types.Coin { - if m != nil { - return m.StToken - } - return types.Coin{} -} - -type MsgLSMLiquidStake struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` - LsmTokenIbcDenom string `protobuf:"bytes,3,opt,name=lsm_token_ibc_denom,json=lsmTokenIbcDenom,proto3" json:"lsm_token_ibc_denom,omitempty"` -} - -func (m *MsgLSMLiquidStake) Reset() { *m = MsgLSMLiquidStake{} } -func (m *MsgLSMLiquidStake) String() string { return proto.CompactTextString(m) } -func (*MsgLSMLiquidStake) ProtoMessage() {} -func (*MsgLSMLiquidStake) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{4} -} -func (m *MsgLSMLiquidStake) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgLSMLiquidStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgLSMLiquidStake.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgLSMLiquidStake) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgLSMLiquidStake.Merge(m, src) -} -func (m *MsgLSMLiquidStake) XXX_Size() int { - return m.Size() -} -func (m *MsgLSMLiquidStake) XXX_DiscardUnknown() { - xxx_messageInfo_MsgLSMLiquidStake.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgLSMLiquidStake proto.InternalMessageInfo - -func (m *MsgLSMLiquidStake) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgLSMLiquidStake) GetLsmTokenIbcDenom() string { - if m != nil { - return m.LsmTokenIbcDenom - } - return "" -} - -type MsgLSMLiquidStakeResponse struct { - TransactionComplete bool `protobuf:"varint,1,opt,name=transaction_complete,json=transactionComplete,proto3" json:"transaction_complete,omitempty"` -} - -func (m *MsgLSMLiquidStakeResponse) Reset() { *m = MsgLSMLiquidStakeResponse{} } -func (m *MsgLSMLiquidStakeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgLSMLiquidStakeResponse) ProtoMessage() {} -func (*MsgLSMLiquidStakeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{5} -} -func (m *MsgLSMLiquidStakeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgLSMLiquidStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgLSMLiquidStakeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgLSMLiquidStakeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgLSMLiquidStakeResponse.Merge(m, src) -} -func (m *MsgLSMLiquidStakeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgLSMLiquidStakeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgLSMLiquidStakeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgLSMLiquidStakeResponse proto.InternalMessageInfo - -func (m *MsgLSMLiquidStakeResponse) GetTransactionComplete() bool { - if m != nil { - return m.TransactionComplete - } - return false -} - -type MsgClearBalance struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` - Channel string `protobuf:"bytes,4,opt,name=channel,proto3" json:"channel,omitempty"` -} - -func (m *MsgClearBalance) Reset() { *m = MsgClearBalance{} } -func (m *MsgClearBalance) String() string { return proto.CompactTextString(m) } -func (*MsgClearBalance) ProtoMessage() {} -func (*MsgClearBalance) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{6} -} -func (m *MsgClearBalance) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClearBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClearBalance.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgClearBalance) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClearBalance.Merge(m, src) -} -func (m *MsgClearBalance) XXX_Size() int { - return m.Size() -} -func (m *MsgClearBalance) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClearBalance.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClearBalance proto.InternalMessageInfo - -func (m *MsgClearBalance) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgClearBalance) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *MsgClearBalance) GetChannel() string { - if m != nil { - return m.Channel - } - return "" -} - -type MsgClearBalanceResponse struct { -} - -func (m *MsgClearBalanceResponse) Reset() { *m = MsgClearBalanceResponse{} } -func (m *MsgClearBalanceResponse) String() string { return proto.CompactTextString(m) } -func (*MsgClearBalanceResponse) ProtoMessage() {} -func (*MsgClearBalanceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{7} -} -func (m *MsgClearBalanceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClearBalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClearBalanceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgClearBalanceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClearBalanceResponse.Merge(m, src) -} -func (m *MsgClearBalanceResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgClearBalanceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClearBalanceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClearBalanceResponse proto.InternalMessageInfo - -type MsgRedeemStake struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"` - HostZone string `protobuf:"bytes,3,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` -} - -func (m *MsgRedeemStake) Reset() { *m = MsgRedeemStake{} } -func (m *MsgRedeemStake) String() string { return proto.CompactTextString(m) } -func (*MsgRedeemStake) ProtoMessage() {} -func (*MsgRedeemStake) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{8} -} -func (m *MsgRedeemStake) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRedeemStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRedeemStake.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRedeemStake) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRedeemStake.Merge(m, src) -} -func (m *MsgRedeemStake) XXX_Size() int { - return m.Size() -} -func (m *MsgRedeemStake) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRedeemStake.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRedeemStake proto.InternalMessageInfo - -func (m *MsgRedeemStake) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgRedeemStake) GetHostZone() string { - if m != nil { - return m.HostZone - } - return "" -} - -func (m *MsgRedeemStake) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -type MsgRedeemStakeResponse struct { -} - -func (m *MsgRedeemStakeResponse) Reset() { *m = MsgRedeemStakeResponse{} } -func (m *MsgRedeemStakeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRedeemStakeResponse) ProtoMessage() {} -func (*MsgRedeemStakeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{9} -} -func (m *MsgRedeemStakeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRedeemStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRedeemStakeResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRedeemStakeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRedeemStakeResponse.Merge(m, src) -} -func (m *MsgRedeemStakeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRedeemStakeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRedeemStakeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRedeemStakeResponse proto.InternalMessageInfo - -// next: 15 -type MsgRegisterHostZone struct { - ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"` - Bech32Prefix string `protobuf:"bytes,12,opt,name=bech32prefix,proto3" json:"bech32prefix,omitempty"` - HostDenom string `protobuf:"bytes,4,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty" yaml:"host_denom"` - IbcDenom string `protobuf:"bytes,5,opt,name=ibc_denom,json=ibcDenom,proto3" json:"ibc_denom,omitempty" yaml:"ibc_denom"` - Creator string `protobuf:"bytes,6,opt,name=creator,proto3" json:"creator,omitempty"` - TransferChannelId string `protobuf:"bytes,10,opt,name=transfer_channel_id,json=transferChannelId,proto3" json:"transfer_channel_id,omitempty" yaml:"transfer_channel_id"` - UnbondingPeriod uint64 `protobuf:"varint,11,opt,name=unbonding_period,json=unbondingPeriod,proto3" json:"unbonding_period,omitempty" yaml:"unbonding_period"` - MinRedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,13,opt,name=min_redemption_rate,json=minRedemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_redemption_rate"` - MaxRedemptionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,14,opt,name=max_redemption_rate,json=maxRedemptionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"max_redemption_rate"` - LsmLiquidStakeEnabled bool `protobuf:"varint,15,opt,name=lsm_liquid_stake_enabled,json=lsmLiquidStakeEnabled,proto3" json:"lsm_liquid_stake_enabled,omitempty"` - CommunityPoolTreasuryAddress string `protobuf:"bytes,16,opt,name=community_pool_treasury_address,json=communityPoolTreasuryAddress,proto3" json:"community_pool_treasury_address,omitempty"` - MaxMessagesPerIcaTx uint64 `protobuf:"varint,17,opt,name=max_messages_per_ica_tx,json=maxMessagesPerIcaTx,proto3" json:"max_messages_per_ica_tx,omitempty"` -} - -func (m *MsgRegisterHostZone) Reset() { *m = MsgRegisterHostZone{} } -func (m *MsgRegisterHostZone) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterHostZone) ProtoMessage() {} -func (*MsgRegisterHostZone) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{10} -} -func (m *MsgRegisterHostZone) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterHostZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterHostZone.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRegisterHostZone) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterHostZone.Merge(m, src) -} -func (m *MsgRegisterHostZone) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterHostZone) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterHostZone.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterHostZone proto.InternalMessageInfo - -type MsgRegisterHostZoneResponse struct { -} - -func (m *MsgRegisterHostZoneResponse) Reset() { *m = MsgRegisterHostZoneResponse{} } -func (m *MsgRegisterHostZoneResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterHostZoneResponse) ProtoMessage() {} -func (*MsgRegisterHostZoneResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{11} -} -func (m *MsgRegisterHostZoneResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterHostZoneResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterHostZoneResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRegisterHostZoneResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterHostZoneResponse.Merge(m, src) -} -func (m *MsgRegisterHostZoneResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterHostZoneResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterHostZoneResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterHostZoneResponse proto.InternalMessageInfo - -type MsgClaimUndelegatedTokens struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - // UserUnbondingRecords are keyed on {chain_id}.{epoch}.{receiver} - HostZoneId string `protobuf:"bytes,2,opt,name=host_zone_id,json=hostZoneId,proto3" json:"host_zone_id,omitempty"` - Epoch uint64 `protobuf:"varint,3,opt,name=epoch,proto3" json:"epoch,omitempty"` - Receiver string `protobuf:"bytes,5,opt,name=receiver,proto3" json:"receiver,omitempty"` -} - -func (m *MsgClaimUndelegatedTokens) Reset() { *m = MsgClaimUndelegatedTokens{} } -func (m *MsgClaimUndelegatedTokens) String() string { return proto.CompactTextString(m) } -func (*MsgClaimUndelegatedTokens) ProtoMessage() {} -func (*MsgClaimUndelegatedTokens) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{12} -} -func (m *MsgClaimUndelegatedTokens) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClaimUndelegatedTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClaimUndelegatedTokens.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgClaimUndelegatedTokens) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClaimUndelegatedTokens.Merge(m, src) -} -func (m *MsgClaimUndelegatedTokens) XXX_Size() int { - return m.Size() -} -func (m *MsgClaimUndelegatedTokens) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClaimUndelegatedTokens.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClaimUndelegatedTokens proto.InternalMessageInfo - -func (m *MsgClaimUndelegatedTokens) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgClaimUndelegatedTokens) GetHostZoneId() string { - if m != nil { - return m.HostZoneId - } - return "" -} - -func (m *MsgClaimUndelegatedTokens) GetEpoch() uint64 { - if m != nil { - return m.Epoch - } - return 0 -} - -func (m *MsgClaimUndelegatedTokens) GetReceiver() string { - if m != nil { - return m.Receiver - } - return "" -} - -type MsgClaimUndelegatedTokensResponse struct { -} - -func (m *MsgClaimUndelegatedTokensResponse) Reset() { *m = MsgClaimUndelegatedTokensResponse{} } -func (m *MsgClaimUndelegatedTokensResponse) String() string { return proto.CompactTextString(m) } -func (*MsgClaimUndelegatedTokensResponse) ProtoMessage() {} -func (*MsgClaimUndelegatedTokensResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{13} -} -func (m *MsgClaimUndelegatedTokensResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgClaimUndelegatedTokensResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgClaimUndelegatedTokensResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgClaimUndelegatedTokensResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgClaimUndelegatedTokensResponse.Merge(m, src) -} -func (m *MsgClaimUndelegatedTokensResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgClaimUndelegatedTokensResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgClaimUndelegatedTokensResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgClaimUndelegatedTokensResponse proto.InternalMessageInfo - -type MsgRebalanceValidators struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - HostZone string `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - NumRebalance uint64 `protobuf:"varint,3,opt,name=num_rebalance,json=numRebalance,proto3" json:"num_rebalance,omitempty"` -} - -func (m *MsgRebalanceValidators) Reset() { *m = MsgRebalanceValidators{} } -func (m *MsgRebalanceValidators) String() string { return proto.CompactTextString(m) } -func (*MsgRebalanceValidators) ProtoMessage() {} -func (*MsgRebalanceValidators) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{14} -} -func (m *MsgRebalanceValidators) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRebalanceValidators) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRebalanceValidators.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRebalanceValidators) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRebalanceValidators.Merge(m, src) -} -func (m *MsgRebalanceValidators) XXX_Size() int { - return m.Size() -} -func (m *MsgRebalanceValidators) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRebalanceValidators.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRebalanceValidators proto.InternalMessageInfo - -func (m *MsgRebalanceValidators) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgRebalanceValidators) GetHostZone() string { - if m != nil { - return m.HostZone - } - return "" -} - -func (m *MsgRebalanceValidators) GetNumRebalance() uint64 { - if m != nil { - return m.NumRebalance - } - return 0 -} - -type MsgRebalanceValidatorsResponse struct { -} - -func (m *MsgRebalanceValidatorsResponse) Reset() { *m = MsgRebalanceValidatorsResponse{} } -func (m *MsgRebalanceValidatorsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRebalanceValidatorsResponse) ProtoMessage() {} -func (*MsgRebalanceValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{15} -} -func (m *MsgRebalanceValidatorsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRebalanceValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRebalanceValidatorsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRebalanceValidatorsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRebalanceValidatorsResponse.Merge(m, src) -} -func (m *MsgRebalanceValidatorsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRebalanceValidatorsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRebalanceValidatorsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRebalanceValidatorsResponse proto.InternalMessageInfo - -type MsgAddValidators struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - HostZone string `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - Validators []*Validator `protobuf:"bytes,3,rep,name=validators,proto3" json:"validators,omitempty"` -} - -func (m *MsgAddValidators) Reset() { *m = MsgAddValidators{} } -func (m *MsgAddValidators) String() string { return proto.CompactTextString(m) } -func (*MsgAddValidators) ProtoMessage() {} -func (*MsgAddValidators) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{16} -} -func (m *MsgAddValidators) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAddValidators) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAddValidators.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgAddValidators) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAddValidators.Merge(m, src) -} -func (m *MsgAddValidators) XXX_Size() int { - return m.Size() -} -func (m *MsgAddValidators) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAddValidators.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAddValidators proto.InternalMessageInfo - -func (m *MsgAddValidators) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgAddValidators) GetHostZone() string { - if m != nil { - return m.HostZone - } - return "" -} - -func (m *MsgAddValidators) GetValidators() []*Validator { - if m != nil { - return m.Validators - } - return nil -} - -type MsgAddValidatorsResponse struct { -} - -func (m *MsgAddValidatorsResponse) Reset() { *m = MsgAddValidatorsResponse{} } -func (m *MsgAddValidatorsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAddValidatorsResponse) ProtoMessage() {} -func (*MsgAddValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{17} -} -func (m *MsgAddValidatorsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgAddValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgAddValidatorsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgAddValidatorsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAddValidatorsResponse.Merge(m, src) -} -func (m *MsgAddValidatorsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgAddValidatorsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAddValidatorsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgAddValidatorsResponse proto.InternalMessageInfo - -type ValidatorWeight struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Weight uint64 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` -} - -func (m *ValidatorWeight) Reset() { *m = ValidatorWeight{} } -func (m *ValidatorWeight) String() string { return proto.CompactTextString(m) } -func (*ValidatorWeight) ProtoMessage() {} -func (*ValidatorWeight) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{18} -} -func (m *ValidatorWeight) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValidatorWeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValidatorWeight.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValidatorWeight) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValidatorWeight.Merge(m, src) -} -func (m *ValidatorWeight) XXX_Size() int { - return m.Size() -} -func (m *ValidatorWeight) XXX_DiscardUnknown() { - xxx_messageInfo_ValidatorWeight.DiscardUnknown(m) -} - -var xxx_messageInfo_ValidatorWeight proto.InternalMessageInfo - -func (m *ValidatorWeight) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *ValidatorWeight) GetWeight() uint64 { - if m != nil { - return m.Weight - } - return 0 -} - -type MsgChangeValidatorWeights struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - HostZone string `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - ValidatorWeights []*ValidatorWeight `protobuf:"bytes,3,rep,name=validator_weights,json=validatorWeights,proto3" json:"validator_weights,omitempty"` -} - -func (m *MsgChangeValidatorWeights) Reset() { *m = MsgChangeValidatorWeights{} } -func (m *MsgChangeValidatorWeights) String() string { return proto.CompactTextString(m) } -func (*MsgChangeValidatorWeights) ProtoMessage() {} -func (*MsgChangeValidatorWeights) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{19} -} -func (m *MsgChangeValidatorWeights) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgChangeValidatorWeights) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgChangeValidatorWeights.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgChangeValidatorWeights) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgChangeValidatorWeights.Merge(m, src) -} -func (m *MsgChangeValidatorWeights) XXX_Size() int { - return m.Size() -} -func (m *MsgChangeValidatorWeights) XXX_DiscardUnknown() { - xxx_messageInfo_MsgChangeValidatorWeights.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgChangeValidatorWeights proto.InternalMessageInfo - -func (m *MsgChangeValidatorWeights) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgChangeValidatorWeights) GetHostZone() string { - if m != nil { - return m.HostZone - } - return "" -} - -func (m *MsgChangeValidatorWeights) GetValidatorWeights() []*ValidatorWeight { - if m != nil { - return m.ValidatorWeights - } - return nil -} - -type MsgChangeValidatorWeightsResponse struct { -} - -func (m *MsgChangeValidatorWeightsResponse) Reset() { *m = MsgChangeValidatorWeightsResponse{} } -func (m *MsgChangeValidatorWeightsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgChangeValidatorWeightsResponse) ProtoMessage() {} -func (*MsgChangeValidatorWeightsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{20} -} -func (m *MsgChangeValidatorWeightsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgChangeValidatorWeightsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgChangeValidatorWeightsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgChangeValidatorWeightsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgChangeValidatorWeightsResponse.Merge(m, src) -} -func (m *MsgChangeValidatorWeightsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgChangeValidatorWeightsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgChangeValidatorWeightsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgChangeValidatorWeightsResponse proto.InternalMessageInfo - -type MsgDeleteValidator struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - HostZone string `protobuf:"bytes,2,opt,name=host_zone,json=hostZone,proto3" json:"host_zone,omitempty"` - ValAddr string `protobuf:"bytes,3,opt,name=val_addr,json=valAddr,proto3" json:"val_addr,omitempty"` -} - -func (m *MsgDeleteValidator) Reset() { *m = MsgDeleteValidator{} } -func (m *MsgDeleteValidator) String() string { return proto.CompactTextString(m) } -func (*MsgDeleteValidator) ProtoMessage() {} -func (*MsgDeleteValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{21} -} -func (m *MsgDeleteValidator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeleteValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeleteValidator.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgDeleteValidator) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeleteValidator.Merge(m, src) -} -func (m *MsgDeleteValidator) XXX_Size() int { - return m.Size() -} -func (m *MsgDeleteValidator) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeleteValidator.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeleteValidator proto.InternalMessageInfo - -func (m *MsgDeleteValidator) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgDeleteValidator) GetHostZone() string { - if m != nil { - return m.HostZone - } - return "" -} - -func (m *MsgDeleteValidator) GetValAddr() string { - if m != nil { - return m.ValAddr - } - return "" -} - -type MsgDeleteValidatorResponse struct { -} - -func (m *MsgDeleteValidatorResponse) Reset() { *m = MsgDeleteValidatorResponse{} } -func (m *MsgDeleteValidatorResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDeleteValidatorResponse) ProtoMessage() {} -func (*MsgDeleteValidatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{22} -} -func (m *MsgDeleteValidatorResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeleteValidatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeleteValidatorResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgDeleteValidatorResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeleteValidatorResponse.Merge(m, src) -} -func (m *MsgDeleteValidatorResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgDeleteValidatorResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeleteValidatorResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeleteValidatorResponse proto.InternalMessageInfo - -type MsgRestoreInterchainAccount struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - ConnectionId string `protobuf:"bytes,3,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - AccountOwner string `protobuf:"bytes,4,opt,name=account_owner,json=accountOwner,proto3" json:"account_owner,omitempty"` -} - -func (m *MsgRestoreInterchainAccount) Reset() { *m = MsgRestoreInterchainAccount{} } -func (m *MsgRestoreInterchainAccount) String() string { return proto.CompactTextString(m) } -func (*MsgRestoreInterchainAccount) ProtoMessage() {} -func (*MsgRestoreInterchainAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{23} -} -func (m *MsgRestoreInterchainAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRestoreInterchainAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRestoreInterchainAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRestoreInterchainAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRestoreInterchainAccount.Merge(m, src) -} -func (m *MsgRestoreInterchainAccount) XXX_Size() int { - return m.Size() -} -func (m *MsgRestoreInterchainAccount) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRestoreInterchainAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRestoreInterchainAccount proto.InternalMessageInfo - -func (m *MsgRestoreInterchainAccount) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgRestoreInterchainAccount) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *MsgRestoreInterchainAccount) GetConnectionId() string { - if m != nil { - return m.ConnectionId - } - return "" -} - -func (m *MsgRestoreInterchainAccount) GetAccountOwner() string { - if m != nil { - return m.AccountOwner - } - return "" -} - -type MsgRestoreInterchainAccountResponse struct { -} - -func (m *MsgRestoreInterchainAccountResponse) Reset() { *m = MsgRestoreInterchainAccountResponse{} } -func (m *MsgRestoreInterchainAccountResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRestoreInterchainAccountResponse) ProtoMessage() {} -func (*MsgRestoreInterchainAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{24} -} -func (m *MsgRestoreInterchainAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRestoreInterchainAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRestoreInterchainAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgRestoreInterchainAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRestoreInterchainAccountResponse.Merge(m, src) -} -func (m *MsgRestoreInterchainAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRestoreInterchainAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRestoreInterchainAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRestoreInterchainAccountResponse proto.InternalMessageInfo - -type MsgUpdateValidatorSharesExchRate struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Valoper string `protobuf:"bytes,3,opt,name=valoper,proto3" json:"valoper,omitempty"` -} - -func (m *MsgUpdateValidatorSharesExchRate) Reset() { *m = MsgUpdateValidatorSharesExchRate{} } -func (m *MsgUpdateValidatorSharesExchRate) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateValidatorSharesExchRate) ProtoMessage() {} -func (*MsgUpdateValidatorSharesExchRate) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{25} -} -func (m *MsgUpdateValidatorSharesExchRate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateValidatorSharesExchRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateValidatorSharesExchRate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateValidatorSharesExchRate) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateValidatorSharesExchRate.Merge(m, src) -} -func (m *MsgUpdateValidatorSharesExchRate) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateValidatorSharesExchRate) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateValidatorSharesExchRate.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateValidatorSharesExchRate proto.InternalMessageInfo - -func (m *MsgUpdateValidatorSharesExchRate) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgUpdateValidatorSharesExchRate) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *MsgUpdateValidatorSharesExchRate) GetValoper() string { - if m != nil { - return m.Valoper - } - return "" -} - -type MsgUpdateValidatorSharesExchRateResponse struct { -} - -func (m *MsgUpdateValidatorSharesExchRateResponse) Reset() { - *m = MsgUpdateValidatorSharesExchRateResponse{} -} -func (m *MsgUpdateValidatorSharesExchRateResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateValidatorSharesExchRateResponse) ProtoMessage() {} -func (*MsgUpdateValidatorSharesExchRateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{26} -} -func (m *MsgUpdateValidatorSharesExchRateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateValidatorSharesExchRateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateValidatorSharesExchRateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateValidatorSharesExchRateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateValidatorSharesExchRateResponse.Merge(m, src) -} -func (m *MsgUpdateValidatorSharesExchRateResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateValidatorSharesExchRateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateValidatorSharesExchRateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateValidatorSharesExchRateResponse proto.InternalMessageInfo - -type MsgCalibrateDelegation struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Valoper string `protobuf:"bytes,3,opt,name=valoper,proto3" json:"valoper,omitempty"` -} - -func (m *MsgCalibrateDelegation) Reset() { *m = MsgCalibrateDelegation{} } -func (m *MsgCalibrateDelegation) String() string { return proto.CompactTextString(m) } -func (*MsgCalibrateDelegation) ProtoMessage() {} -func (*MsgCalibrateDelegation) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{27} -} -func (m *MsgCalibrateDelegation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCalibrateDelegation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCalibrateDelegation.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCalibrateDelegation) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCalibrateDelegation.Merge(m, src) -} -func (m *MsgCalibrateDelegation) XXX_Size() int { - return m.Size() -} -func (m *MsgCalibrateDelegation) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCalibrateDelegation.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCalibrateDelegation proto.InternalMessageInfo - -func (m *MsgCalibrateDelegation) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgCalibrateDelegation) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *MsgCalibrateDelegation) GetValoper() string { - if m != nil { - return m.Valoper - } - return "" -} - -type MsgCalibrateDelegationResponse struct { -} - -func (m *MsgCalibrateDelegationResponse) Reset() { *m = MsgCalibrateDelegationResponse{} } -func (m *MsgCalibrateDelegationResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCalibrateDelegationResponse) ProtoMessage() {} -func (*MsgCalibrateDelegationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{28} -} -func (m *MsgCalibrateDelegationResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCalibrateDelegationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCalibrateDelegationResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCalibrateDelegationResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCalibrateDelegationResponse.Merge(m, src) -} -func (m *MsgCalibrateDelegationResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCalibrateDelegationResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCalibrateDelegationResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCalibrateDelegationResponse proto.InternalMessageInfo - -type MsgResumeHostZone struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` -} - -func (m *MsgResumeHostZone) Reset() { *m = MsgResumeHostZone{} } -func (m *MsgResumeHostZone) String() string { return proto.CompactTextString(m) } -func (*MsgResumeHostZone) ProtoMessage() {} -func (*MsgResumeHostZone) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{29} -} -func (m *MsgResumeHostZone) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgResumeHostZone) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgResumeHostZone.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgResumeHostZone) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgResumeHostZone.Merge(m, src) -} -func (m *MsgResumeHostZone) XXX_Size() int { - return m.Size() -} -func (m *MsgResumeHostZone) XXX_DiscardUnknown() { - xxx_messageInfo_MsgResumeHostZone.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgResumeHostZone proto.InternalMessageInfo - -func (m *MsgResumeHostZone) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgResumeHostZone) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -type MsgResumeHostZoneResponse struct { -} - -func (m *MsgResumeHostZoneResponse) Reset() { *m = MsgResumeHostZoneResponse{} } -func (m *MsgResumeHostZoneResponse) String() string { return proto.CompactTextString(m) } -func (*MsgResumeHostZoneResponse) ProtoMessage() {} -func (*MsgResumeHostZoneResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{30} -} -func (m *MsgResumeHostZoneResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgResumeHostZoneResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgResumeHostZoneResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgResumeHostZoneResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgResumeHostZoneResponse.Merge(m, src) -} -func (m *MsgResumeHostZoneResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgResumeHostZoneResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgResumeHostZoneResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgResumeHostZoneResponse proto.InternalMessageInfo - -// Creates a new trade route -type MsgCreateTradeRoute struct { - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // The chain ID of the host zone - HostChainId string `protobuf:"bytes,2,opt,name=host_chain_id,json=hostChainId,proto3" json:"host_chain_id,omitempty"` - // Connection IDs between stride and the other zones - StrideToRewardConnectionId string `protobuf:"bytes,3,opt,name=stride_to_reward_connection_id,json=strideToRewardConnectionId,proto3" json:"stride_to_reward_connection_id,omitempty"` - StrideToTradeConnectionId string `protobuf:"bytes,4,opt,name=stride_to_trade_connection_id,json=strideToTradeConnectionId,proto3" json:"stride_to_trade_connection_id,omitempty"` - // Transfer channels between the host, reward, and trade zones - HostToRewardTransferChannelId string `protobuf:"bytes,5,opt,name=host_to_reward_transfer_channel_id,json=hostToRewardTransferChannelId,proto3" json:"host_to_reward_transfer_channel_id,omitempty"` - RewardToTradeTransferChannelId string `protobuf:"bytes,6,opt,name=reward_to_trade_transfer_channel_id,json=rewardToTradeTransferChannelId,proto3" json:"reward_to_trade_transfer_channel_id,omitempty"` - TradeToHostTransferChannelId string `protobuf:"bytes,7,opt,name=trade_to_host_transfer_channel_id,json=tradeToHostTransferChannelId,proto3" json:"trade_to_host_transfer_channel_id,omitempty"` - // ibc denom for the reward token on the host zone (e.g. ibc/usdc on dYdX) - RewardDenomOnHost string `protobuf:"bytes,8,opt,name=reward_denom_on_host,json=rewardDenomOnHost,proto3" json:"reward_denom_on_host,omitempty"` - // native denom of reward token on the reward zone (e.g. usdc on Noble) - RewardDenomOnReward string `protobuf:"bytes,9,opt,name=reward_denom_on_reward,json=rewardDenomOnReward,proto3" json:"reward_denom_on_reward,omitempty"` - // ibc denom of the reward token on the trade zone (e.g. ibc/usdc on Osmosis) - RewardDenomOnTrade string `protobuf:"bytes,10,opt,name=reward_denom_on_trade,json=rewardDenomOnTrade,proto3" json:"reward_denom_on_trade,omitempty"` - // ibc denom of the host's token on the trade zone (e.g. ibc/dydx on Osmosis) - HostDenomOnTrade string `protobuf:"bytes,11,opt,name=host_denom_on_trade,json=hostDenomOnTrade,proto3" json:"host_denom_on_trade,omitempty"` - // the host zone's native denom (e.g. dydx on dYdX) - HostDenomOnHost string `protobuf:"bytes,12,opt,name=host_denom_on_host,json=hostDenomOnHost,proto3" json:"host_denom_on_host,omitempty"` - // The osmosis pool ID - PoolId uint64 `protobuf:"varint,13,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price on stride - // "0.05" means the output from the trade can be no less than a 5% deviation - // from the current value - MaxAllowedSwapLossRate string `protobuf:"bytes,14,opt,name=max_allowed_swap_loss_rate,json=maxAllowedSwapLossRate,proto3" json:"max_allowed_swap_loss_rate,omitempty"` - // minimum amount of reward tokens to initate a swap - // if not provided, defaults to 0 - MinSwapAmount cosmossdk_io_math.Int `protobuf:"bytes,15,opt,name=min_swap_amount,json=minSwapAmount,proto3,customtype=cosmossdk.io/math.Int" json:"min_swap_amount"` - // maximum amount of reward tokens in a single swap - // if not provided, defaults to 10e24 - MaxSwapAmount cosmossdk_io_math.Int `protobuf:"bytes,16,opt,name=max_swap_amount,json=maxSwapAmount,proto3,customtype=cosmossdk.io/math.Int" json:"max_swap_amount"` -} - -func (m *MsgCreateTradeRoute) Reset() { *m = MsgCreateTradeRoute{} } -func (m *MsgCreateTradeRoute) String() string { return proto.CompactTextString(m) } -func (*MsgCreateTradeRoute) ProtoMessage() {} -func (*MsgCreateTradeRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{31} -} -func (m *MsgCreateTradeRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateTradeRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateTradeRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateTradeRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateTradeRoute.Merge(m, src) -} -func (m *MsgCreateTradeRoute) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateTradeRoute) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateTradeRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateTradeRoute proto.InternalMessageInfo - -func (m *MsgCreateTradeRoute) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgCreateTradeRoute) GetHostChainId() string { - if m != nil { - return m.HostChainId - } - return "" -} - -func (m *MsgCreateTradeRoute) GetStrideToRewardConnectionId() string { - if m != nil { - return m.StrideToRewardConnectionId - } - return "" -} - -func (m *MsgCreateTradeRoute) GetStrideToTradeConnectionId() string { - if m != nil { - return m.StrideToTradeConnectionId - } - return "" -} - -func (m *MsgCreateTradeRoute) GetHostToRewardTransferChannelId() string { - if m != nil { - return m.HostToRewardTransferChannelId - } - return "" -} - -func (m *MsgCreateTradeRoute) GetRewardToTradeTransferChannelId() string { - if m != nil { - return m.RewardToTradeTransferChannelId - } - return "" -} - -func (m *MsgCreateTradeRoute) GetTradeToHostTransferChannelId() string { - if m != nil { - return m.TradeToHostTransferChannelId - } - return "" -} - -func (m *MsgCreateTradeRoute) GetRewardDenomOnHost() string { - if m != nil { - return m.RewardDenomOnHost - } - return "" -} - -func (m *MsgCreateTradeRoute) GetRewardDenomOnReward() string { - if m != nil { - return m.RewardDenomOnReward - } - return "" -} - -func (m *MsgCreateTradeRoute) GetRewardDenomOnTrade() string { - if m != nil { - return m.RewardDenomOnTrade - } - return "" -} - -func (m *MsgCreateTradeRoute) GetHostDenomOnTrade() string { - if m != nil { - return m.HostDenomOnTrade - } - return "" -} - -func (m *MsgCreateTradeRoute) GetHostDenomOnHost() string { - if m != nil { - return m.HostDenomOnHost - } - return "" -} - -func (m *MsgCreateTradeRoute) GetPoolId() uint64 { - if m != nil { - return m.PoolId - } - return 0 -} - -func (m *MsgCreateTradeRoute) GetMaxAllowedSwapLossRate() string { - if m != nil { - return m.MaxAllowedSwapLossRate - } - return "" -} - -type MsgCreateTradeRouteResponse struct { -} - -func (m *MsgCreateTradeRouteResponse) Reset() { *m = MsgCreateTradeRouteResponse{} } -func (m *MsgCreateTradeRouteResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateTradeRouteResponse) ProtoMessage() {} -func (*MsgCreateTradeRouteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{32} -} -func (m *MsgCreateTradeRouteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateTradeRouteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateTradeRouteResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateTradeRouteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateTradeRouteResponse.Merge(m, src) -} -func (m *MsgCreateTradeRouteResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateTradeRouteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateTradeRouteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateTradeRouteResponse proto.InternalMessageInfo - -// Deletes a trade route -type MsgDeleteTradeRoute struct { - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // The reward denom of the route in it's native form (e.g. usdc) - RewardDenom string `protobuf:"bytes,2,opt,name=reward_denom,json=rewardDenom,proto3" json:"reward_denom,omitempty"` - // The host zone's denom in it's native form (e.g. dydx) - HostDenom string `protobuf:"bytes,3,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` -} - -func (m *MsgDeleteTradeRoute) Reset() { *m = MsgDeleteTradeRoute{} } -func (m *MsgDeleteTradeRoute) String() string { return proto.CompactTextString(m) } -func (*MsgDeleteTradeRoute) ProtoMessage() {} -func (*MsgDeleteTradeRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{33} -} -func (m *MsgDeleteTradeRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeleteTradeRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeleteTradeRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgDeleteTradeRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeleteTradeRoute.Merge(m, src) -} -func (m *MsgDeleteTradeRoute) XXX_Size() int { - return m.Size() -} -func (m *MsgDeleteTradeRoute) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeleteTradeRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeleteTradeRoute proto.InternalMessageInfo - -func (m *MsgDeleteTradeRoute) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgDeleteTradeRoute) GetRewardDenom() string { - if m != nil { - return m.RewardDenom - } - return "" -} - -func (m *MsgDeleteTradeRoute) GetHostDenom() string { - if m != nil { - return m.HostDenom - } - return "" -} - -type MsgDeleteTradeRouteResponse struct { -} - -func (m *MsgDeleteTradeRouteResponse) Reset() { *m = MsgDeleteTradeRouteResponse{} } -func (m *MsgDeleteTradeRouteResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDeleteTradeRouteResponse) ProtoMessage() {} -func (*MsgDeleteTradeRouteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{34} -} -func (m *MsgDeleteTradeRouteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeleteTradeRouteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeleteTradeRouteResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgDeleteTradeRouteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeleteTradeRouteResponse.Merge(m, src) -} -func (m *MsgDeleteTradeRouteResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgDeleteTradeRouteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeleteTradeRouteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeleteTradeRouteResponse proto.InternalMessageInfo - -// Updates the config of a trade route -type MsgUpdateTradeRoute struct { - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // The reward denom of the route in it's native form (e.g. usdc) - RewardDenom string `protobuf:"bytes,2,opt,name=reward_denom,json=rewardDenom,proto3" json:"reward_denom,omitempty"` - // The host zone's denom in it's native form (e.g. dydx) - HostDenom string `protobuf:"bytes,3,opt,name=host_denom,json=hostDenom,proto3" json:"host_denom,omitempty"` - // The osmosis pool ID - PoolId uint64 `protobuf:"varint,4,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - // Threshold defining the percentage of tokens that could be lost in the trade - // This captures both the loss from slippage and from a stale price on stride - // "0.05" means the output from the trade can be no less than a 5% deviation - // from the current value - MaxAllowedSwapLossRate string `protobuf:"bytes,5,opt,name=max_allowed_swap_loss_rate,json=maxAllowedSwapLossRate,proto3" json:"max_allowed_swap_loss_rate,omitempty"` - // minimum amount of reward tokens to initate a swap - // if not provided, defaults to 0 - MinSwapAmount cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=min_swap_amount,json=minSwapAmount,proto3,customtype=cosmossdk.io/math.Int" json:"min_swap_amount"` - // maximum amount of reward tokens in a single swap - // if not provided, defaults to 10e24 - MaxSwapAmount cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=max_swap_amount,json=maxSwapAmount,proto3,customtype=cosmossdk.io/math.Int" json:"max_swap_amount"` -} - -func (m *MsgUpdateTradeRoute) Reset() { *m = MsgUpdateTradeRoute{} } -func (m *MsgUpdateTradeRoute) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateTradeRoute) ProtoMessage() {} -func (*MsgUpdateTradeRoute) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{35} -} -func (m *MsgUpdateTradeRoute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateTradeRoute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateTradeRoute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateTradeRoute) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateTradeRoute.Merge(m, src) -} -func (m *MsgUpdateTradeRoute) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateTradeRoute) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateTradeRoute.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateTradeRoute proto.InternalMessageInfo - -func (m *MsgUpdateTradeRoute) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgUpdateTradeRoute) GetRewardDenom() string { - if m != nil { - return m.RewardDenom - } - return "" -} - -func (m *MsgUpdateTradeRoute) GetHostDenom() string { - if m != nil { - return m.HostDenom - } - return "" -} - -func (m *MsgUpdateTradeRoute) GetPoolId() uint64 { - if m != nil { - return m.PoolId - } - return 0 -} - -func (m *MsgUpdateTradeRoute) GetMaxAllowedSwapLossRate() string { - if m != nil { - return m.MaxAllowedSwapLossRate - } - return "" -} - -type MsgUpdateTradeRouteResponse struct { -} - -func (m *MsgUpdateTradeRouteResponse) Reset() { *m = MsgUpdateTradeRouteResponse{} } -func (m *MsgUpdateTradeRouteResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateTradeRouteResponse) ProtoMessage() {} -func (*MsgUpdateTradeRouteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{36} -} -func (m *MsgUpdateTradeRouteResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateTradeRouteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateTradeRouteResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateTradeRouteResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateTradeRouteResponse.Merge(m, src) -} -func (m *MsgUpdateTradeRouteResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateTradeRouteResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateTradeRouteResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateTradeRouteResponse proto.InternalMessageInfo - -// Registers or updates a community pool rebate by specifying the amount liquid -// staked -type MsgSetCommunityPoolRebate struct { - // Message signer (admin only) - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - // Chain id of the chain whose community pool has a liquid staking rebate - // arrangement with stride - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Rebate percentage represented as a decimal (e.g. 0.2 for 20%) - RebateRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=rebate_rate,json=rebateRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"rebate_rate"` - // Number of stTokens recieved by the community pool after liquid staking - LiquidStakedStTokenAmount cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=liquid_staked_st_token_amount,json=liquidStakedStTokenAmount,proto3,customtype=cosmossdk.io/math.Int" json:"liquid_staked_st_token_amount"` -} - -func (m *MsgSetCommunityPoolRebate) Reset() { *m = MsgSetCommunityPoolRebate{} } -func (m *MsgSetCommunityPoolRebate) String() string { return proto.CompactTextString(m) } -func (*MsgSetCommunityPoolRebate) ProtoMessage() {} -func (*MsgSetCommunityPoolRebate) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{37} -} -func (m *MsgSetCommunityPoolRebate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSetCommunityPoolRebate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSetCommunityPoolRebate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSetCommunityPoolRebate) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetCommunityPoolRebate.Merge(m, src) -} -func (m *MsgSetCommunityPoolRebate) XXX_Size() int { - return m.Size() -} -func (m *MsgSetCommunityPoolRebate) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetCommunityPoolRebate.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSetCommunityPoolRebate proto.InternalMessageInfo - -func (m *MsgSetCommunityPoolRebate) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgSetCommunityPoolRebate) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -type MsgSetCommunityPoolRebateResponse struct { -} - -func (m *MsgSetCommunityPoolRebateResponse) Reset() { *m = MsgSetCommunityPoolRebateResponse{} } -func (m *MsgSetCommunityPoolRebateResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSetCommunityPoolRebateResponse) ProtoMessage() {} -func (*MsgSetCommunityPoolRebateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{38} -} -func (m *MsgSetCommunityPoolRebateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgSetCommunityPoolRebateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgSetCommunityPoolRebateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgSetCommunityPoolRebateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetCommunityPoolRebateResponse.Merge(m, src) -} -func (m *MsgSetCommunityPoolRebateResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgSetCommunityPoolRebateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetCommunityPoolRebateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgSetCommunityPoolRebateResponse proto.InternalMessageInfo - -// Grants or revokes trade permissions to a given address via authz -type MsgToggleTradeController struct { - // Message signer (admin only) - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - // Chain ID of the trade account - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Permission change (either grant or revoke) - PermissionChange AuthzPermissionChange `protobuf:"varint,3,opt,name=permission_change,json=permissionChange,proto3,enum=stride.stakeibc.AuthzPermissionChange" json:"permission_change,omitempty"` - // Address of trade operator - Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *MsgToggleTradeController) Reset() { *m = MsgToggleTradeController{} } -func (m *MsgToggleTradeController) String() string { return proto.CompactTextString(m) } -func (*MsgToggleTradeController) ProtoMessage() {} -func (*MsgToggleTradeController) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{39} -} -func (m *MsgToggleTradeController) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgToggleTradeController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgToggleTradeController.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgToggleTradeController) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgToggleTradeController.Merge(m, src) -} -func (m *MsgToggleTradeController) XXX_Size() int { - return m.Size() -} -func (m *MsgToggleTradeController) XXX_DiscardUnknown() { - xxx_messageInfo_MsgToggleTradeController.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgToggleTradeController proto.InternalMessageInfo - -func (m *MsgToggleTradeController) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgToggleTradeController) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *MsgToggleTradeController) GetPermissionChange() AuthzPermissionChange { - if m != nil { - return m.PermissionChange - } - return AuthzPermissionChange_GRANT -} - -func (m *MsgToggleTradeController) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -type MsgToggleTradeControllerResponse struct { -} - -func (m *MsgToggleTradeControllerResponse) Reset() { *m = MsgToggleTradeControllerResponse{} } -func (m *MsgToggleTradeControllerResponse) String() string { return proto.CompactTextString(m) } -func (*MsgToggleTradeControllerResponse) ProtoMessage() {} -func (*MsgToggleTradeControllerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{40} -} -func (m *MsgToggleTradeControllerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgToggleTradeControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgToggleTradeControllerResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgToggleTradeControllerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgToggleTradeControllerResponse.Merge(m, src) -} -func (m *MsgToggleTradeControllerResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgToggleTradeControllerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgToggleTradeControllerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgToggleTradeControllerResponse proto.InternalMessageInfo - -// Updates host zone params -type MsgUpdateHostZoneParams struct { - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Chain ID of the host zone - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Max messages that can be sent in a single ICA message - MaxMessagesPerIcaTx uint64 `protobuf:"varint,3,opt,name=max_messages_per_ica_tx,json=maxMessagesPerIcaTx,proto3" json:"max_messages_per_ica_tx,omitempty"` -} - -func (m *MsgUpdateHostZoneParams) Reset() { *m = MsgUpdateHostZoneParams{} } -func (m *MsgUpdateHostZoneParams) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateHostZoneParams) ProtoMessage() {} -func (*MsgUpdateHostZoneParams) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{41} -} -func (m *MsgUpdateHostZoneParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateHostZoneParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateHostZoneParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateHostZoneParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateHostZoneParams.Merge(m, src) -} -func (m *MsgUpdateHostZoneParams) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateHostZoneParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateHostZoneParams.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateHostZoneParams proto.InternalMessageInfo - -func (m *MsgUpdateHostZoneParams) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgUpdateHostZoneParams) GetChainId() string { - if m != nil { - return m.ChainId - } - return "" -} - -func (m *MsgUpdateHostZoneParams) GetMaxMessagesPerIcaTx() uint64 { - if m != nil { - return m.MaxMessagesPerIcaTx - } - return 0 -} - -type MsgUpdateHostZoneParamsResponse struct { -} - -func (m *MsgUpdateHostZoneParamsResponse) Reset() { *m = MsgUpdateHostZoneParamsResponse{} } -func (m *MsgUpdateHostZoneParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateHostZoneParamsResponse) ProtoMessage() {} -func (*MsgUpdateHostZoneParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{42} -} -func (m *MsgUpdateHostZoneParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateHostZoneParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateHostZoneParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateHostZoneParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateHostZoneParamsResponse.Merge(m, src) -} -func (m *MsgUpdateHostZoneParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateHostZoneParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateHostZoneParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateHostZoneParamsResponse proto.InternalMessageInfo - -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless - // overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the x/staking parameters to update. - // - // NOTE: All parameters must be supplied. - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` -} - -func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } -func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParams) ProtoMessage() {} -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{43} -} -func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParams.Merge(m, src) -} -func (m *MsgUpdateParams) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo - -func (m *MsgUpdateParams) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgUpdateParams) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { -} - -func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } -func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParamsResponse) ProtoMessage() {} -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9b7e09c9ad51cd54, []int{44} -} -func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) -} -func (m *MsgUpdateParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo - -func init() { - proto.RegisterEnum("stride.stakeibc.AuthzPermissionChange", AuthzPermissionChange_name, AuthzPermissionChange_value) - proto.RegisterType((*MsgUpdateInnerRedemptionRateBounds)(nil), "stride.stakeibc.MsgUpdateInnerRedemptionRateBounds") - proto.RegisterType((*MsgUpdateInnerRedemptionRateBoundsResponse)(nil), "stride.stakeibc.MsgUpdateInnerRedemptionRateBoundsResponse") - proto.RegisterType((*MsgLiquidStake)(nil), "stride.stakeibc.MsgLiquidStake") - proto.RegisterType((*MsgLiquidStakeResponse)(nil), "stride.stakeibc.MsgLiquidStakeResponse") - proto.RegisterType((*MsgLSMLiquidStake)(nil), "stride.stakeibc.MsgLSMLiquidStake") - proto.RegisterType((*MsgLSMLiquidStakeResponse)(nil), "stride.stakeibc.MsgLSMLiquidStakeResponse") - proto.RegisterType((*MsgClearBalance)(nil), "stride.stakeibc.MsgClearBalance") - proto.RegisterType((*MsgClearBalanceResponse)(nil), "stride.stakeibc.MsgClearBalanceResponse") - proto.RegisterType((*MsgRedeemStake)(nil), "stride.stakeibc.MsgRedeemStake") - proto.RegisterType((*MsgRedeemStakeResponse)(nil), "stride.stakeibc.MsgRedeemStakeResponse") - proto.RegisterType((*MsgRegisterHostZone)(nil), "stride.stakeibc.MsgRegisterHostZone") - proto.RegisterType((*MsgRegisterHostZoneResponse)(nil), "stride.stakeibc.MsgRegisterHostZoneResponse") - proto.RegisterType((*MsgClaimUndelegatedTokens)(nil), "stride.stakeibc.MsgClaimUndelegatedTokens") - proto.RegisterType((*MsgClaimUndelegatedTokensResponse)(nil), "stride.stakeibc.MsgClaimUndelegatedTokensResponse") - proto.RegisterType((*MsgRebalanceValidators)(nil), "stride.stakeibc.MsgRebalanceValidators") - proto.RegisterType((*MsgRebalanceValidatorsResponse)(nil), "stride.stakeibc.MsgRebalanceValidatorsResponse") - proto.RegisterType((*MsgAddValidators)(nil), "stride.stakeibc.MsgAddValidators") - proto.RegisterType((*MsgAddValidatorsResponse)(nil), "stride.stakeibc.MsgAddValidatorsResponse") - proto.RegisterType((*ValidatorWeight)(nil), "stride.stakeibc.ValidatorWeight") - proto.RegisterType((*MsgChangeValidatorWeights)(nil), "stride.stakeibc.MsgChangeValidatorWeights") - proto.RegisterType((*MsgChangeValidatorWeightsResponse)(nil), "stride.stakeibc.MsgChangeValidatorWeightsResponse") - proto.RegisterType((*MsgDeleteValidator)(nil), "stride.stakeibc.MsgDeleteValidator") - proto.RegisterType((*MsgDeleteValidatorResponse)(nil), "stride.stakeibc.MsgDeleteValidatorResponse") - proto.RegisterType((*MsgRestoreInterchainAccount)(nil), "stride.stakeibc.MsgRestoreInterchainAccount") - proto.RegisterType((*MsgRestoreInterchainAccountResponse)(nil), "stride.stakeibc.MsgRestoreInterchainAccountResponse") - proto.RegisterType((*MsgUpdateValidatorSharesExchRate)(nil), "stride.stakeibc.MsgUpdateValidatorSharesExchRate") - proto.RegisterType((*MsgUpdateValidatorSharesExchRateResponse)(nil), "stride.stakeibc.MsgUpdateValidatorSharesExchRateResponse") - proto.RegisterType((*MsgCalibrateDelegation)(nil), "stride.stakeibc.MsgCalibrateDelegation") - proto.RegisterType((*MsgCalibrateDelegationResponse)(nil), "stride.stakeibc.MsgCalibrateDelegationResponse") - proto.RegisterType((*MsgResumeHostZone)(nil), "stride.stakeibc.MsgResumeHostZone") - proto.RegisterType((*MsgResumeHostZoneResponse)(nil), "stride.stakeibc.MsgResumeHostZoneResponse") - proto.RegisterType((*MsgCreateTradeRoute)(nil), "stride.stakeibc.MsgCreateTradeRoute") - proto.RegisterType((*MsgCreateTradeRouteResponse)(nil), "stride.stakeibc.MsgCreateTradeRouteResponse") - proto.RegisterType((*MsgDeleteTradeRoute)(nil), "stride.stakeibc.MsgDeleteTradeRoute") - proto.RegisterType((*MsgDeleteTradeRouteResponse)(nil), "stride.stakeibc.MsgDeleteTradeRouteResponse") - proto.RegisterType((*MsgUpdateTradeRoute)(nil), "stride.stakeibc.MsgUpdateTradeRoute") - proto.RegisterType((*MsgUpdateTradeRouteResponse)(nil), "stride.stakeibc.MsgUpdateTradeRouteResponse") - proto.RegisterType((*MsgSetCommunityPoolRebate)(nil), "stride.stakeibc.MsgSetCommunityPoolRebate") - proto.RegisterType((*MsgSetCommunityPoolRebateResponse)(nil), "stride.stakeibc.MsgSetCommunityPoolRebateResponse") - proto.RegisterType((*MsgToggleTradeController)(nil), "stride.stakeibc.MsgToggleTradeController") - proto.RegisterType((*MsgToggleTradeControllerResponse)(nil), "stride.stakeibc.MsgToggleTradeControllerResponse") - proto.RegisterType((*MsgUpdateHostZoneParams)(nil), "stride.stakeibc.MsgUpdateHostZoneParams") - proto.RegisterType((*MsgUpdateHostZoneParamsResponse)(nil), "stride.stakeibc.MsgUpdateHostZoneParamsResponse") - proto.RegisterType((*MsgUpdateParams)(nil), "stride.stakeibc.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "stride.stakeibc.MsgUpdateParamsResponse") -} - -func init() { proto.RegisterFile("stride/stakeibc/tx.proto", fileDescriptor_9b7e09c9ad51cd54) } - -var fileDescriptor_9b7e09c9ad51cd54 = []byte{ - // 2635 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0xdf, 0x6b, 0xe4, 0xd6, - 0xf5, 0xf7, 0xac, 0x7f, 0x1f, 0xdb, 0xeb, 0xb1, 0x6c, 0xaf, 0xc7, 0xb3, 0xb1, 0xc7, 0x96, 0x37, - 0xdf, 0xaf, 0xe3, 0x64, 0x3d, 0xb5, 0x77, 0xd3, 0x36, 0x93, 0x34, 0xd4, 0xbf, 0x9a, 0xba, 0x59, - 0x27, 0x8b, 0xec, 0x24, 0x10, 0x08, 0xea, 0x1d, 0xe9, 0x66, 0x46, 0xac, 0xa4, 0x3b, 0x95, 0x34, - 0xf6, 0x38, 0x0f, 0xa1, 0xf4, 0xa9, 0x14, 0x0a, 0x85, 0xd2, 0xf7, 0xd0, 0xa7, 0x52, 0x0a, 0x0d, - 0x34, 0xb4, 0xd0, 0xfe, 0x03, 0x09, 0xa5, 0x34, 0xe4, 0xa9, 0x94, 0xe2, 0x84, 0xe4, 0x21, 0xa5, - 0x8f, 0xfb, 0x5c, 0x4a, 0xb9, 0x3f, 0xa4, 0x91, 0x34, 0x57, 0x33, 0x63, 0x67, 0x17, 0xfa, 0x62, - 0x5b, 0xe7, 0x9e, 0x7b, 0xce, 0xf9, 0x9c, 0x7b, 0xcf, 0xd1, 0x39, 0x47, 0x86, 0x82, 0x1f, 0x78, - 0x96, 0x89, 0xcb, 0x7e, 0x80, 0x1e, 0x60, 0xab, 0x6a, 0x94, 0x83, 0xd6, 0x66, 0xc3, 0x23, 0x01, - 0x51, 0xa6, 0xf9, 0xca, 0x66, 0xb8, 0x52, 0x2c, 0xa5, 0x59, 0x4f, 0x91, 0x6d, 0x99, 0x28, 0x20, - 0x1e, 0xdf, 0x51, 0x9c, 0xab, 0x91, 0x1a, 0x61, 0x7f, 0x96, 0xe9, 0x5f, 0x82, 0xba, 0x68, 0x10, - 0xdf, 0x21, 0xbe, 0xce, 0x17, 0xf8, 0x83, 0x58, 0x5a, 0xe6, 0x4f, 0xe5, 0x2a, 0xf2, 0x71, 0xf9, - 0x74, 0xab, 0x8a, 0x03, 0xb4, 0x55, 0x36, 0x88, 0xe5, 0x8a, 0xf5, 0x05, 0xb1, 0xee, 0xf8, 0xb5, - 0xf2, 0xe9, 0x16, 0xfd, 0x25, 0x16, 0x66, 0x90, 0x63, 0xb9, 0xa4, 0xcc, 0x7e, 0x0a, 0xd2, 0x13, - 0x69, 0xeb, 0x1a, 0xc8, 0x43, 0x8e, 0xd0, 0xa4, 0xfe, 0xfb, 0x1a, 0xa8, 0x47, 0x7e, 0xed, 0xb5, - 0x86, 0x89, 0x02, 0x7c, 0xe8, 0xba, 0xd8, 0xd3, 0xb0, 0x89, 0x9d, 0x46, 0x60, 0x11, 0x57, 0x43, - 0x01, 0xde, 0x25, 0x4d, 0xd7, 0xf4, 0x95, 0x02, 0x8c, 0x1a, 0x1e, 0xa6, 0x90, 0x0a, 0xb9, 0x95, - 0xdc, 0xfa, 0xb8, 0x16, 0x3e, 0x2a, 0x8b, 0x30, 0x66, 0xd4, 0x91, 0xe5, 0xea, 0x96, 0x59, 0xb8, - 0x26, 0x96, 0xe8, 0xf3, 0xa1, 0xa9, 0xd8, 0xb0, 0xe8, 0xd0, 0x05, 0x2a, 0x55, 0xf7, 0x22, 0xb1, - 0xba, 0x87, 0x02, 0x5c, 0x18, 0xa4, 0xbc, 0xbb, 0x5b, 0x1f, 0x5e, 0x94, 0x06, 0xfe, 0x7e, 0x51, - 0xba, 0xc9, 0x01, 0xf9, 0xe6, 0x83, 0x4d, 0x8b, 0x94, 0x1d, 0x14, 0xd4, 0x37, 0xef, 0xe1, 0x1a, - 0x32, 0xce, 0xf7, 0xb1, 0xf1, 0xc9, 0x07, 0xb7, 0x41, 0x78, 0x67, 0x1f, 0x1b, 0xda, 0x0d, 0xc7, - 0x72, 0x25, 0x86, 0x32, 0x6d, 0xa8, 0x95, 0xa1, 0x6d, 0xe8, 0xea, 0xda, 0x50, 0x4b, 0xa2, 0xad, - 0x72, 0xf0, 0xa3, 0x2f, 0xdf, 0xdf, 0x08, 0x9d, 0xf0, 0x93, 0x2f, 0xdf, 0xdf, 0xb8, 0x2b, 0xdc, - 0xdc, 0x6a, 0x3b, 0xba, 0xb7, 0x5f, 0xd5, 0x67, 0x60, 0xa3, 0x37, 0x97, 0x86, 0xfd, 0x06, 0x71, - 0x7d, 0xac, 0xfe, 0x2e, 0x07, 0xd7, 0x8f, 0xfc, 0xda, 0x3d, 0xeb, 0x07, 0x4d, 0xcb, 0x3c, 0xa6, - 0x6a, 0xba, 0x1c, 0xcc, 0xb3, 0x30, 0x82, 0x1c, 0xd2, 0x74, 0x03, 0x7e, 0x2c, 0xbb, 0x4b, 0x02, - 0xfc, 0x7c, 0x27, 0xf8, 0x43, 0x37, 0xd0, 0x04, 0xb3, 0xb2, 0x04, 0x50, 0x27, 0x7e, 0xa0, 0x9b, - 0xd8, 0x25, 0x0e, 0x3f, 0x25, 0x6d, 0x9c, 0x52, 0xf6, 0x29, 0xa1, 0xb2, 0x95, 0xc6, 0xbd, 0x22, - 0xc5, 0x1d, 0x33, 0x51, 0x25, 0x70, 0x23, 0x49, 0x09, 0xf1, 0x28, 0xaf, 0xc1, 0x98, 0x1f, 0xe8, - 0x01, 0x79, 0x80, 0x5d, 0x66, 0xfd, 0xc4, 0xf6, 0xe2, 0xa6, 0xf0, 0x3d, 0xbd, 0xf9, 0x9b, 0xe2, - 0xe6, 0x6f, 0xee, 0x11, 0xcb, 0xdd, 0x2d, 0x51, 0xfb, 0x7f, 0xfd, 0x69, 0x69, 0xa1, 0xd3, 0x7e, - 0xba, 0xee, 0x6b, 0xa3, 0x7e, 0x70, 0x42, 0x45, 0xa9, 0x1f, 0xe5, 0x60, 0x86, 0x6a, 0x3c, 0x3e, - 0x7a, 0xac, 0x9e, 0xba, 0x0d, 0xb3, 0xb6, 0xef, 0x70, 0xf3, 0x75, 0xab, 0x6a, 0x24, 0x5c, 0x96, - 0xb7, 0x7d, 0x87, 0x59, 0x73, 0x58, 0x35, 0xb8, 0xe7, 0xee, 0xa6, 0x3d, 0xb7, 0x26, 0xf7, 0x5c, - 0xc2, 0x6a, 0xf5, 0x15, 0x58, 0xec, 0x20, 0x46, 0xfe, 0xdb, 0x82, 0xb9, 0xc0, 0x43, 0xae, 0x8f, - 0x0c, 0x76, 0xd3, 0x0d, 0xe2, 0x34, 0x6c, 0x1c, 0x60, 0x86, 0x6f, 0x4c, 0x9b, 0x8d, 0xad, 0xed, - 0x89, 0x25, 0xf5, 0xcf, 0x39, 0x98, 0x3e, 0xf2, 0x6b, 0x7b, 0x36, 0x46, 0xde, 0x2e, 0xb2, 0x91, - 0x6b, 0xe0, 0xab, 0x05, 0x77, 0xdb, 0x69, 0x83, 0x97, 0x71, 0x1a, 0xd5, 0x55, 0x47, 0xae, 0x8b, - 0x6d, 0x1e, 0x93, 0x5a, 0xf8, 0x58, 0xd9, 0x4e, 0xfb, 0x67, 0x55, 0xea, 0x9f, 0xb8, 0xe5, 0xea, - 0x22, 0x2c, 0xa4, 0x48, 0x51, 0xac, 0xfc, 0x85, 0xc7, 0x0a, 0x8d, 0x27, 0xec, 0x3c, 0xa6, 0x1b, - 0x70, 0x13, 0x58, 0x64, 0xe8, 0xef, 0x10, 0x57, 0x24, 0x34, 0x6d, 0x8c, 0x12, 0xde, 0x24, 0x2e, - 0x56, 0x8a, 0x30, 0xe6, 0x61, 0x03, 0x5b, 0xa7, 0xd8, 0x13, 0x50, 0xa3, 0xe7, 0x7e, 0xa3, 0x28, - 0x66, 0xbc, 0x5a, 0x60, 0x51, 0x14, 0xa3, 0x44, 0x48, 0xff, 0x3a, 0x02, 0xb3, 0x6c, 0xa9, 0x66, - 0xf9, 0x01, 0xf6, 0xbe, 0x1b, 0x1a, 0xf0, 0x2d, 0x98, 0x32, 0x88, 0xeb, 0x62, 0x7e, 0x39, 0xc2, - 0x13, 0xdc, 0x2d, 0x3c, 0xbc, 0x28, 0xcd, 0x9d, 0x23, 0xc7, 0xae, 0xa8, 0x89, 0x65, 0x55, 0x9b, - 0x6c, 0x3f, 0x1f, 0x9a, 0x8a, 0x0a, 0x93, 0x55, 0x6c, 0xd4, 0xef, 0x6c, 0x37, 0x3c, 0xfc, 0xb6, - 0xd5, 0x2a, 0x4c, 0x32, 0x0c, 0x09, 0x9a, 0x72, 0x37, 0x91, 0x2c, 0x78, 0x92, 0x9d, 0x7f, 0x78, - 0x51, 0x9a, 0xe1, 0xf2, 0xdb, 0x6b, 0x6a, 0x2c, 0x87, 0x28, 0x5b, 0x30, 0xde, 0x0e, 0x97, 0x61, - 0xb6, 0x69, 0xee, 0xe1, 0x45, 0x29, 0xcf, 0x37, 0x45, 0x4b, 0xaa, 0x36, 0x66, 0x89, 0xe0, 0x89, - 0x1f, 0xdd, 0x48, 0xf2, 0xe8, 0x5e, 0x01, 0x7e, 0xcf, 0xdf, 0xc6, 0x9e, 0x2e, 0xae, 0x12, 0xc5, - 0x0a, 0x4c, 0xec, 0xf2, 0xc3, 0x8b, 0x52, 0x91, 0x8b, 0x95, 0x30, 0xa9, 0xda, 0x4c, 0x48, 0xdd, - 0xe3, 0xc4, 0x43, 0x53, 0xf9, 0x0e, 0xe4, 0x9b, 0x6e, 0x95, 0xb8, 0xa6, 0xe5, 0xd6, 0xf4, 0x06, - 0xf6, 0x2c, 0x62, 0x16, 0x26, 0x56, 0x72, 0xeb, 0x43, 0xbb, 0x37, 0x1f, 0x5e, 0x94, 0x16, 0xb8, - 0xb0, 0x34, 0x87, 0xaa, 0x4d, 0x47, 0xa4, 0xfb, 0x8c, 0xa2, 0x20, 0x98, 0xa5, 0x2f, 0xbf, 0xf4, - 0x8b, 0x68, 0xea, 0xaa, 0x2f, 0xa2, 0x19, 0xc7, 0x72, 0x53, 0x6f, 0x3c, 0xaa, 0x02, 0xb5, 0x3a, - 0x54, 0x5c, 0xbf, 0xba, 0x0a, 0xd4, 0x4a, 0xa9, 0xf8, 0x06, 0x14, 0x68, 0x8e, 0xb3, 0x59, 0xf2, - 0xd1, 0xd9, 0xdd, 0xd4, 0xb1, 0x8b, 0xaa, 0x36, 0x36, 0x0b, 0xd3, 0x2c, 0xcb, 0xcc, 0xdb, 0xbe, - 0x13, 0xcb, 0x4d, 0x07, 0x7c, 0x51, 0x39, 0x80, 0x92, 0x41, 0x1c, 0xa7, 0xe9, 0x5a, 0xc1, 0xb9, - 0xde, 0x20, 0xc4, 0xd6, 0x03, 0x0f, 0x23, 0xbf, 0xe9, 0x9d, 0xeb, 0xc8, 0x34, 0x3d, 0xec, 0xfb, - 0x85, 0x3c, 0x3b, 0xc8, 0x27, 0x22, 0xb6, 0xfb, 0x84, 0xd8, 0x27, 0x82, 0x69, 0x87, 0xf3, 0x28, - 0x77, 0x61, 0x81, 0x42, 0x74, 0xb0, 0xef, 0xa3, 0x1a, 0xf6, 0xa9, 0xbb, 0x75, 0xcb, 0x40, 0x7a, - 0xd0, 0x2a, 0xcc, 0xd0, 0x43, 0xd1, 0xa8, 0x07, 0x8e, 0xc4, 0xea, 0x7d, 0xec, 0x1d, 0x1a, 0xe8, - 0xa4, 0x55, 0x79, 0xf1, 0xc7, 0xef, 0x95, 0x06, 0xfe, 0xf9, 0x5e, 0x69, 0x20, 0x1d, 0x66, 0x4f, - 0x66, 0x84, 0x59, 0x32, 0x72, 0xd4, 0x25, 0xb8, 0x29, 0x21, 0xc7, 0x53, 0xcb, 0x22, 0x4b, 0x3b, - 0xc8, 0x72, 0x5e, 0x73, 0x4d, 0x6c, 0xe3, 0x1a, 0x0a, 0xb0, 0xc9, 0xd2, 0x7d, 0xb7, 0x52, 0x69, - 0x05, 0x26, 0xa3, 0x74, 0xd1, 0xce, 0xa8, 0x10, 0x66, 0x8c, 0x43, 0x53, 0x99, 0x83, 0x61, 0xdc, - 0x20, 0x46, 0x9d, 0x25, 0x93, 0x21, 0x8d, 0x3f, 0x24, 0x32, 0xc9, 0x70, 0x2a, 0x93, 0xbc, 0x90, - 0x86, 0xf8, 0x74, 0x46, 0xd6, 0x94, 0xd9, 0xfa, 0xbd, 0xa1, 0xb1, 0xa1, 0xfc, 0xb0, 0xba, 0x06, - 0xab, 0x99, 0x2c, 0x11, 0xe8, 0xdf, 0xe6, 0x44, 0x02, 0xaa, 0xf2, 0x44, 0xfb, 0x7a, 0x58, 0xe3, - 0x76, 0x43, 0x9c, 0x48, 0x90, 0xd7, 0x52, 0x09, 0x72, 0x0d, 0xa6, 0xdc, 0xa6, 0xa3, 0x7b, 0xa1, - 0x44, 0x01, 0x7a, 0xd2, 0x6d, 0x3a, 0x91, 0x96, 0xca, 0x73, 0x69, 0x7c, 0xeb, 0x19, 0x47, 0xd8, - 0x61, 0x96, 0xba, 0x02, 0xcb, 0xf2, 0x95, 0x08, 0xd3, 0x1f, 0x73, 0x90, 0x3f, 0xf2, 0x6b, 0x3b, - 0xa6, 0xf9, 0xd5, 0xd1, 0x54, 0x00, 0xa2, 0xb2, 0xdf, 0x2f, 0x0c, 0xae, 0x0c, 0xae, 0x4f, 0x6c, - 0x17, 0x37, 0x53, 0xad, 0xc2, 0x66, 0xa4, 0x47, 0x8b, 0x71, 0x57, 0xee, 0xa4, 0x41, 0xaa, 0x52, - 0x90, 0x09, 0x3b, 0xd5, 0x22, 0x14, 0xd2, 0xb4, 0x08, 0xd8, 0x5b, 0x30, 0x1d, 0x51, 0xdf, 0xc0, - 0x56, 0xad, 0x1e, 0x28, 0xdb, 0x30, 0x1a, 0x06, 0x5e, 0x8e, 0xbf, 0x07, 0x3e, 0xf9, 0xe0, 0xf6, - 0x9c, 0x88, 0x7e, 0x11, 0x6e, 0xc7, 0x81, 0x67, 0xb9, 0x35, 0x2d, 0x64, 0x54, 0x6e, 0xc0, 0xc8, - 0x19, 0xdb, 0xcd, 0xd0, 0x0e, 0x69, 0xe2, 0x49, 0xfd, 0x54, 0x04, 0x40, 0x1d, 0xb9, 0x35, 0x9c, - 0x52, 0x74, 0x65, 0x07, 0x1e, 0xc1, 0x4c, 0xe4, 0x12, 0x9d, 0x2b, 0x0a, 0xfd, 0xb8, 0x92, 0xed, - 0x47, 0xae, 0x54, 0xcb, 0x9f, 0xa6, 0xac, 0xe8, 0x3b, 0x30, 0xa4, 0x18, 0xc2, 0x90, 0x90, 0x2e, - 0x46, 0x5e, 0xfe, 0x43, 0x0e, 0x94, 0x23, 0xbf, 0xb6, 0x8f, 0x69, 0x65, 0x15, 0x71, 0x5d, 0x15, - 0xff, 0x1d, 0x18, 0x3b, 0x45, 0x36, 0xcb, 0x8e, 0xa2, 0xa4, 0xea, 0x72, 0x42, 0xa7, 0xc8, 0xa6, - 0x94, 0xca, 0xb3, 0x69, 0x94, 0xb7, 0xa4, 0x28, 0x53, 0x26, 0xaa, 0x4f, 0x40, 0xb1, 0x93, 0x1a, - 0xe1, 0xfa, 0x47, 0x4e, 0xe4, 0x3f, 0x3f, 0x20, 0x1e, 0x3e, 0x74, 0x03, 0xec, 0xb1, 0xaa, 0x6f, - 0xc7, 0x30, 0xa2, 0x1a, 0xee, 0xd2, 0xf5, 0xe2, 0x5a, 0xba, 0x1a, 0xe1, 0xf5, 0x52, 0xb2, 0xe6, - 0x58, 0x83, 0x29, 0xc4, 0x95, 0xe8, 0xe4, 0xcc, 0x8d, 0x0a, 0xa7, 0x49, 0x41, 0x7c, 0x95, 0xd2, - 0x2a, 0x2f, 0xa6, 0x31, 0xdf, 0xce, 0x48, 0x09, 0x72, 0xf3, 0xd5, 0x27, 0x61, 0xad, 0xcb, 0x72, - 0xe4, 0x85, 0xdf, 0xe7, 0x60, 0x25, 0xea, 0xcd, 0x22, 0x27, 0x1d, 0xd7, 0x91, 0x87, 0xfd, 0x83, - 0x96, 0x51, 0x67, 0xef, 0xc7, 0x2b, 0xb9, 0xa2, 0x00, 0xf4, 0xfc, 0x48, 0x03, 0x8b, 0x83, 0xd6, - 0xc2, 0xc7, 0xca, 0x5e, 0x1a, 0xda, 0x76, 0x97, 0xae, 0x32, 0xc3, 0x26, 0x75, 0x03, 0xd6, 0x7b, - 0xf1, 0x44, 0x20, 0x7f, 0xc9, 0xb3, 0xfa, 0x1e, 0xb2, 0xad, 0x2a, 0x2d, 0x1e, 0xf6, 0x79, 0xf6, - 0xb7, 0x88, 0xfb, 0xa8, 0xa1, 0xf5, 0x99, 0xc8, 0x25, 0x96, 0x88, 0x44, 0x2e, 0x59, 0x89, 0x60, - 0xbc, 0xcb, 0x1a, 0x3e, 0x0d, 0xfb, 0x4d, 0x07, 0x47, 0xf5, 0xef, 0x55, 0x00, 0xf4, 0xdb, 0xa5, - 0x25, 0x55, 0xa9, 0x37, 0x59, 0x3e, 0x4c, 0x12, 0x23, 0xe3, 0xfe, 0x35, 0xca, 0xea, 0xf3, 0x3d, - 0x2a, 0x13, 0x9f, 0x78, 0xc8, 0xc4, 0x1a, 0x69, 0x06, 0x58, 0xf9, 0x3a, 0x8c, 0xa3, 0x66, 0x50, - 0x27, 0x9e, 0x15, 0x9c, 0xf7, 0xcc, 0xc9, 0x6d, 0x56, 0x45, 0x85, 0x29, 0x96, 0x45, 0x52, 0x10, - 0x26, 0x28, 0x71, 0x4f, 0x9c, 0xc3, 0x2e, 0x2c, 0x73, 0xbb, 0xf5, 0x80, 0xe8, 0x1e, 0x3e, 0x43, - 0x9e, 0xa9, 0xcb, 0xc2, 0xaf, 0xc8, 0xb9, 0x4e, 0x88, 0xc6, 0x78, 0xf6, 0xe2, 0xc1, 0xf8, 0x6d, - 0x58, 0x6a, 0xcb, 0x08, 0xa8, 0xdd, 0x29, 0x11, 0x3c, 0x38, 0x17, 0x43, 0x11, 0x0c, 0x5a, 0x42, - 0xc2, 0x21, 0xf0, 0x16, 0xa0, 0x6d, 0x83, 0xac, 0x54, 0xe7, 0x25, 0xcd, 0x12, 0xe5, 0x0c, 0xed, - 0x38, 0xe9, 0x28, 0xcb, 0x5f, 0x86, 0xb5, 0x50, 0x44, 0x68, 0x8c, 0x4c, 0x16, 0x6f, 0x0e, 0x96, - 0x39, 0xab, 0x30, 0xa9, 0x53, 0xd8, 0x4b, 0xb0, 0x2a, 0x44, 0x10, 0x9d, 0x1b, 0x28, 0x11, 0x35, - 0xca, 0xcb, 0x53, 0xc6, 0x78, 0x42, 0xe8, 0xa9, 0x76, 0x0a, 0x2a, 0xc3, 0x9c, 0xb0, 0x8a, 0x75, - 0x2c, 0x3a, 0x71, 0x99, 0xbc, 0xc2, 0x18, 0xdb, 0x3b, 0xc3, 0xd7, 0x58, 0x07, 0xf3, 0xaa, 0x4b, - 0x25, 0x28, 0x77, 0xe0, 0x46, 0x7a, 0x03, 0x7f, 0x2e, 0x8c, 0xb3, 0x2d, 0xb3, 0x89, 0x2d, 0xdc, - 0x19, 0xca, 0x16, 0xcc, 0xa7, 0x37, 0x31, 0xab, 0x78, 0x93, 0xa3, 0x29, 0x89, 0x3d, 0x0c, 0xb2, - 0x72, 0x1b, 0x66, 0xdb, 0xcd, 0x57, 0x7b, 0xc3, 0x04, 0x9f, 0x4d, 0x44, 0xad, 0x58, 0xc8, 0xfe, - 0x34, 0x28, 0x49, 0x76, 0x86, 0x82, 0x77, 0x7c, 0xd3, 0x31, 0x6e, 0x86, 0x61, 0x01, 0x46, 0x59, - 0x41, 0x6f, 0x99, 0xac, 0x9b, 0x19, 0xd2, 0x46, 0xe8, 0xe3, 0xa1, 0xa9, 0x54, 0xa0, 0x48, 0x8b, - 0x75, 0x64, 0xdb, 0xe4, 0x0c, 0x9b, 0xba, 0x7f, 0x86, 0x1a, 0xba, 0x4d, 0x7c, 0x3f, 0xd6, 0x96, - 0xb0, 0x79, 0xda, 0x0e, 0x67, 0x38, 0x3e, 0x43, 0x8d, 0x7b, 0xc4, 0xf7, 0x59, 0x22, 0x3d, 0x80, - 0x69, 0xda, 0x2e, 0xb1, 0x3d, 0xa2, 0x15, 0x9f, 0xee, 0xa7, 0x15, 0x9f, 0x72, 0x2c, 0x97, 0x0a, - 0xda, 0xe1, 0x1d, 0x39, 0x15, 0x83, 0x5a, 0x09, 0x31, 0xf9, 0xfe, 0xc4, 0xa0, 0x56, 0x5b, 0x4c, - 0xe5, 0x9b, 0x34, 0x0b, 0xb4, 0x43, 0x2e, 0xbb, 0x75, 0x48, 0x07, 0xb5, 0x68, 0x1d, 0xd2, 0xe4, - 0x28, 0x17, 0x7c, 0x94, 0x63, 0xb9, 0x80, 0xbf, 0x79, 0x1f, 0x41, 0x2e, 0x58, 0x85, 0xc9, 0xf8, - 0xd5, 0x08, 0x53, 0x41, 0xec, 0x46, 0xf4, 0x1a, 0xe8, 0xf5, 0x0d, 0x35, 0x6d, 0xb3, 0x80, 0x9a, - 0x26, 0x47, 0x50, 0x7f, 0x33, 0xc8, 0xa0, 0xf2, 0xf7, 0xd0, 0xff, 0x02, 0xd4, 0xf8, 0xc5, 0x1d, - 0xba, 0xc4, 0xc5, 0x1d, 0xbe, 0xec, 0xc5, 0x1d, 0x79, 0x34, 0x17, 0x77, 0xf4, 0x71, 0x5e, 0xdc, - 0xf4, 0xb1, 0x88, 0xd3, 0x4c, 0x93, 0xdb, 0x43, 0xa6, 0x6b, 0xec, 0x15, 0x77, 0x8c, 0x83, 0xbd, - 0x78, 0xbf, 0x4e, 0xbb, 0xab, 0x00, 0xd3, 0xe6, 0x22, 0xf1, 0xaa, 0xed, 0x56, 0xba, 0xf6, 0x51, - 0x45, 0xec, 0xc3, 0x84, 0xc7, 0x04, 0xc7, 0x3f, 0x15, 0xac, 0xf5, 0x31, 0xd0, 0xd0, 0x80, 0xef, - 0x63, 0x27, 0xa3, 0xc3, 0x52, 0x7c, 0x6e, 0x41, 0x7f, 0x89, 0x61, 0xad, 0x70, 0xf0, 0x50, 0x3f, - 0x0e, 0x5e, 0xb4, 0xdb, 0xc3, 0x0d, 0xf3, 0x98, 0x4f, 0x98, 0x85, 0xb3, 0xfb, 0x6c, 0x31, 0xe4, - 0x3e, 0x13, 0x2d, 0x86, 0x7c, 0x31, 0x72, 0xfb, 0x2f, 0xae, 0xb1, 0x2e, 0xef, 0x84, 0xd4, 0x6a, - 0x36, 0x0e, 0x5f, 0xb0, 0x81, 0x47, 0x6c, 0x1b, 0x7b, 0x8f, 0xda, 0xeb, 0xc7, 0x30, 0xd3, 0xc0, - 0x9e, 0x63, 0xf9, 0x3e, 0x1b, 0x26, 0xb3, 0xde, 0x87, 0xf9, 0xfe, 0xfa, 0xf6, 0xff, 0x75, 0x34, - 0x60, 0x3b, 0xcd, 0xa0, 0xfe, 0xce, 0xfd, 0x88, 0x9d, 0x77, 0x4a, 0x5a, 0xbe, 0x91, 0xa2, 0xd0, - 0x22, 0x2c, 0x6c, 0x3b, 0xc5, 0xbc, 0x57, 0x3c, 0x56, 0x9e, 0x4f, 0x7b, 0x6f, 0x43, 0xea, 0x3d, - 0x29, 0x74, 0x55, 0x65, 0xb5, 0xb9, 0x74, 0x2d, 0xf2, 0xdd, 0x67, 0x39, 0x36, 0x1d, 0xe6, 0x57, - 0x3a, 0xac, 0xca, 0xee, 0xb3, 0x8f, 0x5f, 0x57, 0x4e, 0x42, 0x5d, 0xdc, 0xd7, 0x65, 0x54, 0x35, - 0x98, 0x3d, 0xaa, 0x7a, 0xa1, 0x33, 0x60, 0x9f, 0xea, 0x12, 0xb0, 0x49, 0x18, 0xea, 0x2a, 0x94, - 0x32, 0x96, 0x22, 0x2f, 0xfc, 0x89, 0x0f, 0xfc, 0x39, 0xcf, 0x57, 0x44, 0x5f, 0x81, 0x11, 0xfe, - 0xf1, 0x90, 0x61, 0x9f, 0xd8, 0x5e, 0xe8, 0xb8, 0x16, 0x5c, 0xc1, 0xee, 0x38, 0x8d, 0xa9, 0x5f, - 0x7d, 0xf9, 0xfe, 0x46, 0x4e, 0x13, 0x3b, 0x78, 0x61, 0x9d, 0x04, 0xba, 0xda, 0x05, 0xa8, 0x00, - 0xb8, 0x18, 0x3b, 0xc2, 0x24, 0xb0, 0x8d, 0x4d, 0x98, 0x97, 0x5e, 0x42, 0x65, 0x1c, 0x86, 0x5f, - 0xd2, 0x76, 0x5e, 0x39, 0xc9, 0x0f, 0x28, 0x00, 0x23, 0xda, 0xc1, 0xeb, 0xaf, 0xbe, 0x7c, 0x90, - 0xcf, 0x6d, 0xff, 0x47, 0x81, 0xc1, 0x23, 0xbf, 0xa6, 0xbc, 0x01, 0x13, 0xf1, 0xcf, 0x42, 0xa5, - 0x0e, 0x0c, 0xc9, 0x8f, 0x55, 0xc5, 0xff, 0xef, 0xc1, 0x10, 0x7d, 0x8d, 0xf9, 0x3e, 0x5c, 0x4f, - 0x7d, 0x72, 0x52, 0xa5, 0x5b, 0x13, 0x3c, 0xc5, 0x8d, 0xde, 0x3c, 0x91, 0x86, 0x37, 0x60, 0x22, - 0xfe, 0x3d, 0x43, 0x6a, 0x7a, 0x8c, 0x41, 0x6e, 0xba, 0xe4, 0x13, 0x82, 0xf2, 0x36, 0xe4, 0x3b, - 0x3e, 0x1f, 0xdc, 0x92, 0x6f, 0x4e, 0x72, 0x15, 0x9f, 0xe9, 0x87, 0x2b, 0xd2, 0xd3, 0x82, 0x1b, - 0x19, 0x53, 0x53, 0xa9, 0x1b, 0xe4, 0xbc, 0xc5, 0xed, 0xfe, 0x79, 0x23, 0xcd, 0x04, 0x66, 0x65, - 0xa3, 0xcb, 0x0c, 0x0f, 0x75, 0x30, 0x16, 0xcb, 0x7d, 0x32, 0x46, 0x0a, 0xdf, 0x82, 0xa9, 0xe4, - 0x5c, 0x71, 0x55, 0x26, 0x21, 0xc1, 0x52, 0x7c, 0xaa, 0x27, 0x4b, 0x24, 0xfe, 0x0c, 0xe6, 0xa5, - 0xd3, 0xa9, 0x0c, 0x47, 0x4a, 0x07, 0x59, 0x19, 0x8e, 0xec, 0x3a, 0xf4, 0x52, 0x0c, 0x98, 0x4e, - 0x0f, 0xbc, 0xd6, 0x64, 0x62, 0x52, 0x4c, 0xc5, 0xa7, 0xfb, 0x60, 0x8a, 0x94, 0xbc, 0x0b, 0x85, - 0xcc, 0xe9, 0x53, 0xc6, 0x8d, 0x93, 0x73, 0x17, 0xef, 0x5e, 0x86, 0x3b, 0xd2, 0xff, 0xd3, 0x1c, - 0x2c, 0x75, 0x1f, 0xfc, 0x6c, 0xc9, 0xe4, 0x76, 0xdd, 0x52, 0x7c, 0xee, 0xd2, 0x5b, 0xe2, 0xb7, - 0x57, 0x36, 0xa2, 0x91, 0xde, 0x5e, 0x09, 0xa3, 0xfc, 0xf6, 0x76, 0x19, 0xa8, 0x28, 0x6f, 0xc2, - 0x64, 0xe2, 0x13, 0xf1, 0x8a, 0x3c, 0xe4, 0xda, 0x1c, 0xc5, 0xf5, 0x5e, 0x1c, 0x91, 0xec, 0x9f, - 0xe7, 0xa0, 0xd4, 0xeb, 0xff, 0x4d, 0xee, 0x64, 0xfb, 0x2a, 0x73, 0x53, 0xf1, 0xf9, 0x2b, 0x6c, - 0x8a, 0x67, 0xef, 0xd4, 0xfc, 0x48, 0xcd, 0xb8, 0x3a, 0x31, 0x1e, 0x79, 0xf6, 0x96, 0xcf, 0x81, - 0x68, 0x92, 0xed, 0x98, 0x01, 0x49, 0x93, 0x6c, 0x9a, 0x4b, 0x9e, 0x64, 0xb3, 0x7a, 0x4c, 0xaa, - 0xa7, 0xa3, 0xbf, 0xbc, 0x95, 0x1d, 0x7d, 0xbd, 0xf4, 0x64, 0x35, 0x78, 0x54, 0x4f, 0x47, 0x73, - 0x77, 0x2b, 0xfb, 0x08, 0x7a, 0xe9, 0xc9, 0x6a, 0x3d, 0xe8, 0x4b, 0x23, 0xa3, 0xed, 0x90, 0x7a, - 0x5f, 0xce, 0x2b, 0xcf, 0x75, 0xdd, 0xab, 0x6f, 0xa5, 0x09, 0xf3, 0xf2, 0xca, 0x5b, 0x9a, 0xa8, - 0xa5, 0xac, 0xc5, 0xad, 0xbe, 0x59, 0x23, 0xb5, 0x1e, 0xcc, 0x49, 0x8b, 0xd6, 0xf5, 0x6c, 0xb7, - 0x25, 0x39, 0x8b, 0x5f, 0xeb, 0x97, 0x33, 0x1e, 0xf0, 0x89, 0x12, 0x71, 0x25, 0x5b, 0x82, 0xd0, - 0xb1, 0xde, 0x8b, 0x23, 0x94, 0x5d, 0x1c, 0xfe, 0x21, 0xad, 0x04, 0x77, 0xef, 0x7d, 0xf8, 0xf9, - 0x72, 0xee, 0xe3, 0xcf, 0x97, 0x73, 0x9f, 0x7d, 0xbe, 0x9c, 0xfb, 0xd9, 0x17, 0xcb, 0x03, 0x1f, - 0x7f, 0xb1, 0x3c, 0xf0, 0xb7, 0x2f, 0x96, 0x07, 0xde, 0xdc, 0xae, 0x59, 0x41, 0xbd, 0x59, 0xdd, - 0x34, 0x88, 0x53, 0x76, 0x2c, 0xfb, 0xc1, 0xf9, 0x19, 0x3a, 0xbf, 0x6d, 0xa3, 0xaa, 0x1f, 0x3d, - 0xc5, 0x6b, 0xc4, 0xe0, 0xbc, 0x81, 0xfd, 0xea, 0x08, 0xfb, 0xff, 0xb5, 0x3b, 0xff, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0xc8, 0x84, 0xd2, 0xa2, 0xa8, 0x27, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type MsgClient interface { - LiquidStake(ctx context.Context, in *MsgLiquidStake, opts ...grpc.CallOption) (*MsgLiquidStakeResponse, error) - LSMLiquidStake(ctx context.Context, in *MsgLSMLiquidStake, opts ...grpc.CallOption) (*MsgLSMLiquidStakeResponse, error) - RedeemStake(ctx context.Context, in *MsgRedeemStake, opts ...grpc.CallOption) (*MsgRedeemStakeResponse, error) - RegisterHostZone(ctx context.Context, in *MsgRegisterHostZone, opts ...grpc.CallOption) (*MsgRegisterHostZoneResponse, error) - ClaimUndelegatedTokens(ctx context.Context, in *MsgClaimUndelegatedTokens, opts ...grpc.CallOption) (*MsgClaimUndelegatedTokensResponse, error) - RebalanceValidators(ctx context.Context, in *MsgRebalanceValidators, opts ...grpc.CallOption) (*MsgRebalanceValidatorsResponse, error) - AddValidators(ctx context.Context, in *MsgAddValidators, opts ...grpc.CallOption) (*MsgAddValidatorsResponse, error) - ChangeValidatorWeight(ctx context.Context, in *MsgChangeValidatorWeights, opts ...grpc.CallOption) (*MsgChangeValidatorWeightsResponse, error) - DeleteValidator(ctx context.Context, in *MsgDeleteValidator, opts ...grpc.CallOption) (*MsgDeleteValidatorResponse, error) - RestoreInterchainAccount(ctx context.Context, in *MsgRestoreInterchainAccount, opts ...grpc.CallOption) (*MsgRestoreInterchainAccountResponse, error) - UpdateValidatorSharesExchRate(ctx context.Context, in *MsgUpdateValidatorSharesExchRate, opts ...grpc.CallOption) (*MsgUpdateValidatorSharesExchRateResponse, error) - CalibrateDelegation(ctx context.Context, in *MsgCalibrateDelegation, opts ...grpc.CallOption) (*MsgCalibrateDelegationResponse, error) - ClearBalance(ctx context.Context, in *MsgClearBalance, opts ...grpc.CallOption) (*MsgClearBalanceResponse, error) - UpdateInnerRedemptionRateBounds(ctx context.Context, in *MsgUpdateInnerRedemptionRateBounds, opts ...grpc.CallOption) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) - ResumeHostZone(ctx context.Context, in *MsgResumeHostZone, opts ...grpc.CallOption) (*MsgResumeHostZoneResponse, error) - CreateTradeRoute(ctx context.Context, in *MsgCreateTradeRoute, opts ...grpc.CallOption) (*MsgCreateTradeRouteResponse, error) - DeleteTradeRoute(ctx context.Context, in *MsgDeleteTradeRoute, opts ...grpc.CallOption) (*MsgDeleteTradeRouteResponse, error) - UpdateTradeRoute(ctx context.Context, in *MsgUpdateTradeRoute, opts ...grpc.CallOption) (*MsgUpdateTradeRouteResponse, error) - SetCommunityPoolRebate(ctx context.Context, in *MsgSetCommunityPoolRebate, opts ...grpc.CallOption) (*MsgSetCommunityPoolRebateResponse, error) - ToggleTradeController(ctx context.Context, in *MsgToggleTradeController, opts ...grpc.CallOption) (*MsgToggleTradeControllerResponse, error) - UpdateHostZoneParams(ctx context.Context, in *MsgUpdateHostZoneParams, opts ...grpc.CallOption) (*MsgUpdateHostZoneParamsResponse, error) - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) LiquidStake(ctx context.Context, in *MsgLiquidStake, opts ...grpc.CallOption) (*MsgLiquidStakeResponse, error) { - out := new(MsgLiquidStakeResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/LiquidStake", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) LSMLiquidStake(ctx context.Context, in *MsgLSMLiquidStake, opts ...grpc.CallOption) (*MsgLSMLiquidStakeResponse, error) { - out := new(MsgLSMLiquidStakeResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/LSMLiquidStake", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RedeemStake(ctx context.Context, in *MsgRedeemStake, opts ...grpc.CallOption) (*MsgRedeemStakeResponse, error) { - out := new(MsgRedeemStakeResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/RedeemStake", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RegisterHostZone(ctx context.Context, in *MsgRegisterHostZone, opts ...grpc.CallOption) (*MsgRegisterHostZoneResponse, error) { - out := new(MsgRegisterHostZoneResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/RegisterHostZone", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ClaimUndelegatedTokens(ctx context.Context, in *MsgClaimUndelegatedTokens, opts ...grpc.CallOption) (*MsgClaimUndelegatedTokensResponse, error) { - out := new(MsgClaimUndelegatedTokensResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/ClaimUndelegatedTokens", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RebalanceValidators(ctx context.Context, in *MsgRebalanceValidators, opts ...grpc.CallOption) (*MsgRebalanceValidatorsResponse, error) { - out := new(MsgRebalanceValidatorsResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/RebalanceValidators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) AddValidators(ctx context.Context, in *MsgAddValidators, opts ...grpc.CallOption) (*MsgAddValidatorsResponse, error) { - out := new(MsgAddValidatorsResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/AddValidators", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ChangeValidatorWeight(ctx context.Context, in *MsgChangeValidatorWeights, opts ...grpc.CallOption) (*MsgChangeValidatorWeightsResponse, error) { - out := new(MsgChangeValidatorWeightsResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/ChangeValidatorWeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeleteValidator(ctx context.Context, in *MsgDeleteValidator, opts ...grpc.CallOption) (*MsgDeleteValidatorResponse, error) { - out := new(MsgDeleteValidatorResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/DeleteValidator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RestoreInterchainAccount(ctx context.Context, in *MsgRestoreInterchainAccount, opts ...grpc.CallOption) (*MsgRestoreInterchainAccountResponse, error) { - out := new(MsgRestoreInterchainAccountResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/RestoreInterchainAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateValidatorSharesExchRate(ctx context.Context, in *MsgUpdateValidatorSharesExchRate, opts ...grpc.CallOption) (*MsgUpdateValidatorSharesExchRateResponse, error) { - out := new(MsgUpdateValidatorSharesExchRateResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/UpdateValidatorSharesExchRate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CalibrateDelegation(ctx context.Context, in *MsgCalibrateDelegation, opts ...grpc.CallOption) (*MsgCalibrateDelegationResponse, error) { - out := new(MsgCalibrateDelegationResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/CalibrateDelegation", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ClearBalance(ctx context.Context, in *MsgClearBalance, opts ...grpc.CallOption) (*MsgClearBalanceResponse, error) { - out := new(MsgClearBalanceResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/ClearBalance", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateInnerRedemptionRateBounds(ctx context.Context, in *MsgUpdateInnerRedemptionRateBounds, opts ...grpc.CallOption) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) { - out := new(MsgUpdateInnerRedemptionRateBoundsResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/UpdateInnerRedemptionRateBounds", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ResumeHostZone(ctx context.Context, in *MsgResumeHostZone, opts ...grpc.CallOption) (*MsgResumeHostZoneResponse, error) { - out := new(MsgResumeHostZoneResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/ResumeHostZone", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) CreateTradeRoute(ctx context.Context, in *MsgCreateTradeRoute, opts ...grpc.CallOption) (*MsgCreateTradeRouteResponse, error) { - out := new(MsgCreateTradeRouteResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/CreateTradeRoute", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeleteTradeRoute(ctx context.Context, in *MsgDeleteTradeRoute, opts ...grpc.CallOption) (*MsgDeleteTradeRouteResponse, error) { - out := new(MsgDeleteTradeRouteResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/DeleteTradeRoute", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateTradeRoute(ctx context.Context, in *MsgUpdateTradeRoute, opts ...grpc.CallOption) (*MsgUpdateTradeRouteResponse, error) { - out := new(MsgUpdateTradeRouteResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/UpdateTradeRoute", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SetCommunityPoolRebate(ctx context.Context, in *MsgSetCommunityPoolRebate, opts ...grpc.CallOption) (*MsgSetCommunityPoolRebateResponse, error) { - out := new(MsgSetCommunityPoolRebateResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/SetCommunityPoolRebate", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ToggleTradeController(ctx context.Context, in *MsgToggleTradeController, opts ...grpc.CallOption) (*MsgToggleTradeControllerResponse, error) { - out := new(MsgToggleTradeControllerResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/ToggleTradeController", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateHostZoneParams(ctx context.Context, in *MsgUpdateHostZoneParams, opts ...grpc.CallOption) (*MsgUpdateHostZoneParamsResponse, error) { - out := new(MsgUpdateHostZoneParamsResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/UpdateHostZoneParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/stride.stakeibc.Msg/UpdateParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - LiquidStake(context.Context, *MsgLiquidStake) (*MsgLiquidStakeResponse, error) - LSMLiquidStake(context.Context, *MsgLSMLiquidStake) (*MsgLSMLiquidStakeResponse, error) - RedeemStake(context.Context, *MsgRedeemStake) (*MsgRedeemStakeResponse, error) - RegisterHostZone(context.Context, *MsgRegisterHostZone) (*MsgRegisterHostZoneResponse, error) - ClaimUndelegatedTokens(context.Context, *MsgClaimUndelegatedTokens) (*MsgClaimUndelegatedTokensResponse, error) - RebalanceValidators(context.Context, *MsgRebalanceValidators) (*MsgRebalanceValidatorsResponse, error) - AddValidators(context.Context, *MsgAddValidators) (*MsgAddValidatorsResponse, error) - ChangeValidatorWeight(context.Context, *MsgChangeValidatorWeights) (*MsgChangeValidatorWeightsResponse, error) - DeleteValidator(context.Context, *MsgDeleteValidator) (*MsgDeleteValidatorResponse, error) - RestoreInterchainAccount(context.Context, *MsgRestoreInterchainAccount) (*MsgRestoreInterchainAccountResponse, error) - UpdateValidatorSharesExchRate(context.Context, *MsgUpdateValidatorSharesExchRate) (*MsgUpdateValidatorSharesExchRateResponse, error) - CalibrateDelegation(context.Context, *MsgCalibrateDelegation) (*MsgCalibrateDelegationResponse, error) - ClearBalance(context.Context, *MsgClearBalance) (*MsgClearBalanceResponse, error) - UpdateInnerRedemptionRateBounds(context.Context, *MsgUpdateInnerRedemptionRateBounds) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) - ResumeHostZone(context.Context, *MsgResumeHostZone) (*MsgResumeHostZoneResponse, error) - CreateTradeRoute(context.Context, *MsgCreateTradeRoute) (*MsgCreateTradeRouteResponse, error) - DeleteTradeRoute(context.Context, *MsgDeleteTradeRoute) (*MsgDeleteTradeRouteResponse, error) - UpdateTradeRoute(context.Context, *MsgUpdateTradeRoute) (*MsgUpdateTradeRouteResponse, error) - SetCommunityPoolRebate(context.Context, *MsgSetCommunityPoolRebate) (*MsgSetCommunityPoolRebateResponse, error) - ToggleTradeController(context.Context, *MsgToggleTradeController) (*MsgToggleTradeControllerResponse, error) - UpdateHostZoneParams(context.Context, *MsgUpdateHostZoneParams) (*MsgUpdateHostZoneParamsResponse, error) - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) LiquidStake(ctx context.Context, req *MsgLiquidStake) (*MsgLiquidStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LiquidStake not implemented") -} -func (*UnimplementedMsgServer) LSMLiquidStake(ctx context.Context, req *MsgLSMLiquidStake) (*MsgLSMLiquidStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LSMLiquidStake not implemented") -} -func (*UnimplementedMsgServer) RedeemStake(ctx context.Context, req *MsgRedeemStake) (*MsgRedeemStakeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RedeemStake not implemented") -} -func (*UnimplementedMsgServer) RegisterHostZone(ctx context.Context, req *MsgRegisterHostZone) (*MsgRegisterHostZoneResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterHostZone not implemented") -} -func (*UnimplementedMsgServer) ClaimUndelegatedTokens(ctx context.Context, req *MsgClaimUndelegatedTokens) (*MsgClaimUndelegatedTokensResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClaimUndelegatedTokens not implemented") -} -func (*UnimplementedMsgServer) RebalanceValidators(ctx context.Context, req *MsgRebalanceValidators) (*MsgRebalanceValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RebalanceValidators not implemented") -} -func (*UnimplementedMsgServer) AddValidators(ctx context.Context, req *MsgAddValidators) (*MsgAddValidatorsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddValidators not implemented") -} -func (*UnimplementedMsgServer) ChangeValidatorWeight(ctx context.Context, req *MsgChangeValidatorWeights) (*MsgChangeValidatorWeightsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ChangeValidatorWeight not implemented") -} -func (*UnimplementedMsgServer) DeleteValidator(ctx context.Context, req *MsgDeleteValidator) (*MsgDeleteValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteValidator not implemented") -} -func (*UnimplementedMsgServer) RestoreInterchainAccount(ctx context.Context, req *MsgRestoreInterchainAccount) (*MsgRestoreInterchainAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RestoreInterchainAccount not implemented") -} -func (*UnimplementedMsgServer) UpdateValidatorSharesExchRate(ctx context.Context, req *MsgUpdateValidatorSharesExchRate) (*MsgUpdateValidatorSharesExchRateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateValidatorSharesExchRate not implemented") -} -func (*UnimplementedMsgServer) CalibrateDelegation(ctx context.Context, req *MsgCalibrateDelegation) (*MsgCalibrateDelegationResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CalibrateDelegation not implemented") -} -func (*UnimplementedMsgServer) ClearBalance(ctx context.Context, req *MsgClearBalance) (*MsgClearBalanceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClearBalance not implemented") -} -func (*UnimplementedMsgServer) UpdateInnerRedemptionRateBounds(ctx context.Context, req *MsgUpdateInnerRedemptionRateBounds) (*MsgUpdateInnerRedemptionRateBoundsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateInnerRedemptionRateBounds not implemented") -} -func (*UnimplementedMsgServer) ResumeHostZone(ctx context.Context, req *MsgResumeHostZone) (*MsgResumeHostZoneResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResumeHostZone not implemented") -} -func (*UnimplementedMsgServer) CreateTradeRoute(ctx context.Context, req *MsgCreateTradeRoute) (*MsgCreateTradeRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateTradeRoute not implemented") -} -func (*UnimplementedMsgServer) DeleteTradeRoute(ctx context.Context, req *MsgDeleteTradeRoute) (*MsgDeleteTradeRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteTradeRoute not implemented") -} -func (*UnimplementedMsgServer) UpdateTradeRoute(ctx context.Context, req *MsgUpdateTradeRoute) (*MsgUpdateTradeRouteResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateTradeRoute not implemented") -} -func (*UnimplementedMsgServer) SetCommunityPoolRebate(ctx context.Context, req *MsgSetCommunityPoolRebate) (*MsgSetCommunityPoolRebateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetCommunityPoolRebate not implemented") -} -func (*UnimplementedMsgServer) ToggleTradeController(ctx context.Context, req *MsgToggleTradeController) (*MsgToggleTradeControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ToggleTradeController not implemented") -} -func (*UnimplementedMsgServer) UpdateHostZoneParams(ctx context.Context, req *MsgUpdateHostZoneParams) (*MsgUpdateHostZoneParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateHostZoneParams not implemented") -} -func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_LiquidStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgLiquidStake) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).LiquidStake(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/LiquidStake", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).LiquidStake(ctx, req.(*MsgLiquidStake)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_LSMLiquidStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgLSMLiquidStake) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).LSMLiquidStake(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/LSMLiquidStake", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).LSMLiquidStake(ctx, req.(*MsgLSMLiquidStake)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RedeemStake_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRedeemStake) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RedeemStake(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/RedeemStake", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RedeemStake(ctx, req.(*MsgRedeemStake)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RegisterHostZone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterHostZone) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RegisterHostZone(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/RegisterHostZone", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterHostZone(ctx, req.(*MsgRegisterHostZone)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ClaimUndelegatedTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgClaimUndelegatedTokens) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ClaimUndelegatedTokens(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/ClaimUndelegatedTokens", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClaimUndelegatedTokens(ctx, req.(*MsgClaimUndelegatedTokens)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RebalanceValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRebalanceValidators) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RebalanceValidators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/RebalanceValidators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RebalanceValidators(ctx, req.(*MsgRebalanceValidators)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_AddValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAddValidators) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).AddValidators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/AddValidators", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AddValidators(ctx, req.(*MsgAddValidators)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ChangeValidatorWeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgChangeValidatorWeights) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ChangeValidatorWeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/ChangeValidatorWeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ChangeValidatorWeight(ctx, req.(*MsgChangeValidatorWeights)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeleteValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeleteValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeleteValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/DeleteValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeleteValidator(ctx, req.(*MsgDeleteValidator)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RestoreInterchainAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRestoreInterchainAccount) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RestoreInterchainAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/RestoreInterchainAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RestoreInterchainAccount(ctx, req.(*MsgRestoreInterchainAccount)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateValidatorSharesExchRate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateValidatorSharesExchRate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateValidatorSharesExchRate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/UpdateValidatorSharesExchRate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateValidatorSharesExchRate(ctx, req.(*MsgUpdateValidatorSharesExchRate)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CalibrateDelegation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCalibrateDelegation) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CalibrateDelegation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/CalibrateDelegation", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CalibrateDelegation(ctx, req.(*MsgCalibrateDelegation)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ClearBalance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgClearBalance) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ClearBalance(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/ClearBalance", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClearBalance(ctx, req.(*MsgClearBalance)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateInnerRedemptionRateBounds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateInnerRedemptionRateBounds) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateInnerRedemptionRateBounds(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/UpdateInnerRedemptionRateBounds", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateInnerRedemptionRateBounds(ctx, req.(*MsgUpdateInnerRedemptionRateBounds)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ResumeHostZone_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgResumeHostZone) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ResumeHostZone(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/ResumeHostZone", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ResumeHostZone(ctx, req.(*MsgResumeHostZone)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_CreateTradeRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateTradeRoute) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateTradeRoute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/CreateTradeRoute", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateTradeRoute(ctx, req.(*MsgCreateTradeRoute)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeleteTradeRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeleteTradeRoute) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeleteTradeRoute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/DeleteTradeRoute", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeleteTradeRoute(ctx, req.(*MsgDeleteTradeRoute)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateTradeRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateTradeRoute) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateTradeRoute(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/UpdateTradeRoute", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateTradeRoute(ctx, req.(*MsgUpdateTradeRoute)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SetCommunityPoolRebate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetCommunityPoolRebate) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetCommunityPoolRebate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/SetCommunityPoolRebate", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetCommunityPoolRebate(ctx, req.(*MsgSetCommunityPoolRebate)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ToggleTradeController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgToggleTradeController) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ToggleTradeController(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/ToggleTradeController", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ToggleTradeController(ctx, req.(*MsgToggleTradeController)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateHostZoneParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateHostZoneParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateHostZoneParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/UpdateHostZoneParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateHostZoneParams(ctx, req.(*MsgUpdateHostZoneParams)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/stride.stakeibc.Msg/UpdateParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "stride.stakeibc.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "LiquidStake", - Handler: _Msg_LiquidStake_Handler, - }, - { - MethodName: "LSMLiquidStake", - Handler: _Msg_LSMLiquidStake_Handler, - }, - { - MethodName: "RedeemStake", - Handler: _Msg_RedeemStake_Handler, - }, - { - MethodName: "RegisterHostZone", - Handler: _Msg_RegisterHostZone_Handler, - }, - { - MethodName: "ClaimUndelegatedTokens", - Handler: _Msg_ClaimUndelegatedTokens_Handler, - }, - { - MethodName: "RebalanceValidators", - Handler: _Msg_RebalanceValidators_Handler, - }, - { - MethodName: "AddValidators", - Handler: _Msg_AddValidators_Handler, - }, - { - MethodName: "ChangeValidatorWeight", - Handler: _Msg_ChangeValidatorWeight_Handler, - }, - { - MethodName: "DeleteValidator", - Handler: _Msg_DeleteValidator_Handler, - }, - { - MethodName: "RestoreInterchainAccount", - Handler: _Msg_RestoreInterchainAccount_Handler, - }, - { - MethodName: "UpdateValidatorSharesExchRate", - Handler: _Msg_UpdateValidatorSharesExchRate_Handler, - }, - { - MethodName: "CalibrateDelegation", - Handler: _Msg_CalibrateDelegation_Handler, - }, - { - MethodName: "ClearBalance", - Handler: _Msg_ClearBalance_Handler, - }, - { - MethodName: "UpdateInnerRedemptionRateBounds", - Handler: _Msg_UpdateInnerRedemptionRateBounds_Handler, - }, - { - MethodName: "ResumeHostZone", - Handler: _Msg_ResumeHostZone_Handler, - }, - { - MethodName: "CreateTradeRoute", - Handler: _Msg_CreateTradeRoute_Handler, - }, - { - MethodName: "DeleteTradeRoute", - Handler: _Msg_DeleteTradeRoute_Handler, - }, - { - MethodName: "UpdateTradeRoute", - Handler: _Msg_UpdateTradeRoute_Handler, - }, - { - MethodName: "SetCommunityPoolRebate", - Handler: _Msg_SetCommunityPoolRebate_Handler, - }, - { - MethodName: "ToggleTradeController", - Handler: _Msg_ToggleTradeController_Handler, - }, - { - MethodName: "UpdateHostZoneParams", - Handler: _Msg_UpdateHostZoneParams_Handler, - }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "stride/stakeibc/tx.proto", -} - -func (m *MsgUpdateInnerRedemptionRateBounds) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateInnerRedemptionRateBounds) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateInnerRedemptionRateBounds) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MaxInnerRedemptionRate.Size() - i -= size - if _, err := m.MaxInnerRedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.MinInnerRedemptionRate.Size() - i -= size - if _, err := m.MinInnerRedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgLiquidStake) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgLiquidStake) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgLiquidStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.HostDenom) > 0 { - i -= len(m.HostDenom) - copy(dAtA[i:], m.HostDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostDenom))) - i-- - dAtA[i] = 0x1a - } - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgLiquidStakeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgLiquidStakeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgLiquidStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.StToken.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *MsgLSMLiquidStake) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgLSMLiquidStake) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgLSMLiquidStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.LsmTokenIbcDenom) > 0 { - i -= len(m.LsmTokenIbcDenom) - copy(dAtA[i:], m.LsmTokenIbcDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.LsmTokenIbcDenom))) - i-- - dAtA[i] = 0x1a - } - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgLSMLiquidStakeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgLSMLiquidStakeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgLSMLiquidStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.TransactionComplete { - i-- - if m.TransactionComplete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgClearBalance) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgClearBalance) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClearBalance) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Channel) > 0 { - i -= len(m.Channel) - copy(dAtA[i:], m.Channel) - i = encodeVarintTx(dAtA, i, uint64(len(m.Channel))) - i-- - dAtA[i] = 0x22 - } - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgClearBalanceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgClearBalanceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClearBalanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRedeemStake) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRedeemStake) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRedeemStake) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) - i-- - dAtA[i] = 0x22 - } - if len(m.HostZone) > 0 { - i -= len(m.HostZone) - copy(dAtA[i:], m.HostZone) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostZone))) - i-- - dAtA[i] = 0x1a - } - { - size := m.Amount.Size() - i -= size - if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRedeemStakeResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRedeemStakeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRedeemStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRegisterHostZone) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRegisterHostZone) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterHostZone) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MaxMessagesPerIcaTx != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.MaxMessagesPerIcaTx)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if len(m.CommunityPoolTreasuryAddress) > 0 { - i -= len(m.CommunityPoolTreasuryAddress) - copy(dAtA[i:], m.CommunityPoolTreasuryAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.CommunityPoolTreasuryAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if m.LsmLiquidStakeEnabled { - i-- - if m.LsmLiquidStakeEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x78 - } - { - size := m.MaxRedemptionRate.Size() - i -= size - if _, err := m.MaxRedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - { - size := m.MinRedemptionRate.Size() - i -= size - if _, err := m.MinRedemptionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - if len(m.Bech32Prefix) > 0 { - i -= len(m.Bech32Prefix) - copy(dAtA[i:], m.Bech32Prefix) - i = encodeVarintTx(dAtA, i, uint64(len(m.Bech32Prefix))) - i-- - dAtA[i] = 0x62 - } - if m.UnbondingPeriod != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.UnbondingPeriod)) - i-- - dAtA[i] = 0x58 - } - if len(m.TransferChannelId) > 0 { - i -= len(m.TransferChannelId) - copy(dAtA[i:], m.TransferChannelId) - i = encodeVarintTx(dAtA, i, uint64(len(m.TransferChannelId))) - i-- - dAtA[i] = 0x52 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0x32 - } - if len(m.IbcDenom) > 0 { - i -= len(m.IbcDenom) - copy(dAtA[i:], m.IbcDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.IbcDenom))) - i-- - dAtA[i] = 0x2a - } - if len(m.HostDenom) > 0 { - i -= len(m.HostDenom) - copy(dAtA[i:], m.HostDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostDenom))) - i-- - dAtA[i] = 0x22 - } - if len(m.ConnectionId) > 0 { - i -= len(m.ConnectionId) - copy(dAtA[i:], m.ConnectionId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ConnectionId))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func (m *MsgRegisterHostZoneResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRegisterHostZoneResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterHostZoneResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgClaimUndelegatedTokens) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgClaimUndelegatedTokens) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClaimUndelegatedTokens) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Receiver) > 0 { - i -= len(m.Receiver) - copy(dAtA[i:], m.Receiver) - i = encodeVarintTx(dAtA, i, uint64(len(m.Receiver))) - i-- - dAtA[i] = 0x2a - } - if m.Epoch != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Epoch)) - i-- - dAtA[i] = 0x18 - } - if len(m.HostZoneId) > 0 { - i -= len(m.HostZoneId) - copy(dAtA[i:], m.HostZoneId) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostZoneId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgClaimUndelegatedTokensResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgClaimUndelegatedTokensResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgClaimUndelegatedTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRebalanceValidators) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRebalanceValidators) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRebalanceValidators) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NumRebalance != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.NumRebalance)) - i-- - dAtA[i] = 0x18 - } - if len(m.HostZone) > 0 { - i -= len(m.HostZone) - copy(dAtA[i:], m.HostZone) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostZone))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRebalanceValidatorsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRebalanceValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRebalanceValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgAddValidators) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgAddValidators) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgAddValidators) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.HostZone) > 0 { - i -= len(m.HostZone) - copy(dAtA[i:], m.HostZone) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostZone))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgAddValidatorsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgAddValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgAddValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ValidatorWeight) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidatorWeight) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidatorWeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Weight != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Weight)) - i-- - dAtA[i] = 0x10 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgChangeValidatorWeights) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgChangeValidatorWeights) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgChangeValidatorWeights) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorWeights) > 0 { - for iNdEx := len(m.ValidatorWeights) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ValidatorWeights[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.HostZone) > 0 { - i -= len(m.HostZone) - copy(dAtA[i:], m.HostZone) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostZone))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgChangeValidatorWeightsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgChangeValidatorWeightsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgChangeValidatorWeightsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgDeleteValidator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgDeleteValidator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeleteValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValAddr) > 0 { - i -= len(m.ValAddr) - copy(dAtA[i:], m.ValAddr) - i = encodeVarintTx(dAtA, i, uint64(len(m.ValAddr))) - i-- - dAtA[i] = 0x1a - } - if len(m.HostZone) > 0 { - i -= len(m.HostZone) - copy(dAtA[i:], m.HostZone) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostZone))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgDeleteValidatorResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgDeleteValidatorResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeleteValidatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRestoreInterchainAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRestoreInterchainAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRestoreInterchainAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AccountOwner) > 0 { - i -= len(m.AccountOwner) - copy(dAtA[i:], m.AccountOwner) - i = encodeVarintTx(dAtA, i, uint64(len(m.AccountOwner))) - i-- - dAtA[i] = 0x22 - } - if len(m.ConnectionId) > 0 { - i -= len(m.ConnectionId) - copy(dAtA[i:], m.ConnectionId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ConnectionId))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRestoreInterchainAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgRestoreInterchainAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRestoreInterchainAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateValidatorSharesExchRate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateValidatorSharesExchRate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateValidatorSharesExchRate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Valoper) > 0 { - i -= len(m.Valoper) - copy(dAtA[i:], m.Valoper) - i = encodeVarintTx(dAtA, i, uint64(len(m.Valoper))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateValidatorSharesExchRateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateValidatorSharesExchRateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateValidatorSharesExchRateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgCalibrateDelegation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCalibrateDelegation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCalibrateDelegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Valoper) > 0 { - i -= len(m.Valoper) - copy(dAtA[i:], m.Valoper) - i = encodeVarintTx(dAtA, i, uint64(len(m.Valoper))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCalibrateDelegationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCalibrateDelegationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCalibrateDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgResumeHostZone) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgResumeHostZone) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgResumeHostZone) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgResumeHostZoneResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgResumeHostZoneResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgResumeHostZoneResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgCreateTradeRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateTradeRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateTradeRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MaxSwapAmount.Size() - i -= size - if _, err := m.MaxSwapAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - { - size := m.MinSwapAmount.Size() - i -= size - if _, err := m.MinSwapAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - if len(m.MaxAllowedSwapLossRate) > 0 { - i -= len(m.MaxAllowedSwapLossRate) - copy(dAtA[i:], m.MaxAllowedSwapLossRate) - i = encodeVarintTx(dAtA, i, uint64(len(m.MaxAllowedSwapLossRate))) - i-- - dAtA[i] = 0x72 - } - if m.PoolId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) - i-- - dAtA[i] = 0x68 - } - if len(m.HostDenomOnHost) > 0 { - i -= len(m.HostDenomOnHost) - copy(dAtA[i:], m.HostDenomOnHost) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostDenomOnHost))) - i-- - dAtA[i] = 0x62 - } - if len(m.HostDenomOnTrade) > 0 { - i -= len(m.HostDenomOnTrade) - copy(dAtA[i:], m.HostDenomOnTrade) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostDenomOnTrade))) - i-- - dAtA[i] = 0x5a - } - if len(m.RewardDenomOnTrade) > 0 { - i -= len(m.RewardDenomOnTrade) - copy(dAtA[i:], m.RewardDenomOnTrade) - i = encodeVarintTx(dAtA, i, uint64(len(m.RewardDenomOnTrade))) - i-- - dAtA[i] = 0x52 - } - if len(m.RewardDenomOnReward) > 0 { - i -= len(m.RewardDenomOnReward) - copy(dAtA[i:], m.RewardDenomOnReward) - i = encodeVarintTx(dAtA, i, uint64(len(m.RewardDenomOnReward))) - i-- - dAtA[i] = 0x4a - } - if len(m.RewardDenomOnHost) > 0 { - i -= len(m.RewardDenomOnHost) - copy(dAtA[i:], m.RewardDenomOnHost) - i = encodeVarintTx(dAtA, i, uint64(len(m.RewardDenomOnHost))) - i-- - dAtA[i] = 0x42 - } - if len(m.TradeToHostTransferChannelId) > 0 { - i -= len(m.TradeToHostTransferChannelId) - copy(dAtA[i:], m.TradeToHostTransferChannelId) - i = encodeVarintTx(dAtA, i, uint64(len(m.TradeToHostTransferChannelId))) - i-- - dAtA[i] = 0x3a - } - if len(m.RewardToTradeTransferChannelId) > 0 { - i -= len(m.RewardToTradeTransferChannelId) - copy(dAtA[i:], m.RewardToTradeTransferChannelId) - i = encodeVarintTx(dAtA, i, uint64(len(m.RewardToTradeTransferChannelId))) - i-- - dAtA[i] = 0x32 - } - if len(m.HostToRewardTransferChannelId) > 0 { - i -= len(m.HostToRewardTransferChannelId) - copy(dAtA[i:], m.HostToRewardTransferChannelId) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostToRewardTransferChannelId))) - i-- - dAtA[i] = 0x2a - } - if len(m.StrideToTradeConnectionId) > 0 { - i -= len(m.StrideToTradeConnectionId) - copy(dAtA[i:], m.StrideToTradeConnectionId) - i = encodeVarintTx(dAtA, i, uint64(len(m.StrideToTradeConnectionId))) - i-- - dAtA[i] = 0x22 - } - if len(m.StrideToRewardConnectionId) > 0 { - i -= len(m.StrideToRewardConnectionId) - copy(dAtA[i:], m.StrideToRewardConnectionId) - i = encodeVarintTx(dAtA, i, uint64(len(m.StrideToRewardConnectionId))) - i-- - dAtA[i] = 0x1a - } - if len(m.HostChainId) > 0 { - i -= len(m.HostChainId) - copy(dAtA[i:], m.HostChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateTradeRouteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateTradeRouteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateTradeRouteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgDeleteTradeRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgDeleteTradeRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeleteTradeRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.HostDenom) > 0 { - i -= len(m.HostDenom) - copy(dAtA[i:], m.HostDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostDenom))) - i-- - dAtA[i] = 0x1a - } - if len(m.RewardDenom) > 0 { - i -= len(m.RewardDenom) - copy(dAtA[i:], m.RewardDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.RewardDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgDeleteTradeRouteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgDeleteTradeRouteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeleteTradeRouteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateTradeRoute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateTradeRoute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateTradeRoute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MaxSwapAmount.Size() - i -= size - if _, err := m.MaxSwapAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - { - size := m.MinSwapAmount.Size() - i -= size - if _, err := m.MinSwapAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - if len(m.MaxAllowedSwapLossRate) > 0 { - i -= len(m.MaxAllowedSwapLossRate) - copy(dAtA[i:], m.MaxAllowedSwapLossRate) - i = encodeVarintTx(dAtA, i, uint64(len(m.MaxAllowedSwapLossRate))) - i-- - dAtA[i] = 0x2a - } - if m.PoolId != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.PoolId)) - i-- - dAtA[i] = 0x20 - } - if len(m.HostDenom) > 0 { - i -= len(m.HostDenom) - copy(dAtA[i:], m.HostDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.HostDenom))) - i-- - dAtA[i] = 0x1a - } - if len(m.RewardDenom) > 0 { - i -= len(m.RewardDenom) - copy(dAtA[i:], m.RewardDenom) - i = encodeVarintTx(dAtA, i, uint64(len(m.RewardDenom))) - i-- - dAtA[i] = 0x12 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateTradeRouteResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateTradeRouteResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateTradeRouteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgSetCommunityPoolRebate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSetCommunityPoolRebate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSetCommunityPoolRebate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.LiquidStakedStTokenAmount.Size() - i -= size - if _, err := m.LiquidStakedStTokenAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size := m.RebateRate.Size() - i -= size - if _, err := m.RebateRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgSetCommunityPoolRebateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgSetCommunityPoolRebateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgSetCommunityPoolRebateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgToggleTradeController) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgToggleTradeController) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgToggleTradeController) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x22 - } - if m.PermissionChange != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.PermissionChange)) - i-- - dAtA[i] = 0x18 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgToggleTradeControllerResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgToggleTradeControllerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgToggleTradeControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateHostZoneParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateHostZoneParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateHostZoneParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MaxMessagesPerIcaTx != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.MaxMessagesPerIcaTx)) - i-- - dAtA[i] = 0x18 - } - if len(m.ChainId) > 0 { - i -= len(m.ChainId) - copy(dAtA[i:], m.ChainId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ChainId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateHostZoneParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateHostZoneParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateHostZoneParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgUpdateInnerRedemptionRateBounds) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.MinInnerRedemptionRate.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.MaxInnerRedemptionRate.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgLiquidStake) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - l = len(m.HostDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgLiquidStakeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.StToken.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgLSMLiquidStake) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - l = len(m.LsmTokenIbcDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgLSMLiquidStakeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TransactionComplete { - n += 2 - } - return n -} - -func (m *MsgClearBalance) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - l = len(m.Channel) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgClearBalanceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRedeemStake) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Amount.Size() - n += 1 + l + sovTx(uint64(l)) - l = len(m.HostZone) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRedeemStakeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRegisterHostZone) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ConnectionId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.IbcDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.TransferChannelId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.UnbondingPeriod != 0 { - n += 1 + sovTx(uint64(m.UnbondingPeriod)) - } - l = len(m.Bech32Prefix) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.MinRedemptionRate.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.MaxRedemptionRate.Size() - n += 1 + l + sovTx(uint64(l)) - if m.LsmLiquidStakeEnabled { - n += 2 - } - l = len(m.CommunityPoolTreasuryAddress) - if l > 0 { - n += 2 + l + sovTx(uint64(l)) - } - if m.MaxMessagesPerIcaTx != 0 { - n += 2 + sovTx(uint64(m.MaxMessagesPerIcaTx)) - } - return n -} - -func (m *MsgRegisterHostZoneResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgClaimUndelegatedTokens) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostZoneId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Epoch != 0 { - n += 1 + sovTx(uint64(m.Epoch)) - } - l = len(m.Receiver) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgClaimUndelegatedTokensResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRebalanceValidators) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostZone) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.NumRebalance != 0 { - n += 1 + sovTx(uint64(m.NumRebalance)) - } - return n -} - -func (m *MsgRebalanceValidatorsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgAddValidators) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostZone) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgAddValidatorsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ValidatorWeight) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Weight != 0 { - n += 1 + sovTx(uint64(m.Weight)) - } - return n -} - -func (m *MsgChangeValidatorWeights) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostZone) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if len(m.ValidatorWeights) > 0 { - for _, e := range m.ValidatorWeights { - l = e.Size() - n += 1 + l + sovTx(uint64(l)) - } - } - return n -} - -func (m *MsgChangeValidatorWeightsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgDeleteValidator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostZone) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ValAddr) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgDeleteValidatorResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRestoreInterchainAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ConnectionId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.AccountOwner) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRestoreInterchainAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateValidatorSharesExchRate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Valoper) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateValidatorSharesExchRateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgCalibrateDelegation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Valoper) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgCalibrateDelegationResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgResumeHostZone) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgResumeHostZoneResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgCreateTradeRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.StrideToRewardConnectionId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.StrideToTradeConnectionId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostToRewardTransferChannelId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RewardToTradeTransferChannelId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.TradeToHostTransferChannelId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RewardDenomOnHost) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RewardDenomOnReward) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RewardDenomOnTrade) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostDenomOnTrade) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostDenomOnHost) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.PoolId != 0 { - n += 1 + sovTx(uint64(m.PoolId)) - } - l = len(m.MaxAllowedSwapLossRate) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.MinSwapAmount.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.MaxSwapAmount.Size() - n += 2 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgCreateTradeRouteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgDeleteTradeRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RewardDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgDeleteTradeRouteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateTradeRoute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.RewardDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.HostDenom) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.PoolId != 0 { - n += 1 + sovTx(uint64(m.PoolId)) - } - l = len(m.MaxAllowedSwapLossRate) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.MinSwapAmount.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.MaxSwapAmount.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateTradeRouteResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgSetCommunityPoolRebate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.RebateRate.Size() - n += 1 + l + sovTx(uint64(l)) - l = m.LiquidStakedStTokenAmount.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgSetCommunityPoolRebateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgToggleTradeController) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.PermissionChange != 0 { - n += 1 + sovTx(uint64(m.PermissionChange)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgToggleTradeControllerResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateHostZoneParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ChainId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.MaxMessagesPerIcaTx != 0 { - n += 1 + sovTx(uint64(m.MaxMessagesPerIcaTx)) - } - return n -} - -func (m *MsgUpdateHostZoneParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgUpdateInnerRedemptionRateBounds) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateInnerRedemptionRateBounds: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateInnerRedemptionRateBounds: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinInnerRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinInnerRedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxInnerRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxInnerRedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateInnerRedemptionRateBoundsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateInnerRedemptionRateBoundsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateInnerRedemptionRateBoundsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgLiquidStake) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgLiquidStake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgLiquidStake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgLiquidStakeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgLiquidStakeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgLiquidStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StToken", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StToken.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgLSMLiquidStake) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgLSMLiquidStake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgLSMLiquidStake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LsmTokenIbcDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LsmTokenIbcDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgLSMLiquidStakeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgLSMLiquidStakeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgLSMLiquidStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TransactionComplete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TransactionComplete = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClearBalance) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgClearBalance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClearBalance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Channel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClearBalanceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgClearBalanceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClearBalanceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRedeemStake) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRedeemStake: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRedeemStake: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRedeemStakeResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRedeemStakeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRedeemStakeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRegisterHostZone) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterHostZone: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterHostZone: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingPeriod", wireType) - } - m.UnbondingPeriod = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnbondingPeriod |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinRedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRedemptionRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxRedemptionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LsmLiquidStakeEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LsmLiquidStakeEnabled = bool(v != 0) - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommunityPoolTreasuryAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommunityPoolTreasuryAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxMessagesPerIcaTx", wireType) - } - m.MaxMessagesPerIcaTx = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxMessagesPerIcaTx |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRegisterHostZoneResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterHostZoneResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterHostZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClaimUndelegatedTokens) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgClaimUndelegatedTokens: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClaimUndelegatedTokens: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZoneId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZoneId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType) - } - m.Epoch = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Epoch |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Receiver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgClaimUndelegatedTokensResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgClaimUndelegatedTokensResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgClaimUndelegatedTokensResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRebalanceValidators) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRebalanceValidators: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRebalanceValidators: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NumRebalance", wireType) - } - m.NumRebalance = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NumRebalance |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRebalanceValidatorsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRebalanceValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRebalanceValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgAddValidators) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgAddValidators: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddValidators: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, &Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgAddValidatorsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgAddValidatorsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAddValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidatorWeight) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidatorWeight: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidatorWeight: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - m.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Weight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgChangeValidatorWeights) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgChangeValidatorWeights: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgChangeValidatorWeights: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorWeights", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorWeights = append(m.ValidatorWeights, &ValidatorWeight{}) - if err := m.ValidatorWeights[len(m.ValidatorWeights)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgChangeValidatorWeightsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgChangeValidatorWeightsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgChangeValidatorWeightsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDeleteValidator) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteValidator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteValidator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostZone", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostZone = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValAddr", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValAddr = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDeleteValidatorResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteValidatorResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteValidatorResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRestoreInterchainAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRestoreInterchainAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRestoreInterchainAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountOwner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountOwner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRestoreInterchainAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRestoreInterchainAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRestoreInterchainAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateValidatorSharesExchRate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateValidatorSharesExchRate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateValidatorSharesExchRate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valoper", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Valoper = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateValidatorSharesExchRateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateValidatorSharesExchRateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateValidatorSharesExchRateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCalibrateDelegation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCalibrateDelegation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCalibrateDelegation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Valoper", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Valoper = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCalibrateDelegationResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCalibrateDelegationResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCalibrateDelegationResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgResumeHostZone) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgResumeHostZone: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgResumeHostZone: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgResumeHostZoneResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgResumeHostZoneResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgResumeHostZoneResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateTradeRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateTradeRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateTradeRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrideToRewardConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StrideToRewardConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrideToTradeConnectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StrideToTradeConnectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostToRewardTransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostToRewardTransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardToTradeTransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardToTradeTransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TradeToHostTransferChannelId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TradeToHostTransferChannelId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnHost", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenomOnHost = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnReward", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenomOnReward = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardDenomOnTrade", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenomOnTrade = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnTrade", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenomOnTrade = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenomOnHost", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenomOnHost = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - m.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAllowedSwapLossRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxAllowedSwapLossRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinSwapAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxSwapAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateTradeRouteResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateTradeRouteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateTradeRouteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDeleteTradeRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteTradeRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteTradeRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgDeleteTradeRouteResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteTradeRouteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteTradeRouteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateTradeRoute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateTradeRoute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateTradeRoute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RewardDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RewardDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) - } - m.PoolId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PoolId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxAllowedSwapLossRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaxAllowedSwapLossRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinSwapAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSwapAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxSwapAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateTradeRouteResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateTradeRouteResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateTradeRouteResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSetCommunityPoolRebate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSetCommunityPoolRebate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetCommunityPoolRebate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RebateRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RebateRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LiquidStakedStTokenAmount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LiquidStakedStTokenAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgSetCommunityPoolRebateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgSetCommunityPoolRebateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetCommunityPoolRebateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgToggleTradeController) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgToggleTradeController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgToggleTradeController: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PermissionChange", wireType) - } - m.PermissionChange = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PermissionChange |= AuthzPermissionChange(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgToggleTradeControllerResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgToggleTradeControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgToggleTradeControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateHostZoneParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateHostZoneParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateHostZoneParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxMessagesPerIcaTx", wireType) - } - m.MaxMessagesPerIcaTx = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxMessagesPerIcaTx |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateHostZoneParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateHostZoneParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateHostZoneParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/stakeibc/types/validator.pb.go b/x/stakeibc/types/validator.pb.go deleted file mode 100644 index f4bc52b46..000000000 --- a/x/stakeibc/types/validator.pb.go +++ /dev/null @@ -1,687 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stride/stakeibc/validator.proto - -package types - -import ( - cosmossdk_io_math "cosmossdk.io/math" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Validator struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - Weight uint64 `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty"` - Delegation cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=delegation,proto3,customtype=cosmossdk.io/math.Int" json:"delegation"` - SlashQueryProgressTracker cosmossdk_io_math.Int `protobuf:"bytes,9,opt,name=slash_query_progress_tracker,json=slashQueryProgressTracker,proto3,customtype=cosmossdk.io/math.Int" json:"slash_query_progress_tracker"` - SlashQueryCheckpoint cosmossdk_io_math.Int `protobuf:"bytes,12,opt,name=slash_query_checkpoint,json=slashQueryCheckpoint,proto3,customtype=cosmossdk.io/math.Int" json:"slash_query_checkpoint"` - SharesToTokensRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,10,opt,name=shares_to_tokens_rate,json=sharesToTokensRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"shares_to_tokens_rate"` - DelegationChangesInProgress int64 `protobuf:"varint,11,opt,name=delegation_changes_in_progress,json=delegationChangesInProgress,proto3" json:"delegation_changes_in_progress,omitempty"` - SlashQueryInProgress bool `protobuf:"varint,13,opt,name=slash_query_in_progress,json=slashQueryInProgress,proto3" json:"slash_query_in_progress,omitempty"` -} - -func (m *Validator) Reset() { *m = Validator{} } -func (m *Validator) String() string { return proto.CompactTextString(m) } -func (*Validator) ProtoMessage() {} -func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_5d2f32e16bd6ab8f, []int{0} -} -func (m *Validator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Validator.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Validator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validator.Merge(m, src) -} -func (m *Validator) XXX_Size() int { - return m.Size() -} -func (m *Validator) XXX_DiscardUnknown() { - xxx_messageInfo_Validator.DiscardUnknown(m) -} - -var xxx_messageInfo_Validator proto.InternalMessageInfo - -func (m *Validator) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Validator) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *Validator) GetWeight() uint64 { - if m != nil { - return m.Weight - } - return 0 -} - -func (m *Validator) GetDelegationChangesInProgress() int64 { - if m != nil { - return m.DelegationChangesInProgress - } - return 0 -} - -func (m *Validator) GetSlashQueryInProgress() bool { - if m != nil { - return m.SlashQueryInProgress - } - return false -} - -func init() { - proto.RegisterType((*Validator)(nil), "stride.stakeibc.Validator") -} - -func init() { proto.RegisterFile("stride/stakeibc/validator.proto", fileDescriptor_5d2f32e16bd6ab8f) } - -var fileDescriptor_5d2f32e16bd6ab8f = []byte{ - // 477 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x6e, 0xd3, 0x4c, - 0x14, 0xc5, 0xe3, 0xaf, 0x6e, 0xea, 0xcc, 0x07, 0x22, 0x1a, 0xa5, 0xc5, 0x6d, 0xc1, 0x89, 0x58, - 0x65, 0x13, 0x5b, 0x14, 0xb1, 0x64, 0x41, 0xd3, 0x4d, 0xa3, 0x2e, 0xc0, 0x8d, 0x58, 0xb0, 0xc0, - 0x9a, 0x8c, 0xaf, 0xec, 0x91, 0xff, 0x4c, 0x98, 0x99, 0x52, 0xfc, 0x16, 0x3c, 0x4c, 0x1f, 0xa2, - 0xcb, 0xaa, 0x2b, 0x60, 0x51, 0xa1, 0xe4, 0x45, 0x90, 0x3d, 0x4e, 0x6c, 0x89, 0x4d, 0x77, 0x73, - 0xef, 0x3d, 0xe7, 0x37, 0xba, 0x47, 0x17, 0x0d, 0xa5, 0x12, 0x2c, 0x04, 0x4f, 0x2a, 0x92, 0x00, - 0x5b, 0x50, 0xef, 0x1b, 0x49, 0x59, 0x48, 0x14, 0x17, 0xee, 0x52, 0x70, 0xc5, 0xf1, 0x33, 0x2d, - 0x70, 0x37, 0x82, 0xa3, 0x43, 0xca, 0x65, 0xc6, 0x65, 0x50, 0x8d, 0x3d, 0x5d, 0x68, 0xed, 0xd1, - 0x20, 0xe2, 0x11, 0xd7, 0xfd, 0xf2, 0xa5, 0xbb, 0xaf, 0x7e, 0x99, 0xa8, 0xf7, 0x69, 0x43, 0xc5, - 0x18, 0x99, 0x39, 0xc9, 0xc0, 0x36, 0x46, 0xc6, 0xb8, 0xe7, 0x57, 0x6f, 0x7c, 0x82, 0xf6, 0x48, - 0x18, 0x0a, 0x90, 0xd2, 0xfe, 0xaf, 0x6c, 0x9f, 0xda, 0xf7, 0x37, 0x93, 0x41, 0x8d, 0x7e, 0xaf, - 0x27, 0x97, 0x4a, 0xb0, 0x3c, 0xf2, 0x37, 0x42, 0x7c, 0x80, 0xba, 0xd7, 0xc0, 0xa2, 0x58, 0xd9, - 0xdd, 0x91, 0x31, 0x36, 0xfd, 0xba, 0xc2, 0xef, 0x10, 0x0a, 0x21, 0x85, 0x88, 0x28, 0xc6, 0x73, - 0x7b, 0xb7, 0xc2, 0xbd, 0xbc, 0x7d, 0x18, 0x76, 0x7e, 0x3f, 0x0c, 0xf7, 0x35, 0x52, 0x86, 0x89, - 0xcb, 0xb8, 0x97, 0x11, 0x15, 0xbb, 0xe7, 0xb9, 0xf2, 0x5b, 0x06, 0xfc, 0x05, 0xbd, 0x90, 0x29, - 0x91, 0x71, 0xf0, 0xf5, 0x0a, 0x44, 0x51, 0x2e, 0x19, 0x95, 0xdf, 0x05, 0x4a, 0x10, 0x9a, 0x80, - 0xb0, 0x7b, 0x8f, 0x01, 0x1e, 0x56, 0x88, 0x8f, 0x25, 0xe1, 0x43, 0x0d, 0x98, 0x6b, 0x3f, 0xbe, - 0x44, 0x07, 0x6d, 0x3e, 0x8d, 0x81, 0x26, 0x4b, 0xce, 0x72, 0x65, 0x3f, 0x79, 0x0c, 0x79, 0xd0, - 0x90, 0xa7, 0x5b, 0x2b, 0x0e, 0xd1, 0xbe, 0x8c, 0x89, 0x00, 0x19, 0x28, 0x1e, 0x28, 0x9e, 0x40, - 0x2e, 0x03, 0x41, 0x14, 0xd8, 0xa8, 0x62, 0xbe, 0xae, 0x99, 0xc7, 0xff, 0x32, 0x2f, 0x20, 0x22, - 0xb4, 0x38, 0x03, 0x7a, 0x7f, 0x33, 0x41, 0x75, 0xe0, 0x67, 0x40, 0x7d, 0xac, 0x79, 0x73, 0x3e, - 0xaf, 0x68, 0x3e, 0x51, 0x80, 0xa7, 0xc8, 0x69, 0x82, 0x0a, 0x68, 0x4c, 0xf2, 0x08, 0x64, 0xc0, - 0xf2, 0x6d, 0x48, 0xf6, 0xff, 0x23, 0x63, 0xbc, 0xe3, 0x1f, 0x37, 0xaa, 0xa9, 0x16, 0x9d, 0xe7, - 0x9b, 0x18, 0xf0, 0x5b, 0xf4, 0xbc, 0xbd, 0x7f, 0xdb, 0xfd, 0x74, 0x64, 0x8c, 0xad, 0xf6, 0x86, - 0x8d, 0x6d, 0x66, 0x5a, 0x3b, 0x7d, 0x73, 0x66, 0x5a, 0x66, 0x7f, 0x77, 0x66, 0x5a, 0x7b, 0x7d, - 0x6b, 0x66, 0x5a, 0x56, 0xbf, 0x77, 0x7a, 0x71, 0xbb, 0x72, 0x8c, 0xbb, 0x95, 0x63, 0xfc, 0x59, - 0x39, 0xc6, 0x8f, 0xb5, 0xd3, 0xb9, 0x5b, 0x3b, 0x9d, 0x9f, 0x6b, 0xa7, 0xf3, 0xf9, 0x24, 0x62, - 0x2a, 0xbe, 0x5a, 0xb8, 0x94, 0x67, 0x5e, 0xc6, 0xd2, 0xa4, 0xb8, 0x26, 0xc5, 0x24, 0x25, 0x0b, - 0xb9, 0xad, 0xbc, 0xef, 0xcd, 0xd5, 0xab, 0x62, 0x09, 0x72, 0xd1, 0xad, 0x0e, 0xf6, 0xcd, 0xdf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0x37, 0xb3, 0x1a, 0x15, 0x03, 0x00, 0x00, -} - -func (m *Validator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Validator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SlashQueryInProgress { - i-- - if m.SlashQueryInProgress { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x68 - } - { - size := m.SlashQueryCheckpoint.Size() - i -= size - if _, err := m.SlashQueryCheckpoint.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintValidator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - if m.DelegationChangesInProgress != 0 { - i = encodeVarintValidator(dAtA, i, uint64(m.DelegationChangesInProgress)) - i-- - dAtA[i] = 0x58 - } - { - size := m.SharesToTokensRate.Size() - i -= size - if _, err := m.SharesToTokensRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintValidator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - { - size := m.SlashQueryProgressTracker.Size() - i -= size - if _, err := m.SlashQueryProgressTracker.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintValidator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - if m.Weight != 0 { - i = encodeVarintValidator(dAtA, i, uint64(m.Weight)) - i-- - dAtA[i] = 0x30 - } - { - size := m.Delegation.Size() - i -= size - if _, err := m.Delegation.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintValidator(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintValidator(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintValidator(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintValidator(dAtA []byte, offset int, v uint64) int { - offset -= sovValidator(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Validator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovValidator(uint64(l)) - } - l = m.Delegation.Size() - n += 1 + l + sovValidator(uint64(l)) - if m.Weight != 0 { - n += 1 + sovValidator(uint64(m.Weight)) - } - l = m.SlashQueryProgressTracker.Size() - n += 1 + l + sovValidator(uint64(l)) - l = m.SharesToTokensRate.Size() - n += 1 + l + sovValidator(uint64(l)) - if m.DelegationChangesInProgress != 0 { - n += 1 + sovValidator(uint64(m.DelegationChangesInProgress)) - } - l = m.SlashQueryCheckpoint.Size() - n += 1 + l + sovValidator(uint64(l)) - if m.SlashQueryInProgress { - n += 2 - } - return n -} - -func sovValidator(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozValidator(x uint64) (n int) { - return sovValidator(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Validator) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Delegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Delegation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - m.Weight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Weight |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashQueryProgressTracker", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SlashQueryProgressTracker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SharesToTokensRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SharesToTokensRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DelegationChangesInProgress", wireType) - } - m.DelegationChangesInProgress = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DelegationChangesInProgress |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashQueryCheckpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthValidator - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthValidator - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SlashQueryCheckpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashQueryInProgress", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowValidator - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SlashQueryInProgress = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipValidator(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthValidator - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipValidator(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowValidator - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthValidator - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupValidator - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthValidator - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthValidator = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowValidator = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupValidator = fmt.Errorf("proto: unexpected end of group") -)