forked from evmos/evmos
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vesting): grpc queries locked, unvested, vested (evmos#291)
* wip vesting queries * wip add queries * add grpc query tests * fix lint * feat(vesting): add LockedOnly method * feat(vesting): refactor queries * fix indentation * feat(vesting): adress comments
- Loading branch information
Showing
14 changed files
with
1,317 additions
and
13 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
syntax = "proto3"; | ||
package evmos.vesting.v1; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
import "google/api/annotations.proto"; | ||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/tharsis/evmos/x/vesting/types"; | ||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
// Retrieves the unvested, vested and locked tokens for a vesting account | ||
rpc Balances(QueryBalancesRequest) returns (QueryBalancesResponse) { | ||
option (google.api.http).get = "/evmos/vesting/v1/balances/{address}"; | ||
} | ||
} | ||
|
||
// QueryBalancesRequest is the request type for the Query/Balances RPC method. | ||
message QueryBalancesRequest { | ||
// address of the clawback vesting account | ||
string address = 1; | ||
} | ||
|
||
// QueryBalancesResponse is the response type for the Query/Balances RPC | ||
// method. | ||
message QueryBalancesResponse { | ||
// current amount of locked tokens | ||
repeated cosmos.base.v1beta1.Coin locked = 1 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
// current amount of unvested tokens | ||
repeated cosmos.base.v1beta1.Coin unvested = 2 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
// current amount of vested tokens | ||
repeated cosmos.base.v1beta1.Coin vested = 3 [ | ||
(gogoproto.nullable) = false, | ||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" | ||
]; | ||
} |
Oops, something went wrong.