Skip to content

Commit

Permalink
feat: emergency group ugov proto
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Jul 6, 2023
1 parent fd82ca2 commit eb380f4
Show file tree
Hide file tree
Showing 7 changed files with 901 additions and 52 deletions.
4 changes: 4 additions & 0 deletions proto/umee/ugov/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ package umee.ugov.v1;

import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/umee-network/umee/v5/x/ugov";
option (gogoproto.goproto_getters_all) = false;

// GenesisState of the ugov module.
message GenesisState {
cosmos.base.v1beta1.DecCoin min_gas_price = 1 [(gogoproto.nullable) = false];

// Emergency Group address
string emergency_group = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
18 changes: 16 additions & 2 deletions proto/umee/ugov/v1/query.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package umee.ugov.v1;

import "google/api/annotations.proto";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";

option go_package = "github.com/umee-network/umee/v5/x/ugov";

Expand All @@ -15,6 +16,11 @@ service Query {
rpc MinGasPrice(QueryMinGasPrice) returns (QueryMinGasPriceResponse) {
option (google.api.http).get = "/umee/ugov/v1/min-gas-price";
}

// EmergencyGroup returns emergency group address
rpc EmergencyGroup(QueryEmergencyGroup) returns (QueryEmergencyGroupResponse) {
option (google.api.http).get = "/umee/ugov/v1/emergency-group";
}
}

// QueryMinGasPrice is a request type.
Expand All @@ -24,3 +30,11 @@ message QueryMinGasPrice {}
message QueryMinGasPriceResponse {
cosmos.base.v1beta1.DecCoin min_gas_price = 1 [(gogoproto.nullable) = false];
}

// QueryEmergencyGroup request type.
message QueryEmergencyGroup {}

// QueryEmergencyGroupResponse response type.
message QueryEmergencyGroupResponse {
string emergency_group = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
20 changes: 18 additions & 2 deletions proto/umee/ugov/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ option (gogoproto.goproto_getters_all) = false;
service Msg {
// GovUpdateMinGasPrice sets protocol controlled tx min fees.
rpc GovUpdateMinGasPrice(MsgGovUpdateMinGasPrice) returns (MsgGovUpdateMinGasPriceResponse);

// GovSetEmergencyGroup sets protocol controlled tx min fees.
rpc GovSetEmergencyGroup(MsgGovSetEmergencyGroup) returns (MsgGovSetEmergencyGroupResponse);
}

// MsgGovUpdateMinGasPrice is a request type for the Msg/GovUpdateMinGasPrice.
// MsgGovUpdateMinGasPrice request type.
message MsgGovUpdateMinGasPrice {
option (gogoproto.goproto_stringer) = false;
option (cosmos.msg.v1.signer) = "authority";
Expand All @@ -26,5 +29,18 @@ message MsgGovUpdateMinGasPrice {
cosmos.base.v1beta1.DecCoin min_gas_price = 2 [(gogoproto.nullable) = false];
}

// MsgGovUpdateMinGasPriceResponse is a response type for the Msg/GovUpdateMinGasPrice.
// MsgGovUpdateMinGasPriceResponse response type.
message MsgGovUpdateMinGasPriceResponse {};

// MsgGovSetEmergencyGroup request type.
message MsgGovSetEmergencyGroup {
option (gogoproto.goproto_stringer) = false;
option (cosmos.msg.v1.signer) = "authority";

// authority must be the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string emergency_group = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// MsgGovSetEmergencyGroupResponse response type.
message MsgGovSetEmergencyGroupResponse {};
82 changes: 66 additions & 16 deletions x/ugov/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eb380f4

Please sign in to comment.