github.com/Finschia/finschia-sdk@v0.48.1/proto/lbm/foundation/v1/tx.proto (about)

     1  syntax = "proto3";
     2  package lbm.foundation.v1;
     3  
     4  import "gogoproto/gogo.proto";
     5  import "lbm/foundation/v1/foundation.proto";
     6  import "cosmos/base/v1beta1/coin.proto";
     7  
     8  import "google/protobuf/any.proto";
     9  import "cosmos_proto/cosmos.proto";
    10  
    11  option go_package = "github.com/Finschia/finschia-sdk/x/foundation";
    12  
    13  option (gogoproto.equal_all)           = false;
    14  option (gogoproto.goproto_getters_all) = false;
    15  
    16  // Msg defines the foundation Msg service.
    17  service Msg {
    18    // FundTreasury defines a method to fund the treasury.
    19    rpc FundTreasury(MsgFundTreasury) returns (MsgFundTreasuryResponse);
    20  
    21    // WithdrawFromTreasury defines a method to withdraw coins from the treasury.
    22    rpc WithdrawFromTreasury(MsgWithdrawFromTreasury) returns (MsgWithdrawFromTreasuryResponse);
    23  
    24    // UpdateMembers updates the foundation members.
    25    rpc UpdateMembers(MsgUpdateMembers) returns (MsgUpdateMembersResponse);
    26  
    27    // UpdateDecisionPolicy allows a group policy's decision policy to be updated.
    28    rpc UpdateDecisionPolicy(MsgUpdateDecisionPolicy) returns (MsgUpdateDecisionPolicyResponse);
    29  
    30    // SubmitProposal submits a new proposal.
    31    rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse);
    32  
    33    // WithdrawProposal aborts a proposal.
    34    rpc WithdrawProposal(MsgWithdrawProposal) returns (MsgWithdrawProposalResponse);
    35  
    36    // Vote allows a voter to vote on a proposal.
    37    rpc Vote(MsgVote) returns (MsgVoteResponse);
    38  
    39    // Exec executes a proposal.
    40    rpc Exec(MsgExec) returns (MsgExecResponse);
    41  
    42    // LeaveFoundation allows a member to leave the foundation.
    43    rpc LeaveFoundation(MsgLeaveFoundation) returns (MsgLeaveFoundationResponse);
    44  
    45    // UpdateCensorship updates censorship information.
    46    rpc UpdateCensorship(MsgUpdateCensorship) returns (MsgUpdateCensorshipResponse);
    47  
    48    // Grant grants the provided authorization to the grantee with authority of
    49    // the foundation. If there is already a grant for the given
    50    // (grantee, Authorization) tuple, then the grant will be overwritten.
    51    rpc Grant(MsgGrant) returns (MsgGrantResponse);
    52  
    53    // Revoke revokes any authorization corresponding to the provided method name
    54    // that has been granted to the grantee.
    55    rpc Revoke(MsgRevoke) returns (MsgRevokeResponse);
    56  }
    57  
    58  // MsgFundTreasury is the Msg/FundTreasury request type.
    59  message MsgFundTreasury {
    60    string   from                            = 1;
    61    repeated cosmos.base.v1beta1.Coin amount = 2
    62        [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coins"];
    63  }
    64  
    65  // MsgFundTreasuryResponse is the Msg/FundTreasury response type.
    66  message MsgFundTreasuryResponse {}
    67  
    68  // MsgWithdrawFromTreasury is the Msg/WithdrawFromTreasury request type.
    69  message MsgWithdrawFromTreasury {
    70    // authority is the address of the privileged account.
    71    string   authority                       = 1;
    72    string   to                              = 2;
    73    repeated cosmos.base.v1beta1.Coin amount = 3
    74        [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/Finschia/finschia-sdk/types.Coins"];
    75  }
    76  
    77  // MsgUpdateParams is the Msg/UpdateParams request type.
    78  // NOTE: This is not for tx
    79  message MsgUpdateParams {
    80    // authority is the address of the privileged account.
    81    string authority = 1;
    82  
    83    // params defines the x/foundation parameters to update.
    84    //
    85    // NOTE: All parameters must be supplied.
    86    Params params = 2 [(gogoproto.nullable) = false];
    87  }
    88  
    89  // MsgUpdateParamsResponse is the Msg/UpdateParams response type.
    90  // NOTE: This is not for tx
    91  message MsgUpdateParamsResponse {}
    92  
    93  // MsgWithdrawFromTreasuryResponse is the Msg/WithdrawFromTreasury response type.
    94  message MsgWithdrawFromTreasuryResponse {}
    95  
    96  // MsgUpdateMembers is the Msg/UpdateMembers request type.
    97  message MsgUpdateMembers {
    98    // authority is the address of the privileged account.
    99    string authority = 1;
   100  
   101    // member_updates is the list of members to update,
   102    // set remove to true to remove a member.
   103    repeated MemberRequest member_updates = 2 [(gogoproto.nullable) = false];
   104  }
   105  
   106  // MsgUpdateMembersResponse is the Msg/UpdateMembers response type.
   107  message MsgUpdateMembersResponse {}
   108  
   109  // MsgUpdateDecisionPolicy is the Msg/UpdateDecisionPolicy request type.
   110  message MsgUpdateDecisionPolicy {
   111    // authority is the address of the privileged account.
   112    string authority = 1;
   113  
   114    // decision_policy is the updated decision policy.
   115    google.protobuf.Any decision_policy = 2 [(cosmos_proto.accepts_interface) = "DecisionPolicy"];
   116  }
   117  
   118  // MsgUpdateDecisionPolicyResponse is the Msg/UpdateDecisionPolicy response type.
   119  message MsgUpdateDecisionPolicyResponse {}
   120  
   121  // Exec defines modes of execution of a proposal on creation or on new vote.
   122  enum Exec {
   123    // An empty value means that there should be a separate
   124    // MsgExec request for the proposal to execute.
   125    EXEC_UNSPECIFIED = 0;
   126  
   127    // Try to execute the proposal immediately.
   128    // If the proposal is not allowed per the DecisionPolicy,
   129    // the proposal will still be open and could
   130    // be executed at a later point.
   131    EXEC_TRY = 1;
   132  }
   133  
   134  // MsgSubmitProposal is the Msg/SubmitProposal request type.
   135  message MsgSubmitProposal {
   136    // proposers are the account addresses of the proposers.
   137    // Proposers signatures will be counted as yes votes.
   138    repeated string proposers = 1;
   139  
   140    // metadata is any arbitrary metadata to attached to the proposal.
   141    string metadata = 2;
   142  
   143    // messages is a list of `sdk.Msg`s that will be executed if the proposal passes.
   144    repeated google.protobuf.Any messages = 3;
   145  
   146    // exec defines the mode of execution of the proposal,
   147    // whether it should be executed immediately on creation or not.
   148    // If so, proposers signatures are considered as Yes votes.
   149    Exec exec = 4;
   150  }
   151  
   152  // MsgSubmitProposalResponse is the Msg/SubmitProposal response type.
   153  message MsgSubmitProposalResponse {
   154    // proposal is the unique ID of the proposal.
   155    uint64 proposal_id = 1;
   156  }
   157  
   158  // MsgWithdrawProposal is the Msg/WithdrawProposal request type.
   159  message MsgWithdrawProposal {
   160    // proposal is the unique ID of the proposal.
   161    uint64 proposal_id = 1;
   162  
   163    // address of one of the proposer of the proposal.
   164    string address = 2;
   165  }
   166  
   167  // MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type.
   168  message MsgWithdrawProposalResponse {}
   169  
   170  // MsgVote is the Msg/Vote request type.
   171  message MsgVote {
   172    // proposal is the unique ID of the proposal.
   173    uint64 proposal_id = 1;
   174  
   175    // voter is the voter account address.
   176    string voter = 2;
   177  
   178    // option is the voter's choice on the proposal.
   179    VoteOption option = 3;
   180  
   181    // metadata is any arbitrary metadata to attached to the vote.
   182    string metadata = 4;
   183  
   184    // exec defines whether the proposal should be executed
   185    // immediately after voting or not.
   186    Exec exec = 5;
   187  }
   188  
   189  // MsgVoteResponse is the Msg/Vote response type.
   190  message MsgVoteResponse {}
   191  
   192  // MsgExec is the Msg/Exec request type.
   193  message MsgExec {
   194    // proposal is the unique ID of the proposal.
   195    uint64 proposal_id = 1;
   196  
   197    // signer is the account address used to execute the proposal.
   198    string signer = 2;
   199  }
   200  
   201  // MsgExecResponse is the Msg/Exec request type.
   202  message MsgExecResponse {}
   203  
   204  // MsgLeaveFoundation is the Msg/LeaveFoundation request type.
   205  message MsgLeaveFoundation {
   206    // address is the account address of the foundation member.
   207    string address = 1;
   208  }
   209  
   210  // MsgLeaveFoundationResponse is the Msg/LeaveFoundation response type.
   211  message MsgLeaveFoundationResponse {}
   212  
   213  // MsgUpdateCensorship is the Msg/UpdateCensorship request type.
   214  message MsgUpdateCensorship {
   215    // authority over the target censorship.
   216    string authority = 1;
   217  
   218    // new censorship information
   219    Censorship censorship = 2 [(gogoproto.nullable) = false];
   220  }
   221  
   222  // MsgUpdateCensorshipResponse is the Msg/UpdateCensorship response type.
   223  message MsgUpdateCensorshipResponse {}
   224  
   225  // MsgGrant is the Msg/Grant request type.
   226  // on behalf of the foundation.
   227  message MsgGrant {
   228    // authority is the address of the privileged account.
   229    string authority = 1;
   230    string grantee   = 2;
   231  
   232    google.protobuf.Any authorization = 3
   233        [(cosmos_proto.accepts_interface) = "github.com/Finschia/finschia-sdk/x/foundation.Authorization"];
   234  }
   235  
   236  // MsgGrantResponse is the Msg/MsgGrant response type.
   237  message MsgGrantResponse {}
   238  
   239  // MsgRevoke is the Msg/Revoke request type.
   240  message MsgRevoke {
   241    // authority is the address of the privileged account.
   242    string authority    = 1;
   243    string grantee      = 2;
   244    string msg_type_url = 3;
   245  }
   246  
   247  // MsgRevokeResponse is the Msg/MsgRevokeResponse response type.
   248  message MsgRevokeResponse {}