-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix old cork proposals having blank message name (#328)
* Attempt 2, add old cork protos and regen their bindings * Make sure XXX_MessageName is present for old cork types
- Loading branch information
Showing
13 changed files
with
416 additions
and
159 deletions.
There are no files selected for viewing
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,26 @@ | ||
syntax = "proto3"; | ||
package cork.v1; | ||
|
||
option go_package = "github.com/peggyjv/sommelier/v8/x/cork/types/v1"; | ||
|
||
message Cork { | ||
// call body containing the ABI encoded bytes to send to the contract | ||
bytes encoded_contract_call = 1; | ||
// address of the contract to send the call | ||
string target_contract_address = 2; | ||
} | ||
|
||
message ValidatorCork { | ||
Cork cork = 1; | ||
string validator = 2; | ||
} | ||
|
||
message ScheduledCork { | ||
Cork cork = 1; | ||
uint64 block_height = 2; | ||
string validator = 3; | ||
} | ||
|
||
message CellarIDSet { | ||
repeated string ids = 1; | ||
} |
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,35 @@ | ||
syntax = "proto3"; | ||
package cork.v1; | ||
|
||
import "cork/v1/tx.proto"; | ||
import "cork/v1/cork.proto"; | ||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/peggyjv/sommelier/v8/x/cork/types/v1"; | ||
|
||
|
||
// GenesisState - all cork state that must be provided at genesis | ||
message GenesisState { | ||
Params params = 1 [ | ||
(gogoproto.nullable) = false | ||
]; | ||
CellarIDSet cellar_ids = 2 [ | ||
(gogoproto.nullable) = false | ||
]; | ||
uint64 invalidation_nonce = 3; | ||
repeated ValidatorCork corks = 4; | ||
repeated ScheduledCork scheduled_corks = 5; | ||
} | ||
|
||
// Params cork parameters | ||
message Params { | ||
// VotePeriod defines the number of blocks to wait for votes before attempting to tally | ||
int64 vote_period = 1 [(gogoproto.moretags) = "yaml:\"vote_period\""]; | ||
|
||
// VoteThreshold defines the percentage of bonded stake required to vote each period | ||
string vote_threshold = 2 [ | ||
(gogoproto.moretags) = "yaml:\"vote_threshold\"", | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", | ||
(gogoproto.nullable) = false | ||
]; | ||
} |
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,39 @@ | ||
syntax = "proto3"; | ||
package cork.v1; | ||
|
||
import "cork/v1/cork.proto"; | ||
import "gogoproto/gogo.proto"; | ||
|
||
option go_package = "github.com/peggyjv/sommelier/v8/x/cork/types/v1"; | ||
|
||
message AddManagedCellarIDsProposal { | ||
option (gogoproto.messagename) = true; | ||
string title = 1; | ||
string description = 2; | ||
CellarIDSet cellar_ids = 3; | ||
} | ||
|
||
// AddManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands | ||
message AddManagedCellarIDsProposalWithDeposit { | ||
option (gogoproto.messagename) = true; | ||
string title = 1; | ||
string description = 2; | ||
repeated string cellar_ids = 3; | ||
string deposit = 4; | ||
} | ||
|
||
message RemoveManagedCellarIDsProposal { | ||
option (gogoproto.messagename) = true; | ||
string title = 1; | ||
string description = 2; | ||
CellarIDSet cellar_ids = 3; | ||
} | ||
|
||
// RemoveManagedCellarIDsProposalWithDeposit is a specific definition for CLI commands | ||
message RemoveManagedCellarIDsProposalWithDeposit { | ||
option (gogoproto.messagename) = true; | ||
string title = 1; | ||
string description = 2; | ||
repeated string cellar_ids = 3; | ||
string deposit = 4; | ||
} |
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,111 @@ | ||
syntax = "proto3"; | ||
package cork.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "cork/v1/genesis.proto"; | ||
import "cork/v1/cork.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
|
||
option go_package = "github.com/peggyjv/sommelier/v8/x/cork/types/v1"; | ||
|
||
// Query defines the gRPC query service for the cork module. | ||
service Query { | ||
// QueryParams queries the allocation module parameters. | ||
rpc QueryParams(QueryParamsRequest) returns (QueryParamsResponse) { | ||
option (google.api.http).get = "/sommelier/cork/v1/params"; | ||
} | ||
// QuerySubmittedCorks queries the submitted corks awaiting vote | ||
rpc QuerySubmittedCorks(QuerySubmittedCorksRequest) returns (QuerySubmittedCorksResponse) { | ||
option (google.api.http).get = "/sommelier/cork/v1/submitted"; | ||
} | ||
// QueryCommitPeriod queries the heights for the current voting period (current, start and end) | ||
rpc QueryCommitPeriod(QueryCommitPeriodRequest) returns (QueryCommitPeriodResponse) { | ||
option (google.api.http).get = "/sommelier/cork/v1/commit_period"; | ||
} | ||
// QueryCellarIDs returns all cellars and current tick ranges | ||
rpc QueryCellarIDs(QueryCellarIDsRequest) returns (QueryCellarIDsResponse) { | ||
option (google.api.http).get = "/sommelier/cork/v1/cellar_ids"; | ||
} | ||
// QueryScheduledCorks returns all scheduled corks | ||
rpc QueryScheduledCorks(QueryScheduledCorksRequest) returns (QueryScheduledCorksResponse) { | ||
option (google.api.http).get = "/sommelier/cork/v1/scheduled_corks"; | ||
} | ||
// QueryScheduledBlockHeights returns all scheduled block heights | ||
rpc QueryScheduledBlockHeights(QueryScheduledBlockHeightsRequest) returns (QueryScheduledBlockHeightsResponse) { | ||
option (google.api.http).get = "/sommelier/cork/v1/scheduled_block_heights"; | ||
} | ||
|
||
// QueryScheduledCorks returns all scheduled corks at a block height | ||
rpc QueryScheduledCorksByBlockHeight(QueryScheduledCorksByBlockHeightRequest) returns (QueryScheduledCorksByBlockHeightResponse) { | ||
option (google.api.http).get = "/sommelier/cork/v1/scheduled_corks_by_block_height/{block_height}"; | ||
} | ||
} | ||
|
||
// QueryParamsRequest is the request type for the Query/Params gRPC method. | ||
message QueryParamsRequest {} | ||
|
||
// QueryParamsRequest is the response type for the Query/Params gRPC method. | ||
message QueryParamsResponse { | ||
// allocation parameters | ||
Params params = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
// QuerySubmittedCorksRequest is the request type for the Query/QuerySubmittedCorks gRPC query method. | ||
message QuerySubmittedCorksRequest {} | ||
|
||
// QuerySubmittedCorksResponse is the response type for the Query/QuerySubmittedCorks gRPC query method. | ||
message QuerySubmittedCorksResponse { | ||
// corks in keeper awaiting vote | ||
repeated Cork corks = 1; | ||
} | ||
|
||
|
||
// QueryCommitPeriodRequest is the request type for the Query/QueryCommitPeriod gRPC method. | ||
message QueryCommitPeriodRequest {} | ||
|
||
// QueryCommitPeriodResponse is the response type for the Query/QueryCommitPeriod gRPC method. | ||
message QueryCommitPeriodResponse { | ||
// block height at which the query was processed | ||
int64 current_height = 1; | ||
// latest vote period start block height | ||
int64 vote_period_start = 2; | ||
// block height at which the current voting period ends | ||
int64 vote_period_end = 3; | ||
} | ||
|
||
|
||
// QueryCellarIDsRequest is the request type for Query/QueryCellarIDs gRPC method. | ||
message QueryCellarIDsRequest {} | ||
|
||
// QueryCellarIDsResponse is the response type for Query/QueryCellars gRPC method. | ||
message QueryCellarIDsResponse { | ||
repeated string cellar_ids = 1; | ||
} | ||
|
||
// QueryScheduledCorksRequest | ||
message QueryScheduledCorksRequest {} | ||
|
||
// QueryScheduledCorksResponse | ||
message QueryScheduledCorksResponse { | ||
repeated ScheduledCork corks = 1; | ||
} | ||
|
||
// QueryScheduledBlockHeightsRequest | ||
message QueryScheduledBlockHeightsRequest {} | ||
|
||
// QueryScheduledBlockHeightsResponse | ||
message QueryScheduledBlockHeightsResponse { | ||
repeated uint64 block_heights = 1; | ||
} | ||
|
||
// QueryScheduledCorksByBlockHeightRequest | ||
message QueryScheduledCorksByBlockHeightRequest { | ||
uint64 block_height = 1; | ||
} | ||
|
||
// QueryScheduledCorksByBlockHeightResponse | ||
message QueryScheduledCorksByBlockHeightResponse { | ||
repeated ScheduledCork corks = 1; | ||
} |
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,34 @@ | ||
syntax = "proto3"; | ||
package cork.v1; | ||
|
||
import "cork/v1/cork.proto"; | ||
|
||
option go_package = "github.com/peggyjv/sommelier/v8/x/cork/types/v1"; | ||
|
||
// MsgService defines the msgs that the cork module handles | ||
service Msg { | ||
rpc SubmitCork (MsgSubmitCorkRequest) returns (MsgSubmitCorkResponse); | ||
rpc ScheduleCork (MsgScheduleCorkRequest) returns (MsgScheduleCorkResponse); | ||
} | ||
|
||
// MsgSubmitCorkRequest - sdk.Msg for submitting calls to Ethereum through the gravity bridge contract | ||
message MsgSubmitCorkRequest { | ||
// the cork to send across the bridge | ||
Cork cork = 1; | ||
// signer account address | ||
string signer = 2; | ||
} | ||
|
||
message MsgSubmitCorkResponse {} | ||
|
||
// MsgScheduleCorkRequest - sdk.Msg for scheduling a cork request for on or after a specific block height | ||
message MsgScheduleCorkRequest { | ||
// the scheduled cork | ||
Cork cork = 1; | ||
// the block height that must be reached | ||
uint64 block_height = 2; | ||
// signer account address | ||
string signer = 3; | ||
} | ||
|
||
message MsgScheduleCorkResponse {} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.