mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-14 12:05:18 +00:00
395b69ac2f
* Add authority, MsgUpdateParams * Add e2e test for x/community UpdateParamsMsg proposal * Ensure new params are different * Add errors and update codec * Update changelog * Use single reused govAuthorityAddr * Add unit tests for authority and msg * Validate authority address * Update proto comment * Check for ErrInvalidSigner in invalid authority error
48 lines
1.8 KiB
Protocol Buffer
48 lines
1.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
package kava.community.v1beta1;
|
|
|
|
import "cosmos/base/v1beta1/coin.proto";
|
|
import "cosmos_proto/cosmos.proto";
|
|
import "gogoproto/gogo.proto";
|
|
import "kava/community/v1beta1/params.proto";
|
|
|
|
option go_package = "github.com/kava-labs/kava/x/community/types";
|
|
option (gogoproto.equal_all) = true;
|
|
|
|
// Msg defines the community Msg service.
|
|
service Msg {
|
|
// FundCommunityPool defines a method to allow an account to directly fund the community module account.
|
|
rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse);
|
|
|
|
// UpdateParams defines a method to allow an account to update the community module parameters.
|
|
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
|
}
|
|
|
|
// MsgFundCommunityPool allows an account to directly fund the community module account.
|
|
message MsgFundCommunityPool {
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
repeated cosmos.base.v1beta1.Coin amount = 1 [
|
|
(gogoproto.nullable) = false,
|
|
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
|
];
|
|
string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
}
|
|
|
|
// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type.
|
|
message MsgFundCommunityPoolResponse {}
|
|
|
|
// MsgUpdateParams allows an account to update the community module parameters.
|
|
message MsgUpdateParams {
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
// authority is the address that controls the module (defaults to x/gov unless overwritten).
|
|
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
// params defines the x/community parameters to update.
|
|
Params params = 2 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
// MsgUpdateParamsResponse defines the Msg/UpdateParams response type.
|
|
message MsgUpdateParamsResponse {}
|