diff --git a/proto/umee/ugov/v1/genesis.proto b/proto/umee/ugov/v1/genesis.proto index 8e2e0aef3d..8f7684c1b6 100644 --- a/proto/umee/ugov/v1/genesis.proto +++ b/proto/umee/ugov/v1/genesis.proto @@ -3,6 +3,7 @@ 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; @@ -10,4 +11,7 @@ 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"]; } diff --git a/proto/umee/ugov/v1/query.proto b/proto/umee/ugov/v1/query.proto index e71fa52f3e..685593805c 100644 --- a/proto/umee/ugov/v1/query.proto +++ b/proto/umee/ugov/v1/query.proto @@ -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"; @@ -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. @@ -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"]; +} diff --git a/proto/umee/ugov/v1/tx.proto b/proto/umee/ugov/v1/tx.proto index 311a9e370c..ec69902b76 100644 --- a/proto/umee/ugov/v1/tx.proto +++ b/proto/umee/ugov/v1/tx.proto @@ -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"; @@ -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 {}; diff --git a/x/ugov/genesis.pb.go b/x/ugov/genesis.pb.go index 1a9390b4d7..fd19fa093e 100644 --- a/x/ugov/genesis.pb.go +++ b/x/ugov/genesis.pb.go @@ -5,6 +5,7 @@ package ugov import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" @@ -27,6 +28,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState of the ugov module. type GenesisState struct { MinGasPrice types.DecCoin `protobuf:"bytes,1,opt,name=min_gas_price,json=minGasPrice,proto3" json:"min_gas_price"` + // Emergency Group address + EmergencyGroup string `protobuf:"bytes,2,opt,name=emergency_group,json=emergencyGroup,proto3" json:"emergency_group,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -69,22 +72,26 @@ func init() { func init() { proto.RegisterFile("umee/ugov/v1/genesis.proto", fileDescriptor_82f39cd8e8ede8c7) } var fileDescriptor_82f39cd8e8ede8c7 = []byte{ - // 240 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x2c, 0x8f, 0xb1, 0x4a, 0x04, 0x31, - 0x10, 0x86, 0x13, 0x10, 0x8b, 0xbd, 0xb3, 0x39, 0x2c, 0x64, 0x91, 0x28, 0x16, 0x62, 0x63, 0x86, - 0x55, 0x7c, 0x81, 0xf3, 0xf0, 0x5a, 0x51, 0xb0, 0xb0, 0x39, 0xb2, 0x61, 0x88, 0x41, 0x92, 0x39, - 0x36, 0xd9, 0xe8, 0x63, 0xf8, 0x58, 0x5b, 0x5e, 0x69, 0x25, 0xba, 0xfb, 0x22, 0x92, 0xdd, 0xeb, - 0x66, 0xf8, 0x66, 0x3e, 0xfe, 0xbf, 0x28, 0x5b, 0x87, 0x08, 0xad, 0xa1, 0x04, 0xa9, 0x02, 0x83, - 0x1e, 0x83, 0x0d, 0x72, 0xdb, 0x50, 0xa4, 0xc5, 0x3c, 0x33, 0x99, 0x99, 0x4c, 0x55, 0x79, 0x6c, - 0xc8, 0xd0, 0x08, 0x20, 0x4f, 0xd3, 0x4d, 0x29, 0x34, 0x05, 0x47, 0x01, 0x6a, 0x15, 0x10, 0x52, - 0x55, 0x63, 0x54, 0x15, 0x68, 0xb2, 0x7e, 0xe2, 0x17, 0x2f, 0xc5, 0x7c, 0x3d, 0x49, 0x9f, 0xa3, - 0x8a, 0xb8, 0x78, 0x28, 0x8e, 0x9c, 0xf5, 0x1b, 0xa3, 0xc2, 0x66, 0xdb, 0x58, 0x8d, 0x27, 0xfc, - 0x9c, 0x5f, 0xcd, 0x6e, 0x4e, 0xe5, 0xe4, 0x91, 0xd9, 0x23, 0xf7, 0x1e, 0xb9, 0x42, 0x7d, 0x4f, - 0xd6, 0x2f, 0x0f, 0xba, 0x9f, 0x33, 0xf6, 0x34, 0x73, 0xd6, 0xaf, 0x55, 0x78, 0xcc, 0x6f, 0xcb, - 0x55, 0xf7, 0x27, 0x58, 0xd7, 0x0b, 0xbe, 0xeb, 0x05, 0xff, 0xed, 0x05, 0xff, 0x1a, 0x04, 0xdb, - 0x0d, 0x82, 0x7d, 0x0f, 0x82, 0xbd, 0x5e, 0x1a, 0x1b, 0xdf, 0xda, 0x5a, 0x6a, 0x72, 0x90, 0x4b, - 0x5c, 0x7b, 0x8c, 0x1f, 0xd4, 0xbc, 0x8f, 0x0b, 0xa4, 0x3b, 0xf8, 0x1c, 0x2b, 0xd7, 0x87, 0x63, - 0xc8, 0xdb, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xba, 0x74, 0x96, 0x06, 0x01, 0x00, 0x00, + // 296 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0x41, 0x4a, 0x03, 0x31, + 0x14, 0x86, 0x27, 0x22, 0x82, 0xd3, 0xaa, 0x50, 0xba, 0xa8, 0x45, 0x62, 0x71, 0x21, 0xdd, 0x34, + 0x61, 0x14, 0x0f, 0xd0, 0x5a, 0xec, 0x56, 0xda, 0x9d, 0x9b, 0x32, 0x33, 0x7d, 0xc4, 0x20, 0x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 0xfc, 0x64, 0xba, 0xf9, 0xa5, 0xd1, 0x66, 0x47, 0xc9, 0x76, 0x47, 0xc9, + 0xcf, 0x8e, 0x92, 0xb7, 0x8a, 0x46, 0xdb, 0x8a, 0x46, 0x5f, 0x15, 0x8d, 0x1e, 0x2e, 0x85, 0x74, + 0x8f, 0x45, 0xc6, 0x72, 0x54, 0xdc, 0xdf, 0x68, 0xa4, 0xc1, 0x3d, 0xa3, 0x79, 0xaa, 0x07, 0x5e, + 0xde, 0xf0, 0x97, 0xfa, 0xa2, 0xd9, 0x41, 0xbd, 0xe8, 0xf5, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xfc, 0x94, 0x81, 0x77, 0x65, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -107,6 +114,13 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.EmergencyGroup) > 0 { + i -= len(m.EmergencyGroup) + copy(dAtA[i:], m.EmergencyGroup) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.EmergencyGroup))) + i-- + dAtA[i] = 0x12 + } { size, err := m.MinGasPrice.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -139,6 +153,10 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.MinGasPrice.Size() n += 1 + l + sovGenesis(uint64(l)) + l = len(m.EmergencyGroup) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -210,6 +228,38 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EmergencyGroup", 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.EmergencyGroup = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/ugov/query.pb.go b/x/ugov/query.pb.go index bf8e61e819..c1238cff22 100644 --- a/x/ugov/query.pb.go +++ b/x/ugov/query.pb.go @@ -6,6 +6,7 @@ package ugov import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -105,35 +106,119 @@ func (m *QueryMinGasPriceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryMinGasPriceResponse proto.InternalMessageInfo +// QueryEmergencyGroup request type. +type QueryEmergencyGroup struct { +} + +func (m *QueryEmergencyGroup) Reset() { *m = QueryEmergencyGroup{} } +func (m *QueryEmergencyGroup) String() string { return proto.CompactTextString(m) } +func (*QueryEmergencyGroup) ProtoMessage() {} +func (*QueryEmergencyGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_25fa04679024a47d, []int{2} +} +func (m *QueryEmergencyGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryEmergencyGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryEmergencyGroup.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 *QueryEmergencyGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEmergencyGroup.Merge(m, src) +} +func (m *QueryEmergencyGroup) XXX_Size() int { + return m.Size() +} +func (m *QueryEmergencyGroup) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEmergencyGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryEmergencyGroup proto.InternalMessageInfo + +// QueryEmergencyGroupResponse response type. +type QueryEmergencyGroupResponse struct { + EmergencyGroup string `protobuf:"bytes,1,opt,name=emergency_group,json=emergencyGroup,proto3" json:"emergency_group,omitempty"` +} + +func (m *QueryEmergencyGroupResponse) Reset() { *m = QueryEmergencyGroupResponse{} } +func (m *QueryEmergencyGroupResponse) String() string { return proto.CompactTextString(m) } +func (*QueryEmergencyGroupResponse) ProtoMessage() {} +func (*QueryEmergencyGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_25fa04679024a47d, []int{3} +} +func (m *QueryEmergencyGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryEmergencyGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryEmergencyGroupResponse.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 *QueryEmergencyGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryEmergencyGroupResponse.Merge(m, src) +} +func (m *QueryEmergencyGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryEmergencyGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryEmergencyGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryEmergencyGroupResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*QueryMinGasPrice)(nil), "umee.ugov.v1.QueryMinGasPrice") proto.RegisterType((*QueryMinGasPriceResponse)(nil), "umee.ugov.v1.QueryMinGasPriceResponse") + proto.RegisterType((*QueryEmergencyGroup)(nil), "umee.ugov.v1.QueryEmergencyGroup") + proto.RegisterType((*QueryEmergencyGroupResponse)(nil), "umee.ugov.v1.QueryEmergencyGroupResponse") } func init() { proto.RegisterFile("umee/ugov/v1/query.proto", fileDescriptor_25fa04679024a47d) } var fileDescriptor_25fa04679024a47d = []byte{ - // 320 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xcd, 0x4a, 0x03, 0x31, - 0x14, 0x85, 0x67, 0x44, 0x5d, 0x4c, 0x15, 0x24, 0xb8, 0x28, 0xb5, 0x46, 0xa9, 0x50, 0xdc, 0x34, - 0x61, 0x2a, 0xbe, 0x40, 0x2d, 0xba, 0x12, 0xb4, 0x4b, 0x37, 0x25, 0x33, 0x84, 0x18, 0x34, 0xb9, - 0xe3, 0x24, 0x33, 0xfe, 0x2c, 0xf5, 0x05, 0x04, 0x5f, 0xaa, 0xcb, 0x82, 0x1b, 0x57, 0xa2, 0xad, - 0x0f, 0x22, 0xc9, 0x54, 0xac, 0x5d, 0xb8, 0xbb, 0xdc, 0x2f, 0x9c, 0xef, 0xe4, 0x46, 0xf5, 0x42, - 0x71, 0x4e, 0x0b, 0x01, 0x25, 0x2d, 0x63, 0x7a, 0x53, 0xf0, 0xfc, 0x9e, 0x64, 0x39, 0x58, 0x40, - 0x6b, 0x8e, 0x10, 0x47, 0x48, 0x19, 0x37, 0x9a, 0x02, 0x40, 0x5c, 0x73, 0xca, 0x32, 0x49, 0x99, - 0xd6, 0x60, 0x99, 0x95, 0xa0, 0x4d, 0xf5, 0xb6, 0xb1, 0x29, 0x40, 0x80, 0x1f, 0xa9, 0x9b, 0x66, - 0x5b, 0x9c, 0x82, 0x51, 0x60, 0x68, 0xc2, 0x0c, 0xa7, 0x65, 0x9c, 0x70, 0xcb, 0x62, 0x9a, 0x82, - 0xd4, 0x15, 0x6f, 0xa1, 0x68, 0xe3, 0xdc, 0x09, 0x4f, 0xa5, 0x3e, 0x61, 0xe6, 0x2c, 0x97, 0x29, - 0x6f, 0x25, 0x51, 0x7d, 0x71, 0x37, 0xe0, 0x26, 0x03, 0x6d, 0x38, 0x3a, 0x8e, 0xd6, 0x95, 0xd4, - 0x43, 0xc1, 0xcc, 0x30, 0x73, 0xa0, 0x1e, 0xee, 0x86, 0xfb, 0xb5, 0x6e, 0x93, 0x54, 0x1e, 0xe2, - 0x3c, 0x64, 0xe6, 0x21, 0x7d, 0x9e, 0x1e, 0x81, 0xd4, 0xbd, 0xe5, 0xd1, 0xfb, 0x4e, 0x30, 0xa8, - 0xa9, 0xdf, 0xbc, 0xee, 0x53, 0x18, 0xad, 0x78, 0x09, 0x7a, 0x88, 0x6a, 0x73, 0x22, 0x84, 0xc9, - 0xfc, 0x9f, 0xc9, 0x62, 0x91, 0x46, 0xfb, 0x7f, 0xfe, 0x53, 0xb4, 0xb5, 0xf7, 0xf8, 0xfa, 0xf5, - 0xb2, 0xb4, 0x8d, 0xb6, 0xe8, 0x9f, 0xeb, 0x2a, 0xa9, 0x3b, 0x82, 0x99, 0x8e, 0x2f, 0xdf, 0xeb, - 0x8f, 0x3e, 0x71, 0x30, 0x9a, 0xe0, 0x70, 0x3c, 0xc1, 0xe1, 0xc7, 0x04, 0x87, 0xcf, 0x53, 0x1c, - 0x8c, 0xa7, 0x38, 0x78, 0x9b, 0xe2, 0xe0, 0xa2, 0x2d, 0xa4, 0xbd, 0x2c, 0x12, 0x92, 0x82, 0xf2, - 0x21, 0x1d, 0xcd, 0xed, 0x2d, 0xe4, 0x57, 0x55, 0x62, 0x79, 0x48, 0xef, 0x7c, 0x6c, 0xb2, 0xea, - 0x4f, 0x79, 0xf0, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x90, 0xf5, 0xc5, 0x4e, 0xc8, 0x01, 0x00, 0x00, + // 430 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x6e, 0xd4, 0x30, + 0x10, 0x86, 0x93, 0x0a, 0x90, 0xf0, 0x42, 0x41, 0xa6, 0x48, 0xcb, 0xb6, 0x75, 0x61, 0x11, 0x15,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, 0x8a, 0x99, 0xb7, 0x89, 0x0c, 0x14, + 0xef, 0xd0, 0xbe, 0x6e, 0x3c, 0xab, 0x07, 0xe2, 0xbd, 0x37, 0x4e, 0x2e, 0xf8, 0xb7, 0x74, 0xff, + 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x09, 0xc1, 0x74, 0x1a, 0xe4, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -150,6 +235,8 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // MinGasPrice returns minimum transaction fees. MinGasPrice(ctx context.Context, in *QueryMinGasPrice, opts ...grpc.CallOption) (*QueryMinGasPriceResponse, error) + // EmergencyGroup returns emergency group address + EmergencyGroup(ctx context.Context, in *QueryEmergencyGroup, opts ...grpc.CallOption) (*QueryEmergencyGroupResponse, error) } type queryClient struct { @@ -169,10 +256,21 @@ func (c *queryClient) MinGasPrice(ctx context.Context, in *QueryMinGasPrice, opt return out, nil } +func (c *queryClient) EmergencyGroup(ctx context.Context, in *QueryEmergencyGroup, opts ...grpc.CallOption) (*QueryEmergencyGroupResponse, error) { + out := new(QueryEmergencyGroupResponse) + err := c.cc.Invoke(ctx, "/umee.ugov.v1.Query/EmergencyGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // MinGasPrice returns minimum transaction fees. MinGasPrice(context.Context, *QueryMinGasPrice) (*QueryMinGasPriceResponse, error) + // EmergencyGroup returns emergency group address + EmergencyGroup(context.Context, *QueryEmergencyGroup) (*QueryEmergencyGroupResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -182,6 +280,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) MinGasPrice(ctx context.Context, req *QueryMinGasPrice) (*QueryMinGasPriceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MinGasPrice not implemented") } +func (*UnimplementedQueryServer) EmergencyGroup(ctx context.Context, req *QueryEmergencyGroup) (*QueryEmergencyGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EmergencyGroup not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -205,6 +306,24 @@ func _Query_MinGasPrice_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } +func _Query_EmergencyGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryEmergencyGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).EmergencyGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.ugov.v1.Query/EmergencyGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).EmergencyGroup(ctx, req.(*QueryEmergencyGroup)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "umee.ugov.v1.Query", HandlerType: (*QueryServer)(nil), @@ -213,6 +332,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "MinGasPrice", Handler: _Query_MinGasPrice_Handler, }, + { + MethodName: "EmergencyGroup", + Handler: _Query_EmergencyGroup_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/ugov/v1/query.proto", @@ -274,6 +397,59 @@ func (m *QueryMinGasPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *QueryEmergencyGroup) 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 *QueryEmergencyGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEmergencyGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryEmergencyGroupResponse) 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 *QueryEmergencyGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryEmergencyGroupResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EmergencyGroup) > 0 { + i -= len(m.EmergencyGroup) + copy(dAtA[i:], m.EmergencyGroup) + i = encodeVarintQuery(dAtA, i, uint64(len(m.EmergencyGroup))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -305,6 +481,28 @@ func (m *QueryMinGasPriceResponse) Size() (n int) { return n } +func (m *QueryEmergencyGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryEmergencyGroupResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.EmergencyGroup) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -444,6 +642,138 @@ func (m *QueryMinGasPriceResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryEmergencyGroup) 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: QueryEmergencyGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEmergencyGroup: 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 *QueryEmergencyGroupResponse) 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: QueryEmergencyGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryEmergencyGroupResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EmergencyGroup", 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.EmergencyGroup = 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/ugov/query.pb.gw.go b/x/ugov/query.pb.gw.go index f0582d2971..c541046c98 100644 --- a/x/ugov/query.pb.gw.go +++ b/x/ugov/query.pb.gw.go @@ -51,6 +51,24 @@ func local_request_Query_MinGasPrice_0(ctx context.Context, marshaler runtime.Ma } +func request_Query_EmergencyGroup_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEmergencyGroup + var metadata runtime.ServerMetadata + + msg, err := client.EmergencyGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_EmergencyGroup_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryEmergencyGroup + var metadata runtime.ServerMetadata + + msg, err := server.EmergencyGroup(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. @@ -80,6 +98,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_EmergencyGroup_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_EmergencyGroup_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_EmergencyGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -141,13 +182,37 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_EmergencyGroup_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_EmergencyGroup_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_EmergencyGroup_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Query_MinGasPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "ugov", "v1", "min-gas-price"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_EmergencyGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "ugov", "v1", "emergency-group"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_MinGasPrice_0 = runtime.ForwardResponseMessage + + forward_Query_EmergencyGroup_0 = runtime.ForwardResponseMessage ) diff --git a/x/ugov/tx.pb.go b/x/ugov/tx.pb.go index 6a76d018ed..f6e82d22e9 100644 --- a/x/ugov/tx.pb.go +++ b/x/ugov/tx.pb.go @@ -31,7 +31,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// MsgGovUpdateMinGasPrice is a request type for the Msg/GovUpdateMinGasPrice. +// MsgGovUpdateMinGasPrice request type. type MsgGovUpdateMinGasPrice struct { // authority must be the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` @@ -70,7 +70,7 @@ func (m *MsgGovUpdateMinGasPrice) XXX_DiscardUnknown() { var xxx_messageInfo_MsgGovUpdateMinGasPrice proto.InternalMessageInfo -// MsgGovUpdateMinGasPriceResponse is a response type for the Msg/GovUpdateMinGasPrice. +// MsgGovUpdateMinGasPriceResponse response type. type MsgGovUpdateMinGasPriceResponse struct { } @@ -107,15 +107,93 @@ func (m *MsgGovUpdateMinGasPriceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgGovUpdateMinGasPriceResponse proto.InternalMessageInfo +// MsgGovSetEmergencyGroup request type. +type MsgGovSetEmergencyGroup struct { + // authority must be the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + EmergencyGroup string `protobuf:"bytes,2,opt,name=emergency_group,json=emergencyGroup,proto3" json:"emergency_group,omitempty"` +} + +func (m *MsgGovSetEmergencyGroup) Reset() { *m = MsgGovSetEmergencyGroup{} } +func (*MsgGovSetEmergencyGroup) ProtoMessage() {} +func (*MsgGovSetEmergencyGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_9ffc07de1c6ee91b, []int{2} +} +func (m *MsgGovSetEmergencyGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovSetEmergencyGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovSetEmergencyGroup.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 *MsgGovSetEmergencyGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovSetEmergencyGroup.Merge(m, src) +} +func (m *MsgGovSetEmergencyGroup) XXX_Size() int { + return m.Size() +} +func (m *MsgGovSetEmergencyGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovSetEmergencyGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovSetEmergencyGroup proto.InternalMessageInfo + +// MsgGovSetEmergencyGroupResponse response type. +type MsgGovSetEmergencyGroupResponse struct { +} + +func (m *MsgGovSetEmergencyGroupResponse) Reset() { *m = MsgGovSetEmergencyGroupResponse{} } +func (m *MsgGovSetEmergencyGroupResponse) String() string { return proto.CompactTextString(m) } +func (*MsgGovSetEmergencyGroupResponse) ProtoMessage() {} +func (*MsgGovSetEmergencyGroupResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9ffc07de1c6ee91b, []int{3} +} +func (m *MsgGovSetEmergencyGroupResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgGovSetEmergencyGroupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgGovSetEmergencyGroupResponse.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 *MsgGovSetEmergencyGroupResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgGovSetEmergencyGroupResponse.Merge(m, src) +} +func (m *MsgGovSetEmergencyGroupResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgGovSetEmergencyGroupResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgGovSetEmergencyGroupResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgGovSetEmergencyGroupResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgGovUpdateMinGasPrice)(nil), "umee.ugov.v1.MsgGovUpdateMinGasPrice") proto.RegisterType((*MsgGovUpdateMinGasPriceResponse)(nil), "umee.ugov.v1.MsgGovUpdateMinGasPriceResponse") + proto.RegisterType((*MsgGovSetEmergencyGroup)(nil), "umee.ugov.v1.MsgGovSetEmergencyGroup") + proto.RegisterType((*MsgGovSetEmergencyGroupResponse)(nil), "umee.ugov.v1.MsgGovSetEmergencyGroupResponse") } func init() { proto.RegisterFile("umee/ugov/v1/tx.proto", fileDescriptor_9ffc07de1c6ee91b) } var fileDescriptor_9ffc07de1c6ee91b = []byte{ - // 367 bytes of a gzipped FileDescriptorProto + // 432 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0xcd, 0x4d, 0x4d, 0xd5, 0x2f, 0x4d, 0xcf, 0x2f, 0xd3, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x09, 0xeb, 0x81, 0x84, 0xf5, 0xca, 0x0c, 0xa5, 0xe4, 0x92, 0xf3, 0x8b, @@ -131,14 +209,18 @@ var fileDescriptor_9ffc07de1c6ee91b = []byte{ 0x2a, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa3, 0x07, 0xd5, 0x08, 0xf2, 0x95, 0x1e, 0xd4, 0x57, 0x7a, 0x2e, 0xa9, 0xc9, 0xce, 0xf9, 0x99, 0x79, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x71, 0xe7, 0x22, 0xec, 0xb7, 0x12, 0x9a, 0xb1, 0x40, 0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0x1d, + 0x64, 0x14, 0xd8, 0x53, 0xf8, 0x74, 0xf3, 0xa5, 0xa2, 0x58, 0x8d, 0xdf, 0x37, 0x18, 0x2e, 0x85, + 0xf9, 0xc6, 0xe8, 0x21, 0x23, 0x17, 0xb3, 0x6f, 0x71, 0xba, 0x50, 0x0e, 0x97, 0x08, 0xd6, 0x48, + 0x52, 0xd5, 0x43, 0x4e, 0x39, 0x7a, 0x38, 0x02, 0x47, 0x4a, 0x97, 0x28, 0x65, 0x30, 0x5b, 0xa1, + 0xb6, 0x61, 0x86, 0x1f, 0x56, 0xdb, 0x30, 0x94, 0x61, 0xb7, 0x0d, 0xa7, 0x1f, 0x9d, 0x5c, 0x4e, + 0x3c, 0x94, 0x63, 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, 0xb5, 0xf4, + 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x90, 0xb1, 0xba, 0x79, 0xa9, 0x25, + 0xe5, 0xf9, 0x45, 0xd9, 0x60, 0x8e, 0x7e, 0x99, 0xa9, 0x7e, 0x05, 0x38, 0x3b, 0x25, 0xb1, 0x81, + 0x53, 0xb4, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x88, 0x0b, 0x9c, 0x9f, 0x62, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -155,6 +237,8 @@ const _ = grpc.SupportPackageIsVersion4 type MsgClient interface { // GovUpdateMinGasPrice sets protocol controlled tx min fees. GovUpdateMinGasPrice(ctx context.Context, in *MsgGovUpdateMinGasPrice, opts ...grpc.CallOption) (*MsgGovUpdateMinGasPriceResponse, error) + // GovSetEmergencyGroup sets protocol controlled tx min fees. + GovSetEmergencyGroup(ctx context.Context, in *MsgGovSetEmergencyGroup, opts ...grpc.CallOption) (*MsgGovSetEmergencyGroupResponse, error) } type msgClient struct { @@ -174,10 +258,21 @@ func (c *msgClient) GovUpdateMinGasPrice(ctx context.Context, in *MsgGovUpdateMi return out, nil } +func (c *msgClient) GovSetEmergencyGroup(ctx context.Context, in *MsgGovSetEmergencyGroup, opts ...grpc.CallOption) (*MsgGovSetEmergencyGroupResponse, error) { + out := new(MsgGovSetEmergencyGroupResponse) + err := c.cc.Invoke(ctx, "/umee.ugov.v1.Msg/GovSetEmergencyGroup", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // GovUpdateMinGasPrice sets protocol controlled tx min fees. GovUpdateMinGasPrice(context.Context, *MsgGovUpdateMinGasPrice) (*MsgGovUpdateMinGasPriceResponse, error) + // GovSetEmergencyGroup sets protocol controlled tx min fees. + GovSetEmergencyGroup(context.Context, *MsgGovSetEmergencyGroup) (*MsgGovSetEmergencyGroupResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -187,6 +282,9 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) GovUpdateMinGasPrice(ctx context.Context, req *MsgGovUpdateMinGasPrice) (*MsgGovUpdateMinGasPriceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GovUpdateMinGasPrice not implemented") } +func (*UnimplementedMsgServer) GovSetEmergencyGroup(ctx context.Context, req *MsgGovSetEmergencyGroup) (*MsgGovSetEmergencyGroupResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GovSetEmergencyGroup not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -210,6 +308,24 @@ func _Msg_GovUpdateMinGasPrice_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_GovSetEmergencyGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgGovSetEmergencyGroup) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).GovSetEmergencyGroup(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.ugov.v1.Msg/GovSetEmergencyGroup", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).GovSetEmergencyGroup(ctx, req.(*MsgGovSetEmergencyGroup)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "umee.ugov.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -218,6 +334,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "GovUpdateMinGasPrice", Handler: _Msg_GovUpdateMinGasPrice_Handler, }, + { + MethodName: "GovSetEmergencyGroup", + Handler: _Msg_GovSetEmergencyGroup_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/ugov/v1/tx.proto", @@ -286,6 +406,66 @@ func (m *MsgGovUpdateMinGasPriceResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } +func (m *MsgGovSetEmergencyGroup) 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 *MsgGovSetEmergencyGroup) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovSetEmergencyGroup) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.EmergencyGroup) > 0 { + i -= len(m.EmergencyGroup) + copy(dAtA[i:], m.EmergencyGroup) + i = encodeVarintTx(dAtA, i, uint64(len(m.EmergencyGroup))) + 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 *MsgGovSetEmergencyGroupResponse) 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 *MsgGovSetEmergencyGroupResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgGovSetEmergencyGroupResponse) 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 @@ -321,6 +501,32 @@ func (m *MsgGovUpdateMinGasPriceResponse) Size() (n int) { return n } +func (m *MsgGovSetEmergencyGroup) 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.EmergencyGroup) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgGovSetEmergencyGroupResponse) 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 } @@ -492,6 +698,170 @@ func (m *MsgGovUpdateMinGasPriceResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgGovSetEmergencyGroup) 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: MsgGovSetEmergencyGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovSetEmergencyGroup: 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 EmergencyGroup", 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.EmergencyGroup = 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 *MsgGovSetEmergencyGroupResponse) 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: MsgGovSetEmergencyGroupResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgGovSetEmergencyGroupResponse: 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