Lorenz Herzberger 94830df5fc
184 implement staged claim (#190)
* adjust issuePoPRewards to mint stagedCRDDL
* add GetChallengeRange
* add resolveStagedClaims on ReissueRDDLResult msg
* move claim resolve to distribution result
* add StagedDenom and ClaimDenom to config
* added the prepare4linting.sh script
* renamed PoPEpochs to PopEpochs
* renamed DistributionAddressPoP to DistributionAddressPop
* added config value ReIssuanceEpochs
* detached the re-issuance from the distribution process and schedule them independently
* changed logging messages
* added an explicit util/kv_serialize.go file to have all KV serialization done
* switched to Bigendian serialization of int64 to have the ordered list on the kvstore
* added ComputeReIssuanceValue to enable re-issuances once a day or defined by ReIssuanceEpoch
* integrated a ReIssuanceValue computation test case
* adjusted the challenges test cases to be epoch-dependent
* added ReIssuances per ReIssuanceEpoch
* extended the Reissue message
* checking ReIssuanceProposal in the ante handler
* added precision setter for the UINT to RDDL token converter (and test cases)
* add e2e test case for pop rewards


Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
Co-authored-by: Jürgen Eckel <juergen@riddleandcode.com>
2023-12-05 10:51:06 +01:00

102 lines
2.9 KiB
Protocol Buffer

syntax = "proto3";
package planetmintgo.dao;
import "planetmintgo/dao/challenge.proto";
import "planetmintgo/dao/mint_request.proto";
import "planetmintgo/dao/distribution_order.proto";
import "planetmintgo/dao/params.proto";
import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1/msg.proto";
option go_package = "github.com/planetmint/planetmint-go/x/dao/types";
// Msg defines the Msg service.
service Msg {
rpc ReissueRDDLProposal (MsgReissueRDDLProposal) returns (MsgReissueRDDLProposalResponse);
rpc MintToken (MsgMintToken ) returns (MsgMintTokenResponse );
rpc ReissueRDDLResult (MsgReissueRDDLResult ) returns (MsgReissueRDDLResultResponse );
rpc DistributionResult (MsgDistributionResult ) returns (MsgDistributionResultResponse );
rpc DistributionRequest (MsgDistributionRequest) returns (MsgDistributionRequestResponse);
rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse );
rpc ReportPopResult (MsgReportPopResult ) returns (MsgReportPopResultResponse );
rpc InitPop (MsgInitPop ) returns (MsgInitPopResponse );
}
message MsgReportPopResult {
string creator = 1;
Challenge challenge = 2;
}
message MsgReportPopResultResponse {}
message MsgReissueRDDLProposal {
string creator = 1;
string proposer = 2;
string tx = 3;
int64 blockHeight = 4;
int64 firstIncludedPop = 5;
int64 lastIncludedPop = 6;
}
message MsgReissueRDDLProposalResponse {}
message MsgMintToken {
string creator = 1;
MintRequest mintRequest = 2;
}
message MsgMintTokenResponse {}
message MsgReissueRDDLResult {
string creator = 1;
string proposer = 2;
string txID = 3;
int64 blockHeight = 4;
}
message MsgReissueRDDLResultResponse {}
message MsgDistributionResult {
string creator = 1;
int64 lastPop = 2;
string daoTxID = 3;
string investorTxID = 4;
string popTxID = 5;
}
message MsgDistributionResultResponse {}
message MsgDistributionRequest {
string creator = 1;
DistributionOrder distribution = 2;
}
message MsgDistributionRequestResponse {}
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
// 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/dao parameters to update.
// NOTE: All parameters must be supplied.
Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
}
message MsgUpdateParamsResponse {}
message MsgInitPop {
string creator = 1;
string initiator = 2;
string challenger = 3;
string challengee = 4;
int64 height = 5;
}
message MsgInitPopResponse {}