Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable whitelisted Stargate Query with determinism #908

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions proto/cosmwasm/wasm/v1/stargate/auth/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
syntax = "proto3";
package cosmwasm.wasm.v1.stargate.auth;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "cosmos/auth/v1beta1/auth.proto";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/auth";

// QueryAccountsResponse is the response type for the Query/Accounts RPC method.
//
// Since: cosmos-sdk 0.43
message QueryAccountsResponse {
// accounts are the existing accounts
repeated google.protobuf.Any accounts = 1
[ (cosmos_proto.accepts_interface) = "AccountI" ];

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryAccountResponse is the response type for the Query/Account RPC method.
message QueryAccountResponse {
// account defines the account of the corresponding address.
google.protobuf.Any account = 1
[ (cosmos_proto.accepts_interface) = "AccountI" ];
}

// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// params defines the parameters of the module.
cosmos.auth.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ];
}
86 changes: 86 additions & 0 deletions proto/cosmwasm/wasm/v1/stargate/bank/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
syntax = "proto3";
package cosmwasm.wasm.v1.stargate.bank;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/bank/v1beta1/bank.proto";

option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/bank";

// QueryBalanceResponse is the response type for the Query/Balance RPC method.
message QueryBalanceResponse {
// balance is the balance of the coin.
cosmos.base.v1beta1.Coin balance = 1;
}

// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC
// method.
message QueryAllBalancesResponse {
// balances is the balances of all the coins.
repeated cosmos.base.v1beta1.Coin balances = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QuerySpendableBalancesResponse defines the gRPC response structure for
// querying an account's spendable balances.
message QuerySpendableBalancesResponse {
// balances is the spendable balances of all the coins.
repeated cosmos.base.v1beta1.Coin balances = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC
// method
message QueryTotalSupplyResponse {
// supply is the supply of the coins
repeated cosmos.base.v1beta1.Coin supply = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];

// pagination defines the pagination in the response.
//
// Since: cosmos-sdk 0.43
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method.
message QuerySupplyOfResponse {
// amount is the supply of the coin.
cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ];
}

// QueryParamsResponse defines the response type for querying x/bank parameters.
message QueryParamsResponse {
cosmos.bank.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ];
}

// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata
// RPC method.
message QueryDenomsMetadataResponse {
// metadata provides the client information for all the registered tokens.
repeated cosmos.bank.v1beta1.Metadata metadatas = 1
[ (gogoproto.nullable) = false ];

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata
// RPC method.
message QueryDenomMetadataResponse {
// metadata describes and provides all the client information for the
// requested token.
cosmos.bank.v1beta1.Metadata metadata = 1 [ (gogoproto.nullable) = false ];
}
95 changes: 95 additions & 0 deletions proto/cosmwasm/wasm/v1/stargate/distribution/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
syntax = "proto3";
package cosmwasm.wasm.v1.stargate.distribution;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/distribution/v1beta1/distribution.proto";

option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/distribution";

// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// params defines the parameters of the module.
cosmos.distribution.v1beta1.Params params = 1
[ (gogoproto.nullable) = false ];
}

// QueryValidatorOutstandingRewardsResponse is the response type for the
// Query/ValidatorOutstandingRewards RPC method.
message QueryValidatorOutstandingRewardsResponse {
cosmos.distribution.v1beta1.ValidatorOutstandingRewards rewards = 1
[ (gogoproto.nullable) = false ];
}

// QueryValidatorCommissionResponse is the response type for the
// Query/ValidatorCommission RPC method
message QueryValidatorCommissionResponse {
// commission defines the commision the validator received.
cosmos.distribution.v1beta1.ValidatorAccumulatedCommission commission = 1
[ (gogoproto.nullable) = false ];
}

// QueryValidatorSlashesResponse is the response type for the
// Query/ValidatorSlashes RPC method.
message QueryValidatorSlashesResponse {
// slashes defines the slashes the validator received.
repeated cosmos.distribution.v1beta1.ValidatorSlashEvent slashes = 1
[ (gogoproto.nullable) = false ];

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryDelegationRewardsResponse is the response type for the
// Query/DelegationRewards RPC method.
message QueryDelegationRewardsResponse {
// rewards defines the rewards accrued by a delegation.
repeated cosmos.base.v1beta1.DecCoin rewards = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
}

// QueryDelegationTotalRewardsResponse is the response type for the
// Query/DelegationTotalRewards RPC method.
message QueryDelegationTotalRewardsResponse {
// rewards defines all the rewards accrued by a delegator.
repeated cosmos.distribution.v1beta1.DelegationDelegatorReward rewards = 1
[ (gogoproto.nullable) = false ];
// total defines the sum of all the rewards.
repeated cosmos.base.v1beta1.DecCoin total = 2 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"
];
}

// QueryDelegatorValidatorsResponse is the response type for the
// Query/DelegatorValidators RPC method.
message QueryDelegatorValidatorsResponse {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

// validators defines the validators a delegator is delegating for.
repeated string validators = 1;
}

// QueryDelegatorWithdrawAddressResponse is the response type for the
// Query/DelegatorWithdrawAddress RPC method.
message QueryDelegatorWithdrawAddressResponse {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

// withdraw_address defines the delegator address to query for.
string withdraw_address = 1;
}

