0g-chain/third_party/proto/cosmos/group/v1/tx.proto
drklee3 f757d7ab15
feat: upgrade to Cosmos v0.46 (#1477)
* Update cosmos-sdk to v0.45.10-kava

* Add RegisterNodeService to app

* Update cosmos proto files

* Update cosmos proto files

* Use tagged v0.45.10-kava-v0.19-0.21 cosmos version

* update x/auth/legacy to x/auth/migrations

* Delete rest packages and registration

* Remove rest from proposal handlers

* Remove legacy types referencing removed sdk types

* Remove legacy tx broadcast handler

* Update incentive staking hooks to return error

* Remove grpc replace directive, use new grpc version

* Fix storetypes import

* Update tally_handler with updated gov types

* Delete legacy types

* Use new gov default config

* Update RegisterTendermintService params

Signed-off-by: drklee3 <derrick@dlee.dev>

* Replace sdk.StoreKey with storetypes.StoreKey

* Replace sdk.Int#ToDec with sdk.NewDecFromInt

* Replace sdk.NewUintFromBigInt with sdkmath.NewUintFromBigInt

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update most intances of govtypes to govv1beta1

* Unpack coin slice for Coins#Sub and Coins#SafeSub

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update committee gov codec registration

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update migrate utils period_vesting Coins#Sub

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update Coin#Sub in community proposal handler

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update Coin#Sub, FundModuleAccount/FundAccount in banktestutil

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update community, earn, kavadist proposal gov registration

* Update evm cli client EthSecp256k1Type check

* AccAddressFromHex to AccAddressFromHexUnsafe

* Add mint DefaultInflationCalculationFn to earn test

* Update use of removed staking.NewHandler

* Rename FlagIAVLFastNode -> FlagDisableIAVLFastNode

* cmd: Update new snapshot app option

Signed-off-by: drklee3 <derrick@dlee.dev>

* cmd: Add tendermint default config, use cosmos rpc status command

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update ethermint import path

github.com/tharsis/ethermint -> github.com/evmos/ethermint

* Upgrade ibc-go to v6

* Update proto dependencies

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update Tally handler test with new gov types

* Update helpers.GenTx -> helpers.GenSignedMockTx

* Update evmkeeper.NewKeeper params

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update ante authz, tests

* Add feemarket transient key, pass subspaces to evm/feemarket keepers

* Update new ante decorators

* Add new addModuleInitFlags to server commands

* Pass codec to keyring.New in genaccounts

* Pass codec to client keys add

* Add SendCoins to evmutil bank_keeper

* Use github.com/cosmos/iavl@v0.19.5

* Add ante HandlerOptions

* Add unimplemented SendCoins to evmutil bank keeper

Ethermint x/evm does not use this method

* Update init-new-chain script to disable post-london blocks

* Modify test genesis states to append 1 validator

* Update tally handler test to use string values

* Prevent querying balance for empty sdk.AccAddress in auction bidding test

* Set default bond denom to ukava

* Remove overwritten bank genesis total supply in committee proposal test

Signed-off-by: drklee3 <derrick@dlee.dev>

* Use ukava for testing staked balance

* Disable minting in community proposal handler test

Previously stake denom is used, which resulted in 0 minted coins

* Update hard APYToSPY test expected value

Increased iterations in sdk.ApproxRoot, updated closer to real value

* Fix NewDecCoinsFromCoins bug in incentive collectDerivativeStakingRewards

* Allow bkava earn incentive test values to match within small margin for rounding

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update invalid denom in issuance message coin validation

Colons are now valid in denoms

Signed-off-by: drklee3 <derrick@dlee.dev>

* Remove genesis validator in incentive delegation tests

* Update pricefeed market test for invalid denom

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update incentive delegator rewards test without genesis validator

Signed-off-by: drklee3 <derrick@dlee.dev>

* Add validator to export test

* Clear bank state in minting tests

Signed-off-by: drklee3 <derrick@dlee.dev>

* Remove validator for no stake tally test

Signed-off-by: drklee3 <derrick@dlee.dev>

* Clear incentive state before InitGenesis in incentive genesis export test

* Update swagger

Signed-off-by: drklee3 <derrick@dlee.dev>

* Update ethermint version to match replaced version

* Remove legacy swagger

* Add NewEthEmitEventDecorator

* Remove redundant func for AddModuleInitFlags

* Remove unused addBankBalanceForAddress func

* Add SetIAVLLazyLoading option to app cmd

* Use legacy.RegisterAminoMsg for committee msg concrete registration

* Remove unnecessary Amino field

* Add evm_util bankkeeper SendCoins comment

* Update test method ResetBankState to DeleteGenesisValidatorCoins to be more clear

* Validate incentive params.RewardsPerSecond to be non-zero

* Validate swap pools to disallow colons in token denoms

* Register all legacy amino types on gov modulecdc

* Remove redundant Comittee interface registration

* Pin goleveldb to v1.0.1-0.20210819022825-2ae1ddf74ef7

Causes failed to load state at height errors

* Update ethermint to new pinned version with minGasPrices parse error fix

* Update cosmos fork dependcy commit to include reverted account constructor patch

* Update Cosmos v0.46.11 and cometbft v0.34.27

* Bump minimum go version to 1.19

* Update tendermint proto

* Update internal testnet genesis

* Move NewCanTransferDecorator before NewEthGasConsumeDecorator

* Add hard borrow store tests (#1514)

* add store tests for Borrow type

* refactor Deposit tests to match

* Fix old bep3 tests (#1515)

* Update Ethermint to 1b17445 to fix duplicate proto registration

* Add custom status command to use snake_case and stdout

* Add SetInflation helper

* Reduce ambiguity with evm CanSignEthTx error

* Remove init genesis validator claim in test

* Add disabled evmante.NewMinGasPriceDecorator with x/feemarket note

* chore: use tagged versions for Cosmos and Ethermint forks

* update kvtool & increase wait for ibc transfer test

---------

Signed-off-by: drklee3 <derrick@dlee.dev>
Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
Co-authored-by: Robert Pirtle <astropirtle@gmail.com>
2023-04-03 20:08:45 -04:00

374 lines
13 KiB
Protocol Buffer

// Since: cosmos-sdk 0.46
syntax = "proto3";
package cosmos.group.v1;
option go_package = "github.com/cosmos/cosmos-sdk/x/group";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "google/protobuf/any.proto";
import "cosmos/group/v1/types.proto";
import "cosmos/msg/v1/msg.proto";
// Msg is the cosmos.group.v1 Msg service.
service Msg {
// CreateGroup creates a new group with an admin account address, a list of members and some optional metadata.
rpc CreateGroup(MsgCreateGroup) returns (MsgCreateGroupResponse);
// UpdateGroupMembers updates the group members with given group id and admin address.
rpc UpdateGroupMembers(MsgUpdateGroupMembers) returns (MsgUpdateGroupMembersResponse);
// UpdateGroupAdmin updates the group admin with given group id and previous admin address.
rpc UpdateGroupAdmin(MsgUpdateGroupAdmin) returns (MsgUpdateGroupAdminResponse);
// UpdateGroupMetadata updates the group metadata with given group id and admin address.
rpc UpdateGroupMetadata(MsgUpdateGroupMetadata) returns (MsgUpdateGroupMetadataResponse);
// CreateGroupPolicy creates a new group policy using given DecisionPolicy.
rpc CreateGroupPolicy(MsgCreateGroupPolicy) returns (MsgCreateGroupPolicyResponse);
// CreateGroupWithPolicy creates a new group with policy.
rpc CreateGroupWithPolicy(MsgCreateGroupWithPolicy) returns (MsgCreateGroupWithPolicyResponse);
// UpdateGroupPolicyAdmin updates a group policy admin.
rpc UpdateGroupPolicyAdmin(MsgUpdateGroupPolicyAdmin) returns (MsgUpdateGroupPolicyAdminResponse);
// UpdateGroupPolicyDecisionPolicy allows a group policy's decision policy to be updated.
rpc UpdateGroupPolicyDecisionPolicy(MsgUpdateGroupPolicyDecisionPolicy)
returns (MsgUpdateGroupPolicyDecisionPolicyResponse);
// UpdateGroupPolicyMetadata updates a group policy metadata.
rpc UpdateGroupPolicyMetadata(MsgUpdateGroupPolicyMetadata) returns (MsgUpdateGroupPolicyMetadataResponse);
// SubmitProposal submits a new proposal.
rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse);
// WithdrawProposal withdraws a proposal.
rpc WithdrawProposal(MsgWithdrawProposal) returns (MsgWithdrawProposalResponse);
// Vote allows a voter to vote on a proposal.
rpc Vote(MsgVote) returns (MsgVoteResponse);
// Exec executes a proposal.
rpc Exec(MsgExec) returns (MsgExecResponse);
// LeaveGroup allows a group member to leave the group.
rpc LeaveGroup(MsgLeaveGroup) returns (MsgLeaveGroupResponse);
}
//
// Groups
//
// MsgCreateGroup is the Msg/CreateGroup request type.
message MsgCreateGroup {
option (cosmos.msg.v1.signer) = "admin";
// admin is the account address of the group admin.
string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// members defines the group members.
repeated MemberRequest members = 2 [(gogoproto.nullable) = false];
// metadata is any arbitrary metadata to attached to the group.
string metadata = 3;
}
// MsgCreateGroupResponse is the Msg/CreateGroup response type.
message MsgCreateGroupResponse {
// group_id is the unique ID of the newly created group.
uint64 group_id = 1;
}
// MsgUpdateGroupMembers is the Msg/UpdateGroupMembers request type.
message MsgUpdateGroupMembers {
option (cosmos.msg.v1.signer) = "admin";
// admin is the account address of the group admin.
string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// group_id is the unique ID of the group.
uint64 group_id = 2;
// member_updates is the list of members to update,
// set weight to 0 to remove a member.
repeated MemberRequest member_updates = 3 [(gogoproto.nullable) = false];
}
// MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type.
message MsgUpdateGroupMembersResponse {}
// MsgUpdateGroupAdmin is the Msg/UpdateGroupAdmin request type.
message MsgUpdateGroupAdmin {
option (cosmos.msg.v1.signer) = "admin";
// admin is the current account address of the group admin.
string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// group_id is the unique ID of the group.
uint64 group_id = 2;
// new_admin is the group new admin account address.
string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type.
message MsgUpdateGroupAdminResponse {}
// MsgUpdateGroupMetadata is the Msg/UpdateGroupMetadata request type.
message MsgUpdateGroupMetadata {
option (cosmos.msg.v1.signer) = "admin";
// admin is the account address of the group admin.
string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// group_id is the unique ID of the group.
uint64 group_id = 2;
// metadata is the updated group's metadata.
string metadata = 3;
}
// MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response type.
message MsgUpdateGroupMetadataResponse {}
//
// Group Policies
//
// MsgCreateGroupPolicy is the Msg/CreateGroupPolicy request type.
message MsgCreateGroupPolicy {
option (cosmos.msg.v1.signer) = "admin";
option (gogoproto.goproto_getters) = false;
// admin is the account address of the group admin.
string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// group_id is the unique ID of the group.
uint64 group_id = 2;
// metadata is any arbitrary metadata attached to the group policy.
string metadata = 3;
// decision_policy specifies the group policy's decision policy.
google.protobuf.Any decision_policy = 4 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"];
}
// MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type.
message MsgCreateGroupPolicyResponse {
// address is the account address of the newly created group policy.
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// MsgUpdateGroupPolicyAdmin is the Msg/UpdateGroupPolicyAdmin request type.
message MsgUpdateGroupPolicyAdmin {
option (cosmos.msg.v1.signer) = "admin";
// admin is the account address of the group admin.
string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// group_policy_address is the account address of the group policy.
string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// new_admin is the new group policy admin.
string new_admin = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// MsgCreateGroupWithPolicy is the Msg/CreateGroupWithPolicy request type.
message MsgCreateGroupWithPolicy {
option (cosmos.msg.v1.signer) = "admin";
option (gogoproto.goproto_getters) = false;
// admin is the account address of the group and group policy admin.
string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// members defines the group members.
repeated MemberRequest members = 2 [(gogoproto.nullable) = false];
// group_metadata is any arbitrary metadata attached to the group.
string group_metadata = 3;
// group_policy_metadata is any arbitrary metadata attached to the group policy.
string group_policy_metadata = 4;
// group_policy_as_admin is a boolean field, if set to true, the group policy account address will be used as group
// and group policy admin.
bool group_policy_as_admin = 5;
// decision_policy specifies the group policy's decision policy.
google.protobuf.Any decision_policy = 6 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"];
}
// MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response type.
message MsgCreateGroupWithPolicyResponse {
// group_id is the unique ID of the newly created group with policy.
uint64 group_id = 1;
// group_policy_address is the account address of the newly created group policy.
string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin response type.
message MsgUpdateGroupPolicyAdminResponse {}
// MsgUpdateGroupPolicyDecisionPolicy is the Msg/UpdateGroupPolicyDecisionPolicy request type.
message MsgUpdateGroupPolicyDecisionPolicy {
option (cosmos.msg.v1.signer) = "admin";
option (gogoproto.goproto_getters) = false;
// admin is the account address of the group admin.
string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// group_policy_address is the account address of group policy.
string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// decision_policy is the updated group policy's decision policy.
google.protobuf.Any decision_policy = 3 [(cosmos_proto.accepts_interface) = "cosmos.group.v1.DecisionPolicy"];
}
// MsgUpdateGroupPolicyDecisionPolicyResponse is the Msg/UpdateGroupPolicyDecisionPolicy response type.
message MsgUpdateGroupPolicyDecisionPolicyResponse {}
// MsgUpdateGroupPolicyMetadata is the Msg/UpdateGroupPolicyMetadata request type.
message MsgUpdateGroupPolicyMetadata {
option (cosmos.msg.v1.signer) = "admin";
// admin is the account address of the group admin.
string admin = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// group_policy_address is the account address of group policy.
string group_policy_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// metadata is the updated group policy metadata.
string metadata = 3;
}
// MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata response type.
message MsgUpdateGroupPolicyMetadataResponse {}
//
// Proposals and Voting
//
// Exec defines modes of execution of a proposal on creation or on new vote.
enum Exec {
// An empty value means that there should be a separate
// MsgExec request for the proposal to execute.
EXEC_UNSPECIFIED = 0;
// Try to execute the proposal immediately.
// If the proposal is not allowed per the DecisionPolicy,
// the proposal will still be open and could
// be executed at a later point.
EXEC_TRY = 1;
}
// MsgSubmitProposal is the Msg/SubmitProposal request type.
message MsgSubmitProposal {
option (cosmos.msg.v1.signer) = "proposers";
option (gogoproto.goproto_getters) = false;
// group_policy_address is the account address of group policy.
string group_policy_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// proposers are the account addresses of the proposers.
// Proposers signatures will be counted as yes votes.
repeated string proposers = 2;
// metadata is any arbitrary metadata to attached to the proposal.
string metadata = 3;
// messages is a list of `sdk.Msg`s that will be executed if the proposal passes.
repeated google.protobuf.Any messages = 4;
// exec defines the mode of execution of the proposal,
// whether it should be executed immediately on creation or not.
// If so, proposers signatures are considered as Yes votes.
Exec exec = 5;
}
// MsgSubmitProposalResponse is the Msg/SubmitProposal response type.
message MsgSubmitProposalResponse {
// proposal is the unique ID of the proposal.
uint64 proposal_id = 1;
}
// MsgWithdrawProposal is the Msg/WithdrawProposal request type.
message MsgWithdrawProposal {
option (cosmos.msg.v1.signer) = "address";
// proposal is the unique ID of the proposal.
uint64 proposal_id = 1;
// address is the admin of the group policy or one of the proposer of the proposal.
string address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type.
message MsgWithdrawProposalResponse {}
// MsgVote is the Msg/Vote request type.
message MsgVote {
option (cosmos.msg.v1.signer) = "voter";
// proposal is the unique ID of the proposal.
uint64 proposal_id = 1;
// voter is the voter account address.
string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// option is the voter's choice on the proposal.
VoteOption option = 3;
// metadata is any arbitrary metadata to attached to the vote.
string metadata = 4;
// exec defines whether the proposal should be executed
// immediately after voting or not.
Exec exec = 5;
}
// MsgVoteResponse is the Msg/Vote response type.
message MsgVoteResponse {}
// MsgExec is the Msg/Exec request type.
message MsgExec {
option (cosmos.msg.v1.signer) = "signer";
// proposal is the unique ID of the proposal.
uint64 proposal_id = 1;
// executor is the account address used to execute the proposal.
string executor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
// MsgExecResponse is the Msg/Exec request type.
message MsgExecResponse {
// result is the final result of the proposal execution.
ProposalExecutorResult result = 2;
}
// MsgLeaveGroup is the Msg/LeaveGroup request type.
message MsgLeaveGroup {
option (cosmos.msg.v1.signer) = "address";
// address is the account address of the group member.
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// group_id is the unique ID of the group.
uint64 group_id = 2;
}
// MsgLeaveGroupResponse is the Msg/LeaveGroup response type.
message MsgLeaveGroupResponse {}