0g-chain/proto/zgc/committee/v1beta1/permissions.proto

73 lines
2.6 KiB
Protocol Buffer
Raw Permalink Normal View History

syntax = "proto3";
2024-05-01 03:56:00 +00:00
package zgc.committee.v1beta1;
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
2024-05-01 03:17:24 +00:00
option go_package = "github.com/0glabs/0g-chain/x/committee/types";
// GodPermission allows any governance proposal. It is used mainly for testing.
message GodPermission {
option (cosmos_proto.implements_interface) = "Permission";
}
// SoftwareUpgradePermission permission type for software upgrade proposals
message SoftwareUpgradePermission {
option (cosmos_proto.implements_interface) = "Permission";
}
// TextPermission allows any text governance proposal.
message TextPermission {
option (cosmos_proto.implements_interface) = "Permission";
}
// CommunityCDPRepayDebtPermission allows submission of CommunityCDPRepayDebtProposal
message CommunityCDPRepayDebtPermission {
option (cosmos_proto.implements_interface) = "Permission";
}
// CommunityCDPWithdrawCollateralPermission allows submission of CommunityCDPWithdrawCollateralProposal
message CommunityCDPWithdrawCollateralPermission {
option (cosmos_proto.implements_interface) = "Permission";
}
// CommunityPoolLendWithdrawPermission allows submission of CommunityPoolLendWithdrawProposal
message CommunityPoolLendWithdrawPermission {
option (cosmos_proto.implements_interface) = "Permission";
}
// ParamsChangePermission allows any parameter or sub parameter change proposal.
message ParamsChangePermission {
option (cosmos_proto.implements_interface) = "Permission";
repeated AllowedParamsChange allowed_params_changes = 1 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "AllowedParamsChanges"
];
}
// AllowedParamsChange contains data on the allowed parameter changes for subspace, key, and sub params requirements.
message AllowedParamsChange {
string subspace = 1;
string key = 2;
// Requirements for when the subparam value is a single record. This contains list of allowed attribute keys that can
// be changed on the subparam record.
repeated string single_subparam_allowed_attrs = 3;
// Requirements for when the subparam value is a list of records. The requirements contains requirements for each
// record in the list.
repeated SubparamRequirement multi_subparams_requirements = 4 [(gogoproto.nullable) = false];
}
// SubparamRequirement contains requirements for a single record in a subparam value list
message SubparamRequirement {
// The required attr key of the param record.
string key = 1;
// The required param value for the param record key. The key and value is used to match to the target param record.
string val = 2;
// The sub param attrs that are allowed to be changed.
repeated string allowed_subparam_attr_changes = 3;
}