// QueryCommunityPoolResponse is the response type for the Query/CommunityPool
// RPC method.
message QueryCommunityPoolResponse {
// pool defines community pool's coins.
repeated cosmos.base.v1beta1.DecCoin pool = 1 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
(gogoproto.nullable) = false
];
}
25 changes: 25 additions & 0 deletions proto/cosmwasm/wasm/v1/stargate/feegrant/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Since: cosmos-sdk 0.43
syntax = "proto3";
package cosmwasm.wasm.v1.stargate.feegrant;

import "cosmos/feegrant/v1beta1/feegrant.proto";
import "cosmos/base/query/v1beta1/pagination.proto";

option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/feegrant";

// QueryAllowanceResponse is the response type for the Query/Allowance RPC
// method.
message QueryAllowanceResponse {
// allowance is a allowance granted for grantee by granter.
cosmos.feegrant.v1beta1.Grant allowance = 1;
}

// QueryAllowancesResponse is the response type for the Query/Allowances RPC
// method.
message QueryAllowancesResponse {
// allowances are allowance's granted for grantee by granter.
repeated cosmos.feegrant.v1beta1.Grant allowances = 1;

// pagination defines an pagination for the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
72 changes: 72 additions & 0 deletions proto/cosmwasm/wasm/v1/stargate/gov/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
syntax = "proto3";
package cosmwasm.wasm.v1.stargate.gov;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "cosmos/gov/v1beta1/gov.proto";

option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/gov";

// QueryProposalResponse is the response type for the Query/Proposal RPC method.
message QueryProposalResponse {
cosmos.gov.v1beta1.Proposal proposal = 1 [ (gogoproto.nullable) = false ];
}

// QueryProposalsResponse is the response type for the Query/Proposals RPC
// method.
message QueryProposalsResponse {
repeated cosmos.gov.v1beta1.Proposal proposals = 1
[ (gogoproto.nullable) = false ];

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryVoteResponse is the response type for the Query/Vote RPC method.
message QueryVoteResponse {
// vote defined the queried vote.
cosmos.gov.v1beta1.Vote vote = 1 [ (gogoproto.nullable) = false ];
}

// QueryVotesResponse is the response type for the Query/Votes RPC method.
message QueryVotesResponse {
// votes defined the queried votes.
repeated cosmos.gov.v1beta1.Vote votes = 1 [ (gogoproto.nullable) = false ];

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// voting_params defines the parameters related to voting.
cosmos.gov.v1beta1.VotingParams voting_params = 1
[ (gogoproto.nullable) = false ];
// deposit_params defines the parameters related to deposit.
cosmos.gov.v1beta1.DepositParams deposit_params = 2
[ (gogoproto.nullable) = false ];
// tally_params defines the parameters related to tally.
cosmos.gov.v1beta1.TallyParams tally_params = 3
[ (gogoproto.nullable) = false ];
}

// QueryDepositResponse is the response type for the Query/Deposit RPC method.
message QueryDepositResponse {
// deposit defines the requested deposit.
cosmos.gov.v1beta1.Deposit deposit = 1 [ (gogoproto.nullable) = false ];
}

// QueryDepositsResponse is the response type for the Query/Deposits RPC method.
message QueryDepositsResponse {
repeated cosmos.gov.v1beta1.Deposit deposits = 1
[ (gogoproto.nullable) = false ];

// pagination defines the pagination in the response.
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryTallyResultResponse is the response type for the Query/Tally RPC method.
message QueryTallyResultResponse {
// tally defines the requested tally.
cosmos.gov.v1beta1.TallyResult tally = 1 [ (gogoproto.nullable) = false ];
}
33 changes: 33 additions & 0 deletions proto/cosmwasm/wasm/v1/stargate/mint/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
syntax = "proto3";
package cosmwasm.wasm.v1.stargate.mint;

import "gogoproto/gogo.proto";
import "cosmos/mint/v1beta1/mint.proto";

option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/mint";

// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// params defines the parameters of the module.
cosmos.mint.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ];
}

// QueryInflationResponse is the response type for the Query/Inflation RPC
// method.
message QueryInflationResponse {
// inflation is the current minting inflation value.
bytes inflation = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}

// QueryAnnualProvisionsResponse is the response type for the
// Query/AnnualProvisions RPC method.
message QueryAnnualProvisionsResponse {
// annual_provisions is the current minting annual provisions value.
bytes annual_provisions = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}
30 changes: 30 additions & 0 deletions proto/cosmwasm/wasm/v1/stargate/slashing/query.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";
package cosmwasm.wasm.v1.stargate.slashing;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "cosmos/slashing/v1beta1/slashing.proto";

option go_package = "github.com/CosmWasm/wasmd/x/wasm/stargate/slashing";

// QueryParamsResponse is the response type for the Query/Params RPC method
message QueryParamsResponse {
cosmos.slashing.v1beta1.Params params = 1 [ (gogoproto.nullable) = false ];
}

// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC
// method
message QuerySigningInfoResponse {
// val_signing_info is the signing info of requested val cons address
cosmos.slashing.v1beta1.ValidatorSigningInfo val_signing_info = 1
[ (gogoproto.nullable) = false ];
}

// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC
// method
message QuerySigningInfosResponse {
// info is the signing info of all validators
repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1
[ (gogoproto.nullable) = false ];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
Loading